aspose file tools*
The moose likes Struts and the fly likes Unable to translate jsp with struts-html taglib Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Unable to translate jsp with struts-html taglib" Watch "Unable to translate jsp with struts-html taglib" New topic
Author

Unable to translate jsp with struts-html taglib

Rade Treci
Greenhorn

Joined: Apr 03, 2009
Posts: 10
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

Joined: Aug 03, 2008
Posts: 9305
    
  17

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...



SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Rade Treci
Greenhorn

Joined: Apr 03, 2009
Posts: 10
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

Joined: Jan 10, 2002
Posts: 61434
    
  67

Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Rade Treci
Greenhorn

Joined: Apr 03, 2009
Posts: 10
OK thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to translate jsp with struts-html taglib