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