This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Hi,
I am a beginner with Struts 2 and facing problem in calling the action class.
Am trying this in RAD 7 with websphere 6.1.
My 1st jsp page is (index.jsp)And the struts.xml isand the web.xml isAnd the actionclass is I am able to the 1st page that is index.jsp but on click of submit ( http://localhost:9081/Test/HelloWorld.action)
the request is not at all reaching to action class. Evan I am not able to see any error logs in console.
Only in UI file not found error is coming.(Error 404: SRVE0190E: File not found: /HelloWorld.action )
Can anybody please guide me in this regard. where am going wrong..
Prajatna Mahunta
Pradeep Adibatla
Ranch Hand
Joined: Oct 27, 2009
Posts: 336
posted
0
what is your next page??? where is it?
write println's for userName and check what it is giving...
Prajatna Mahunta
Greenhorn
Joined: Sep 01, 2008
Posts: 25
posted
0
Pradeep Adibatla wrote:what is your next page??? where is it?
write println's for userName and check what it is giving...
My nest page (success.jsp) is this page is at same location of index.jsp
I tried putting println for username. But nothing is coming in console,. The action class is not getting called I guesss..
Set the logging level to DEBUG and check the logs on startup. You can also use the config browser to determine what Struts 2 thinks your configuration is.
Prajatna Mahunta
Greenhorn
Joined: Sep 01, 2008
Posts: 25
posted
0
David Newton wrote:BTW, Action.SUCCESS != "SUCCESS"; it is "success". So your result will never be found.
I changed to "SUCCESS" in action class (return "SUCCESS") and in struts.xml (result name="SUCCESS"). But still it is not working.
Surpriseingly I tried the same in eclipse and tomcat , it is working fine, and am able to see the out put page.
But in RAD 7.0.0.9 with Websphere 6.1 it is still not working.
I am able to get my index.jsp(1st page) . But on submiting the form nothing is happening. And am not even able to see any logs in console even enabling the devmode to true. ( <constant name="struts.devMode" value="true" />)
The Log I used to get only upto display of 1st page is .....(after which nothing is being displayed)
Prajatna Mahunta
Greenhorn
Joined: Sep 01, 2008
Posts: 25
posted
0
David Newton wrote:BTW, Action.SUCCESS != "SUCCESS"; it is "success". So your result will never be found.
Please don't confused with "GenericAdmission" coz, I changed my project name from "Test"
Pradeep Adibatla
Ranch Hand
Joined: Oct 27, 2009
Posts: 336
posted
0
Did you change it to 'success' instead of 'SUCCESS' and checked??
Did you change that WebSphere property for filter compatibility? Google for it; you need it set in order to run S2 on WebFear.
Prajatna Mahunta
Greenhorn
Joined: Sep 01, 2008
Posts: 25
posted
0
David Newton wrote:Did you change that WebSphere property for filter compatibility? Google for it; you need it set in order to run S2 on WebFear.
Thanks David,
Your solution worked out for me. I added com.ibm.ws.webcontainer.invokefilterscompatibility =true to my webcontener custom property.(Websphere 6.1.0.0.9) .
But Still it didn't work. Then I tried with struts 2.1.8.1 version jar, and now my action class is getting called and the output jsp page is getting loaded.
But unfortunately ..I am geting some error ..as follows..