You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dinesh Khetarpal <dk...@karora.ca> on 2002/09/03 20:01:37 UTC

General HTML/jsp question, any one

I have an html page generated dynamically by jsp, this page has input
field and value=A string which has " in it. I should generate the page
converting " to &quot; but I don't and html assumes string ends early.
Do you know a method to overcome this or utilities which will convert
the string to xml compliant string, will be very well appreciated.
thanks Dinesh

RE: General HTML/jsp question, any one

Posted by Rui Fernandes <ru...@entalpia.com>.
I think you are generating you html by concatenation of strings or so.
If you generate it as you should (as if it was a XML DOM object, to be
serialized after) this would not happen.
----- Original Message -----
From: garrett smith <ja...@yahoo.com>
To: Tomcat Users List <to...@jakarta.apache.org>
Sent: Wednesday, September 04, 2002 7:43 PM
Subject: Re: General HTML/jsp question, any one


> To convert the string to xml compliant string, you could use a custom tag
to
> convert " to &quot;, < to &lt;, et c.
>
> instead of having an input tag, you could have a custom tag such as
> filtered-input. This custom tag would replace " with &quot;
>
> You could try to use single-quotes for attributes, but that will lead to a
> problem if there is an ' in your attribute. Also, " is not allowed in
attribute
> values.
>
> I hope this helps.
>
>
>
> --- Dinesh Khetarpal <dk...@karora.ca> wrote:
> > I have an html page generated dynamically by jsp, this page has input
> > field and value=A string which has " in it. I should generate the page
> > converting " to &quot; but I don't and html assumes string ends early.
> > Do you know a method to overcome this or utilities which will convert
> > the string to xml compliant string, will be very well appreciated.
> > thanks Dinesh
> >
>
>
> =====
> Garrett Needs A Job
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Finance - Get real-time stock quotes
> http://finance.yahoo.com
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: General HTML/jsp question, any one

Posted by garrett smith <ja...@yahoo.com>.
To convert the string to xml compliant string, you could use a custom tag to
convert " to &quot;, < to &lt;, et c.

instead of having an input tag, you could have a custom tag such as
filtered-input. This custom tag would replace " with &quot; 

You could try to use single-quotes for attributes, but that will lead to a
problem if there is an ' in your attribute. Also, " is not allowed in attribute
values.

I hope this helps.



--- Dinesh Khetarpal <dk...@karora.ca> wrote:
> I have an html page generated dynamically by jsp, this page has input
> field and value=A string which has " in it. I should generate the page
> converting " to &quot; but I don't and html assumes string ends early.
> Do you know a method to overcome this or utilities which will convert
> the string to xml compliant string, will be very well appreciated.
> thanks Dinesh
> 


=====
Garrett Needs A Job

__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>