tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan Carlos Fernández Galante <juan.carlos.fernan...@upcnet.es>
Subject You can help me ....
Date Mon, 26 Nov 2001 16:56:04 GMT
Hi,

I want to load  a jsp file on a org.apache.catalina.core.StandardWrapper (of
Catalina API), but this fragment of code not make it, Can someone Help me?

StandardWrapper theStandardWrapper = new StandardWrapper();

theStandardWrapper.setJspFile("file://C:/proyectos/varios/jasper/bak/hello.j
sp");
  theStandardWrapper.setServletName("hello.jsp");
  theStandardWrapper.setServletClass("jsp.hello");
  StandardContext theStandardContext = new StandardContext();
  theStandardContext.addChild(theStandardWrapper);

  theStandardWrapper.setParent(theStandardContext);

  try
  {
       //Sets the loader
       WebappLoader theWebappLoader = new WebappLoader();
       theStandardWrapper.setLoader(theWebappLoader);
       Servlet theServlet = theStandardWrapper.allocate();
    }catch (Exception e)
   {
    e.printStackTrace();
   }
  }

The exception throws is :
--------------------------------------------------------
javax.servlet.ServletException: Servlet.init() for servlet hello.jsp threw
exception

 void org.apache.catalina.core.StandardWrapper.load()

  StandardWrapper.java:871

 javax.servlet.Servlet org.apache.catalina.core.StandardWrapper.allocate()

  StandardWrapper.java:615

 void jsp.Prueba1.<init>()

  Prueba1.java:39

 void jsp.Prueba1.main(java.lang.String[])

  Prueba1.java:73
----------------------------------------------------------------------------




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


Mime
View raw message