You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jauphka Kuri Uhrynowski <ja...@hotpop.com> on 2003/05/21 10:33:37 UTC

Variable from Jsp to Servlet??

Hi everyone!

I have encountered one problem. I can't send a (String) variable from a Jsp
to a Servlet.

Somehow in my jsp I have the user's account number, but the Servlet needs
this number to access a DataBase
and display some info.

How can I retrieve this variable???

Thanx in advance for your good help.

Jauphka.



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Variable from Jsp to Servlet??

Posted by Tim Funk <fu...@joedog.org>.
Get a good servlet/jsp book.
or
http://www.onjava.com/
or
http://java.sun.com/webservices/docs/1.0/tutorial/

If you are using a RequestDispatcher.forward() - just stuff the data into the 
ServetRequest object via getAttribute(). If this sentence made no sense, see 
the first paragraph.

-Tim

Jauphka Kuri Uhrynowski wrote:
> Hi everyone!
> 
> I have encountered one problem. I can't send a (String) variable from a Jsp
> to a Servlet.
> 
> Somehow in my jsp I have the user's account number, but the Servlet needs
> this number to access a DataBase
> and display some info.
> 
> How can I retrieve this variable???
> 
> Thanx in advance for your good help.
> 
> Jauphka.
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org