File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Struts problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts problem" Watch "Struts problem" New topic
Author

Struts problem

Richard Mendoza
Ranch Hand

Joined: Feb 26, 2003
Posts: 48
I created a simple struts application. I used eclipse 3.0 and jboss 3.2.5.
These are the contents of my web.xml:

<?xml version="1.0"?>
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

<!-- Action Servlet 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>


<!-- Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

<!-- Taglib Configuration -->
<taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
</web-app>

The struts-config.xml has these contents:

<?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 Bean Definitions ============================ -->
<form-beans>
<form-bean name="lookupForm"
type="test.LookupForm">
</form-bean>
</form-beans>

<!-- ======= Action Mapping Definitions ============== -->
<action-mappings>
<action path="/Lookup"
type="test.LookupAction"
name="lookupForm"
input="/jsp/index.jsp">
<forward name="success" path="/jsp/quote.jsp" />
<forward name="failure" path="/jsp/index.jsp" />
</action>
</action-mappings>


<!-- ====== Message Resources Definitions ======== -->
<message-resources
parameter="test.ApplicationResources"/>
</struts-config>

I placed these two xml's under WEB-INF directory together with the struts-html.tld.

I think I have successfully deployed the war file, but when I try to run the index.jsp, I always got this error:

javax.servlet.ServletException: javax.servlet.jsp.tagext.TagAttributeInfo.<init>(Ljava/lang/String;ZLjava/lang/String;ZZ)V

java.lang.NoSuchMethodError: javax.servlet.jsp.tagext.TagAttributeInfo.<init>(Ljava/lang/String;ZLjava/lang/String;ZZ)V

Can somebody help me? thanks!

Richard
Sarath Mohan
Ranch Hand

Joined: Mar 17, 2001
Posts: 213
Ensure all jars files and tld files required are placed in appropriate directories


Sarath Mohan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts problem