• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
Ranch Hand
Posts: 686
Mac
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What if it shows
"http://server/app/servlet/MyServlet".

I don't see any harm in that.
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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>
 
Ranch Hand
Posts: 472
Objective C Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It was discussed here
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic