File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Custom tag not evaluating ${} expressions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Custom tag not evaluating ${} expressions" Watch "Custom tag not evaluating ${} expressions" New topic
Author

Custom tag not evaluating ${} expressions

Matthieu Levesque
Greenhorn

Joined: May 22, 2009
Posts: 5
Hi,
I've been stuck for a few days now... I'm trying to build a custum tag with parameters but my setter always receive a string when I pass a value as ${model.testStr}.

It's one of my first tag so I as an exemple I redefined the cut tag in my library... Same soruce code, same config and yet the explression is passed as a srting...
JSP:

Results in :

ps : "SWEET!" is my ${model.testStr}

Here's my lcc.tdl:


Any help will be greatly appreciated,

Thanks,

Matt
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

As per forum instructions, please include what versions of JSP, JSTL and Servlets that you are using.

Problems like this are a sign of mixing incompatible versions, or of web app misconfiguration.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Matthieu Levesque
Greenhorn

Joined: May 22, 2009
Posts: 5
Here's what i'm using :
tomcat 6 with liferay 5.2 portlet container
portlet 2.0

For my jsp version I think it's 1.2 since in my web.xml I have the http://java.sun.com/dtd/web-app_2_3.dtd specified.

For my jstl version 2.0, as it was showing in my last post...

The problem is probably between the jsp 1.2 and jstl 2.0... I'll experiment a bit and let guys kknow...
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

You'll need to get your versions straight. For example, there is no JSTL 2.0.

Check the JSP FAQs for info on setting up the proper versions and declaring your web.xml properly.
Matthieu Levesque
Greenhorn

Joined: May 22, 2009
Posts: 5
Hi,

Obviously my config is wrong... Would you have any good working example that I could follow?

Keep in mind that it'is my first custom tag...
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

Have you consulted the JSP FAQ as instructed?
Matthieu Levesque
Greenhorn

Joined: May 22, 2009
Posts: 5
I finaly figured it out...

I changed my web.xml header to this :



Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Custom tag not evaluating ${} expressions