Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with submiting the page in Strurs 1

 
vivek mahajan
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have designed an action class which redirects the user according to the link clicked e.g. /action/employee.do?cmd=create redirects to insert employee page and /action/employee.do?cmd=edit redirects to Edit Employee page. the following lines shows the struts-config.xml entries
I cannot submit both the pages of Create employee as well as Edit Employee i have checked it by the following code in execute methods of CreateProfile as well as EditProfile

I can't get the line printed
and it shows the Insert and Edit Page back even after clicking the submit button
Please Help Me
 
Ranveer K Kumar
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


you are checking on createProfile action while first time when you clicking on create it forwarding to createprofile.jsp page by the Employee action not bye the CreateProfile class.

and please post the code of action classes.
 
Ankit Garg
Sheriff
Posts: 9528
32
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In your config file, the path is /actions/employee and you are writing that you are saying that the request goes to /action/employee.do (there is no s in action here). Also are you returning create or edit mapping from the employee action. If yes, then that will take you directly to JSP page not to actions (as you've configured in your config file)...
 
vivek mahajan
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Friends I got the solution. Now its working fine
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic