Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

uploading page to web - begginner

 
Kieth Nogins
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.....
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64171
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
 
Kieth Nogins
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64171
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure that your host provider has set up the public_html folder as a web app context?
 
Kieth Nogins
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Scratch that, I'm just having a look through the LunarPages setup docs.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Kieth Nogins
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I call the index file like:
http://www.owi.bizzitek.com/

and the class I tried the following:

http://www.owi.bizzitek.com/HelloWorld
http://www.owi.bizzitek.com/servlet/HelloWorld
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic