This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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
Thanks a lot<br />Learn from yesterday, live for today, hope for tomorrow. The important thing is to not stop questioning
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 ]
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. ;-)