• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in JSP page input tag, any suggestions ....

 
prasad agarwal
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,...

You know what i discover some kind of a weired problem in my application..

Ok here it goes,.. in the Database tables,... i noticed that some of the columns have values with double quotes("" for example - little "A")

When i read and display such values, the JSP page doesn't display anything..
It displays only if there are no double quotes ... !!! hmmm..



So how to over come that,... one way to do it is when i am reading from the database, whenever i encounter a double quote ", change it to single quote (') and display,... when i tried this it worked,...
but you know it does not make sense in changing everywhere all across the application...

Any smart and clever way to attack this problem..???
Apreciate your help...
Thanks
[ March 19, 2008: Message edited by: prasad agarwal ]
 
prasad agarwal
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To be even more precise it just cuts off where the " (double quote) starts

for example if its "dog" , then it dosesn't display anything since it starts with ", but if the value is (john "D") then it only displays John (cutting off the "D")

I am just hoping there is a different way to handle this, instead of doing it everywhere... the escape ...
Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64623
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please use real words when posting to the forums. Abbreviations such as "plz" in place of "please" only serve to make your posts more difficult to read and less likely to generate useful responses.

Please read this for more information.

thanks,
bear
JavaRanch sheriff
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64623
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by prasad agarwal:
I am just hoping there is a different way to handle this
Use of <cut> will safely HTML-encode emitted text.
 
prasad agarwal
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bear Bibeault, Thanks a lot
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic