• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

HttpServletRequest confusing methods

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1) What are these methods for in HttpServletRequest interface?
these are very confusing in the API descriptions..

getPathInfo
getPathTranslated
getServerName
getServletPath
getRequestURI


2)When will the syntactic correctness of associated Tag files happen in a JSP ?
Will it happen During Page translation ?

3)Order of events during Web application start up?
Initialize Servlets with Load on Start Up
Initialize Filters
Initialize Listeners
ContextInitialized method is called on Listeners implementing ServletContextListener interface
[ June 05, 2007: Message edited by: Rav Kumar ]
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1) PATH_INFO is kinda weird and rarely seen in J2EE. It is more common in CGI, and even still not all that common.

I took the URL of this thread and inserted a path info in bold:
http://www.javaranch.com/this/1/is/anexample?ubb=get_topic&f=18&t=011409

The other methods you are asking about should be fairly straight-forward by the API if you read the API's full description.

2) Well, mostly translation time. There's also the chance that the page simply won't recognize your tag and it will get passed along with your HTML and your browser probably will ignore it because it won't recognize the tag either. This can be frustrating when debugging because you have to view the HTML source from your browser to see that the tag was ignored at translation time.

3) Not sure if this ordering is guaranteed by the spec. If this ordering becomes a concern in your application, that should become a red flag that you are doing something wrong.
 
Eliminate 95% of the weeds in your lawn by mowing 3 inches or higher. Then plant tiny ads:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic