A
A
Alexander2015-01-31 16:14:31
Java
Alexander, 2015-01-31 16:14:31

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

1 answer(s)
N
Nikolai, 2015-01-31
@Gribodemon1991

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 question

Ask a Question

731 491 924 answers to any question