This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Struts and the fly likes Problems with Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problems with Struts" Watch "Problems with Struts" New topic
Author

Problems with Struts

s penumudi
Ranch Hand

Joined: Nov 17, 2004
Posts: 113
1. It is documented that add(String,ActionError) is deprecated. when I use ActionMessage in place of ActionError, I get ClascastException for <html:errors> tag. How to go about this?

2. Can't I use jsp tags in the javascript function that I call onClick event
Example
<html:submit value="Unlock Selected Lock(s)" property="unLock" onclik="setMethodToCall('<%=Constants.UNLOCK%>');"/>

When I Look at view source I see <%=Constants.UNLOCK%> is not being replaced with constant value. How can I make this possible?
your help would be greatly appreciated

3. I am getting some information from DB and wanted to show that in the listing with checkbox before each list item. To show this listing I am holding list in request scope and using logic:iterate. I have button called delete where user can select some of the list items and click on delete. I am setting checkbox value as the unique id that identifies list items. Now, I have to validate that form so as to enforce user to select atleast one checkbox. now When my validation fails, It is going back to my listing page, but I guess it is not able to get the information in request scope any more. How same request not passed to the jsp back on error?

Please help me. This is kind of urgent. I have to meet few deadlines.

thank you
[ December 08, 2004: Message edited by: s penumudi ]
 
jQuery in Action, 2nd edition
 
subject: Problems with Struts