aspose file tools*
The moose likes Struts and the fly likes Geeting session  value in text box Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Geeting session  value in text box" Watch "Geeting session  value in text box" New topic
Author

Geeting session value in text box

smitaj joshi
Greenhorn

Joined: Dec 24, 2008
Posts: 3
I have given <html:text property="name" size="30" value=<%=session.getAttribute("name")%>/>.it is showing error.
Could you tell me correct syntax for it
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Originally posted by smitaj joshi:
I have given <html:text property="name" size="30" value=<%=session.getAttribute("name")%>/>.it is showing error.
Could you tell me correct syntax for it



you need to put session value in single quote since you have the attribute like "name".

it is a struts related question,if you want to get more details you can go struts forum

Hope this helps

[ December 24, 2008: Message edited by: seetharaman venkatasamy ]
[ December 24, 2008: Message edited by: seetharaman venkatasamy ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61187
    
  66

Please take the time to choose the correct forum for your posts. This forum is for questions on JSP, not Struts.

For more information, please read this.

This post has been moved to a more appropriate forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
smitaj joshi
Greenhorn

Joined: Dec 24, 2008
Posts: 3
An error occurred at line: 32 in the jsp file: /update.jsp
The method setValue(String, Object) in the type TagSupport is not applicable for the arguments (Object)
29: </tr>
30: <tr>
31: <td align="right">Name</td>
32: <td align="left"><html:text property="name" size="30" value='<%=session.getAttribute("name")%>'/> </td>
33: </tr>
i m not getting meaning of this error.Could you help me on this topic?
srikanth paideti
Greenhorn

Joined: May 25, 2011
Posts: 2

I am facing same problem.
I have to set values to text box from Logic:iterate.
Can you give suggestions?




Rudy Gireyev
Ranch Hand

Joined: May 03, 2011
Posts: 39
Unfortunately, STRUTS doesn't always play along with JSP. So what I do in such cases is convert the STRUTS tag to its HTML equivalent.
Rakesh Keerthi
Ranch Hand

Joined: Jul 16, 2012
Posts: 136
try putting in double quotes("") instead of single quotes('').
Shailesh Narkhede
Ranch Hand

Joined: Jul 10, 2008
Posts: 368
Hi,

try with below code, by typecasting object to String,



Thanks,
Shailesh
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Geeting session value in text box