I am very new with Struts MVC project. I have written a simple hello world project, when I run this project, it shows the index page, but after that it is not working and even not giving any error in console also. I am using RAD 7.x as editor and Websphere as server and Struts1.3. My project business is like that,
JSP pages at view
1. index.jsp --> wher user enter the name or keep blank
2. success.jsp --> if user enter name then only page show the Name which has enter at index.jsp page
3. error.jsp page --> if user did not enter name at index.jsp pageand click submit then it show error message.
1. HelloWorldForm --> for getter and setter
2. HelloWorldAction --> Action page
Unless there is some reason you need to learn Struts 1 (i.e. your employer has an old application that uses it and for some reason cannot upgrade), don't. It hasn't seen an update in nearly 10 years, is officially unsupported and has some glaring architectural flaws that make any non-trivial development painful.
That said, I'm not sure what you mean by "it is not working". Does the form not submit? Does the page go blank? Does it just sit there?
Your best bet to debug your code would be to put log messages in your action methods to see if they are getting called, getting the information you expect and returning the values you want them to.
When ever I click on link at indec.jsp page either for success.jsp and error.jsp page it gives a blank page. Even nothing error are showing at console. page error status 500.
Regarding debug when I started to debug, it goes to ClassNotFoundException.
Thanks for your reply. But I am extremely sorry , issue yet not fixed. and Other things is that error code is HTTP 404, not 500. I have attached the screenshots. Regarding server log, I don't know how to check. Please help me.
when i run this project console gives an error message like :
[5/24/15 12:52:45:755 IST] 00000023 PropertyMessa W org.apache.struts.util.PropertyMessageResources loadLocale Resource com/ibm/hellostruts/resources/ApplicationResources_en_US.properties Not Found.
[5/24/15 12:52:45:765 IST] 00000023 PropertyMessa W org.apache.struts.util.PropertyMessageResources loadLocale Resource com/ibm/hellostruts/resources/ApplicationResources_en.properties Not Found.
[5/24/15 12:52:50:605 IST] 00000023 ComposableReq I org.apache.struts.chain.ComposableRequestProcessor init Initializing composable request processor for module prefix ''
[5/24/15 12:52:50:665 IST] 00000023 CreateAction I org.apache.struts.chain.commands.servlet.CreateAction createAction Initialize action of type: org.resource.action.HelloWorldAction
after that when i try to add classes folder under WEB-INF, it shows message already exist, but there is only lib folder.