Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Apache Tomcat »

Tags and Servlets

Mohammed Zabin

2007-07-23


Hi all

I am trying to pass an object from a tag to a servlet. i did the following,

1. In the tag class, i put:

pageContext.getRequest().setAttribute("QList", list);



The above Tag will go to a servlet, i need to read the above request
attribute in the servlet, how can i do this?, i tried

List<Integer> list = (List<Integer>)request.getAttribute("QList");

, but when i tried to access the read list, it gave me NullPointerException,


any help please

Jotnarta
©2008 junlu.com - Jax Systems, LLC, U.S.A.