Hi ojay,

Firstly, you write a listener under the server folder.

This like:

public class StartUp implements ServletContextListener {
   
    @Override
    public void contextInitialized(ServletContextEvent arg0) {
       //You will add for each startup process
       //maybe, like this
        Registry.addResources(ColumnResources.class);
    }

    @Override
    public void contextDestroyed(ServletContextEvent arg0) {

    }

}

Then, you add below lines into web.xml
      <listener>
        <listener-class>com.mclub.server.startup.StartUp</listener-class>
    </listener>

All these.

I'm sorry, my English is bad because I'm living in Turkiye.


ojay wrote:
> Hi,
>
> I need to access my database in the server area of my gwt application.
> Now I have the problem that i cannot init the database connection. I
> am using hibernate to access my database, in my previous applications
> (struts) I used the Datasource of the underlying tomcat to start and
> database transcation with hibernate. Now with GWT 2.0 I want to use
> the hosted mode and therefore I need to initialize my database
> connection pool. Therefore I tried to create this pool with a servlet.
> Now I have the problem that my servlet will not be started in the
> hosted mode.
>
> Can somebody explain where I can define in GWT to start a special
> servlet at startup of the host mode?
>
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>
>
>   
-- 


Mustafa DUMLUPINAR

--

You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.


Reply via email to