1

I'm facing issue in CSS loading when used with Spring .Please find below code.

@RequestMapping(value = "/view/{id}" , method = RequestMethod.GET)
    public ModelAndView viewStudentById(@PathVariable("id") int id) {
        ModelAndView model = new ModelAndView("viewStudent");
        model.addObject("studentdata",this.studentService.findStudentById(id));
        return model;
    }

But with value = "/view" CSS of "viewStudent" jsp page is Loaded.Can anyone help me fix this issue ? Why I'm not able to load CSS with (value = "/view/{id}" ?

1 Answer 1

2

I fixed this issue by below code.

I was missing / in href .

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.