You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by bindhu <bi...@gmail.com> on 2007/06/18 11:54:51 UTC
Help me pls
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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Help me pls
Posted by bindhu <bi...@gmail.com>.
c:\apache-tomcat-6.0.13\webapps\register\WEB-INF\lib\commons-validator-1.3.1.jar;c:\apache-tomcat-6.0.13\webapps\register\WEB-INF\lib\struts-core-1.3.8.
i added it to my classpath. now also i get the same error when compiling the
struts enabled java.
--
View this message in context: http://www.nabble.com/Help-me-pls-tf3939274.html#a11175905
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Help me pls
Posted by bindhu <bi...@gmail.com>.
i have done what u said me to do. copy the .war file to webapps. i opened my
web browser. i get the following msg when i open my browser.
Welcome!
To get started on your own application, copy the struts-blank.war to a new
WAR file using the name for your application. Place it in your container's
"webapp" folder (or equivalent), and let your container auto-deploy the
application. Edit the skeleton configuration files as needed, restart your
container, and you are on your way! (You can find the
MessageResources.properties file with this message in the /WEB-INF/src
folder.)
then what shd i do next
--
View this message in context: http://www.nabble.com/Help-me-pls-tf3939274.html#a11174966
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Help me pls
Posted by bindhu <bi...@gmail.com>.
" Sorry yesterday we had problem with net in our office. so i was not able to
chat wiht u further. u have asked how do i compile my java in cmd promt . i
just type javacRegisterForm.java in the command path.
Raghupathy, Gurumoorthy wrote:
>
> Hello,
> Let me know the following
>
> Where is tomcat installed
> What is the jdk version
> Are you using Eclipse ( or anything else )
> How much do you know about servlet specification
>
> Once I get this I will try to help ....
>
> Regards
> Guru
>
> -----Original Message-----
> From: bindhu [mailto:bindhu80@gmail.com]
> Sent: 18 June 2007 11:49
> To: user@struts.apache.org
> Subject: RE: Help me pls
>
>
> thank u so much Raghu. i will download struts1.3.x. can u pls say me the
> how
> to install it. i read the installation guide but its not that much
> useful.
> so can u pls help me
> --
> View this message in context:
> http://www.nabble.com/Help-me-pls-tf3939274.html#a11173372
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Help-me-pls-tf3939274.html#a11188375
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Help me pls
Posted by "Raghupathy, Gurumoorthy" <Gu...@nielsen.com>.
Hello,
Let me know the following
Where is tomcat installed
What is the jdk version
Are you using Eclipse ( or anything else )
How much do you know about servlet specification
Once I get this I will try to help ....
Regards
Guru
-----Original Message-----
From: bindhu [mailto:bindhu80@gmail.com]
Sent: 18 June 2007 11:49
To: user@struts.apache.org
Subject: RE: Help me pls
thank u so much Raghu. i will download struts1.3.x. can u pls say me the
how
to install it. i read the installation guide but its not that much
useful.
so can u pls help me
--
View this message in context:
http://www.nabble.com/Help-me-pls-tf3939274.html#a11173372
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Help me pls
Posted by bindhu <bi...@gmail.com>.
thank u so much Raghu. i will download struts1.3.x. can u pls say me the how
to install it. i read the installation guide but its not that much useful.
so can u pls help me
--
View this message in context: http://www.nabble.com/Help-me-pls-tf3939274.html#a11173372
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Help me pls
Posted by "Raghupathy, Gurumoorthy" <Gu...@nielsen.com>.
Struts 2 is architecturally totally different from struts 1.3.x ....
Have you tried to download a sample application and run it ?
Look at the dtd of the struts-config.xml ?
Regards
Guru
-----Original Message-----
From: bindhu [mailto:bindhu80@gmail.com]
Sent: 18 June 2007 11:10
To: user@struts.apache.org
Subject: RE: Help me pls
y will version 2.0.8 will not work
--
View this message in context:
http://www.nabble.com/Help-me-pls-tf3939274.html#a11172900
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Help me pls
Posted by bindhu <bi...@gmail.com>.
y will version 2.0.8 will not work
--
View this message in context: http://www.nabble.com/Help-me-pls-tf3939274.html#a11172900
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Help me pls
Posted by "Raghupathy, Gurumoorthy" <Gu...@nielsen.com>.
This is struts 1.3.x version syntax ... donwload 1.3.8 version and then
try
-----Original Message-----
From: bindhu [mailto:bindhu80@gmail.com]
Sent: 18 June 2007 10:55
To: user@struts.apache.org
Subject: Help me pls
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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org