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 Request not able to reach Action class in Struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Request not able to reach Action class in Struts2" Watch "Request not able to reach Action class in Struts2" New topic
Author

Request not able to reach Action class in Struts2

Prajatna Mahunta
Greenhorn

Joined: Sep 01, 2008
Posts: 25
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
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
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..
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

BTW, Action.SUCCESS != "SUCCESS"; it is "success". So your result will never be found.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

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
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
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
Did you change it to 'success' instead of 'SUCCESS' and checked??

post the error message...
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

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
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..

When struts dev-mode=false



Even on putting dev mode =true, I got



Please help...
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

List the exact jars you're deploying; right now it looks like you're mixing up versions.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Request not able to reach Action class in Struts2
 
Similar Threads
Struts2 Helloworld Problem
Struts2 Action problem Problem
Struts2 Filter and Includes
Struts2 "There is no Action mapped for namespace / and action name LoginAction ERROR"
problem in Struts2 while running an application