• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error in deploying struts: Attribute name invalid according to the specified TLD

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys..
I am deploying my first struts application.
I got held up at an exception.

I am including the details here:

my root directory is C:\jakarta-tomcat-4.1.30
I created a directory by name "struts" in webapps.
(C:\jakarta-tomcat-4.1.30\webapps\struts)
I created the directory "web-inf" and index.jsp is my first view.

C:\jakarta-tomcat-4.1.30\webapps\struts\WEB-INF.
C:\jakarta-tomcat-4.1.30\webapps\struts\index.jsp

I copied all the jar files from C:\jakarta-struts-1.2.4\lib to
C:\jakarta-tomcat-4.1.30\webapps\struts\WEB-INF\lib\

__________________________________________________________________________
index.jsp:

<%@ page language="java" %>
<%@ taglib
uri="/WEB-INF/struts-html.tld"
prefix="html" %>
<html>
<head>
<title> First Struts Application</title>
</head>

<body>
<table width="500" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td> </td>
</tr>
<tr>
<td height="68" width="48%">
<div align="left">
<img src="images/Cloud.gif">
</div>
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
</table>

<html:form action="Lookup" name="lookupForm"
type="first.LookupForm">
<table width="45%" border="0">
<tr>
<td>Symbol:</td>
<td><html:text property="symbol" /></td>
</tr>
<tr>
<td colspan="2" align="center">
<html:submit />
</td>
</tr>
</table>
</html:form>

</body>
</html>
_______________________________________________________________________

I included the following in web.xml:
C:\jakarta-tomcat-4.1.30\webapps\struts\WEB-INF\web.xml

<!-- Struts Tag Library Descriptors -->
<taglib>
<taglib-uri>
/WEB-INF/struts-html.tld
</taglib-uri>
<taglib-location>
/WEB-INF/struts-html.tld
</taglib-location>
</taglib>

I copied struts-html.tld from C:\jakarta-struts-1.2.4\lib to
C:\jakarta-tomcat-4.1.30\webapps\struts\WEB-INF\


ActionForm and Action :
C:\jakarta-tomcat-4.1.30\webapps\struts\WEB-INF\classes\first
LookupAction.java
(Package first contains 2 classes :LookupAction and LookupForm)
__________________________________________________________________________
package first;

import java.io.IOException;
import javax.servlet.ServletException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

public class LookupAction extends Action
{

protected Double getQuote(String symbol)
{

if(symbol.equalsIgnoreCase("SUNW"))
{
return new Double(25.00);
}

return null;
}

public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException,ServletException
{
Double price=null;
String target=new String("success");

if(form!=null)
{
LookupForm lookupForm=(LookupForm)form;
String symbol=lookupForm.getSymbol();
price=getQuote(symbol);
}

if(price==null)
{
target=new String("failure");
}
else
{
request.setAttribute("PRICE",price);
}

return (mapping.findForward(target));
}

}

class LookupForm extends ActionForm
{

private String symbol=null;

public String getSymbol()
{
return (symbol);
}

public void setSymbol(String symbol)
{
this.symbol=symbol;
}

public void reset(ActionMapping mapping,HttpServletRequest request)
{
this.symbol=null;
}

}
___________________________________________________________________________
I compiled the above java file. The corresponding class files are in
C:\jakarta-tomcat-4.1.30\webapps\struts\WEB-INF\classes\first\

The struts-config.xml contains :
(C:\jakarta-tomcat-4.1.30\webapps\struts\WEB-INF\struts-config.xml)

__________________________________________________________________________
<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE struts-config
PUBLIC "-//Apache Software Foundation//DTD Struts
Configuration 1.1//EN"
"http://jakarta.apache.org/struts/dtds/struts-
config_1_1.dtd">

<struts-config>

<form-beans>
<form-bean name="lookupForm"
type="first.LookupForm"/>
</form-beans>


<action-mappings>

<action path= "/Lookup"
type="first.LookupAction"
name="lookupForm" >
<forward name="success" path="/quote.jsp"/>
<forward name="failure" path="/index.jsp"/>
</action>

</action-mappings>

</struts-config>
______________________________________________________________________

The second view is quote.jsp

___________________________________________________________
<html>
<head>
<title>First Struts Application</title>
</head>
<body>

<table width="500"
border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
<tr>
<td height="68" width="48%">
<div align="left>
<img src="images/wxmainlogowhitespace.gif">
</div>
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td>
Current Price: <%=request.getAttribute("PRICE") %>
</td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</body>
</html>
____________________________________________________

Finally the web.xml file has :
________________________________________________________
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">

<web-app>

<!-- Standard ActionServlet Configuration -->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>
org.apache.struts.action.ActionServlet
</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>WEB-INF/struts-config.xml</param-value>
</init-param>

<load-on-startup>1</load-on-startup>
</servlet>

<!-- Standard ActionServlet Mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

<!-- Standard Welcome File List -->
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

<!-- Struts Tag Library Descriptors -->
<taglib>
<taglib-uri>
/WEB-INF/struts-html.tld
</taglib-uri>
<taglib-location>
/WEB-INF/struts-html.tld
</taglib-location>
</taglib>

</web-app>

___________________________________________________________________________

Now when i try to open the index page, by
http://localhost:8080/struts/

i am getting the following error:

HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: /index.jsp(30,0) Attribute name invalid according to the specified TLD
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:428)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:186)
at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:498)
at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:707)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:1028)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:1070)
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:1076)
at org.apache.jasper.compiler.Node$Root.accept(Node.java:232)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:1028)
at org.apache.jasper.compiler.Validator.validate(Validator.java:607)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:230)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)



--------------------------------------------------------------------------------


I guess i have done everything perfect.
Can anyone help me out from this exception?

Thanks in advance,

Rajani.
 
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guess, u have been reading Wrox's Professional Jakarta Struts.
Anyway, I think the error is because u might have got the struts.jar file in your JAVA_HOME/jre/lib/ext directory. Remove it if it is there. This directory should only contain the JDK jar files. Hope this helps.
 
Rajani Sudhakar
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi David,

Thankyou for your reply..
I am reading the same book..
But i dont have the struts.jar file in my JAVA-HOME\jre\lib\ext directory.
I have struts.jar file in the following:

C:\jakarta-tomcat-4.1.30\server\webapps\admin\web-inf\lib
C:\jakarta-tomcat-4.1.30\webapps\struts\web-inf\lib
C:\jakarta-struts-1.2.4\contrib\struts-el\lib
C:\jakarta-struts-1.2.4\lib

Does the exception has anything to do with the struts-html.tld file?

I am not able to proceed further without solving this..
Please help me out..

Thankyou,
Rajani.
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Struts' <html:form/> taglib doesn't have attributes 'name' and 'type'. That's probably why you're getting that exception...
 
Rajani Sudhakar
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Lasse,

Thankyou.
I removed the name and type attributes from <html:form>

Now i am a getting a new exception.


HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Exception creating bean of class first.LookupForm: {1}
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)


root cause

javax.servlet.ServletException: Exception creating bean of class first.LookupForm: {1}
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:533)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:95)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)



--------------------------------------------------------------------------------

Apache Tomcat/4.1.30

Waiting for a faster reply,

Rajani.
 
Kedar Dravid
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
U'd get this error when ur LookupForm.java is in the right directory/package. By the way, html:form tag does have a name and type attribute. The name and type attribute values must match the name and type values in the <form-bean> section of the struts-config.xml file.
By the way, I hope u have copied the .tld files to ur web-inf directory.
Anyway, if ur just starting out with Struts, u will find excellent material on www.reumann.net.
[ October 19, 2004: Message edited by: Kedar Dravid ]
 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi friends ,
I'm also getting the same error.



Can anyone please help. I've followed all the steps exactly as described in the book.
I'm not getting the output I'm expecting.can anyone please help??

Thanks
Narahari
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The latest version of Struts (1.2.9) does not support a name or type attribute for the <html:form> tag. The Struts books and tutorials were all written before this release, so that's why the examples of the <html:form> tag that you see there are wrong for this release. Just remove the attributes and it should work fine. As long as you provide the correct action attribute, Struts will look up the rest.
 
naraharirao mocherla
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Merrill,

Thank you very much for your reply.
I have done as you suggested .Removed name and type attributes from <html:form> tag.But now I'm getting these errors.



I'm trying to fix it.Any suggestions Merrill?Do you want me to install old version struts 1.1 As the book is based on 1.1.Please help me .

Thanks,
narahari

[ June 09, 2006: Message edited by: naraharirao mocherla ]
[ June 09, 2006: Message edited by: naraharirao mocherla ]
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The most likely cause of this problem is a simple clerical error such as a misspelling of the class name in the struts-config.xml file.

Double check the <form-bean> entry and the <action> entry in struts-config.xml to make sure they are exactly what the book tells you to write.

If you're unable to figure out the error, please post your struts-config.xml file as well as the code for the ch03.LookupForm class and we'll help you figure it out.
 
naraharirao mocherla
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Merrill,
here is my code of struts-config.xml


ch03.LookupForm.java


index.jsp


and one more question

In the book ,in web.xml file
in <taglib> tag
<taglib-uri> is given as /WEB-INF /struts-html.tld. whereas in the struts-examples'which I've installed the <taglib-uri> in the web.xml file is given as /tags/struts-html.So now I'm trying using uri "tags/struts-html" in my index.jsp.
I'm trying all sorts of things.


Thanks
Narahari
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't see any errors in your code. Can you verify that the file LookupForm.class exists in the WEB-INF/classes/ch03 directory? Also, try clearing out all the class files, recompiling the project from scratch, and redeploying to your App Server.

I don't think this error is related to your using version 1.2.9, so I don't think reverting back to version 1.1 is going to help.
 
naraharirao mocherla
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Merrill,
Now my first struts example is working.As you said it was a clerical mistake.
Spelling mistake in index.jsp's title tag.


I'm very excited.
Thanks,
Narahari
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is a very simple error that I also encountered.

1.)First open your struts-html.tld file(which is in struts-taglib-1.x.x.jar -->META-INF -->tld ) and try to find the following :
<tag>
<name>form</name>

2.)Under this tag there are several attributes given belonging to the tag named form . Just check with ctrl-f whether it contains something like :

<attribute>
<name>name</name>

3.) Incase you are using struts 1.1 jars , you will find it but in my case I was using struts 1.3 jar, hence the "name" attribute was no longer used in 1.3 version.
Just check your struts-html.tld file..

Note : The name attribute is defined in struts-html.tld but not for <form> tag but for other tags. Hence be careful to check the scope of the attribute you are searching in tld.
 
Brace yourself while corporate america tries to sell us its things. Some day they will chill and use tiny ads.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic