aspose file tools*
The moose likes JSP and the fly likes problem in JSP page input tag, any suggestions .... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "problem in JSP page input tag, any suggestions ...." Watch "problem in JSP page input tag, any suggestions ...." New topic
Author

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

prasad agarwal
Ranch Hand

Joined: Aug 24, 2006
Posts: 44
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

Joined: Aug 24, 2006
Posts: 44
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

Joined: Jan 10, 2002
Posts: 61413
    
  67

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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

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

Joined: Aug 24, 2006
Posts: 44
Hi Bear Bibeault, Thanks a lot
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in JSP page input tag, any suggestions ....