• 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

Help on Petstore JSP

 
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I'm pretty new to JSP and would need some advice and explanation on how the JSP in the PetStore is constructed.
I'm reading the jsp code for PetStore 1.0.1 (as the 1st Edition of Blueprint is based on this)
I understand that template.jsp uses ScreenDefinition.jsp (and ScreenDefinitions in turns make use of CreateTemplate, Screen and Parameter) to return the the parameter defined in template.jsp to create the page base on the url send in.
e.g.
an URL of "/main"
ScreenDefinitions generate the following parameter for template
parameter="HtmlTitle" value="Welcome to Pet Store"
parameter="HtmlBanner" value="/banner.jsp"
parameter="HtmlBody" value="/index.jsp"
parameter="HtmlFooter" value="/footer.jsp"
parameter="Annotation" value="/estore/annotation/ann_overview_j2ee.jsp"
Thus, template.jsp will create a page that has the above parameter set.
I understand that if I supplied a context url of "/main" to template.jsp, then how the proper html page is produced.
But my question is :-
When I type in a url of
http://localhost:8000/control/main
How is that the url lead to the loading of template.jsp
I'm sorry if you need to explain some of the basic stuff as I'm rather not familiar with JSP.
Thanks in advance for your reply.
Cheers.

Han Ming
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic