You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jimmy Emmanual <ji...@imsi.com> on 2003/06/20 14:09:10 UTC
RE: cannot find tag class: 'org.apache.struts.taglib.html.BaseTag
'
According to your web.xml file, the tld files should be in your WEB-INF
directory along with the web.xml and struts-config.xml files...
Jimmy
-----Original Message-----
From: Kandlhofer, Josef [mailto:josef.kandlhofer@gft.com]
Sent: Friday, June 20, 2003 7:21 AM
To: struts-user@jakarta.apache.org
Subject: cannot find tag class: 'org.apache.struts.taglib.html.BaseTag'
Hi,
i am new in struts and i need your help please.
I have a welogic 6.0 Application Server.
There i have the following directories:
- DefaulWebApp
- login.jsp
- WEB-INF
- web.xml
- struts-config.xml
- lib
- here are files from the struts download: e.g. struts.jar ,
struts-html.tld ....
The code of the login.jsp is
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<html:html>
<head>
<title>
<bean:message key="logon.title"/>
</title>
</head>
<body bgcolor="white">
<html:errors/>
<html:form action="/logon" focus="username">
<table border="0" width="100%">
<tr>
<th align="right">
<bean:message key="prompt.username"/>
</th>
<td align="left">
<html:text property="username" size="16"/>
</td>
</tr>
<tr>
<th align="right">
<bean:message key="prompt.password"/>
</th>
<td align="left">
<html:password property="password" size="16"/>
</td>
</tr>
<tr>
<td align="right">
<html:submit>
<bean:message key="button.submit"/>
</html:submit>
</td>
<td align="right">
<html:reset>
<bean:message key="button.reset"/>
</html:reset>
</td>
</tr>
</table>
</html:form>
</body>
</html:html>
the code of the web.xml is
<?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>
<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>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
<taglib>
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-template.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-template.tld</taglib-location>
</taglib>
</web-app>
the code of struts-config.xml is:
<?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">
<!--
This is the Struts configuration file for the example application,
using the proposed new syntax.
-->
<struts-config>
<!-- ========== Data Source Configuration ===============================
-->
<!--
<data-sources>
<data-source>
<set-property property="autoCommit"
value="false"/>
<set-property property="description"
value="Example Data Source Configuration"/>
<set-property property="driverClass"
value="org.postgresql.Driver"/>
<set-property property="maxCount"
value="4"/>
<set-property property="minCount"
value="2"/>
<set-property property="password"
value="mypassword"/>
<set-property property="url"
value="jdbc:postgresql://localhost/mydatabase"/>
<set-property property="user"
value="myusername"/>
</data-source>
</data-sources>
-->
<!-- ========== Form Bean Definitions ===================================
-->
<form-beans>
<!-- Logon form bean -->
<form-bean name="logonForm"
type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="username" type="java.lang.String"/>
<form-property name="password" type="java.lang.String"/>
</form-bean>
<!-- Registration form bean -->
<form-bean name="registrationForm"
type="org.apache.struts.webapp.example.RegistrationForm"/>
<!-- Subscription form bean -->
<form-bean name="subscriptionForm"
type="org.apache.struts.webapp.example.SubscriptionForm"/>
</form-beans>
<!-- ========== Global Forward Definitions ==============================
-->
<global-forwards>
<forward name="logoff" path="/logoff.do"/>
<forward name="logon" path="/logon.jsp"/>
<forward name="registration" path="/registration.jsp"/>
<forward name="success" path="/mainMenu.jsp"/>
</global-forwards>
<!-- ========== Action Mapping Definitions ==============================
-->
<action-mappings>
<!-- Edit user registration -->
<action path="/editRegistration"
type="org.apache.struts.webapp.example.EditRegistrationAction"
attribute="registrationForm"
scope="request"
validate="false">
<forward name="success" path="/registration.jsp"/>
</action>
<!-- Edit mail subscription -->
<action path="/editSubscription"
type="org.apache.struts.webapp.example.EditSubscriptionAction"
attribute="subscriptionForm"
scope="request"
validate="false">
<forward name="failure" path="/mainMenu.jsp"/>
<forward name="success" path="/subscription.jsp"/>
</action>
<!-- Process a user logoff -->
<action path="/logoff"
type="org.apache.struts.webapp.example.LogoffAction">
<forward name="success" path="/index.jsp"/>
</action>
<!-- Process a user logon -->
<action path="/logon"
type="org.apache.struts.webapp.example.LogonAction"
name="logonForm"
scope="session"
input="logon">
<exception
key="expired.password"
type="org.apache.struts.webapp.example.ExpiredPasswordException"
path="/changePassword.jsp"/>
</action>
<!-- Save user registration -->
<action path="/saveRegistration"
type="org.apache.struts.webapp.example.SaveRegistrationAction"
name="registrationForm"
scope="request"
input="registration"/>
<!-- Save mail subscription -->
<action path="/saveSubscription"
type="org.apache.struts.webapp.example.SaveSubscriptionAction"
name="subscriptionForm"
scope="request"
input="subscription">
<forward name="subscription" path="/subscription.jsp"/>
<forward name="success"
path="/editRegistration.do?action=Edit"/>
</action>
<!-- Display the "walking tour" documentation -->
<action path="/tour"
forward="/tour.htm">
</action>
</action-mappings>
<!-- ========== Controller Configuration ================================
-->
<controller>
<!-- The "input" parameter on "action" elements is the name of a
local or global "forward" rather than a module-relative path -->
<set-property property="inputForward" value="true"/>
</controller>
<!-- ========== Message Resources Definitions ===========================
-->
<message-resources
parameter="org.apache.struts.webapp.example.ApplicationResources"/>
<message-resources
parameter="org.apache.struts.webapp.example.AlternateApplicationResources"
key="alternate">
</message-resources>
<!-- ========== Plug Ins Configuration ==================================
-->
<plug-in className="org.apache.struts.plugins.ModuleConfigVerifier"/>
<plug-in
className="org.apache.struts.webapp.example.memory.MemoryDatabasePlugIn">
<set-property property="pathname" value="/WEB-INF/database.xml"/>
</plug-in>
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames"
value="/WEB-INF/validator-rules.xml,
/WEB-INF/validation.xml"/>
</plug-in>
</struts-config>
BUT if i call the login.jsp page I get this error message:
Parsing of JSP File '/login.jsp' failed:
----------------------------------------------------------------------------
----
/login.jsp(2): Error in using tag library uri='/WEB-INF/struts-html.tld'
prefix='html': cannot find tag class:
'org.apache.struts.taglib.html.BaseTag'
probably occurred due to an error in /login.jsp line 2:
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
And if I start the Weblogic Server i get a ClassNotFoundException: he cant
find the org.apache.struts.action.ActionServlet class, although i tried to
put the struts.jar in every directory.
So, i really need your help.
Thank you.
josef
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org