File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Request not able to reach Action class in Struts2

 
Prajatna Mahunta
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
 
Pradeep Adibatla
Ranch Hand
Posts: 336
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is your next page??? where is it?

write println's for userName and check what it is giving...

 
Prajatna Mahunta
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BTW, Action.SUCCESS != "SUCCESS"; it is "success". So your result will never be found.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 336
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you change it to 'success' instead of 'SUCCESS' and checked??

post the error message...
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic