One way of accessing the desired var is:
U can have a method in the first servlet which returns the supposed
variable.
In u'r second method servlet,get the 'ServletContext' with the
getServletContext of the ServletConfig class.Once u get the
ServletContext class,then get the Servlet with the getServlet(name of
u'r first Servlet) of the ServletContext class.Cast it to a servlet and
then u can access the methods of u'r first servlet.If u call the method
which returns the var then u have access to the var of u'r first
servlet.
usha.
sachin rameshrao zingade wrote:
> Hi I want to pass a variable from one servlet to the other ,how to do
> this? sachin
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html