Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cant get simple HelloWorld to work

Status
Not open for further replies.

PBE3

Programmer
Aug 16, 2007
25
US
I am trying to get a simple HelloWorld example to run on my host and I cannot figure out the problem.

I create a dir under my cat_home
/usr/share/tomcat5/webapps/MyFirst

And placed the java class under
/usr/share/tomcat5/webapps/MyFirst/WEB-INF/classes/HelloWorld.class

I have my web.xml and MyFirst.xml(context)

When I go to hostname/MyFirst/HelloWorld I get 'This page cannot be found' - I am lost can anyone help?

Thanks
 
Do a tutorial tell you do so?
Is HelloWorld a Java Servlet?
If it is a servlet, you have to add some configuration in web.xml and restart the server.
 
I am having a similar problem myself! I am new to understanding what Tomcat is, as I did not read all the tutorials at first, however, I am thinking maybe it is due to Tomcat needing to be restarted and or the pathway is not correct. It could also be due to Java_Home variable pathway. I would start there first and look for missing clues.

I am still having trouble understanding how to change the root directory for applications that run on Tomcat and deploying the file. I just join this forum and I was looking for something similar to my problem, but there is nothing I can do right now because tech support is closed on Sundays. So maybe I can have a more direct answer for you. Hate to leave you as frustrated as I am.

Chad B
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top