Java and PHP Applications

How do I enable Java Servlet support for my web site?

There are no translations available.

Java Servlet support is not enabled by default. If you would like to have Java Servlet enabled, please send an e-mail to Service Centre. Remember to include your domain name, user ID and password in the e-mail.

Once the Jave Servlet is enabled, you will find a new directory called "WEB-INF" in your public_html. Inside this directory you will find another directory called "classes", this is where you place all the classes for your Servlets (i.e. all your Servlets should go into the WEB-INF/classes directory).

To execute your Servlets, point your web browser to:
http://www.your-domain.com/servlet/

For more information on Java Servlet, please refer to Sun's Servlet Resources.
 

How do I enable JSP support for my web site?

There are no translations available.

Once Java Servlet support is enabled for your web site, JSP support is automatically enabled. To run Java Server Pages, your web pages must have the .jsp extension. JavaBeans should be placed in the WEB-INF/classes directory under your public_html.

To access your JSP files, point your web browser to:
http://www.your-domain.com/your.jsp

For more information on JSP, please refer to Sun's JSP Resources.

 

Can I have index.jsp loaded up when accessing www.my-domain.com?

There are no translations available.

Absolutely. Simply name your startup JSP file as index.jsp and remove or rename other index.* files in your public_html directory.
 

Can I run my Java application on a dedicated port?

There are no translations available.

No. This option is not available at this time.
 

Are there any restrictions to my Java applications?

There are no translations available.

No. We do not limit the number of Servlets or JSPs you can have in your account. They are only limited to the allocated quota (disk space) based on your Web Hosting plan. From time to time, we may audit your Java applications for potential security issues.
 

Does 3TEC.COM audit my Java applications?

There are no translations available.

Although 3TEC.COM does not intervene our clients' activities, for security reasons, we may audit your Java applications from time to time. We will notify you if any potential security hazard is found within your code and/or if further investigation is required.
 

How do I run PHP on my web site?

There are no translations available.

To run PHP, your web pages must have the .phtml or .php extension.
 

What version of PHP does 3TEC.COM's Web Server support?

There are no translations available.

Our Web Servers support both PHP4 and PHP5.
 

What version of JDK (Java Development Kit) is installed?

There are no translations available.

Our Application Servers have the latest JDK installed, and update packs are installed as soon as they become available from vendor.
 

How do I connect to MySQL database from my Java applications?

There are no translations available.

The JDBC (Java Database Connectivity) engine will take care of the communication between the database server and your Java applications. To access your database using JDBC, you will need the following code to initiate the database connection:
              
try {
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
con = DriverManager.getConnection("jdbc:mysql://localhost/loginname_dbname",
"username", "password");
} catch (Exception e) { ..... }

For more information on MySQL and JDBC, please refer to MM.MySQL.JDBC Resources.
 

How do I connect to MySQL database using PHP?

There are no translations available.

To access your database using PHP, you will need the following code to initiate the database connection:
			  
$link = mysql_connect ("localhost", "username", "password")
or die ("Could not connect");
print ("Connected successfully");
mysql_close ($link);

For more information on MySQL and PHP, please refer to PHP's MySQL Functions.
 

I have created my own .jar libraries. Where should I place them?

There are no translations available.

You should place your .jar libraries in the WEB-INF/lib directory under public_html.