tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hunter Hillegas <li...@lastonepicked.com>
Subject Problems Including Servlet Response in Tags...
Date Tue, 02 Oct 2001 22:53:33 GMT
I'm building some tags and having some trouble...

I am including a Servlet response in a tag like this:

try {
    pageContext.include("/groundswellController?action=tagGetNews");
}
catch (Exception e) {
    System.out.println("Error including Servlet request: " + e);
}

This doesn't throw an exception, so I assume that it is processing...

The above servlet call creates a Vector of objects and places it into the
REQUEST scope via setAttribute().

Then I have a JSP that calls the above referenced tag, which in theory
should then put the Vector into the request scope.

Trying to reference that Vector from the test JSP:

Vector theNewsCollection =
(Vector)request.getAttribute("theNewsCollection");
        
        if (theNewsCollection == null) {
            %>The news collection is null...<%
        }

Guess what, this page reads that the collection is null...

I donĀ¹t suspect the servlet's internal processing since I know the method
that creates the collection is working (it is used in other parts of the
application - I just created a new exposure to it)...

Any ideas?

Hunter


Mime
View raw message