File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I am getting the follwing Exception in struts

 
yerra reddy gatla
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
exception

javax.servlet.ServletException: Must specify type attribute if name is specified
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.Vendor_jsp._jspService(Vendor_jsp.java:514)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

javax.servlet.jsp.JspException: Must specify type attribute if name is specified
org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:818)
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:506)
org.apache.jsp.Vendor_jsp._jspService(Vendor_jsp.java:194)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



Actually I wrote type attribute in struts-config.xml. Still I am getting the exception...

Anybody plzz let me know the reason for this exception..

Regards,
Yerra Reddy
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What this message is telling you is that in your Vendor.jsp file, you have entered an <html:form> tag for which you have specified a name attribute, but not a type attribute. If you enter one, you have to enter both.

I'd suggest you remove the name attribute, as all that is really necessary for this tag is that action attrubute. Given this, Struts can look up the rest. In fact, in the latest version of Struts, both the name and type attribute are deprecated, so you can't use them at all.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic