You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Debora Desideri <de...@eng.it> on 2005/11/08 15:24:36 UTC

BUGS ?? - jsp: implicit object pageContext not AVAILABLE in scriptlet

I'm working with tomcat version 5.0 and I've written a tag file using scriplet inside.
But the implicit object pageContext can be used within the expression language and NOT  into the scriptlet.
It works if I use use the implicit object jspContext instead of pageContext.

Anyway if I substitute the jasper library with an older one I can use pageContext everywhere and it works fine!

In the new version of tomcat the method doTag() of the tag java class produced by jasper library is the following:

public void doTag() throws JspException, java.io.IOException {
    PageContext _jspx_page_context = (PageContext)jspContext;
    HttpServletRequest request = (HttpServletRequest) _jspx_page_context.getRequest();
    HttpServletResponse response = (HttpServletResponse)  _jspx_page_context.getResponse();
    HttpSession session = _jspx_page_context.getSession();
    ServletContext application = _jspx_page_context.getServletContext();
    ServletConfig config = _jspx_page_context.getServletConfig();
    .....

}
  
You can noticed that the _jspx_page_context variable should be called pageContext as in the old version.

Can anyone tell me if it is a bug or a voluntary choice?

Thanks