• Post Reply Bookmark Topic Watch Topic
  • New Topic

Is it possible to make a custom action recognize EL expressions?  RSS feed

 
William Stafford
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to do the following:

<c:url var="searchLink" value="/ControllerServlet"><c:param name="category" value="search"/>
</c:url>
<myCustomAction:linker searchUrl="${searchLink}"> </myCustomAction:linker>

But my custom action does not recognize the EL expression ${searchLink}.
Is it possible to extend an EL base class to get this capability? It it possible at all?

Thanks for any advice,
-=beeky
 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why it's not being recognized ?

In your tld file, did you set the rtxprvalue to false ? Or is EL disabled for your web application or that specific page ?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66157
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As per forum instructions, please include what version of JSP you are using.
 
William Stafford
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vladimir,
Thanks for the reply. rtexprvalue is set to true and Struts tags have no trouble with the expressions so I guess expression evaluation is not turned off.
 
William Stafford
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear,

Sorry about the omission. I'm using Tomcat4.1 but will be moving to the latest Tomcat in a couple of weeks.

-=b
 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anytime my friend :thumb:
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66157
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by William Stafford:
I'm using Tomcat4.1 but will be moving to the latest Tomcat in a couple of weeks.
Then I wouldn't bother. Doing this under JSP 1,2 means that you have to trigger the evaluation within your own code. Under JSP 2.0, the container will perform the evaluation for you prior to even calling the tag handler.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!