File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[Struts 2] Custom Tag

 
Fabian Angy
Ranch Hand
Posts: 90
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!

I created my own tag which I use like this



I would like for example to put a variable inside (Like this: <panelTag:description description="<s:property value="myvariable"/>).

But, <s:property>doesn't work thus I wondered if there was some ways to do something like this?

Or to use a string between the start and the end of my tag? (example: <panelTag:description> my string </panelTag:description>)

Thanks in advance!
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't nest custom tags like that; that's just the way JSP works.

You could just use JSP EL there, ${}. Struts 2's custom request wrapper allows this.
 
Fabian Angy
Ranch Hand
Posts: 90
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Newton wrote:You can't nest custom tags like that; that's just the way JSP works.

You could just use JSP EL there, ${}. Struts 2's custom request wrapper allows this.


Thanks a lot! :mrgreen:
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic