• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Deploy Strut2 application using Netbeans 6.8

 
Nicola Ace
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello guys i'm tring to deploy my 1st struct2 applicaion but i'm having very big problems...
I'm using Apache 6.0 and netbeans 6.8
Hope someone can help me.

My web.xml file is(is set under WEB-INF) :



My struts.xml is (is set under src)



Under src/actions i have my action java file (named VerySimpleAction.java)


now i want to show the resoult calling the verysimple.jsp page



My struts 2 libraries are:
commons-fileupload-1-2-1.jar
commons.io-1.3.2.jar
commons-logging-1.1.1.jar
freemarker-2.3.16.jar
javassist.jar
ognl-3.0.jar
struts2-core-2.2.1.jar
xwork-core-2.2.1..jar

If i'm correct my application should show me : VERY SIMPLE
The problem is that i'm not getting this message but i get HELLO WORLD, the message is written in the default index.jsp that i'm not calling (i think)
Can someone PLEASE give me some hint?

Tanx a lot!!!
 
Ankit Garg
Sheriff
Posts: 9509
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The name of the framework is Struts not struct. If you have actually named your xml as struct.xml, you need to change it. Also what is the URL that you are entering in the browser??
 
Nicola Ace
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry it was my mistake. The XML file is named struts.xml.

Ankit Garg wrote: Also what is the URL that you are entering in the browser??


Generally i start the application usung the button "Start Main Project" after having done "Clean and Build".
The call in the browser is this one: http://localhost:8084/Struct2Example1/

My tomcat is listening on 8084

So, can you give me some hints?
 
Ankit Garg
Sheriff
Posts: 9509
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well you'll have to enter the action name in the URL to be able to access it. Try this URL
http://localhost:8084/Struct2Example1/VerySimpleAction.action
 
Nicola Ace
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Very kind, now it works!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic