File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes How to escape quote characters ( Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to escape quote characters (")?" Watch "How to escape quote characters (")?" New topic

How to escape quote characters (")?

Konstantin Kamsky

Joined: May 27, 2010
Posts: 1
I use Struts 2. On my page I have
<input ... value="${someVariable}"/>
If someVariable has value with quotes (") it can broke the page.
I can't use <s:textfield> from Struts tag library. That <input> is in my own tag library.
What is the better way to escape quote characters?
David Newton

Joined: Sep 29, 2008
Posts: 12617

Escape them on the server side, use a JSP EL function, etc.
I agree. Here's the link:
subject: How to escape quote characters (")?