• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

can we change sendRedirect() method?

 
gem
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Matthew Phillips
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
gem,
Please read the Javaranchnaming policy and change your display name if you wish to continue posting here. Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic