• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to ignore or trim JSP directive attribute with space

 
Tarik Ansari
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,


I have the below code with spaces on uri and prefix (directive attribute).



Could you please help on how to fix without altering the JSP? Can i handle with web.xml or any other property available.

I have hundreds of jsp like this and wanted to handle without code fixes.

I tried JSP trimSpaces but it fixes the namespace but not the attributes.



Thanks.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65522
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. You'll need to edit the JSPs.

This can be done in seconds using a global search and replace.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35709
408
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it an option to do a global search and replace on the JSP directory and actually get rid of the whitespace? (There are several ways of doing that from a tech perspective - in Eclipse, at the command line, etc). If there isn't a strict policy saying you can't touch the JSPs, you are better off going with an actual fix rather than a hack.
 
Tarik Ansari
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have thousdands of JSPs to alter and as per requirement i need to resolve without code fixes.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65522
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't fix it without changing the JSPs. It doesn't matter how badly you wish otherwise.

Both Jeanne and I have pointed out that this can be done in seconds with an editor. Why is that a problem?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!