> -----Original Message-----
> From: Denise Mangano [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, January 07, 2003 10:13 PM
> To: 'Tomcat Users List'
> Subject: RE: Java Bean Scope questions (a lengthy one)
> 
> 
> Correction - I changed the scope to session and the error 
> messages DO appear, so that is ok.  
> 
> But this caused a never ending loop in Retry.jsp and control 
> never gets forwarded to Verify.jsp. And my code for 
> populating the select boxes does not do what it should 
> (should repopulate if there was an error or default to 
> selected option if one was selected - now this is successful 
> in the first retry, but after that it defaults to the first 
> entry and does not list the rest.
> 
> Now I am also getting some errors in catalina.out:
> Jan 7, 2003 9:42:59 PM org.apache.jk.server.JkCoyoteHandler action
> SEVERE: Error in action code
> java.lang.NullPointerException
>         at
> org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:386)
>         at org.apache.coyote.Response.action(Response.java:222)
>         at
> org.apache.coyote.tomcat4.CoyoteAdapter.postParseRequest(Coyot
> eAdapter.java:
> 310)
>         at
> org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.
> java:221)
>         at
> org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261)
>         at
> org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
>         at 
> org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:632)
>         at
> org.apache.jk.common.ChannelSocket.processConnection(ChannelSo
> cket.java:590)
>         at
> org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:707)
>         at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> ThreadPool.jav
> a:530)
>         at java.lang.Thread.run(Thread.java:536)

I don't know what that's about, actually. :-(

> 
> The log code that I had placed before just shows a loop: 
> 2003-01-07 21:42:41 jsp: Entering CCProcess
> 2003-01-07 21:42:41 jsp: Error on form - forwarding to 
> Retry.jsp 2003-01-07 21:42:41 jsp: Entering Retry.jsp - error 
> on form 2003-01-07 21:42:51 jsp: Entering CCProcess 
> 2003-01-07 21:42:51 jsp: Error on form - forwarding to 
> Retry.jsp 2003-01-07 21:42:51 jsp: Entering Retry.jsp - error on form
> 
> I changed the scope back to request.jsp and I get to 
> Verify.jsp, but the error message in catalina.out is still 
> there.  What could be causing this? And why would changing 
> the scope to session cause me to enter into that Retry.jsp loop?

It's hard to say without seeing your code, but I'm guessing that
Retry.jsp tries to forward to CCProcess under some condition which only
triggers when one of your form bean properties is not null.  Then
CCProcess tries to validate, fails, forwards to Retry.jsp, which then
forwards back to CCProcess, etc.  When you use request scope, the form
bean is blanked out and you never enter the loop.

Good luck!

-- 
Tim Moore / Blackboard Inc. / Software Engineer
1899 L Street, NW / 5th Floor / Washington, DC 20036
Phone 202-463-4860 ext. 258 / Fax 202-463-4863


> 
> Thanks!
> Denise
> 
> 
> -----Original Message-----
> From: Denise Mangano [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, January 07, 2003 9:41 PM
> To: 'Tomcat Users List'
> Subject: RE: Java Bean Scope questions (a lengthy one)
> 
> 
> Wow someone read all of that!! ;)
> 
> For Question #1:  I should have mentioned this before... I 
> tried to use session scope at one point (don't recall the 
> exact reason but I thought of it as an attempt to resolve a 
> different problem).  When I set the scope to session, it 
> caused problems with my form validation.  Currently if the 
> form is not validated, the user is brought back to Retry.jsp 
> and error messages appear next to the offending input field.  
> When I used session scope, Retry.jsp would be reloaded, but 
> the error messages would not be displayed... Any thoughts on 
> that?  I am going to go back and attempt this again now that 
> everything is working as it should up to Verify.jsp and see 
> if I stand corrected...
> 
> For Question #2 - that's exactly what I needed to know!!
> 
> For Question #3 - hopefully I can get the session scope to 
> work, but then how would I program that button?  Would I just 
> put onClick="Retry.jsp" ?
> 
> Tim, thank you so much for taking the time!!
> Denise :)
> 
> -----Original Message-----
> From: Tim Moore [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, January 07, 2003 9:24 PM
> To: Tomcat Users List
> Subject: RE: Java Bean Scope questions (a lengthy one)
> 
> 
> > -----Original Message-----
> > From: Denise Mangano [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, January 07, 2003 9:19 PM
> > To: 'Tomcat Users List'
> > Subject: Java Bean Scope questions (a lengthy one)
> > 
> > 
> > Question #1: Why does CCSubmit.jsp not have access to formBean
> > properties. I am thinking this is because technically by 
> submitting a 
> > form with an action of "CCSubmit.jsp" control isn't being 
> forwarded to 
> > CCSubmit.jsp so the instance of formBean isn't forwarded.  
> The scope 
> > of formBean is request. Is that the correct scope to use?  
> **I need to 
> > have access to formBean properties from the moment it is 
> instantiated 
> > to the moment the application has completed, but it has to 
> be unique 
> > to each user of the
> > webapp.**   How
> > could I accomplish this?
> 
> That's exactly what session scope is for. :-) Request scope 
> means that the bean is gone at the end of the request (that 
> is, when Verify.jsp finishes rendering).  If you put it in 
> session scope you'll be set.
> 
> > Question #2: Is it possible to use two beans within a 
> single jsp page?
> > I would imagine that it is, and if so I believe once I gain 
> access to 
> > formBean properties, my transaction properties will no 
> longer be null. 
> > (I included some code below... is this legal?)
> 
> Absolutely!  As long as they have different id attributes, 
> you can use as many beans as you like.
> 
> > Question #3:  I include a button to give the option to go back and
> > make changes.  If the user should desire to go back and 
> make changes, 
> > control should be forwarded to Retry.jsp on button click.  
> I need to 
> > program this button in a way so that when Retry.jsp is recalled it 
> > will still have access to formBean properties.How do I 
> program this? 
> > My last attempt using <jsp:forward> cause Retry.jsp to load 
> > automatically when Verify.jsp was loaded (sorry again Noel ;) ).
> 
> As long as the bean is in session scope, you'll be able to 
> access it from any page the user accesses.
> -- 
> Tim Moore / Blackboard Inc. / Software Engineer
> 1899 L Street, NW / 5th Floor / Washington, DC 20036
> Phone 202-463-4860 ext. 258 / Fax 202-463-4863
> 
> --
> To unsubscribe, e-mail: 
> <mailto:tomcat-user-> [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: <mailto:[EMAIL PROTECTED]>
> 
> --
> To unsubscribe, e-mail: 
> <mailto:tomcat-user-> [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: <mailto:[EMAIL PROTECTED]>
> 
> --
> To unsubscribe, e-mail:   
> <mailto:tomcat-user-> [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to