Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to translate jsp with struts-html taglib

 
Rade Treci
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone!
First I hope that the question is within the standards of the forum.

As for the problem per se,

I'm using Tomcat6.0.18, Eclipse3.4, jdk1.5. It seems tomcat cannot interpret correctly the html struts tag, although it seems that I have set the <taglib-location> pointing to the correct uri.

In my web.xml:

In my whatever.jsp:

And my StackTrace!


In the jsp I tried already moving the taglib to the first line: DID NOT WORK
Changed the uri in the taglib to, http://struts.apache.org/tags-html : DID NOT WORK
Tried pointing the uri directly to the tld file: DID NOT WORK

By the way also <html:radio> tag seems to have problems getting translated, so I suppose that all html:XXXX tags will end up the same. At the moment I haven't tested other struts taglibs (like logic or bean) but I guess the same would happen...

Right now I have no more ideas and any pointer would be deeply appreciated.

Thank you,
 
Ankit Garg
Sheriff
Posts: 9509
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By looking at the error, I think the error is because request.getAttribute return Object while it is expecting a String there. Use a type cast or a toString call like this...

 
Rade Treci
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I forgot to mention that this works using JDeveloper and OC4J app server (need to make it work in Eclipse and Tomcat). I would like to make it work with minimum code changes (hopefully none, because there is a LOT to change). I just hope that this is a config problem.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.
 
Rade Treci
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic