You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "E.M. van Nuil" <nu...@oblivion.nl> on 2002/08/05 17:27:50 UTC
problem: lifetime of sessionobject
Hello,
Posted a week ago also, but no response and I haven't been able to figure it
out myself.
I'm working on my first servlet application and everything went o.k. until
recently I get the following error :
javax.servlet.jsp.JspException: Cannot find bean products in scope null
at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:692)
at
org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:302)
at
_pages._frontend._department__jsp._jspService(/shop/pages/frontend/department.jsp:21)
at com.caucho.jsp.JavaPage.service(JavaPage.java:75)
at com.caucho.jsp.Page.subservice(Page.java:486)
at
com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:182)
at com.caucho.server.http.Invocation.service(Invocation.java:311)
at
com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
at
com.caucho.server.http.QRequestDispatcher.forward(QRequestDispatcher.java:213)
at
com.caucho.server.http.QRequestDispatcher.forward(QRequestDispatcher.java:100)
at
com.caucho.server.http.QRequestDispatcher.forward(QRequestDispatcher.java:77)
at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:972)
at
org.apache.struts.action.RequestProcessor.processActionForward(RequestProcessor.java:408)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:269)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:452)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:126)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
at
com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
at com.caucho.server.http.Invocation.service(Invocation.java:311)
at
com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
at
com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:218)
at
com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:160)
at com.caucho.server.TcpConnection.run(TcpConnection.java:137)
at java.lang.Thread.run(Thread.java:536)
But this page is working alright after I start the server. I can work the
whole day with the application, but the next morning I get this error.
I've tried it with resin 2.1.1, 2.1.2 and 2.1.3 and tomcat 4.0.4. Also with
struts 1.1.b1 and daily snapshot, but always the same.
Can anybody give me a little help ?
This is the code from the jsp file:
<logic:iterate id="element" name="products"
type="nl.linuxonline.shop.product.ProductBean" scope="request">
And this is the struts action:
public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
HttpSession session = request.getSession(true);
ActionErrors errors = new ActionErrors();
MessageResources messages = getResources(request);
DataSource dataSource = null;
Connection myConn = null;
ProductJdbcBean proddb = new ProductJdbcBean();
String did = request.getParameter("did");
try {
dataSource = (DataSource)
servlet.getServletContext().getAttribute("shopdb");
myConn = dataSource.getConnection();
Vector MyProducts=proddb.getMyProducts(myConn,did);
ServletContext context = getServlet().getServletContext();
context.log("DID:"+did+"Aantal:"+MyProducts.size());
request.setAttribute("products",MyProducts);
} catch (SQLException sqle) {} finally {
try {
if (myConn !=null)
myConn.close();
} catch (SQLException e) {
System.out.println("Oooops:" + e);
}
}
request.setAttribute("did",did);
return mapping.findForward("forward");
}
}
Regards,
Edwin
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Configuration of tyrex on Tomcat 4.0.4
Posted by "Sudhir S. Shetty" <ss...@powershare.net>.
> Hi Friends,
> I know Im Off topic, but i desperately need your help,
> I have a struts application in which the database is oracle 8.1.7, I need
to
> implement transactions, My server is Tomcat 4.0.4
> I need to know how to configure tomcat with tyrex , an example
configuration
> file (domain) for oracle would be appreciated.
> I would also like to know what changes are to be made in the server.xml
and
> web.xml, and how to instantiate the transaction in code.
> I have already implemented the Connection pool independent of tyrex.
> A quick reply would be highly appreciated.
> Sorry once again to be off topic
> TIA,
> Sudhir
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Configuration of tyrex on Tomcat 4.0.4
Posted by "Sudhir S. Shetty" <ss...@powershare.net>.
Hi Friends,
I know Im Off topic, but i desperately need your help,
I have a struts application in which the database is oracle 8.1.7, I need to
implement transactions, My server is Tomcat 4.0.4
I need to know how to configure tomcat with tyrex , an example configuration
file (domain) for oracle would be appreciated.
I would also like to know what changes are to be made in the server.xml and
web.xml, and how to instantiate the transaction in code.
I have already implemented the Connection pool independent of tyrex.
A quick reply would be highly appreciated.
Sorry once again to be off topic
TIA,
Sudhir
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>