Website Domain Registration and Website Hosting - Host a Website Tonight
GoWebsite.com provides Domain Registration
Website Hosting, On-Line Shopping Carts,
Blog Hosting, Email Accounts, Security Certificates,
Merchant Accounts & other Website Products.
Free setup! Speak with us anytime: 480-624-2500

Adding a Java Servlet to Your Website

 
We no longer support Java in our shared hosting environments.
This article applies only to existing customers with Java enabled.

To deploy a servlet, you first need to compile it at your local box. Next, you can upload the class file to WEB-INF/classes directory. You should then be able to run it by entering the URL http://www.coolexample.com/servlet/yourservletname, where "www.coolexample.com" is the URL for your website.

Alternatively, you may package the servlet into a jar file and upload the jar file to the WEB-INF/lib directory. However, if you choose to use a jar file, you must wait for Tomcat to restart at its scheduled time before you see the servlet.

You can place the main configuration file, web.xml, in the WEB-INF/ folder. The web.xml file tells Tomcat how to handle servlet requests and where to direct URLs. Tomcat reads the file when it restarts.

The war file automatically explodes to the subfolder of the same name under your home directory and will deploy overnight.

NOTE: If your code is invalid or you attempt to violate security policies, your server will be disabled. For example, writing or reading to a directory other than /tmp, attempting to connect to a host that is not defined as an allowed host/port, and using the log4j module would be considered a violation. For directories Tomcat, Java, or Java Servlet pages disable, the pages will not load until the server is restarted the next morning.

Domain Registration Domain Registration
Pay less for website domain names. Register your own .com, .net or .org for as low as $10.00 per year. (Plus ICANN fee of 18¢ per domain.) A free Email Account is included.
Website Hosting Website Builder
For as little as $3.89 per month you can build your Website online with Website Builder using our easy to use professional templates.
Play Video - Demo
Shopping Cart Software Quick Shopping Cart
Build and run your own successful online store in minutes! You're just five easy steps away!
Play Video
Website Hosting Website Hosting
Everything you need to give your Website the high-performance home it deserves!  Protect transactions and customer data with a
SSL Certificate