Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

What is wrong ?

Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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(
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
If I had asked people what they wanted, they would have said faster horses - Ford. Tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic