If you take a look at the generated java file:

        <blah>/jsm-default/services/jseweb/servlets/jsp/thepage.java

Do you see a line in the _jsp_service method which actually defines an
object 'model' of
class '<blah>.MyClass.MyBean'?

-AMT

> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Cory L Hubert
> Sent: Wednesday, December 22, 1999 3:31 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Servlets and JSPs
>
>
>         It's in there.
>
> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Nanduri Amarnath
> Sent: Wednesday, December 22, 1999 12:47 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Servlets and JSPs
>
>
> Did you check to make sure that your package is in the CLASSPATH ?
>
>
>
>
>
>
> Reg Sherwood <[EMAIL PROTECTED]> on 12/22/99 12:33:27 PM
>
> Please respond to Reg Sherwood <[EMAIL PROTECTED]>
>
>
> To:   [EMAIL PROTECTED]
> cc:    (bcc: Amarnath Nanduri/IT/VANCPOWER)
>
> Subject:  Re: Servlets and JSPs
>
>
>
>
> Craig,
>   As requested.... here is the error I receive in my client window:  I am
> using
> JRun 2.3.3, Servlet API 2.1, JSP 1.0.
> Any ideas as to why.  I am under the impression this should work ok.  Any
> help
> would be appreciated.
>
> 500 Internal Server Error
> com.livesoftware.scripting.CompilerException:
> <blah>/jsm-default/services/jseweb/servlets/jsp/thepage.java:71: Undefined
> variable
> or class name: model
> out.print("" + ( model.getName(0) ) );
>                  ^
> 1 error
>
>  at java.lang.Throwable.(Compiled Code)
>  at java.lang.Exception.(Compiled Code)
>  at com.livesoftware.scripting.CompilerException.(Compiled Code)
>  at com.livesoftware.scripting.JavaCompiler.compile(Compiled Code)
>  at com.livesoftware.jrun.plugins.jsp.JSPCore.getPage(Compiled Code)
>  at com.livesoftware.jrun.plugins.jsp.JSP.callPage(Compiled Code)
>  at com.livesoftware.jrun.plugins.jsp.JSP.service(Compiled Code)
>  at javax.servlet.http.HttpServlet.service(Compiled Code)
>  at com.livesoftware.jrun.JRun.runServlet(Compiled Code)
>  at
> com.livesoftware.jrun.JRunServletContext$JRunRequestDispatcher.for
> ward(Compi
> led
> Code)
>  at
> com.imagicTV.iBDS.Servlet.ListAccountsJSP.ListAccountsJSP.service(Compiled
> Code)
>  at javax.servlet.http.HttpServlet.service(Compiled Code)
>  at com.livesoftware.jrun.JRun.runServlet(Compiled Code)
>  at com.livesoftware.jrun.JRunGeneric.handleConnection(Compiled Code)
>  at
> com.livesoftware.jrun.service.web.JRunWebServiceHandler.handleOutp
> ut(Compile
> d
> Code)
>  at
> com.livesoftware.jrun.service.web.JRunWebServiceHandler.handleRequ
> est(Compil
> ed
> Code)
>  at com.livesoftware.jrun.service.ThreadConfigHandler.run(Compiled Code)
>
> The actual JSP page is something like this:
>
> <html>
>   <%@ page import="<blah>.MyClass.*" %>
>   <jsp:useBean id="model" scope="session" class="<blah>.MyClass.MyBean" />
>   <%= model.getName(0) %>
> </html>
>
> Thanks
>
> "Craig R. McClanahan" wrote:
>
> > Reg Sherwood wrote:
> >
> > > Q.  Is it possible to maintain the state of a bean for a particular
> > > client for use in a JSP page.  I have tried placing the bean
> instance I
> > > wish to save on the session object in the hopes of later retrieving it
> > > via a get method in the servlet.  After reviewing docs I
> think it may be
> > > possible to do something along the lines of:
> > >
> > > SERVLET:
> > >          HttpSession session = request.getSession(true);
> > >          session.putValue("theBean", myBean);
> > >
> > > JSP PAGE:
> > >          <jsp:useBean id="theBean" scope="session" class="..." />
> > >
> > > Now in the JSP page I wish to retrieve values on the bean
> instance from
> > > a specified method.  So,
> > >
> > > JSP PAGE:
> > >         <% int x = theBean.getSize(); %>
> > >
> > > But when I try this the above fails as it does not know what the
> > > variable "theBean" is, even though I named it in the id
> portion with the
> > > jsp:useBean tag.  Any thoughts? Thanks
> > >
> >
> > This is exactly the way it is supposed to work, as long as your
> <jsp:useBean>
> > directive comes *before* the scriptlet in your page.  What JSP
> system are
> you
> > using?  What is the exact compile error that you get?
> >
> > Craig McClanahan
> >
> >
> ==================================================================
> =========
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> > FAQs on JSP can be found at:
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to