jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mart...@apache.org
Subject cvs commit: jakarta-taglibs/bsf/src/org/apache/taglibs/bsf expression.java scriptlet.java
Date Sun, 29 Feb 2004 07:25:01 GMT
martinc     2004/02/28 23:25:01

  Modified:    bsf/src/org/apache/taglibs/bsf expression.java
                        scriptlet.java
  Log:
  Fix line ends.
  
  Revision  Changes    Path
  1.3       +74 -74    jakarta-taglibs/bsf/src/org/apache/taglibs/bsf/expression.java
  
  Index: expression.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/bsf/src/org/apache/taglibs/bsf/expression.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- expression.java	1 Dec 2002 18:52:45 -0000	1.2
  +++ expression.java	29 Feb 2004 07:25:01 -0000	1.3
  @@ -1,74 +1,74 @@
  -package org.apache.taglibs.bsf ;
  -
  -import javax.servlet.jsp.* ;
  -import javax.servlet.jsp.tagext.* ;
  -import java.io.IOException ;
  -
  -import org.apache.bsf.* ;
  -
  -public class expression implements BodyTag
  -{
  -    protected Tag          parent ;
  -    protected BodyContent  bodyOut ;
  -    protected PageContext  pageContext ;
  -    protected String       language ;
  -
  -    public void setLanguage(String value)           { language = value ; };
  -    public void setParent(Tag parent)               { this.parent = parent ; };
  -    public Tag  getParent()                         { return( this.parent ); };
  -    public void doInitBody()  throws JspException   { };
  -    public int  doAfterBody() throws JspException   { return 0; };
  -    public void release()                           { };
  -    public void setBodyContent(BodyContent bodyOut) { this.bodyOut = bodyOut;};
  -    public int  doStartTag() throws JspException    { return(EVAL_BODY_TAG);};
  -
  -    public void setPageContext(PageContext pageContext) { 
  -        this.pageContext = pageContext ;
  -    };
  -
  -    private void register( BSFManager mgr, String name, Object bean ) 
  -                     throws Exception {
  -	if ( bean == null ) return ;
  -        try {
  -	    mgr.declareBean( name, bean, bean.getClass() );
  -	}
  -	catch( Exception e ) {
  -	    throw e ;
  -	}
  -    };
  -
  -    public int doEndTag() throws JspException {
  -        try {
  -            JspWriter out = pageContext.getOut();
  -	    if ( bodyOut == null ) return( EVAL_PAGE );
  -
  -            BSFManager mgr  = new BSFManager ();
  -            BSFEngine  BSFengine = mgr.loadScriptingEngine (language);
  -
  -            try {
  -	        register( mgr, "request"    , pageContext.getRequest() );
  -		register( mgr, "response"   , pageContext.getResponse() );
  -		register( mgr, "pageContext", pageContext );
  -		register( mgr, "application", pageContext.getServletContext() );
  -		register( mgr, "out"        , out );
  -		register( mgr, "config"     , pageContext.getServletConfig() );
  -		register( mgr, "page"       , pageContext.getPage() );
  -		register( mgr, "exception"  , pageContext.getException() );
  -		register( mgr, "session"    , pageContext.getSession() );
  -	    } catch( Exception e ) {
  -	        out.println( e.toString() );
  -	        e.printStackTrace();
  -	    }
  -
  -	    Object result ;
  -	    result = BSFengine.eval ("<unknown>", 0, 0, bodyOut.getString() );
  -	    if ( result != null )
  -	        out.println( result.toString() );
  -	} catch( Exception e ) {
  -	    System.out.println( e.toString() );
  -	    e.printStackTrace();
  -	    // throw new JspException( e.toString() );
  -	}
  -        return( EVAL_PAGE );
  -    };
  -}
  +package org.apache.taglibs.bsf ;
  +
  +import javax.servlet.jsp.* ;
  +import javax.servlet.jsp.tagext.* ;
  +import java.io.IOException ;
  +
  +import org.apache.bsf.* ;
  +
  +public class expression implements BodyTag
  +{
  +    protected Tag          parent ;
  +    protected BodyContent  bodyOut ;
  +    protected PageContext  pageContext ;
  +    protected String       language ;
  +
  +    public void setLanguage(String value)           { language = value ; };
  +    public void setParent(Tag parent)               { this.parent = parent ; };
  +    public Tag  getParent()                         { return( this.parent ); };
  +    public void doInitBody()  throws JspException   { };
  +    public int  doAfterBody() throws JspException   { return 0; };
  +    public void release()                           { };
  +    public void setBodyContent(BodyContent bodyOut) { this.bodyOut = bodyOut;};
  +    public int  doStartTag() throws JspException    { return(EVAL_BODY_TAG);};
  +
  +    public void setPageContext(PageContext pageContext) { 
  +        this.pageContext = pageContext ;
  +    };
  +
  +    private void register( BSFManager mgr, String name, Object bean ) 
  +                     throws Exception {
  +	if ( bean == null ) return ;
  +        try {
  +	    mgr.declareBean( name, bean, bean.getClass() );
  +	}
  +	catch( Exception e ) {
  +	    throw e ;
  +	}
  +    };
  +
  +    public int doEndTag() throws JspException {
  +        try {
  +            JspWriter out = pageContext.getOut();
  +	    if ( bodyOut == null ) return( EVAL_PAGE );
  +
  +            BSFManager mgr  = new BSFManager ();
  +            BSFEngine  BSFengine = mgr.loadScriptingEngine (language);
  +
  +            try {
  +	        register( mgr, "request"    , pageContext.getRequest() );
  +		register( mgr, "response"   , pageContext.getResponse() );
  +		register( mgr, "pageContext", pageContext );
  +		register( mgr, "application", pageContext.getServletContext() );
  +		register( mgr, "out"        , out );
  +		register( mgr, "config"     , pageContext.getServletConfig() );
  +		register( mgr, "page"       , pageContext.getPage() );
  +		register( mgr, "exception"  , pageContext.getException() );
  +		register( mgr, "session"    , pageContext.getSession() );
  +	    } catch( Exception e ) {
  +	        out.println( e.toString() );
  +	        e.printStackTrace();
  +	    }
  +
  +	    Object result ;
  +	    result = BSFengine.eval ("<unknown>", 0, 0, bodyOut.getString() );
  +	    if ( result != null )
  +	        out.println( result.toString() );
  +	} catch( Exception e ) {
  +	    System.out.println( e.toString() );
  +	    e.printStackTrace();
  +	    // throw new JspException( e.toString() );
  +	}
  +        return( EVAL_PAGE );
  +    };
  +}
  
  
  
  1.3       +73 -73    jakarta-taglibs/bsf/src/org/apache/taglibs/bsf/scriptlet.java
  
  Index: scriptlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/bsf/src/org/apache/taglibs/bsf/scriptlet.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- scriptlet.java	1 Dec 2002 18:52:45 -0000	1.2
  +++ scriptlet.java	29 Feb 2004 07:25:01 -0000	1.3
  @@ -1,73 +1,73 @@
  -package org.apache.taglibs.bsf ;
  -
  -import javax.servlet.jsp.* ;
  -import javax.servlet.jsp.tagext.* ;
  -import java.io.IOException ;
  -
  -import org.apache.bsf.* ;
  -
  -public class scriptlet implements BodyTag
  -{
  -    protected Tag          parent ;
  -    protected BodyContent  bodyOut ;
  -    protected PageContext  pageContext ;
  -    protected String       language ;
  -
  -    public void setLanguage(String value)           { language = value ; };
  -    public void setParent(Tag parent)               { this.parent = parent ; };
  -    public Tag  getParent()                         { return( this.parent ); };
  -    public void doInitBody()  throws JspException   { };
  -    public int  doAfterBody() throws JspException   { return 0; };
  -    public void setBodyContent(BodyContent bodyOut) { this.bodyOut = bodyOut;};
  -    public int  doStartTag() throws JspException    { return(EVAL_BODY_TAG);};
  -    public void release()                           { };
  -
  -    public void setPageContext(PageContext pageContext) { 
  -        this.pageContext = pageContext ;
  -    };
  -
  -    private void register( BSFManager mgr, String name, Object bean ) 
  -                     throws Exception {
  -	if ( bean == null ) return ;
  -        try {
  -            mgr.declareBean( name, bean, bean.getClass() );
  -	}
  -	catch( Exception e ) {
  -	    throw e ;
  -	}
  -    };
  -
  -    public int doEndTag() throws JspException {
  -        try {
  -            JspWriter out = pageContext.getOut();
  -	    if ( bodyOut == null ) return( EVAL_PAGE );
  -
  -            BSFManager mgr  = new BSFManager();
  -            BSFEngine  engine = mgr.loadScriptingEngine(language);
  -
  -            try {
  -	        register( mgr, "request"    , pageContext.getRequest() );
  -		register( mgr, "response"   , pageContext.getResponse() );
  -		register( mgr, "pageContext", pageContext );
  -		register( mgr, "application", pageContext.getServletContext() );
  -		register( mgr, "out"        , out );
  -		register( mgr, "config"     , pageContext.getServletConfig() );
  -		register( mgr, "page"       , pageContext.getPage() );
  -		register( mgr, "exception"  , pageContext.getException() );
  -		register( mgr, "session"    , pageContext.getSession() );
  -	    } catch( Exception e ) {
  -	        out.println( e.toString() );
  -	        e.printStackTrace();
  -	    }
  -
  -	    engine.exec ("<JSP>", 1, 1, bodyOut.getString() );
  -
  -	} catch( Exception e ) {
  -	    System.out.println( e.toString() );
  -	    e.printStackTrace();
  -	    // throw new JspException( e.toString() );
  -	}
  -        return( EVAL_PAGE );
  -    };
  -
  -}
  +package org.apache.taglibs.bsf ;
  +
  +import javax.servlet.jsp.* ;
  +import javax.servlet.jsp.tagext.* ;
  +import java.io.IOException ;
  +
  +import org.apache.bsf.* ;
  +
  +public class scriptlet implements BodyTag
  +{
  +    protected Tag          parent ;
  +    protected BodyContent  bodyOut ;
  +    protected PageContext  pageContext ;
  +    protected String       language ;
  +
  +    public void setLanguage(String value)           { language = value ; };
  +    public void setParent(Tag parent)               { this.parent = parent ; };
  +    public Tag  getParent()                         { return( this.parent ); };
  +    public void doInitBody()  throws JspException   { };
  +    public int  doAfterBody() throws JspException   { return 0; };
  +    public void setBodyContent(BodyContent bodyOut) { this.bodyOut = bodyOut;};
  +    public int  doStartTag() throws JspException    { return(EVAL_BODY_TAG);};
  +    public void release()                           { };
  +
  +    public void setPageContext(PageContext pageContext) { 
  +        this.pageContext = pageContext ;
  +    };
  +
  +    private void register( BSFManager mgr, String name, Object bean ) 
  +                     throws Exception {
  +	if ( bean == null ) return ;
  +        try {
  +            mgr.declareBean( name, bean, bean.getClass() );
  +	}
  +	catch( Exception e ) {
  +	    throw e ;
  +	}
  +    };
  +
  +    public int doEndTag() throws JspException {
  +        try {
  +            JspWriter out = pageContext.getOut();
  +	    if ( bodyOut == null ) return( EVAL_PAGE );
  +
  +            BSFManager mgr  = new BSFManager();
  +            BSFEngine  engine = mgr.loadScriptingEngine(language);
  +
  +            try {
  +	        register( mgr, "request"    , pageContext.getRequest() );
  +		register( mgr, "response"   , pageContext.getResponse() );
  +		register( mgr, "pageContext", pageContext );
  +		register( mgr, "application", pageContext.getServletContext() );
  +		register( mgr, "out"        , out );
  +		register( mgr, "config"     , pageContext.getServletConfig() );
  +		register( mgr, "page"       , pageContext.getPage() );
  +		register( mgr, "exception"  , pageContext.getException() );
  +		register( mgr, "session"    , pageContext.getSession() );
  +	    } catch( Exception e ) {
  +	        out.println( e.toString() );
  +	        e.printStackTrace();
  +	    }
  +
  +	    engine.exec ("<JSP>", 1, 1, bodyOut.getString() );
  +
  +	} catch( Exception e ) {
  +	    System.out.println( e.toString() );
  +	    e.printStackTrace();
  +	    // throw new JspException( e.toString() );
  +	}
  +        return( EVAL_PAGE );
  +    };
  +
  +}
  
  
  

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


Mime
View raw message