Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mapping.getInputForward()

 
Saritha Penumudi
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a menu from where I will click on a hyperlink which takes me to listing page. In my listing page I have checkbox before each record and delete button in the bottom of the listing.

Now, when user selects records from the listing and clicks delete button, I have to go and delete those records from the database.

on error, I have to show same listing with error message on top when I say return (mapping.getInputForward()); it is taking me to menu page. How can i get back to my listing page without getting whole data from the database again?

or it is compulsory to get whole records from database in both success and error conditions.

I am not sure why return (mapping.getInputForward()); is taking me to menu page. How can I get back to my listing page

Please help me out.
Thank you
Saritha
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does the ActionMapping look like?
 
Saritha Penumudi
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am sorry I did not understand your quetion.

I am using DispatchAction
This is the method signature


mapping is the method parameter of delete method.

This is the configuration in struts-config.xml file


I always thought that mapping.getInputForward() should hold page url from which I am making the request.

I would really appreciate if you could help me in solving my problem

Thank you
Saritha
[ September 22, 2004: Message edited by: Saritha ventrapragada ]
 
Sheldon Fernandes
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
getInputForward() returns an ActionForward that corresponds to the "input" property of the Action.

In your case this is 'index.jsp'
<action input="/index.jsp" path="/messages" scope="request" ...

If you want to forward to "ListMessages.jsp" use:
- mapping.findForward("continueList")
OR
- change your action mapping to
<action input="/ListMessages.jsp" path="/messages" scope="request" ...
and continue using getInputForward()

Sheldon Fernandes
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic