Re: session taglib

2003-12-06 Thread Suneel Kumar Kollukuduru
bean:define id = user name = userName scope = session toScope = session type = java.lang.String / struts wrote: In the Jsp i have: sess:attribute name=userName/ witch prints the username. Now i want something like: % String username= sess:attribute name=userName/; % but that doesn't work.

session taglib

2003-12-05 Thread struts
In the Jsp i have: sess:attribute name=userName/ witch prints the username. Now i want something like: % String username= sess:attribute name=userName/; % but that doesn't work. How can i assign the session variable to the String username ? Thanks !

Re: session taglib

2003-12-05 Thread John Ferguson Smart
Try something like String username = session.getAttribute(username); or String username = request.getSession(à.getAttribute(username); struts wrote: In the Jsp i have: sess:attribute name=userName/ witch prints the username. Now i want something like: % String username= sess:attribute

Re: session taglib

2003-12-05 Thread Oron Gill Haus
You can use JSTL to accomplish this using the: c:set var=username value=${username} / You can also specify the scope within the value expression. This is if you wish to use JSTL. Only a suggestion. Hope it helps you out! --- struts [EMAIL PROTECTED] wrote: In the Jsp i have:

Re: session taglib

2003-12-05 Thread Gurpreet Dhanoa
:13 PM Subject: Re: session taglib Try something like String username = session.getAttribute(username); or String username = request.getSession(à.getAttribute(username); struts wrote: In the Jsp i have: sess:attribute name=userName/ witch prints the username. Now i want

Re: session taglib

2003-12-05 Thread Scott Reisdorf
You are using a Tag Lib within a Scriptlet. You can assign the variable using the scriplet by the following: % String username = (String) session.getAttribute(userName); % hope that helps. -scott At 02:40 PM 12/5/2003 +0100, you wrote: In the Jsp i have: sess:attribute name=userName/ witch

Re: session taglib

2003-12-05 Thread James Mitchell
On Fri, 5 Dec 2003, struts wrote: In the Jsp i have: sess:attribute name=userName/ witch prints the username. Now i want something like: % String username= sess:attribute name=userName/; % but that doesn't work. How can i assign the session variable to the String username ? A

Re: session taglib

2003-12-05 Thread Oron Gill Haus
James, Isn't there a drive to move to JSTL vs. the Struts tag library? I'm curious as we've been pushing JSTL for this reason (though it rather flexible). Thank you. --- James Mitchell [EMAIL PROTECTED] wrote: On Fri, 5 Dec 2003, struts wrote: In the Jsp i have: sess:attribute

Re: session taglib

2003-12-05 Thread James Mitchell
On Fri, 5 Dec 2003, Oron Gill Haus wrote: James, Isn't there a drive to move to JSTL vs. the Struts tag library? I'm curious as we've been pushing JSTL for this reason (though it rather flexible). Yes, you are absolutely correct. Use c:set if you can (given the min spec requ). Have a