File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes unable to run sample application in Struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "unable to run sample application in Struts2" Watch "unable to run sample application in Struts2" New topic
Author

unable to run sample application in Struts2

madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
hi,
im new to Struts....in my application i was required to use Struts2..from the info i got ..i developed sample application....i had done step-by-step what i mentioned...when im running that application im getting error as The module has not been deployed. eventhough i deployed and used 'Clean and Build' also...im using Netbeans6.9.1...can anyone help me out why im getting that problem..

thanks,
madhu.
Nilesh Bond
Greenhorn

Joined: Aug 18, 2010
Posts: 11
Hello Madhuri,

1) Can you check the web.xml file.

You are probably just missing a "/" at the beginning of the url-pattern tag...

2) The other way could be to recreate the project and move your files to the new project.



Many Thanks,
Nilesh
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
hi Nilesh,
this is my web.xml file....can you once check it....i had seen url pattern...it is like this
<url-pattern>/*</url-pattern>


thanks,
madhu.
Nilesh Bond
Greenhorn

Joined: Aug 18, 2010
Posts: 11
Can you provide the stack trace along with the version of Jars that you have included in while running the application.
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
hi,
these are the jar files i used..
1)commons-fileupload-1.2.1.jar
2)commons-logging-1.0.4.jar
3)freemarker-2.3.16.jar
4)ognl-3.0.jar
5)struts2-core-2.2.1.jar
6)xwork-core-2.2.1.jar

the stack trace by deploying the application



thanks,
madhu
Nilesh Bond
Greenhorn

Joined: Aug 18, 2010
Posts: 11
Do the following changes:

1) Add javaassit.jar [Not included in "struts-2.2.1-all.zip". you will have to download it.]

2) Add "commons-logging-api-1.1.jar" and "commons-io-1.3.2.jar"

3) Replaced "ognl-3.0.jar" with "ognl-2.7.3.jar" [In the dependency list OGNL 2.7.3 is given and you are using OGNL 3, try to use 2.7.3 version to see if it works... ]

madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
hi Nilesh,
i tried what you suggested..but the same problem im facing....the following jar files im using..
1)commons-fileupload-1.2.1.jar
2)commons-logging-1.0.4.jar
3)freemarker-2.3.16.jar
4)struts2-core-2.2.1.jar
5)xwork-core-2.2.1.jar
6)commons-logging-api-1.1.jar
7)commons-io-1.3.2.jar
8)javassist.jar
9)ognl-2.7.3.jar

after deploying im getting as




may i know why im getting unable to deploy
thanks,
madhu.
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
i had tried my modifying my jar files...eventhough im getting same errors.....may i know where my code goes wrong..
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Nilesh Bond wrote:1) Add javaassit.jar [Not included in "struts-2.2.1-all.zip". you will have to download it.]

Not true, it's in the struts2-blank application.
3) Replaced "ognl-3.0.jar" with "ognl-2.7.3.jar" [In the dependency list OGNL 2.7.3 is given and you are using OGNL 3, try to use 2.7.3 version to see if it works... ]

NO. Do NOT downgrade libraries at random. S2.2.1 has a dependency on OGNL 3.0.
madhuri kunchala
Ranch Hand

Joined: Mar 30, 2010
Posts: 350
hi,
i got struts2 application i.e., example which is given in one of the sites..its working....according to 'Nilesh' ..i had added the jar files what he had suggested for me to download i had done and its working fine....previously i got problem because i deleted the jar files which already deployed.....for future use of Ranches..here im giving the following jar files should be loaded inorder to run the Struts2 application....i had done in NetBeans 6.9.1

1)commons-fileupload-1.2.1.jar
2)commons-logging-1.0.4.jar
3)freemarker-2.3.16.jar
4)ognl-3.0.jar
5)struts2-core-2.2.1.jar
6)xwork-core-2.2.1.jar
7)javassist.jar
8)ognl-2.7.3.jar


Hope this may helpful who wants to learn Struts2.

Thanks,
Madhuri.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: unable to run sample application in Struts2