aspose file tools*
The moose likes Struts and the fly likes problem with starting Struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "problem with starting Struts2" Watch "problem with starting Struts2" New topic
Author

problem with starting Struts2

Jimmy Wales
Greenhorn

Joined: Jun 05, 2010
Posts: 10
Hello fellow ranchers,

Please help me get started with Struts 2. I have no previous experience of struts 1...so my question might seem a bit naiive

I've written a hello world program in struts 2. When I run the application, the index file is displayed, which indicates that my web.xml is rightly configured. But when i do an action(submitting my name and redisplaying it with another jsp page), I get this error



So, I began digging my struts.xml file. Here are the contents of the file


So, basically server points that there is an error at the action tag in the configuration file. Can anyone point me what's causing the problem? Could it be anything from the java file?



Many thanks in advance for your replies. I'm kinda deadlocked with this problem!
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Turn devMode on, put logging at DEBUG level, and check the logs.
Jimmy Wales
Greenhorn

Joined: Jun 05, 2010
Posts: 10
Hi David,

Thanks for your reply. As I mentioned I'm new to struts, so kindly bear with my naivety(if it seems so)

I was able to turn devMode on struts.xml file, but how can i put logging to debug and initialize logging? I tried googling, but I couldn't get any good answer for struts2. I'm surprised, considering that struts2 has a huge developer base and expected good documentation/articles/tutorials.

Anyway, could you let me know how do I proceed with logging or any link which could explain the same?

Thanks a bunch.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

It uses commons-logging; just configure whatever underlying logging system you're using and CL will pick it up.
Jimmy Wales
Greenhorn

Joined: Jun 05, 2010
Posts: 10

Hi David,

I haven't been able to get my hands on logging, but I checked out the server log. I got these warnings/errors while deploying the app. Could you let me know if this indicates any problem? I'm using glass fish v3 server.



I have around 20 of these kind of errors, for various classes, like for Execute and Wait Interceptor, AnnotationValidationInterceptor, StrutsConversionErrorInterceptor etc.

Am I missing something? I added all of the struts 2.0.14 jar files to the libraries of my current project.


And then I get this log, when I try to perform an action.



Does this help to trace the problem?

PS: There is some problem with netbeans 6.8 + tomcat 6.0. I can't get the application running. So, I'm using glassfish. With this atleast I can see the index page

Thanks in advance.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

What libraries (specifically) are you deploying, and are you deploying them correctly (to WEB-INF/lib)?
sarada srinivas
Greenhorn

Joined: Oct 09, 2008
Posts: 20
If you are new to struts2 you can run struts2-blank-2.0.14.war provided in struts-2.0.14\apps

-Sarada
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem with starting Struts2