• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

struts extension

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am using Struts frame work using Jsp and Servlets.
Whenever we will forward a request from one jsp to the controller in the
browser we will see ".do" as an extension for action class,but my client requires that it should display the ".jsp" and the current jsp.
Which is very urgent....

Thanks a lot
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One way to achieve this would be to specify redirect="true" with every forward. This would cause the browser to display myPage.jsp instead of myAction.do. However, there's one serious drawback to this approach: All data that you pass between the action class and the JSP must be passed in the form of parameters passed in the query string (?parm1=abcz&parm2=xyz, etc). You will not be able to use the request.setAttribute() method to store information to be passed to the JSP. Session and Applicatoin scoped variables will still work, however.
[ March 07, 2006: Message edited by: Merrill Higginson ]
 
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would suggest that you explain to your client that this is a dumb request; that they are wasting your time and/or their money for a "feature" that has no advantage. I can understand a request to hide the underlying technology (so the user does not see .do, .jsp, .asp, ...) but I don't see an advantage with showing .jsp extensions. What happens when a user bookmarks a URL with a jsp extension?

If there is a valid reason, could you share it?

BTW, clients usually don't like it when you say that their ideas are dumb...so you might want to use a different phrase. ;-)

- Brent
[ March 08, 2006: Message edited by: Brent Sterling ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic