Thank you for your help. I used the same codes as you told, however it
doesn't help me. Can there be a problem about Tomcat or with the "dopost"
and "doget" methods that I use. I took the session variables inside a
"dopost" program and I used those session variables in a "doget" program.
Waiting for your help..
Best,
ilker
Rashmi Rubdi-2 wrote:
>
> On 6/1/07, ibozo <[EMAIL PROTECTED]> wrote:
>>
>> Hello all,
>> I have created a file of servlet pages that publish those pages in
>> Tomcat
>> 6. I have a log in page, programmed by servlet and also another page that
>> activates the application acording to the given parameters by serching
>> webserver. I should use the taken variable on the log in page in another
>> servlet page. I tried to create a session variable and use it inside the
>> other web servlet.
>
> I guess you are trying to access a value stored in the HttpSession in
> one Servlet inside another Servlet.
>
> This is very simple ...
>
> in the first Servlet , you are doing
>
> HttpSession session = request.getSession();
> session.setAttribute("MyAttribute", "MyValue");
>
> in the second Servlet you would write
>
>
> HttpSession session = request.getSession();
> session.getAttribute("MyAttribute");
>
>> However I am unable to suceed... Can you help me as soon
>
> It works because the HttpRequest object is available to all Servlet's
> inside their doPost and doGet methods.
>
>> as possible..
>> Best,
>> ilker
>
> I recommend you read about Servlets, it's all covered in the basics.
>
> -Rashmi
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: [email protected]
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/Tomcat-session-varibale-tf3854667.html#a10924824
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]