Reputation: 21096
I run my app from Eclipse's Servers view. Currently urls that are shown to the user look like:
http://localhost:8082/EclipseProjectName/path
I haven't specified this EclipseProjectName anywhere in my files but it's present there.
Currently when I invoke response.sendRedirect("/path")
, then user is redirected not to http://localhost:8082/EclipseProjectName/path
, but to http://localhost:8082/path
How do I solve that problem?
Upvotes: 1
Views: 2247
Reputation: 21096
You should redirect to response.sendRedirect(request.getContextPath() + "/path");
But I don't know whether it's a correct way to do it
Upvotes: 2