giacomo     01/11/25 01:07:30

  Modified:    src/org/apache/cocoon/components/jsp JSPEngineImpl.java
  Log:
  Fixing the international chars for jsp generator
  
  Submitted by: Bernhard Huber <[EMAIL PROTECTED]>
  
  Revision  Changes    Path
  1.7       +45 -27    
xml-cocoon2/src/org/apache/cocoon/components/jsp/JSPEngineImpl.java
  
  Index: JSPEngineImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/org/apache/cocoon/components/jsp/JSPEngineImpl.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- JSPEngineImpl.java        2001/10/11 07:28:17     1.6
  +++ JSPEngineImpl.java        2001/11/25 09:07:30     1.7
  @@ -7,7 +7,29 @@
    *****************************************************************************/
   package org.apache.cocoon.components.jsp;
   
  +import java.io.BufferedReader;
  +import java.io.IOException;
  +import java.io.OutputStream;
  +import java.io.ByteArrayInputStream;
  +import java.io.ByteArrayOutputStream;
  +import java.io.PrintWriter;
  +import java.security.Principal;
  +import java.util.Enumeration;
  +import java.util.Locale;
  +import java.util.Map;
  +import javax.servlet.RequestDispatcher;
  +import javax.servlet.ServletConfig;
  +import javax.servlet.ServletContext;
  +import javax.servlet.ServletException;
  +import javax.servlet.ServletInputStream;
  +import javax.servlet.ServletOutputStream;
  +import javax.servlet.http.Cookie;
  +import javax.servlet.http.HttpSession;
  +import javax.servlet.Servlet;
  +import javax.servlet.http.HttpServletRequest;
  +import javax.servlet.http.HttpServletResponse;
   import org.apache.avalon.framework.activity.Disposable;
  +import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.component.ComponentManager;
   import org.apache.avalon.framework.component.Composable;
  @@ -20,28 +42,24 @@
   import org.apache.avalon.framework.logger.AbstractLoggable;
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.avalon.framework.thread.ThreadSafe;
  -
  -import javax.servlet.*;
  -import javax.servlet.http.Cookie;
  -import javax.servlet.http.HttpServletRequest;
  -import javax.servlet.http.HttpServletResponse;
  -import javax.servlet.http.HttpSession;
  -import java.io.BufferedReader;
  -import java.io.ByteArrayOutputStream;
  -import java.io.IOException;
  -import java.io.PrintWriter;
  -import java.security.Principal;
  -import java.util.Enumeration;
  -import java.util.Locale;
  +import org.apache.cocoon.ProcessingException;
  +import org.apache.cocoon.components.parser.Parser;
  +import org.apache.cocoon.environment.http.HttpEnvironment;
  +import org.apache.cocoon.xml.AbstractXMLProducer;
  +import org.apache.cocoon.xml.XMLProducer;
  +import org.apache.avalon.excalibur.pool.Recyclable;
  +import org.apache.log.Logger;
  +import org.xml.sax.InputSource;
  +import org.xml.sax.SAXException;
   
   /**
    * Allows JSP to be used as a generator.  Builds upon the JSP servlet
  - * functionality - overrides the output method and returns the byte(s).
  + * functionality - overrides the output method and returns the byte(s). 
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Davanum Srinivas</a>
  - * @version CVS $Revision: 1.6 $ $Date: 2001/10/11 07:28:17 $
  + * @version CVS $Revision: 1.7 $ $Date: 2001/11/25 09:07:30 $
    */
  -public class JSPEngineImpl extends AbstractLoggable
  +public class JSPEngineImpl extends AbstractLoggable 
       implements JSPEngine, Contextualizable, Composable, Configurable, ThreadSafe, 
Disposable {
   
       /** The Servlet Include Path */
  @@ -61,9 +79,9 @@
       }
   
       /**
  -     * Set the sitemap-provided configuration.
  +     * Set the sitemap-provided configuration. 
        * @param conf The configuration information
  -     * @exception ConfigurationException
  +     * @exception ConfigurationException 
        */
       public void configure(Configuration conf) throws ConfigurationException {
           Parameters params = Parameters.fromConfiguration(conf);
  @@ -85,15 +103,15 @@
        * execute the JSP and return the output
        *
        * @param context The Servlet Context
  -     * @exception IOException
  -     * @exception ServletException
  -     * @exception SAXException
  -     * @exception Exception
  +     * @exception IOException 
  +     * @exception ServletException 
  +     * @exception SAXException 
  +     * @exception Exception 
        */
  -    public byte[] executeJSP(String url, HttpServletRequest httpRequest, 
HttpServletResponse httpResponse, ServletContext context)
  -        throws IOException, ServletException/*, SAXException*/, Exception {
  +    public byte[] executeJSP(String url, HttpServletRequest httpRequest, 
HttpServletResponse httpResponse, ServletContext context) 
  +        throws IOException, ServletException, SAXException, Exception {
   
  -//        Parser parser = null;
  +        Parser parser = null;
           byte[] bytes = null;
   
           MyServletRequest request = new MyServletRequest(httpRequest, url);
  @@ -106,7 +124,7 @@
           jsp.service(request, response);
   
           bytes = response.toByteArray();
  -//        ByteArrayInputStream input = new ByteArrayInputStream(bytes);
  +        ByteArrayInputStream input = new ByteArrayInputStream(bytes);
   
           // clean up
           jsp.destroy();
  @@ -129,7 +147,7 @@
           ServletContext c;
           public config(ServletContext c) {this.c = c; }
   
  -        public String getServletName() { return "JSPEngineImpl"; }
  +        public String getServletName() { return "JspGenerator"; }
           public Enumeration getInitParameterNames()
                  { return c.getInitParameterNames(); }
           public ServletContext getServletContext() { return c; }
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to