Jump to content

Recommended Posts

Posted

I am trying to run a simple java servlet. I know that I am hosted on Jonny, and that I have java.

 

My servlet is in the "public_html/WEB-INF/classes/tests" directory and is named test.class.

 

My "public_html/WEB-INF/web.xml" file reads

 

 

&--#60;?xml version="1.0" encoding="ISO-8859-1"?&--#62;
&--#60;!DOCTYPE web-app
   PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
   "http://java.sun.com/dtd/web-app_2_3.dtd"&--#62;
&--#60;web-app&--#62;

  &--#60;servlet&--#62;
    &--#60;servlet-name&--#62;t&--#60;/servlet-name&--#62;
    &--#60;servlet-class&--#62;tests.test&--#60;/servlet-class&--#62;
   &--#60;/servlet&--#62;

   &--#60;servlet-mapping&--#62;
    &--#60;servlet-name&--#62;t&--#60;/servlet-name&--#62;
    &--#60;url-pattern&--#62;/testservlet&--#60;/url-pattern&--#62;
   &--#60;/servlet-mapping&--#62;

&--#60;/web-app&--#62; 

 

when i go to "http://spacehitchhiker42.heliohost.org/testservlet" I get a 404 error.

 

does anyone know how to use servlets correctly on heliohost?

Posted

If you would like to deploy a .war file follow these steps:

  1. Create your account on Johnny http://www.heliohost.org/home/create-johnny-account
  2. Request Java to be enabled on your account http://www.helionet.org/index/forum/74-java-requests/
  3. Wait patiently and keep your account active, because Java can only be enabled on a finite number of account at a time, and you must wait in line to have it enabled. It can take up to a month to get Java enabled depending on how many other people are in line ahead of you.
  4. Once Java is enabled on your account upload your .war file to your home directory. Ex: /home/username/MyProject.war
  5. Request to have the .war file deployed by creating a new topic in Customer Service http://www.helionet.org/index/forum/45-customer-service/

Posted

I'm not a java/jsp expert, but we've offered java for about eight years and to the best of my knowledge no one has ever figured out how to get a working java servlet deployed without admin assistance. Java server pages .jsp files work fine if you just upload them to a java enabled account though. If you figure out a way to get a servlet deployed on your own let us know. We are working on a cPanel plugin that would allow users to deploy their own applications though.

Posted

What is your aversion to having an admin deploy it for you? It's really not an inconvenience for us; it simply takes one command and roughly 5 seconds.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...