• Post Reply Bookmark Topic Watch Topic
  • New Topic

Find & Replace strings/text in JSP's

 
Sidharth Pallai
Ranch Hand
Posts: 137
Hibernate Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My application has around 1800 JSP's, which is intended to be migrated to a different version, where tags/strings refrered in JSP's has to be replaced with prefrered tags/strings.

Am planning to go for a java application which will gurantee the find and replace prefered strings/text based on user serach criteria.

I just want to know how to make sure that all pages with "some" text get replaced , or the approach to create a separate application would be of any usefulness.

If any one could suggest any other approach or idea to arrive at such a solution, would of great usefullness for me.

 
Campbell Ritchie
Marshal
Posts: 52580
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not a "beginning" question. Moving thread.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sed (or awk, I suppose).

I guess I'm not sure what the question is.
 
Mark E Hansen
Ranch Hand
Posts: 650
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I understand the question correctly, this is what Perl was created for. With Perl, you can go through all the files, search for specific patterns, change them to new values, etc. There are Perl tutorials for doing such operations, so you should be able to find some examples with a little bit of searching.

Good luck.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, that's what sed was created for :p

Perl was created for helping create reports.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!