Meaningless Drivel is fun!
The moose likes Struts and the fly likes what's wrong with this code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "what Watch "what New topic

what's wrong with this code

Vicky Pandya
Ranch Hand

Joined: Dec 16, 2004
Posts: 148
I need to call different actions based on one of the parameters to URI. I have following simple if else condition to call diffrent actions. but I keep getting below exception.

<html:form action="existingControlAction">

<html:form action="addControlAction">

javax.servlet.jsp.JspException: ServletException in '/jsp/existingcontrol.jsp': /jsp/existingcontrol.jsp(169,0) The end tag "</html:html" is unbalanced
at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(
at org.apache.struts.taglib.tiles.InsertTag.doEndTag(
at org.apache.jsp.jsp.raedefaultlayout_jsp._jspx_meth_tiles_insert_1(org.apache.jsp.jsp.raedefaultlayout_jsp:204)
at org.apache.jsp.jsp.raedefaultlayout_jsp._jspx_meth_html_html_0(org.apache.jsp.jsp.raedefaultlayout_jsp:124)
at org.apache.jsp.jsp.raedefaultlayout_jsp._jspService(org.apache.jsp.jsp.raedefaultlayout_jsp:72)
at org.apache.jasper.runtime.HttpJspBase.service(
at javax.servlet.http.HttpServlet.service(

Other way I tried is storing actionName in scriptlet in which depending on this parameter I create a String variable with action name but that also doesn't seeem to be working. <html:form action="<%=actionName%>"> is not working with error in tag.

Anybody, what's wrong?
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Try it this way:

also, check to make sure that you have matching <html:html> and </html:html> tags as well as matching <html:form> and </html:form> tags.
[ July 01, 2005: Message edited by: Merrill Higginson ]

Consultant, Sima Solutions
Vicky Pandya
Ranch Hand

Joined: Dec 16, 2004
Posts: 148
Thanks Merrill. That worked well.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: what's wrong with this code
It's not a secret anymore!