This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes <> symbol in textbox it's been changed to & lt; and & gt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "<> symbol in textbox it Watch "<> symbol in textbox it New topic
Author

<> symbol in textbox it's been changed to & lt; and & gt

josuva moorthy
Greenhorn

Joined: Apr 05, 2010
Posts: 11
This is the code

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>

<html:text styleClass="text" name="CardForm"
property="lastName"
maxlength="20" styleId="lastName"/>

When I enter <> symbol in textbox it's been changed to & lt; and & gt
William P O'Sullivan
Ranch Hand

Joined: Mar 28, 2012
Posts: 859

It has been URL encoded during the POST process.

You may need to decode it if persisting to a database or something.

WP
josuva moorthy
Greenhorn

Joined: Apr 05, 2010
Posts: 11
William P O'Sullivan wrote:It has been URL encoded during the POST process.

You may need to decode it if persisting to a database or something.

WP



How to decode .It's only occurring for few symbols <>%()
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

William P O'Sullivan wrote:It has been URL encoded during the POST process.


URL-encoding changes characters to something starting with a percent sign. For example a space character changes to "%20". So no, that's not URL-encoding.
William P O'Sullivan
Ranch Hand

Joined: Mar 28, 2012
Posts: 859

Sorry, HTML encoded.

WP
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: <> symbol in textbox it's been changed to & lt; and & gt