You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jim Anderon <ji...@jjajava.com> on 2014/07/23 00:24:55 UTC
tutorial app cannot be installed and run
I am currently reading the book, "Struts 2 Design & Programming", by
Budi Kurniawan. The book gives a path to download
the examples used in the book and the author states that all of the
examples have been tested in tomcat6. I have downloaded
the examples, but there are no instructions on how to get the examples
to run.
I have installed an example from the book (app03a) into my tomcat7
webapps directory using the tomcat manager, and entered the URL,
http//localhost:8080/User_input.action and tomcat gives and error page:
* type* Status report
* message* _/app03a/User_input.action_
* description* _The requested resource is not available.
_
When I look at the app03a application in the tomcat manager, it shows
that it is not running, unlike the struts2 tutorial applications that I
have running. Since it is not running, I'm not surprised that I cannot
access it through the URL.
When I deployed the struts2 tutorials, I ran 'mvn clean package' before
deploying with the tomcat manager. With app03a I could not run mvn and
instead I built a war file manually, using 'jar cf app03a.war css jsp
test.html WEB-INF' from the app03a
workspace. I then deployed the war file using the tomcat manager.
Under the app03a directory the structure is:
css
main.css
jsp
Author.jsp Book.jsp Error.jsp Login.jsp Menu.jsp
ProductDetails.jsp ProductForm.jsp
test.html
WEB-INF
web.xml
classes:
- Author.class
- Book.class
- Employee.class
- Product.class
- TestUser.class
- User.class
- struts.xml
lib:
asm-3.3.jar commons-fileupload-1.3.1.jar
freemarker-2.3.19.jar ognl-3.0.6.jar
asm-commons-3.3.jar commons-io-2.2.jar
javassist-3.11.0.GA.jar struts2-core-2.3.16.2.jar
asm-tree-3.3.jar commons-lang3-3.1.jar
log4j-1.2.17.jar xwork-core-2.3.16.2.jar
src:
struts.xml
app03a:
- Author.java
- Book.java
- Employee.java
- Product.java
- TestUser.java
- User.java
When I checked the catalina.out file, I found the stacktrace which is
show in the attached 'catalina.out.excerpt' file.
Note that in my most recent app03a.war file, I included the .class files
in both the 'classes' directory and in the 'src/app03a' directory.
Can any help with getting this application installed correctly? I'm
still experimenting trying to figure it out.
Regards,
Jim Anderson
Re: tutorial app cannot be installed and run
Posted by Lukasz Lenart <lu...@apache.org>.
Here you have answer:
Caused by: Action class [app03a.Product] not found - action -
file:/usr/share/apache-tomcat-7.0.54/webapps/app03a/WEB-INF/classes/struts.xml:24:60
which means your war is missing action class (or it is in wrong folder
not corresponding to package)
Regards
--
Ćukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: tutorial app cannot be installed and run
Posted by Martin Gainty <mg...@hotmail.com>.
Date: Tue, 22 Jul 2014 18:24:55 -0400
From: jim_anderson@jjajava.com
To: user@struts.apache.org
Subject: tutorial app cannot be installed and run
I am currently reading the book, "Struts 2 Design & Programming",
by Budi Kurniawan. The book gives a path to download
the examples used in the book and the author states that all of the
examples have been tested in tomcat6. I have downloaded
the examples, but there are no instructions on how to get the examples
to run.
I have installed an example from the book (app03a) into my tomcat7
webapps directory using the tomcat manager, and entered the URL,
http//localhost:8080/User_input.action and tomcat gives and error page:
type Status report
message /app03a/User_input.action
description The requested resource is not available.
MG>
Unable to load configuration. - action - file:/usr/share/apache-tomcat-7.0.54/webapps/app03a/WEB-INF/classes/struts.xml:24:60
The action class referenced at LINE 24 of struts.xml cannot be loaded (you never deployed the action class
referenced at line 24 of struts.xml to /WEB-INF/classes
if you want easy to read step by step tutorials with complete working examples take a look at:
http://www.amazon.com/Apache-Struts-Web-Application-Development/dp/1847193390
HTH
Martin
MG>
When I look at the app03a application in the tomcat manager, it
shows that it is not running, unlike the struts2 tutorial applications
that I have running. Since it is not running, I'm not surprised that I
cannot access it through the URL.
When I deployed the struts2 tutorials, I ran 'mvn clean package'
before deploying with the tomcat manager. With app03a I could not run
mvn and instead I built a war file manually, using 'jar cf app03a.war
css jsp test.html WEB-INF' from the app03a
workspace. I then deployed the war file using the tomcat manager.
Under the app03a directory the structure is:
css
main.css
jsp
Author.jsp Book.jsp Error.jsp Login.jsp Menu.jsp
ProductDetails.jsp ProductForm.jsp
test.html
WEB-INF
web.xml
classes:
- Author.class
- Book.class
- Employee.class
- Product.class
- TestUser.class
- User.class
- struts.xml
lib:
asm-3.3.jar commons-fileupload-1.3.1.jar
freemarker-2.3.19.jar ognl-3.0.6.jar
asm-commons-3.3.jar commons-io-2.2.jar
javassist-3.11.0.GA.jar struts2-core-2.3.16.2.jar
asm-tree-3.3.jar commons-lang3-3.1.jar
log4j-1.2.17.jar xwork-core-2.3.16.2.jar
src:
struts.xml
app03a:
- Author.java
- Book.java
- Employee.java
- Product.java
- TestUser.java
- User.java
When I checked the catalina.out file, I found the stacktrace which is
show in the attached 'catalina.out.excerpt' file.
Note that in my most recent app03a.war file, I included the .class
files in both the 'classes' directory and in the 'src/app03a' directory.
Can any help with getting this application installed correctly? I'm
still experimenting trying to figure it out.
Regards,
Jim Anderson
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org