Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Help on Petstore JSP  RSS feed

Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
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
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.

Han Ming
Lasagna is spaghetti flvored cake. Just like this tiny ad:
ScroogeXHTML 7.2 - RTF to HTML5 / XHTML converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!