File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes What is wrong ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "What is wrong ?" Watch "What is wrong ?" New topic

What is wrong ?


Joined: Nov 03, 2005
Posts: 9
I have this index.jsp file and it gives the following error when I try to view it in the Browser.

<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<title>Sample Struts Application</title>
<html:form action="Name" name="nameForm" type="example.NameForm">
<table width="80%" border="0">
<td><html:text property="name" /></td>
<td><html:submit /></td>

org.apache.jasper.compiler.CompileException: /index.jsp(7,3) Attribute type invalid according to the specified TLD
at org.apache.jasper.compiler.TagBeginGenerator.validate(
at org.apache.jasper.compiler.TagBeginGenerator.init(
Vani Bandargal
Ranch Hand

Joined: Oct 06, 2005
Posts: 82
check value for "type" attribute in html:form tag

It can have values like "text/css" Looks like you are specifying some class name to it, like example.NameForm
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
For the struts <html:form> tag, all you really need to specify is the action attribute. If you give it a valid action that you have defined in the struts.xml file, it will find the correct form bean and name the form with the same name as your form bean.

Consultant, Sima Solutions
I agree. Here's the link:
subject: What is wrong ?
jQuery in Action, 3rd edition