aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 60050
    
  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: 60050
    
  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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: uploading page to web - begginner
 
Similar Threads
changing the web.xml file in NetBeans4.1
response.sendRedirect help needed
struts - cannot find bean in any scope
A basic problem
Simple Tapestry hello world example fails