• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Geeting session value in text box

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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 ]
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
smitaj joshi
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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




 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
try putting in double quotes("") instead of single quotes('').
 
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

try with below code, by typecasting object to String,


 
reply
    Bookmark Topic Watch Topic
  • New Topic