aspose 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 Groovy Fundamentals video training course this week in the Groovy forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "can we change sendRedirect() method?" Watch "can we change sendRedirect() method?" New topic

can we change sendRedirect() method?


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>
Matthew Phillips
Ranch Hand

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

Matthew Phillips
It is sorta covered in the JavaRanch Style Guide.
subject: can we change sendRedirect() method?