Hi folks,
I have searched the forum but didn't get the answer to the following problem:
Here is a piece of a jsp of mine:
<jsp:useBean id="Beer" type="demo.model.Beer">
<jsp:setProperty name="Beer" property="BeerName" value="Jupiler"/>
</jsp:useBean>
So far i get it , but when i look at the translated servlet, i get this:
getServletContext().setAttribute("Beer",new Beer("Leffe"));
demo.model.Beer Beer = null;
synchronized (_jspx_page_context) {
Beer = (demo.model.Beer) _jspx_page_context.getAttribute("Beer", PageContext.PAGE_SCOPE);
if (Beer == null){
throw new java.lang.InstantiationException("bean Beer not found within scope");
}
}
Shouldn't the if be translated into setAttribute stuff ?
I'm using Tomcat 6.0 with Jasper on Windows xp.
I have searched the forum but didn't get the answer to the following problem:
Here is a piece of a jsp of mine:
<jsp:useBean id="Beer" type="demo.model.Beer">
<jsp:setProperty name="Beer" property="BeerName" value="Jupiler"/>
</jsp:useBean>
So far i get it , but when i look at the translated servlet, i get this:
getServletContext().setAttribute("Beer",new Beer("Leffe"));
demo.model.Beer Beer = null;
synchronized (_jspx_page_context) {
Beer = (demo.model.Beer) _jspx_page_context.getAttribute("Beer", PageContext.PAGE_SCOPE);
if (Beer == null){
throw new java.lang.InstantiationException("bean Beer not found within scope");
}
}
Shouldn't the if be translated into setAttribute stuff ?
I'm using Tomcat 6.0 with Jasper on Windows xp.