• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem with starting Struts2

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What libraries (specifically) are you deploying, and are you deploying them correctly (to WEB-INF/lib)?
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
This tiny ad is suggesting that maybe she should go play in traffic.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic