• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Redirect to JSP from Action Class with Parameter in Struts?

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am moving the files from one directory to other directory. After moving the files I want to give the message to the user
that how many files are moved.To display this message how to send a parameter from Action Class to Jsp file?
Just like response.sendRedirect("../admin/HRMAdmnShowTrgAgencyDetails.jsp?reg="+mode+"");
 
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi naveen

Then it seems that u r not that perfect with the concepts of request and all .u need not sent it as query string .u can set that count in request scope and u can access it in ur jsp to display the information.Hope u r getting me .
 
Naveen
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Srinath, You are correct..I didn't work on Request objects earlier. You mean to say that that count will add to the Request Object and take that value in View (JSP) and will display there. May be I have to check the request object for not null and will display the count and have to remove that variable as the same jsp has to be displayed before and after moving files. If you are having that code sample can you post here? Thanks in Advance
 
Greenhorn
Posts: 6
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We can have dynamic redirection of JSP pages through action classes in Struts 2 using "redirect" result in struts.xml.

E.g:
In Struts.xml, have a dynamic result such as:


In the action:


 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic