struts problem, NoClassDefFoundError
gr_samsa Sep 23, 2002 11:27 AMHi!
I deploy a web application (JBoss3.0.0) in a war (struts.jar in WEB-INF\lib\) called wfadmin.war with the following login.jsp:
<%@ page language="java" contentType="text/html" errorPage="/error.jsp"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/premioss.tld" prefix="premioss" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html:html locale="true">
<bean:message key="app.title"/> - <bean:message key="login.caption"/>
<html:base/>
<h2><bean:message key="app.title"/></h2>
<bean:message key="login.caption"/>
<bean:message key="login.user"/>
<bean:message key="login.password"/>
<%-- <input type="submit" value="<bean:message key="login.button"/>" /> --%>
document.forms[0].j_username.focus();
</html:html>
My web.xml has a section like this:
<login-config>
<auth-method>FORM</auth-method>
<realm-name>WEBRealm</realm-name>
<form-login-config>
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/login-error.jsp</form-error-page>
</form-login-config>
</login-config>
So when i log in with a wrong user name, jetty tries to display the login-error.jsp which is exactly the same as login.jsp,
except for an additional line <bean:message key="error.login"/>.
But instead of the login-error.jsp, everything i get so see is:
HTTP ERROR: 500 org/apache/struts/action/ActionServlet
RequestURI=/wfadmin/login-error.jsp
in the browser window and
16:11:59,546 WARN [Jetty] WARNING: Servlet Exception for /wfadmin/login-error.j
sp
java.lang.NoClassDefFoundError: org/apache/struts/action/ActionServlet
at de.ipvalue.premioss.standard.ui.taglib.TestMetaTag.doStartTag(TestMet
aTag.java:43)
at org.apache.jsp.login_0002derror$jsp._jspService(login_0002derror$jsp.
java:110)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspSer
vlet.java:201)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
81)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:371
)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:6
07)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1387)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1326)
at org.mortbay.http.HttpServer.service(HttpServer.java:757)
at org.jboss.jetty.Jetty.service(Jetty.java:527)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:742)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:915)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:757)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:
151)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:287)
at org.mortbay.util.ThreadPool$JobRunner.run(ThreadPool.java:715)
at java.lang.Thread.run(Thread.java:484)
as server log.
Has anyone an idea, why the classloader can't find the struts classes?
Thanks in advance,
gr_samsa