Re: Servlet to JSP problem



charlesmusco@xxxxxxxxx wrote:

Now to accomplish this what I did was to take the request object and
set an attribute on it. The attribute I added was the ArrayList.

This is the correct approach. However, if you are using struts and the
action is set to redirect="true", the request will never make it to the
JSP and you'd have to use the session. Unless you are changing the
model in your servlet (i.e. processing a POST), there is no reason to
use redirect.

The
problem was when the JSP receives the request and does a getAttribute
on the request it is saying the ArrayList is null.


Make sure you are using the correct attribute name - it is case
sensitive.

-cheers,
Manish

.



Relevant Pages

  • Re: jsp client for axis2 webservice
    ... Read the Java EE tutorial on the Sun web site. ... It talks generally about how to call logic from a JSP. ... A servlet on the app server receives the request, parses out the request parameters, and passes them along to an instance of a regular Java class, usually a Bean. ... That object in turn will perform some processing, say, calling one of the stub methods that you have. ...
    (comp.lang.java.programmer)
  • Re: my first session bean
    ... A bean instance associated with the specified id is sought ... and used in the page as it services the current request. ... instance may later be used by any page or servlet in the same webapp, ... JSP forward or include is used -- but do not confuse that with an HTTP ...
    (comp.lang.java.programmer)
  • Re: jsp client for axis2 webservice
    ... Read the Java EE tutorial on the Sun web site. ... to call logic from a JSP. ... all the JSP does is POST an HTTP request to the application ... calling one of the stub methods that you have. ...
    (comp.lang.java.programmer)
  • Re: jsps not serving from context root in netbeans server
    ... resultant request for a jsp seems to be requested outside of the ... context root instead of using the context root and a 404 is returned. ... by redirect I mean a response.redirect. ...
    (comp.lang.java.programmer)
  • Re: MVC/Servlet & URL links question
    ... I understand that a typical way of handiing form posts from a JSP page ... is to post to a servlet, which examines a request variable or two, ... forwards the request to a JSP for display. ... I suppose I could add a URL variable to the hyperlinks, ...
    (comp.lang.java.programmer)