Folks, i have an java server application running stand alone, this will get tcp connection and do some processing and send back some response as well. and i want to run this inside a Tomcat web server along with a web applcation. i will start the server application by mean of servlet using onload =1 in web.xml. so upon start of tomcat the server application is started as well. i expect both web applcaition and server application to run with the tomcat and share some singleton classes and common classes between them. i also have hibernate inside and would except that no issues with deployment of applications. kindly let me know if there are any issues with this or any suggestions.
Here are a couple of things to consider:
Your ServletContextListener will need to implement the following methods:
public void contextInitialized(ServletContextEvent event)
public void contextDestroyed(ServletContextEvent event)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With