JSP2 Expression Language
I read tutorials at courses.coreservlets.com (it is on a PDF file so I
cannot directly link the exact part of the topic). On JSP2 Expression
Language topic, the author shows comparison between JSP1.2 and JSP2
On JSP1.2
<BODY>
<jsp:useBean id="randomNum"
type="coreservlets.NumberBean"
scope="request" />
<H2>Random Number:
<jsp:getProperty name="randomNum"
property="number" />
</H2>
</BODY></HTML>
On JSP2
<BODY>
<H2>Random Number:
${randomNum.number}
</H2>
</BODY></HTML>
randomNum is just a variable name of NumberBean class right? On jsp1.2 it
shows, but on JSP2 its just a one line.
My question is on jsp2 how will server know that randomNum is NumberBean
because I did not see any part of the code that will tell that randomNum
is NumberBean?
I hope I made question clear.
Thanks..
No comments:
Post a Comment