Forums Register Login

uploading page to web - begginner

+Pie Number of slices to send: Send
Hi,

I wrote a simple hello world servlet using NetBeans(which uses TomCat) and everything works fine when i go to :

http://localhost:8084/FirstApp/HelloWorld

Everything works fine so far.

The problem is when I upload the files of the project to my website (hosted at LunarPages, which supports servlets and jsp's), I get a 404 error (page not found). I kept the directory structure exactly the way I had it in my hard-drive:


all that under public_html.

Please help, i'm working on this for days.....
+Pie Number of slices to send: Send
"swollen mustard",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff
+Pie Number of slices to send: Send
Sorry the image didnt work,
the directory structure is:


[Edit by Dave - added code tags to retain formatting]
[ April 14, 2006: Message edited by: David O'Meara ]
+Pie Number of slices to send: Send
Are you sure that your host provider has set up the public_html folder as a web app context?
+Pie Number of slices to send: Send
If I understand what you mean - then yes i'm sure.
For example: If I put an index.html under public_html then this is the page that is displayed when accessing the site
+Pie Number of slices to send: Send
But it looks like the site is set up as a web server (ie serving static content) not an application server (serving dynamic content). A quick way to check would be to request WEB-INF/web.xml and see if you get anything back. A Web server will return it, an application server protects this directory and will not.
+Pie Number of slices to send: Send
Scratch that, I'm just having a look through the LunarPages setup docs.
+Pie Number of slices to send: Send
My guess is it is just a problem with the URL. How are you calling the index.html file, and how are you calling the servlet on the LunarPages site?
+Pie Number of slices to send: Send
Any sufficiently advanced technology will be used as a cat toy. And this tiny ad contains a very small cat:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 659 times.
Similar Threads
Problems getting servlets to work on Tomcat 4
Problems getting servlets to work on Tomcat 4
HTTP Status 404 - Servlet is not available
Tomcat unable to find servlet in Shared linux java hosting Server
not able to communicate to servlet
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 10:23:22.