• 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

using expressions of JSP in struts tag

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I am trying to develop a web application using struts.In a JSP file I am using struts tag and in that I intented to use expression of JSP.The code looks like this.
<s:textfield value='<%=empid%>' />

But I could not get the result. I have to use expression as I have used string to strore values and I have to use this string in the tag.
Please tell me how to acheive this.
Thanks in advance.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The documentation is your friend--this is covered.
 
R.Lakshmi Narasimhan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have tried this. But it is showing an error that expressions cannot be used in value attribute. I need to obtain the value of the expression using struts.

I need to use the expression tag of JSP in Struts tag and in especially I have to assign the value od a string in jsp scriplet code using JSP expression in the attribute value of struts tag textfield.

Please help me to solve this problem.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My fault, I forgot we disallowed that due to a security risk.

So your "choice" is to use OGNL: you can expose the value as an action property (recommended), or access the JEE scopes via OGNL.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic