Answer the question
In order to leave comments, you need to log in
Why doesn't it return anything?
this code:
public ModelAndView demo(@PathVariable String paginationNum,HttpServletRequest request) {
...
...
model.addObject("demoPoint", request.getContextPath().);
....
}
on the local server it returns the path I need, but on the server it doesn't return the path!
but returns an empty string!
Can someone explain to me why??)
Linux server.
Answer the question
In order to leave comments, you need to log in
Maybe your app is deployed on the server in the root context? That is, available (for example) at server.com? And on localhost:8080/myapp.
In this case:
>> For servlets in the default (root) context, this method returns "".
What do you generally want to do?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question