This week's book giveaway is in the
Agile and other Processes
forum.
We're giving away four copies of
The Mikado Method
and have Ola Ellnestam and Daniel Brolund on-line!
See
this thread
for details.
A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Java
»
Servlets
Author
getRequestURL on a JSP forwarded from Servlet
M Rama
Ranch Hand
Joined: Mar 04, 2005
Posts: 88
posted
Sep 14, 2005 09:40:00
0
I have the following
Servlet
get method:
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { RequestDispatcher view = this.getServletContext().getRequestDispatcher("/main.jsp"); view.forward(req,resp); }
in the main.jsp i do the following:
getRequestURL()=<%=request.getRequestURL()%><br>
in one websphere server i get the servlet name (
http://hostname/App/TRO.do
) and in the other one the jsp name (
http://hostname/App/main.jsp
)printed on the page. The url is similar in both which is (
http://hostname/App/TRO.do
)
i deployed then same EAR to both the servers. why is this behaving this way?
Thanks
I agree. Here's the link:
http://aspose.com/file-tools
subject: getRequestURL on a JSP forwarded from Servlet
Similar Threads
writing web.xml
404 error redirecting
Calling controller servlet form a jsp page through an anchor tag
href path changes in jsp on redirecting the servlet to that jsp
Help .... again .... please
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter