tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark R. Diggory" <mdigg...@latte.harvard.edu>
Subject Re: What sucks about c:import!
Date Wed, 21 Aug 2002 15:11:42 GMT
Thank you, I will post my comments there as well.

On another note, I've been playing around with Taglibraries for some 
time now. I'd like to integrate the EL Engine into my libraries, from 
what I understand it is now going to be part of the JSP 2.0 spec as 
well. How might I go about integrating it into my Taglibraries? I've 
seen examples like the following, is this really all I need to do?

import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager;

....

public int doStartTag() throws JspException {
        reader = getReaderFromFile((String)eval("file", file, 
String.class));
        exposeVariable(reader);
        return EVAL_BODY_INCLUDE;
    }

....


    //*********************************************************************
    // Utility methods
   
    /**
     * Evaluate elexprvalue
     */
    private Object eval(String attName, String attValue, Class clazz)
    throws JspException {
        Object obj = ExpressionEvaluatorManager.evaluate(
        attName, attValue, clazz, this, pageContext);
        if (obj == null) {
            throw new NullAttributeException("file", attName);
        } else {
            return obj;
        }
    }
   
    private void exposeVariable(Reader reader) {
        if (id != null) {
            pageContext.setAttribute(id, reader);
        }
    }

thanks,
Mark Diggory



>Indeed - JSTL 1.0 does not support advanced HTTP operations from within
>JSP pages using <c:import> (e.g., basic authentication, free modification
>of headers), but a future version of JSTL could if there were enough
>perceived need.  As Peter says, it's a good idea to inform the expert
>group if you'd like to see this feature; the address is
>
>   jsr-52-comments@jcp.org
>
> -- Shawn Bayern "JSTL in Action" http://www.jstlbook.com On Wed, 21 
> Aug 2002, peter lin wrote:
>
>>> I'm assuming you want to get at things like cookies, user-agent and
>>> other http header data.
>>> 
>>> you may want to make a request to the expert group, so that it is
>>> included in the next version of JSTL. I believe the current
>>> importsupport class just uses standard url & httpurlconnection classes. 
>>> shawn will know more about the current implementation and where it might
>>> go in the future.
>>> 
>>> 
>>> peter
>>> 
>>> 
>>> "Mark R. Diggory" wrote:
>>    
>>
>>>> > 
>>>> > Now that I have your attention. We are continually working with managing
>>>> > headers in our URL object requests to get resources from different
>>>> > locations. Is there really any way I can set the request Header info
on
>>>> > the URL object being created by c:import? Right now I have my own custom
>>>> > implementations to aquire such resources. I'd rather be able to use
the
>>>> > Standard Taglib.
>>>> > 
>>>> > -Mark Diggory
>>>> > Harvard-MIT Data Center
>>>> > 
>>>> > --
>>>> > To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
>>>> > For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>
>>>      
>>>
>>> 
>>> --
>>> To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
>>> For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>
>>> 
>>    
>>
>
>
>--
>To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>
>
>  
>



--
To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>


Mime
View raw message