OK - so setting a request attribute stays with the request object.
But why do I lose the PARAMETER (request.getParameter()) stored in the
request?
I still have a reference to the same request object, don't I?

-----Original Message-----
From: khenderson
Sent: Thursday, July 06, 2000 1:42 PM
To: khenderson; JSP-INTEREST
Subject: Re: Model 2: Duration of Parameters / Attributes in Request
Objec t


Richard,

You need to set the atrribute to the request in your action class. This
enables you to reference it from the JSP.

Example:

from Action to JSP:

  perform(request) {
    request.setAttribute("foo", fooInstance);
    requestDispatcher.forward(request);
  }

Regards,

Kevin

-----Original Message-----
From: Richard Cammarano [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 06, 2000 12:47 PM
To: [EMAIL PROTECTED]
Subject: Model 2: Duration of Parameters / Attributes in Request Object


I'm currently using Model 2 architecture and pass the request object
from controller TO action TO jsp. If I have a parameter that was posted
through the controller servlet and I try to access that parameter (via
request.getParameter) in the jsp, I get null.

Why is this happening? I thought that if I maintained a reference to
that object I still have access to all the parameters and attributes?

Example(abbreviated code):

In HTML page:
  submit via post value for textbox "foo";

>From ControllerServlet to Action:

  doPost(request) {
    action.perform(request);
  }

from Action to JSP:

  perform(request) {
    requestDispatcher.forward(request);
  }

in JSP
  request.getParameter("foo");

  Value is null.





Reading through the archives, I'm still a bit confused about the
duration of the request object.



This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.

========================================================================
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

========================================================================
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets


This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to