Probleme mit struts - ActionServlet

Status
Nicht offen für weitere Antworten.
S

slider7777

Gast
Hallo,

Ich habe eine kleine Web Anwendung mit struts geschrieben (in Eclipse). Jedoch findet Tomcat anscheinend die Klasse ActionServlet nicht, diese ist jedoch in den Libraries vorhanden...

der Fehler:
java.lang.ClassNotFoundException: org.apache.struts.action.ActionServlet

das packet org.apache.struts.action sowie die Klasse sind vorhanden....

hier mal die web.xml:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
	<display-name>
	SimpleForum</display-name>
	
	<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>
    <init-param>
      <param-name>debug</param-name>
      <param-value>3</param-value>
    </init-param>
    <init-param>
      <param-name>detail</param-name>
      <param-value>3</param-value>
    </init-param>
    <load-on-startup>0</load-on-startup>
  </servlet>
  <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>index.htm</welcome-file>
		<welcome-file>index.jsp</welcome-file>
		<welcome-file>default.html</welcome-file>
		<welcome-file>default.htm</welcome-file>
		<welcome-file>default.jsp</welcome-file>
	</welcome-file-list>
</web-app>

struts-config.xml:

Code:
<struts-config>


	<form-beans>
	
		<form-bean name="forum" type="beans.BeanForum" />
		<form-bean name="thema" type="beans.BeanThema" />
	
	</form-beans>
	
	
	<action
	  name="forum"
      path="/start"
      scope="request"
      type="actionhandler.ForumAction"
      validate="false">
      <forward name="success" path="/abc.jsp" />
      <forward name="failure" path="/error.jsp" />
    </action>
	
	
	<action
	  name="thema"
      path="/thema"
      scope="request"
      type="actionhandler.ThemaAction"
      validate="false">
      <forward name="success" path="/thread.jsp" />
      <forward name="failure" path="/index.jsp" />
    </action>
	
	
	
	
</struts-config>


danke für Hilfe!




[/code]
 
S

slider7777

Gast
der ganze fehler:
Code:
SCHWERWIEGEND: Error loading WebappClassLoader
  delegate: false
  repositories:
    /WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@1fe88d
 org.apache.struts.action.ActionServlet
java.lang.ClassNotFoundException: org.apache.struts.action.ActionServlet
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1359)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1205)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1068)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
	at org.apache.catalina.core.StandardService.start(StandardService.java:448)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
30.05.2007 13:13:25 org.apache.catalina.core.StandardContext loadOnStartup
SCHWERWIEGEND: Servlet /SimpleForum threw load() exception
java.lang.ClassNotFoundException: org.apache.struts.action.ActionServlet
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1359)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1205)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1068)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
	at org.apache.catalina.core.StandardService.start(StandardService.java:448)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
 
S

slider7777

Gast
hallo,

ich habe eben alle vorhandenen *.jar files von struts in das Projekt eingebunden. das oben genannte Packet liegt glaub in struts-core.jar
 
S

slider7777

Gast
ich benütze eclipse, habe also ein sogenanntes dynamic web project angelegt, die eingebundenen packete liegen alle unter library
 

HLX

Top Contributor
Aha, ich nehme an im Java Build Path. Liegen sie dort einfach nur so, oder als Web App Libraries.

Falls es keine Web App Libraries sind, enferne die Jars aus den Libraries und kopiere sie ins Verzeichnis WEB-INF/lib. Nur so erfährt auch der Tomcat von den Bibliotheken. Sonst werden sie nur für´s Kompilieren verwendet.
 
Status
Nicht offen für weitere Antworten.
Ähnliche Java Themen
  Titel Forum Antworten Datum
J Probleme mit Struts Allgemeines EE 3
G Probleme mit Validierung (Struts, validation.xml) Allgemeines EE 4
D Probleme beim Umstieg auf Jakarta EE Allgemeines EE 5
Dimax JSP Probleme mit Java in JSP Allgemeines EE 21
OnDemand Performance Probleme wegen vieler Objekte Allgemeines EE 3
B @Startup - FileWatcher - Probleme beim Hochfahren des Servers Allgemeines EE 4
Psypsy Spring Probleme mit Datenzugriff Allgemeines EE 5
D Apache POI Probleme mit Daten(Datum) die aus Formeln entstehen Allgemeines EE 3
T Probleme mit File renameTo bzw. File delete @@ Allgemeines EE 3
F Probleme mit JSF und ManagedBean Allgemeines EE 3
B Probleme mit Templates in einem Webprojekt Allgemeines EE 6
Fu3L Probleme beim Einrichten Allgemeines EE 3
A Probleme bei der Einbindung eines Liferay Portalserver (Glassfish) Allgemeines EE 7
S Datenbankzugriff (Probleme mit Cache?!) Allgemeines EE 8
K Probleme mit Apache MyFaces 2 und ICEFaces Facelets Allgemeines EE 1
K Probleme mit Enterprise Anwendung Allgemeines EE 5
D Probleme mit Cactus Allgemeines EE 9
F <security-constraint> Probleme Allgemeines EE 2
G Probleme im Tomcat - loading WebappClassLoader Allgemeines EE 3
T Probleme mit ApplikationClient mit Sicherheitsanmeldung! Allgemeines EE 2
G Probleme mit dem Klassenpfad nach dem deployment Allgemeines EE 2
Q Probleme bei einbinden von RichFaces. Allgemeines EE 10
T Probleme mit Facelets und if foreach und when Allgemeines EE 3
V Bildupload probleme Allgemeines EE 2
T Probleme mit Komplexerer ejb-ql Abfrage! Allgemeines EE 2
R EJB Client: Probleme mit der Client.jar Allgemeines EE 2
M Probleme mit Leerzeichen bei HtmlOutputLink Allgemeines EE 5
K probleme mit <h:dataTable> Allgemeines EE 2
M probleme mit client server kommunikation Allgemeines EE 3
E BackingBean Probleme Allgemeines EE 2
K JBoss AS & IDE Probleme Allgemeines EE 2
T Probleme beim Einsatz von J2EE / JBoss Allgemeines EE 4
Ö Spring, Probleme mit FlowScope und HttpServletRequest Allgemeines EE 2
DaRolla Probleme mit Verzeichnissen (Servlet, JSP, Tomcat) Allgemeines EE 8
G Probleme mit ResultSet Allgemeines EE 9
L Probleme mit Kompilierung von JNDI Allgemeines EE 2
K Internet Explorer MIME Type Probleme Allgemeines EE 2
M Probleme beim Performancetuning des Servlets Allgemeines EE 2
G Mehrere Probleme mit Servlets/Java Allgemeines EE 15
W Tomcat Probleme Allgemeines EE 7
FsMarine Probleme beim ausführen von JSP dateien unter Tomcat Allgemeines EE 4
E JBoss 4.0.2 - Probleme mit der Spezifikation Allgemeines EE 3
R Probleme mit Tutorial Allgemeines EE 4
M Probleme bei Aufruf von JSPs in Unterverzeichnissen Allgemeines EE 2
M Probleme beim Webservice Deployment(Sun ApplicationServer) Allgemeines EE 2
H JONAS 4.1.4 Start Probleme Allgemeines EE 2
O Probleme mit Aktualität bei JBOSS Allgemeines EE 4
A Probleme mit J2EE und Tomcat Allgemeines EE 7
R Inputstream Probleme Allgemeines EE 11
P Probleme mit File renameTo bzw. File delete Allgemeines EE 3
F Probleme mit Eclipse/JBoss Allgemeines EE 6
S Struts 2 datetimepicker Allgemeines EE 3
W Struts Tutorial für EE Noobs? Allgemeines EE 2
N Struts vs JSF ? Allgemeines EE 7
W Speicher-Problem bei WebApp unter Tomcat, Struts, Hibernate Allgemeines EE 3
Lex Property per html:link schreiben in struts Allgemeines EE 2
Shihan Line Breaks in <br /> umwandeln (Struts) Allgemeines EE 7
S Struts: zwei JSP's nutzen eine Action Allgemeines EE 5
G Struts: ActionMessage value in JSP anzeigen Allgemeines EE 2
S Problem mit Struts und tiles Allgemeines EE 4
S Struts und Session Allgemeines EE 2
K Struts - FormBean mit 2 Listen - Anzeigen und Speichern Allgemeines EE 2
C Struts in iFrame Allgemeines EE 2
Z Struts: Formularfelder initialisieren Allgemeines EE 3
S Struts: Wert in einem iterierten Drop-Down Menü selektieren Allgemeines EE 7
T Struts 2 Allgemeines EE 6
R Struts-Action in JSP abfragen? Allgemeines EE 2
J struts: Bild als submit-button Allgemeines EE 2
J Internationalization mit Struts Allgemeines EE 2
E bei struts inhalte über mehrere seite verteilen Allgemeines EE 6
velaluka Struts- falsches Character-Encoding? Allgemeines EE 3
M URL Darstl. und Struts Allgemeines EE 2
G Struts beans Allgemeines EE 7
D Struts + Table Allgemeines EE 6
L Struts - Action auslösen bei Browser Back Allgemeines EE 2
N Struts - Problem mit <html:link> Action Allgemeines EE 3
netspy Struts, Spring oder ... ? Allgemeines EE 5
S Struts - Direktaufruf eines URL verhindern Allgemeines EE 11
1 Frage zu Struts und findForward Allgemeines EE 4
N Struts Jboss und Filter Allgemeines EE 2
S Fragen zu: Servlets, Struts & Hibernate Allgemeines EE 9
T Struts und Objekte in Comboboxen Allgemeines EE 4
K STRUTS The server encountered an internal error Allgemeines EE 5
F struts logic:iterate Allgemeines EE 5
M STRUTS/Cannot retrieve definition for form bean null on acti Allgemeines EE 4
G struts-config.xml Allgemeines EE 3
H Ich bin sehr verwirrt - struts, jsp, jsf . ? Allgemeines EE 53
P Testen von Struts-Anwendung Allgemeines EE 7
P Struts Form Bean vs. Session Variable Allgemeines EE 6
A Tomcat undeploy unter Windows klappt nicht wegen struts.jar Allgemeines EE 2
B Struts Problem: Array in JSP ausgeben (logic:iterate) Allgemeines EE 12
M Struts Deployment Allgemeines EE 3
R Mehrsprachige Seite mit Struts & Co. ? Allgemeines EE 5
S mehrere Message Resources in Struts ansprechen Allgemeines EE 7
G Values aus DB in Input-Feldern anzeigen (Struts) Allgemeines EE 2
G Exception creating bean of class . (Struts) Allgemeines EE 8
B Verwendung von DynActionForm (Struts) Allgemeines EE 10
K dynamischer Zugriff auf .properties (Struts) Allgemeines EE 2
K Struts html:messages tag Allgemeines EE 2
M Struts File Upload problem Allgemeines EE 6

Ähnliche Java Themen

Neue Themen


Oben