File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Custom tag not evaluating ${} expressions

 
Matthieu Levesque
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Matthieu Levesque
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you consulted the JSP FAQ as instructed?
 
Matthieu Levesque
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic