| Author |
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. <%if(request.getParameter("method").equals("Edit")){%> <html:form action="existingControlAction"> <%}else{%> <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(InsertTag.java:921) at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:460) 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(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 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 ]
|
Merrill
Consultant, Sima Solutions
|
 |
Vicky Pandya
Ranch Hand
Joined: Dec 16, 2004
Posts: 148
|
|
|
Thanks Merrill. That worked well.
|
 |
 |
|
|
subject: what's wrong with this code
|
|
|