Domain Name Search | www.
Learn How You
Can Get Started Today
Need Help Choosing
The Right Plan?
Transferring From
Another Provider?
How To Order?

Host With Confidence
* 30 Days Money Back Guarantee
* 100% Safe, Secure Ordering
* We Value Your Privacy

Tomcat / Servlet / Java / JSP Help Guide


Servlet Set Up
Viewing the Tomcat Logs
Connect jsp <> mysql
Restarting Tomcat


Creating MySQL Database

For more help on MySQL please login to the control panel of your website by going to: and follow the HELP link.



To setup servlet, you need to configure servlet into the file web.xml which needs to be placed in /var/www/html/WEB-INF directory.

www root directory or webapps:/var/www/htm

Classes directory located in: /var/www/html/WEB-INF/Classes/
There you will need to upload your Java class file.

Our default url-mapping for servlet is: /servlet/*  
To check servlet in your browser:
Jsp Files - Upload anywhere in /var/www/html

Double Check that that url-mapping for servlers is entered corectly in web.xml
Double Check that Java class file is uploaded in the corect place.
Without these two things your servlet will not work.

Viewing Tomcat Logs

By default all the logging activity will be placed within the /var/log/ directory of your application. If a ssh shell is enabled on your account then 'tailing' the logs can provide a powerful tool in debugging your web application.
Viewing the logs is recommended when you suspect that errors are occurring during the loading/reloading of your web application.

To get SSH acces you'll need to request it, it is not enabled by default on all accounts.


Connect jsp <> mysql


Please make sure that you have created database through the control panel and that you have setup password for db. Write down your database name - this is very important !

Instructions for database set up available in your initial account activation email titled " MySQL Set Up Instructions"

After this steps, edit dbtest.jsp and enter correct informations, upload this two files and test them

This is an example with MySQL driver. We also support com.mysql.jdbc.Driver


File 1: dbtest.jsp

String dbhost1 = request.getParameter("dbhost");
String dbname1 = request.getParameter("dbname");
String user1 = request.getParameter("user");
String pass1 = request.getParameter("pass");

if( dbhost1==null )
if( dbname1==null )
if( user1==null)
if( pass1==null )

<form action="dbsubmit.jsp" method=get>
<td><input size=60 name="dbhost" type=text value="<%=dbhost1%>">
<td><input size=60 name="dbname" type=text value="<%=dbname1%>">
<td><input name="user" type=text value="<%=user1%>">
<td><input name="pass" type=text value="<%=pass1%>">
<td colspan="2">
<input type=submit>


------------------------------------End of dbtest.jsp


File 2 - dbsubmit.jsp

String dbhost = request.getParameter("dbhost");
String dbname = request.getParameter("dbname");
String user = request.getParameter("user");
String pass = request.getParameter("pass");
String connURL =

java.sql.Connection conn = java.sql.DriverManager.getConnection(connURL);
response.getWriter().println("<font color=green><b>");
response.getWriter().println("Connection success!!!");
catch(Exception e)
response.getWriter().println("<font color=red><b>[");
response.getWriter().println("Connection URL:["+connURL+"]");

<%@include file="dbtest.jsp"%>

--------------------------------End of dbsubmit.jsp


Restarting Tomcat

Shared Tomcat Plan: You'll need to email us and we'll restart the Tomcat for you.
Private Tomcat Plan: Restart Tomcat via SSH access.


Setting Up MySQL Database

Go to   and login to your account
------> Follow the MySQL link
2.Create a database
3. Write down database name
4. Set up database password

Our MySQL address (hostname)= "localhost"