This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Struts and the fly likes I am getting the follwing Exception in struts Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "I am getting the follwing Exception in struts" Watch "I am getting the follwing Exception in struts" New topic
Author

I am getting the follwing Exception in struts

yerra reddy gatla
Greenhorn

Joined: Apr 25, 2006
Posts: 25
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

Joined: Feb 15, 2005
Posts: 4864
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.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: I am getting the follwing Exception in struts
 
Similar Threads
Getting an Exception
HTTP Status 500 -
Error while jsp connecting to database
Error in deploying struts: Attribute name invalid according to the specified TLD
Action mapping error !!