Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with starting Struts2

 
Jimmy Wales
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Turn devMode on, put logging at DEBUG level, and check the logs.
 
Jimmy Wales
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It uses commons-logging; just configure whatever underlying logging system you're using and CL will pick it up.
 
Jimmy Wales
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What libraries (specifically) are you deploying, and are you deploying them correctly (to WEB-INF/lib)?
 
sarada srinivas
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are new to struts2 you can run struts2-blank-2.0.14.war provided in struts-2.0.14\apps

-Sarada
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic