tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven.S...@savillemail.com
Subject RE: AW: Tomcat error during JSP compilation.
Date Mon, 07 Aug 2000 02:29:56 GMT


Bill,

Now that I see why you want to forward to the error page - you actually don't
want to create a bean, only get one.
Just having

<jsp:useBean id="sessionObject" scope="session"
type="mbdd.session.MBDDSessionObject"/>

is fine. The bean won't be instantiated unless you specify a "class" or
"beanName" attribute. Instead you will get a InstantiationException which will
cause you error page to be displayed.

Steve.





william.s.holmes.iii@lmco.com on 04/08/2000 23:22:10

Please respond to tomcat-user@jakarta.apache.org
                                                              
                                                              
                                                              
 To:      tomcat-user@jakarta.apache.org                      
                                                              
 cc:      (bcc: Steven Shaw/Net)                              
                                                              
                                                              
                                                              
 Subject: RE: AW: Tomcat error during JSP compilation.        
                                                              







Steve:
Actually, I don't have the forward there in case an exception is thrown. I
have it there for if the <useBean/> has to instantiate a new sessionBean.
In the case of the page I cut this from, I don't want execution to continue
unless a sessionBean object exists and has been populated by a previous
page.
Is there a more elegant way to accomplish this?

Emanuel:
In response to your question,  I've been using DBConnectionBroker from
http://javaexcange.com/. I'm only working on a prototype system so I'm not
sure what kind of performance to expect from DBConnectionBroker in a
real-world implementation.

Emanuel
> -----Original Message-----
> From:   Steven.Shaw@savillemail.com [SMTP:Steven.Shaw@savillemail.com]
> Sent:   Friday, August 04, 2000 3:31 AM
> To:     tomcat-user@jakarta.apache.org
> Subject:     Re: AW: Tomcat error during JSP compilation.
>
>
>
> It should be ok to have <jsp:useBean ...>   </jsp:useBean>. However, Bill
> is
> confused about what goes in between the tags though. When an error occurs
> an
> exception is thrown. When everything is ok the stuff between the tags is
> processed - there are sometimes <jsp:setProperty ... /> tags...
>
>
>
>
>
> S.Zeeh@spmv.de on 04/08/2000 17:25:19
>
> Please respond to tomcat-user@jakarta.apache.org
>
>
>
>  To:      tomcat-user@jakarta.apache.org
>
>  cc:      (bcc: Steven Shaw/Net)
>
>
>
>  Subject: AW: Tomcat error during JSP compilation.
>
>
>
>
>
>
>
>
> Hi,
>
> why do you close the useBean tag after the forward tag?
>
> I would close the useBean tag like this:
>
> <jsp:useBean id="sessionObject" scope="session"
> type="mbdd.session.MBDDSessionObject" />
>
>
> I hope I am right,
>
> Stephan
>
>
> <jsp:useBean id="sessionObject" scope="session"
> >              type="mbdd.session.MBDDSessionObject">
> > <!-- bean hasn't been found ... redirect to error -->
> > <jsp:forward page="error.html"/>
> > </jsp:usebean>
> >
> > The sessionObject is being stored in the action class using
> > the following:
> > session.setAttribute(jawa.Constants.sessionObject,sessionObject);
> >
> >
> > Any ideas?  I'd rather not have to use a scriptlet i.e.:
> > <% MBDDSessionObject sessionObject =
> >   (MBDDSessionObject) session.getAttribute("sessionObject"); %>
> >
> > Thanks,
> >   Bill
> >
> > > Hi all,
> > >
> > > Can someone please help me with this?
> > > I'm getting the following error thrown from Tomcat v3.1.
> > > It seems to be occurring during compilation of a JSP after
> > my model 2
> > > action
> > > class forwards the request.
> > >
> > > <ERROR>
> > >
> > > Unhandled error! You might want to consider having an error
> > page to report
> > > such
> > > errors more gracefully
> > > java.lang.Error: Fatal Error: missing resource:
> > > java.util.PropertyResourceBundle
> > >
> > >         at org.apache.jasper.Constants.getString(Constants.java:206)
> > >         at org.apache.jasper.Constants.getString(Constants.java:189)
> > >         at
> > org.apache.jasper.compiler.Parser$Bean.accept(Parser.java:627)
> > >         at org.apache.jasper.compiler.Parser.parse(Parser.java:1073)
> > >         at org.apache.jasper.compiler.Parser.parse(Parser.java:1038)
> > >         at org.apache.jasper.compiler.Parser.parse(Parser.java:1034)
> > >         at
> > org.apache.jasper.compiler.Compiler.compile(Compiler.java:182)
> > >         at
> > > org.apache.jasper.runtime.JspServlet.loadJSP(JspServlet.java:413)
> > >         at
> > >
> > org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfN
> > ecessary(Jsp
> > > Se
> > > rvlet.java:149)
> > >         at
> > >
> > org.apache.jasper.runtime.JspServlet$JspServletWrapper.service
> > (JspServlet.
> > > ja
> > > va:161)
> > >         at
> > >
> > org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet
> > .java:261)
> > >         at
> > > org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
> > >         at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > >         at
> > >
> > org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWra
> > pper.java:50
> > > 3)
> > >         at
> > >
> > org.apache.tomcat.core.RequestDispatcherImpl.forward(RequestDi
> > spatcherImpl
> > > .j
> > > ava:163)
> > >         at
> > mbdd.action.SelectDocument.perform(SelectDocument.java:161)
> > >         at
> > > jawa.controller.ControllerServlet.doPost(ControllerServlet.java:114)
> > >         at
> > > jawa.controller.ControllerServlet.doGet(ControllerServlet.java:95)
> > >         at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> > >         at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > >         at
> > >
> > org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWra
> > pper.java:50
> > > 3)
> > >         at
> > >
> > org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
> > >         at
> > >
> > org.apache.tomcat.service.http.HttpConnectionHandler.processCo
> > nnection(Htt
> > > pC
> > > onnectionHandler.java:160)
> > >         at
> > >
> > org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEnd
> > point.java:3
> > > 38
> > > )
> > >         at java.lang.Thread.run(Unknown Source)
> > >
> > > </ERROR>
> > >
> > > Thanks,
> > > Bill
> > >
> >
>  << File: Internet HTML >>




Mime
View raw message