Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

from a JSP, how can I find out which servlet is used to "forward" to this JSP page ?  RSS feed

 
Artemesia Lakener
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a "MyServlet" that forwards to "my.jsp". The URL looks like "http://server/app/servlet/MyServlet" (use POST method) and the content are all about "my.jsp", of course the servlet pass lot of information to the JSP.

Now, in "my.jsp" can I retrieve out the "MyServlet" syntax in any way ? None of the common HttpServletRequest methods like "getRequestURL", "getContextPath" works in this case.

How can I get that ?
 
Jignesh Patel
Ranch Hand
Posts: 626
Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What if it shows
"http://server/app/servlet/MyServlet".

I don't see any harm in that.
 
te zhang
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
each servlet must be configued in the configuration file, which is beneath the WEB-INF package, the web.xml, in the web.xml
the servlet will be found. there are two place to find the servlet
<servlet></servlet>
<servlet-mapping></servlet-mapping>
 
D Rog
Ranch Hand
Posts: 472
Linux Objective C Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It was discussed here
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!