how show the quotation <input type = "text"  nale = "d" value=" he said,"I love you" " >?

Posted on 2004-10-20
Last Modified: 2010-04-01
IN ASP I know method server.HTMLEncode(). but in JSP??
any help?
Question by:laoyaobest

Author Comment

Comment Utility



<input type="text" name="non_operation" value="he said,"I love you" ">

LVL 32

Accepted Solution

ldbkutty earned 150 total points
Comment Utility
LVL 27

Expert Comment

Comment Utility
> but in JSP??
No, just plain java. Use the static methods in the   package.
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!


Expert Comment

Comment Utility

try this

<input type = 'text'  nale = 'd' value=' he said,"I love you" ' >

this will print never use "(double quotes) in html always use '(single quotes)


LVL 35

Expert Comment

Comment Utility
> never use "(double quotes) in html always use '(single quotes)

Errr...  that solves it for double quotes, but what about:

<input type = 'text'  nale = 'd' value=' he'd said,"I love you" ' >

Basically, what everyone else said is the best way forward...encode your string :-)

Expert Comment

Comment Utility
If you're talking about what I think you're talking about then you can use backslash (\) to have the html ignore the qoutation mark.

like so:

<input type="text" nale="d" value="he said \"I love you\"">

this, of course, also works with apostrophes (') or anything else.

Author Comment

Comment Utility
I will try it tomrrow.
I need to solve both /*value=' he said,"I love you" ' */ and  /*value=' he'd said,"I love you" ' */
So I must encode my string.

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
communication with a non technical owner 16 97
J2SE 5.0 metadata 1 44
oracle fusion vs MQ 2 90
mask rule in struts validation.xml 5 67
HOW TO: Connect to the VMware vSphere Hypervisor 6.5 (ESXi 6.5) using the vSphere (HTML5 Web) Host Client 6.5, and perform a simple configuration task of adding a new VMFS 6 datastore.
HOW TO: Upload an ISO image to a VMware datastore for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5) using the vSphere Host Client, and checking its MD5 checksum signature is correct.  It's a good idea to compare checksums, because many installat…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now