I am new to struts. i downloaded struts2.0.8 n and copied all the .war files
from struts to tomcat\webapps directory.
my normal java and servlet pgm is compling very well. but if i run struts
enabled java r servlet pgm i get error msg.
n my error msg reads s follows.
C:\apache-tomcat-6.0.13\webapps\register\WEB-INF\classes\app>javac
RegisterForm.
java
RegisterForm.java:2: package org.apache.struts.action does not exist
import org.apache.struts.action.*;
^
RegisterForm.java :3: cannot find symbol
symbol: class ActionForm
public class RegisterForm extends ActionForm {
^
2 errors
C:\apache-tomcat-6.0.13\webapps\register\WEB-INF\classes\app>javac
RegisterActio
n.java
RegisterAction.java:2: package org.apache.struts.action does not exist
import org.apache.struts.action.*;
^
RegisterAction.java :5: cannot find symbol
symbol: class Action
public class RegisterAction extends Action {
^
RegisterAction.java:6: cannot find symbol
symbol : class ActionMapping
location: class app.RegisterAction
public ActionForward perform (ActionMapping mapping,
^
RegisterAction.java:7: cannot find symbol
symbol : class ActionForm
location: class app.RegisterAction
ActionForm form,
^
RegisterAction.java:6: cannot find symbol
symbol : class ActionForward
location: class app.RegisterAction
public ActionForward perform (ActionMapping mapping,
^
RegisterAction.java :11: cannot find symbol
symbol : class RegisterForm
location: class app.RegisterAction
RegisterForm rf = (RegisterForm) form;
^
RegisterAction.java:11: cannot find symbol
symbol : class RegisterForm
location: class app.RegisterAction
RegisterForm rf = (RegisterForm) form;
^
RegisterAction.java:19: cannot find symbol
symbol : variable UserDirectory
location: class app.RegisterAction
UserDirectory.getInstance().setUser(username,password1);
^
RegisterAction.java:21: cannot find symbol
symbol : class UserDirectoryException
location: class app.RegisterAction
} catch (UserDirectoryException e) {
^
9 errors
C:\apache-tomcat-6.0.13\webapps\register\WEB-INF\classes\app>
My web.xml is as follows:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<display-name>Struts Application Template</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>2</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>2</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<!---Standard Action Servlet Mapping------>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>register.jsp</welcome-file>
</welcome-file-list>
<taglib>
<taglib-uri>/tags/struts-bean</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/struts-html</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/struts-logic</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/struts-nested</taglib-uri>
<taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/struts-tiles</taglib-uri>
<taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
</taglib>
</web-app>
i have written m y struts-config.xml is as follows
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
<struts-config>
<form-beans>
<form-bean name="registerForm" type="app.RegisterForm"/>
</form-beans>
<action-mappings>
<action path="/register"
type="app.RegisterAction"
name="registerForm">
<forward name="success" path="/success.html"/>
<forward name="failure" path="/failure.html"/>
</action>
</action-mappings>
</struts-config>
I hvae my pgm stored in tomcat\webapp\register\WEB-INF\classes\app
RegisterAction.java
RegisterForm.java
thank you in advance
pls anyone help me whats the mistake i hv done
--
View this message in context:
http://www.nabble.com/Help-me-pls-tf3939274.html#a11172716
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]