This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes uploading page to web - begginner Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "uploading page to web - begginner" Watch "uploading page to web - begginner" New topic
Author

uploading page to web - begginner

Kieth Nogins
Greenhorn

Joined: Mar 10, 2006
Posts: 18
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

Joined: Jan 10, 2002
Posts: 60800
    
  65

"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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Kieth Nogins
Greenhorn

Joined: Mar 10, 2006
Posts: 18
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

Joined: Jan 10, 2002
Posts: 60800
    
  65

Are you sure that your host provider has set up the public_html folder as a web app context?
Kieth Nogins
Greenhorn

Joined: Mar 10, 2006
Posts: 18
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

Joined: Mar 06, 2001
Posts: 13459

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

Joined: Mar 06, 2001
Posts: 13459

Scratch that, I'm just having a look through the LunarPages setup docs.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

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

Joined: Mar 10, 2006
Posts: 18
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: uploading page to web - begginner
 
Similar Threads
A basic problem
struts - cannot find bean in any scope
response.sendRedirect help needed
changing the web.xml file in NetBeans4.1
Simple Tapestry hello world example fails