You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Giovanni Formenti <fo...@ariadne.it> on 2003/03/21 12:36:40 UTC

A tag inside another: it will be not interpreted!

Hallo,
i have some new conclusion about the problem posted in the messagge "Struts
form with XML/XSL".
The server process the "html" tags, then process the "xsltags:style" (now i
use the JSTL taglibs for the XSL transformation) that output a text with
some "html" tags but they aren't parsed like Struts tag. So i have in output
to the client an HTML file with some "html" tags!
I'm searching a way to put the whole text (after the execution of
<xsltags:style xml="aaa.xml" xsl="aaa.xsl"/> i have
<html:form><html:text..../>...</html:form>) in the text that the Struts
parser bring like input... or something like this!

I hope my problem is more understandable now... even if my english is a
little bit poor!
Please, help me!!!

Giovanni


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: A tag inside another: it will be not interpreted!

Posted by Giovanni Formenti <fo...@ariadne.it>.
Ok... i understand this too late...
But there are "nested" tag that can be processed... how work this custom
tags?
or maybe the solution is to change the StyleTag so it can "parse" inner
html-tag?

Thanx
Gio

PS: sorry for the CCN but i try to solve the problem quickly

----- Original Message -----
From: "Nicolas De Loof" <ni...@cgey.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Friday, March 21, 2003 2:28 PM
Subject: Re: A tag inside another: it will be not interpreted!


> If I understand your case you have something like this :
>
> you want some XML to be processed by <xsltags:style> Tag, and produce
> some JSP code with <html:xxx> Struts tags.
>
> This fails because JSP compiler works this way :
> - scriptlets and JSP tags (that are declared by a <%@ taglib %>) are
> used to build the java code of the JSP. Tags are translated into
> methodcalls.
> - java code is compiled to a servlet
> - servlet is deployed on the container and gets the requests.
>
> Your XSL tag is translated to a method call on the Tag implementation,
> that transform XML and put the result on output. This output can be
> anything, JSP compiler has ended with your JSP !
>
> You cannot produce JSP code with a JSP.
>
> Nico.


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: A tag inside another: it will be not interpreted!

Posted by Nicolas De Loof <ni...@cgey.com>.
If I understand your case you have something like this :

you want some XML to be processed by <xsltags:style> Tag, and produce
some JSP code with <html:xxx> Struts tags.

This fails because JSP compiler works this way :
- scriptlets and JSP tags (that are declared by a <%@ taglib %>) are
used to build the java code of the JSP. Tags are translated into
methodcalls.
- java code is compiled to a servlet
- servlet is deployed on the container and gets the requests.

Your XSL tag is translated to a method call on the Tag implementation,
that transform XML and put the result on output. This output can be
anything, JSP compiler has ended with your JSP !

You cannot produce JSP code with a JSP.

Nico.


> Hallo,
> i have some new conclusion about the problem posted in the messagge
"Struts
> form with XML/XSL".
> The server process the "html" tags, then process the "xsltags:style"
(now i
> use the JSTL taglibs for the XSL transformation) that output a text
with
> some "html" tags but they aren't parsed like Struts tag. So i have
in output
> to the client an HTML file with some "html" tags!
> I'm searching a way to put the whole text (after the execution of
> <xsltags:style xml="aaa.xml" xsl="aaa.xsl"/> i have
> <html:form><html:text..../>...</html:form>) in the text that the
Struts
> parser bring like input... or something like this!
>
> I hope my problem is more understandable now... even if my english
is a
> little bit poor!
> Please, help me!!!
>
> Giovanni
>
>
> --------------------------------------------------------------------
-
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: A tag inside another: it will be not interpreted!

Posted by Giovanni Formenti <fo...@ariadne.it>.
Sure!
Gio

----- Original Message ----- 
From: "apachep2" <ap...@hotmail.com>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Friday, March 21, 2003 3:14 PM
Subject: RE: A tag inside another: it will be not interpreted!


> Have you declare <%@ tablig ....
> 
> 
> > I;m not entirely sure I followed everything, but if you're getting
> HTML
> > tags displayed on screen, meaning instead of <img src="...."> you get
> > &lt;img src="...." &gt; which will cause the 'tag' to display as text,
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: A tag inside another: it will be not interpreted!

Posted by apachep2 <ap...@hotmail.com>.
Have you declare <%@ tablig ....

-----Original Message-----
From: Giovanni Formenti [mailto:formenti@ariadne.it] 
Sent: March 21, 2003 7:46 AM
To: Struts Users Mailing List
Cc: robert@codepuccino.com
Subject: Re: A tag inside another: it will be not interpreted!

----- Original Message -----
From: "Robert S. Sfeir" <ro...@codepuccino.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Cc: <fo...@ariadne.it>
Sent: Friday, March 21, 2003 1:30 PM
Subject: Re: A tag inside another: it will be not interpreted!


> I;m not entirely sure I followed everything, but if you're getting
HTML
> tags displayed on screen, meaning instead of <img src="...."> you get
> &lt;img src="...." &gt; which will cause the 'tag' to display as text,

I'm sorry, but maybe i explain my problem not so clear.
I have a tag <xsl:style..../> that produce a piece of HTML with some
struts
tags:
<xsl:style..../> ====> <html:form><html:text..../>...</html:form>
Now i want that Struts tags are parsed to produce <form><input
type="text"...> and so on but this don't happen! Maybe because are
nested
tags?!
In the HTML i have the right "<" and ">" (not &gt; and &lt;) so the
browser
(correctly!) don't display my form!
It' more clear now?

Thanks for any answer!
Giovanni


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: A tag inside another: it will be not interpreted!

Posted by Giovanni Formenti <fo...@ariadne.it>.
----- Original Message -----
From: "Robert S. Sfeir" <ro...@codepuccino.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Cc: <fo...@ariadne.it>
Sent: Friday, March 21, 2003 1:30 PM
Subject: Re: A tag inside another: it will be not interpreted!


> I;m not entirely sure I followed everything, but if you're getting HTML
> tags displayed on screen, meaning instead of <img src="...."> you get
> &lt;img src="...." &gt; which will cause the 'tag' to display as text,

I'm sorry, but maybe i explain my problem not so clear.
I have a tag <xsl:style..../> that produce a piece of HTML with some struts
tags:
<xsl:style..../> ====> <html:form><html:text..../>...</html:form>
Now i want that Struts tags are parsed to produce <form><input
type="text"...> and so on but this don't happen! Maybe because are nested
tags?!
In the HTML i have the right "<" and ">" (not &gt; and &lt;) so the browser
(correctly!) don't display my form!
It' more clear now?

Thanks for any answer!
Giovanni


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: A tag inside another: it will be not interpreted!

Posted by "Robert S. Sfeir" <ro...@codepuccino.com>.
Giovanni,

I;m not entirely sure I followed everything, but if you're getting HTML 
tags displayed on screen, meaning instead of <img src="...."> you get 
&lt;img src="...." &gt; which will cause the 'tag' to display as text, 
look for the filter property of the tag you're using and set that to 
false.  It will cause the tag to not encode the text and correctly 
parse the html inside it.  BE REAL CAREFUL though, because I've caught 
myself in instances where a form was returned from the DB and it caused 
to break the page because of how the html was put together and saved in 
the DB.

Hope this helps.
R

P.S.  Sorry to be CC'ing you, sometimes my emails don't make it to the 
list... actually most of the time they don't.

On Friday, March 21, 2003, at 06:36 AM, Giovanni Formenti wrote:

> Hallo,
> i have some new conclusion about the problem posted in the messagge 
> "Struts
> form with XML/XSL".
> The server process the "html" tags, then process the "xsltags:style" 
> (now i
> use the JSTL taglibs for the XSL transformation) that output a text 
> with
> some "html" tags but they aren't parsed like Struts tag. So i have in 
> output
> to the client an HTML file with some "html" tags!
> I'm searching a way to put the whole text (after the execution of
> <xsltags:style xml="aaa.xml" xsl="aaa.xsl"/> i have
> <html:form><html:text..../>...</html:form>) in the text that the Struts
> parser bring like input... or something like this!
>
> I hope my problem is more understandable now... even if my english is a
> little bit poor!
> Please, help me!!!
>
> Giovanni
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org