I deployed my servlet under /servletname. the forms in the jsp pages have their action to be "servletname/tag". when page A submits a form and control is returned back to page A using: RequestDispatcher dis = req.getRequestDispatcher("/pageA.jsp"); dis.forward(req, resp); the page is displayed but the url in the browser appears as: '/servletname/servletname/tag' submit the page again a third time and you get: '/servletname/servletname/servletname/tag'. This goes on and on with the /servletname appearing in the url as many times as you submit the form. what is going on? how do i solve this problem so that the url is: '/servletname/tag'? [ April 11, 2002: Message edited by: tom walters ] [ April 11, 2002: Message edited by: tom walters ]
Joined: Feb 14, 2002
solved it. the action in the forms was 'servletname/tag' instead of '/servletname/tag'. when i changed the form action to '/servletname/tag' the problem went away.
subject: RequestDispatcher repeating /servletname problem