This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming 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 ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

What is wrong ?

 
Greenhorn
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" %>
<html>
<head>
<title>Sample Struts Application</title>
</head>
<body>
<html:form action="Name" name="nameForm" type="example.NameForm">
<table width="80%" border="0">
<tr>
<td>Name:</td>
<td><html:text property="name" /></td>
</tr>
<tr>
<td><html:submit /></td>
</tr>
</table>
</html:form>
</body>
</html>

org.apache.jasper.compiler.CompileException: /index.jsp(7,3) Attribute type invalid according to the specified TLD
at org.apache.jasper.compiler.TagBeginGenerator.validate(TagBeginGenerator.java:180)
at org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerator.java:129)
 
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.
 
Anything worth doing well is worth doing poorly first. Just look at this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!