You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Juan Jos� Vel�zquez Garcia <ve...@htmlspider.com.br> on 2003/01/05 19:38:09 UTC

Tomcat/Sun ONE Studio

Hello,

I'm trying to use Turbine with Tomcat/Sun ONE Studio and I'm getting an error when Turbine tries to load 
the "TurbineResources.properties" file.

The init servlet code is as follows:

public class TurbineInit extends HttpServlet {
    
    /** Initializes the servlet.
     */
    public void init(ServletConfig config) throws ServletException {
        super.init(config);
        String prefix = getServletContext().getRealPath("/");
        String dir = getInitParameter("turbine-resource-directory");
        TurbineConfig tc = new TurbineConfig(dir, "TurbineResources.properties");
        tc.init();
        
    }
...
}

The web.xml

...
  <servlet>
    <servlet-name>TurbineInit</servlet-name>
    <servlet-class>br.com.usg.erp.services.TurbineInit</servlet-class>
    <init-param>
        <param-name>turbine-resource-directory</param-name>
        <param-value>C:/source/bfg</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
  </servlet>
...

The application is within C:/source/bfg directory and the properties file is at 
C:/source/bfg/TurbineResources.properties.

I'm getting the following error:
javax.servlet.ServletException: Servlet.init() for servlet TurbineInit threw exception
...

java.lang.NoClassDefFoundError: org/apache/stratum/lifecycle/Initializable
...



Thanks in advance,

+----------------------------------------+
      Juan Jose Velazquez Garcia 
    Information System Developer 
        www.htmlspider.com.br
+----------------------------------------+


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Tomcat/Sun ONE Studio

Posted by Quinton McCombs <qm...@nequalsone.com>.
I would suggest that you download the TDK.  It comes with a sample
application that you can look at.  

Here is a link to the how-to for the TDK....

http://jakarta.apache.org/turbine/tdk/tdk-howto.html


> -----Original Message-----
> From: Juan José Velázquez Garcia [mailto:velazquez@htmlspider.com.br] 
> Sent: Sunday, January 05, 2003 6:28 PM
> To: Turbine Users List
> Subject: RE: Tomcat/Sun ONE Studio
> 
> 
> Hello,
> 
> > Why are you tying to initialize Turbine in this way?
> I'm following a tutorial ... 
> 
> 
> > You can just use
> > the Turbine servlet.  It will handle its own initialization.
> > 
> Is there a sample of how to use it?
> 
> 
> Thanks a lot for help.
> 
> +----------------------------------------+
>       Juan Jose Velazquez Garcia 
>     Information System Developer 
>         www.htmlspider.com.br
> +----------------------------------------+
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:turbine-user-> unsubscribe@jakarta.apache.org>
> For 
> additional commands, 
> e-mail: <ma...@jakarta.apache.org>
> 
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Tomcat/Sun ONE Studio

Posted by Juan Jos� Vel�zquez Garcia <ve...@htmlspider.com.br>.
Hello,

> Why are you tying to initialize Turbine in this way?  
I'm following a tutorial ... 


> You can just use
> the Turbine servlet.  It will handle its own initialization.
> 
Is there a sample of how to use it?


Thanks a lot for help.

+----------------------------------------+
      Juan Jose Velazquez Garcia 
    Information System Developer 
        www.htmlspider.com.br
+----------------------------------------+


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Tomcat/Sun ONE Studio

Posted by Quinton McCombs <qm...@nequalsone.com>.
Why are you tying to initialize Turbine in this way?  You can just use
the Turbine servlet.  It will handle its own initialization.

> -----Original Message-----
> From: Juan José Velázquez Garcia [mailto:velazquez@htmlspider.com.br] 
> Sent: Sunday, January 05, 2003 12:38 PM
> To: turbine-user@jakarta.apache.org
> Subject: Tomcat/Sun ONE Studio
> 
> 
> Hello,
> 
> I'm trying to use Turbine with Tomcat/Sun ONE Studio and I'm 
> getting an error when Turbine tries to load 
> the "TurbineResources.properties" file.
> 
> The init servlet code is as follows:
> 
> public class TurbineInit extends HttpServlet {
>     
>     /** Initializes the servlet.
>      */
>     public void init(ServletConfig config) throws ServletException {
>         super.init(config);
>         String prefix = getServletContext().getRealPath("/");
>         String dir = getInitParameter("turbine-resource-directory");
>         TurbineConfig tc = new TurbineConfig(dir, 
> "TurbineResources.properties");
>         tc.init();
>         
>     }
> ...
> }
> 
> The web.xml
> 
> ...
>   <servlet>
>     <servlet-name>TurbineInit</servlet-name>
>     <servlet-class>br.com.usg.erp.services.TurbineInit</servlet-class>
>     <init-param>
>         <param-name>turbine-resource-directory</param-name>
>         <param-value>C:/source/bfg</param-value>
>     </init-param>
>     <load-on-startup>1</load-on-startup>
>   </servlet>
> ...
> 
> The application is within C:/source/bfg directory and the 
> properties file is at 
> C:/source/bfg/TurbineResources.properties.
> 
> I'm getting the following error:
> javax.servlet.ServletException: Servlet.init() for servlet 
> TurbineInit threw exception ...
> 
> java.lang.NoClassDefFoundError: 
> org/apache/stratum/lifecycle/Initializable
> ...
> 
> 
> 
> Thanks in advance,
> 
> +----------------------------------------+
>       Juan Jose Velazquez Garcia 
>     Information System Developer 
>         www.htmlspider.com.br
> +----------------------------------------+
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:turbine-user-> unsubscribe@jakarta.apache.org>
> For 
> additional commands, 
> e-mail: <ma...@jakarta.apache.org>
> 
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>