deepthot Posted April 4, 2013 Posted April 4, 2013 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? Quote
Shinryuu Posted April 4, 2013 Posted April 4, 2013 If you package it as a web archive we can deploy it for you. Similar to http://www.helionet.org/index/topic/15469-request-for-deploy/ Quote
Krydos Posted April 4, 2013 Posted April 4, 2013 If you would like to deploy a .war file follow these steps:Create your account on Johnny http://www.heliohost.org/home/create-johnny-accountRequest Java to be enabled on your account http://www.helionet.org/index/forum/74-java-requests/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.Once Java is enabled on your account upload your .war file to your home directory. Ex: /home/username/MyProject.warRequest to have the .war file deployed by creating a new topic in Customer Service http://www.helionet.org/index/forum/45-customer-service/ Quote
deepthot Posted April 5, 2013 Author Posted April 5, 2013 is there any way for me to deploy directly? Quote
Krydos Posted April 5, 2013 Posted April 5, 2013 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. Quote
deepthot Posted April 5, 2013 Author Posted April 5, 2013 though servlets seem easier, i guess i'll just have to use JSP. Quote
Krydos Posted April 5, 2013 Posted April 5, 2013 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. Quote
deepthot Posted April 5, 2013 Author Posted April 5, 2013 I just try to be self sufficient. btw. I tried deploying a JSP page, but it just shows the source code. Quote
Krydos Posted April 5, 2013 Posted April 5, 2013 That means java is not enabled on your account. You can request java to be enabled by posting here http://www.helionet.org/index/forum/74-java-requests/ Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.