----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files. Don't make us guess your problem!!!
----------------------------------------------------------------
Hi,
I am currently using Websphere and our architecture involves :
a) creating Beans in our servlets
b) calling JSP's from these servlets which use these beans.
Since we were using JSDK2.0 and JSP 0.92, we did this using the following
way:
a) ((com.sun.server.http.HttpServiceRequest)
req).setAttribute("results", result);
b)((com.sun.server.http.HttpServiceResponse)
resp).callPage("test.jsp", req);
where result is an instance of a bean, and req is an instance of
HttpServletRequest
Now we use apache_1.3.12, ApacheJServ-1.1.2 and gnujsp-1.0.0. I am unable to
do the same with this setup, as with JSP1.0 the callPage method has been
removed. SO I tried the following (which is very similar to the way JSP's
are called using JSDK2.2 and JSP1.1)
a)((org.gjt.jsp.jsdk20.HttpServletRequestWrapper)
req).setAttribute("result", result);
b) RequestDispatcher dispatcher =
((org.gjt.jsp.jsdk20.ServletContextWrapper) getServletContext
()).getRequestDispatcher("test.jsp");
dispatcher.forward(req, resp);
where result is an instance of a bean, and req is an instance of
HttpServletRequest.
This compiles okay, however I find that when I access the URl which invokes
this servlet, I get a classcast exception for both the lines.
Is this method okay?? Or is there any obvious alternative that I am missing.
Thanx,
Ajay
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search Archives:
<http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]