You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Des qsdqsd <de...@yahoo.fr> on 2007/03/19 17:36:46 UTC

Re : Re : Re : Re : Re : f:verbatim question

>Try commenting out this filter and see if it makes a difference.

I dont use tomahawk ... I guess I will have to track all the filters ...

>If anything, if it were the JSF implementation, I'd expect escape=true
>to take longer than escape=false.   Escape=true means that it performs
>html-escaping on everything whereas escape=false means it renders the
>output as-is.

Dont you think my explanation (that the jsf machinery creates a server side equivalent of jsf components) is right (it would explain this problem) ?

>from which pieces (you could either output the next filter class in
>the chain or you could pass in a parameter to identify the current
>timing filter).

I'd like to do that .. but I'll have to do some research first because I'm not really sure how to do that ...








	

	
		
___________________________________________________________________________ 
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses 
http://fr.answers.yahoo.com

Re: Re : Re : Re : Re : Re : f:verbatim question

Posted by Mike Kienenberger <mk...@gmail.com>.
I don't see how your static text string (which may or may not contain
html elements) would be translated into components.   There's only one
component involved -- h:outputText.   JSF doesn't do anything special
with text containing html and doesn't really even understand it.
It's trivial to have JSF render something else (XML, WAP, xforms, java
byte code) simply by changing the renderkit.

The fact that the behavior changes when you comment out or escape the
code points to something that processes html elements, which JSF
doesn't do.   I suppose it's possible there's some strange bug that
affects only escaped html (maybe buffering it or something), but I
wouldn't look for such a thing until I'd identified JSF (by timing) as
the culprit.

Another quick check might be to simply replace the JSF servlet with
something that outputs raw text, and copy your raw text into that
servlet.   I think your time would be better spent writing or finding
a timing filter.

The filter would look something like this, but you'd probably want to
make it a little more useable.

import java.io.IOException;
import java.util.Date;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

public class TimingFilter implements Filter
{
    public void init(FilterConfig filterConfig) throws ServletException  { }

    public void doFilter(ServletRequest servletRequest,
ServletResponse servletResponse, FilterChain chain) throws
IOException, ServletException
    {
        System.err.println(new Date().toString() + " - Entering timing
filter for " + chain.getClass().getName());

        chain.doFilter(servletRequest, servletResponse);

        System.err.println(new Date().toString() + " - Exiting timing
filter for " + chain.getClass().getName());
    }

    public void destroy() { }
}


On 3/19/07, Des qsdqsd <de...@yahoo.fr> wrote:
>
>
>
> >Try commenting out this filter and see if it makes a difference.
>
> I dont use tomahawk ... I guess I will have to track all the filters ...
>
> >If anything, if it were the JSF implementation, I'd expect escape=true
> >to take longer than escape=false.   Escape=true means that it performs
> >html-escaping on everything whereas escape=false means it renders the
> >output as-is.
>
> Dont you think my explanation (that the jsf machinery creates a server side
> equivalent of jsf components) is right (it would explain this problem) ?
>
> >from which pieces (you could either output the next filter class in
> >the chain or you could pass in a parameter to identify the current
> >timing filter).
>
> I'd like to do that .. but I'll have to do some research first because I'm
> not really sure how to do that ...
>
>
>
>  ________________________________
>  Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions
> ! Profitez des connaissances, des opinions et des expériences des
> internautes sur Yahoo! Questions/Réponses.