aspose file tools*
The moose likes Struts and the fly likes In 'html:rewrite' attribute 'action' invalid bcos of old struts,jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "In Watch "In New topic
Author

In 'html:rewrite' attribute 'action' invalid bcos of old struts,jar

Revathi Damera
Greenhorn

Joined: May 03, 2007
Posts: 5
Hi,


We have devoloped our application using struts.jar(1.1) , in one jsp i used <html:rewrite> and for that tag ,attribute 'action' is not available. I have imported new jar struts.jar(1.2.4) which has action attribute. But in some jsps in <html:form> we have used 'name' attribute which is not there in new jar file.
Can anyone suggest me a solution.

Thanks,
Revathi.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
The name ant type attributes were deprecated from the <html:form> tag because they are unnecessary. All you need to do is supply the action path, and Struts can find the rest from the struts-config.xml file. Just remove the name attribute from the tag, and it should still work fine. The name of the form is always what was specified in the name attribute of the action mapping in the struts-config.xml file.

By the way, I hope you didn't just import a new struts.jar file into your application without doing anything else. Make sure that you replace all jar files, TLD files, and XML files with the new versions. If you search this forum, you will find many sad tales of people encountering problems when using artifacts from different versions of struts that don't play well together.
[ May 03, 2007: Message edited by: Merrill Higginson ]

Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: In 'html:rewrite' attribute 'action' invalid bcos of old struts,jar