File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes can we change sendRedirect() method? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "can we change sendRedirect() method?" Watch "can we change sendRedirect() method?" New topic
Author

can we change sendRedirect() method?

gem
Greenhorn

Joined: Apr 03, 2002
Posts: 3
I have enormous amount of servlet code in which i am ocassionally redirecting to *.jhtml files. But now all *.jhtml 's are changed to *.jsp. So instead of going to each and every servlet to change .jhtml to .jsp can i change the sendRedirect(String url) method as :
{
if (url.indexOf(".jhtml") != 0)
url = url.replaceString();
}
where replaceString is some method which changes the .jhtml to .jsp
martin samm
Ranch Hand

Joined: Nov 09, 2000
Posts: 31
how about using perl & regexp across all you .java files or if you're using Apache have a 404 handler which redirects X.jhtml to .jsp?


martin samm<BR>m_sam@rroom.net
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
gem,
Please read the Javaranchnaming policy and change your display name if you wish to continue posting here. Thanks.


Matthew Phillips
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: can we change sendRedirect() method?