Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » How to replace jsp comments with html comments(search and replace patter)
icon14.gif  How to replace jsp comments with html comments [message #1701755] Wed, 15 July 2015 12:26 Go to next message
Basil Abraham is currently offline Basil AbrahamFriend
Messages: 3
Registered: July 2015
Junior Member
I have a requirement to replace all html comments in all jsp file in my work space with jsp comments. I need to search for all and replace with <%-- --%> and I should not loose the comments.

For Eg

<!-- I have a comment here --> should be replaced with.
<%-- I have a comment here --%>
I am using eclipse to do this. Please let me know if I have some other better way to do it.
Re: How to replace jsp comments with html comments [message #1702054 is a reply to message #1701755] Sat, 18 July 2015 05:33 Go to previous messageGo to next message
kunal verma is currently offline kunal vermaFriend
Messages: 1
Registered: July 2015
Junior Member
Why don't you simply add a task in your build process that makes sure that no JSP contains <!--? That would be extremely simple to implement, it would educate your developers, it would cost nothing at runtime, and it wouldn't tie your solution to any specific tomcat implementation.
Re: How to replace jsp comments with html comments [message #1702069 is a reply to message #1702054] Sat, 18 July 2015 16:24 Go to previous message
Basil Abraham is currently offline Basil AbrahamFriend
Messages: 3
Registered: July 2015
Junior Member
I can do that, but need to remove all the comments for now, i tried $1 but it is not working
Previous Topic:Eclipse mars + buildship problem
Next Topic:Eclipse: Java [ Not Detecting Key Pressed ]
Goto Forum:
  


Current Time: Wed Dec 04 16:47:08 GMT 2024

Powered by FUDForum. Page generated in 0.46877 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top