• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem invoking a servlet directly from FireFox browser

 
Harry Henriques
Ranch Hand
Posts: 206
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am using Eclipse Helios and Tomcat 7 and Ubuntu Lucid Lynx. When developing the web.xml, I started with the web.xml file supplied with Tomcat 7. I have been able to successfully run this web app independently from Eclipse Helios (directly from /var/lib/tomcat7/webapps/HearingImpaired). This example is taken directly from the Head First Servlets & JSPs textbook. I have been working on this problem for more than 2 hours. I don't see anything wrong with my web.xml file (Do you?).



HearingImpaired is the name of the Dynamic Web Project in Eclipse Helios.

I'm trying to invoke the web app in the FireFox browser with the following URL http://localhost:8080/HearingImpaired/InvokingTest.do The error message is 404. The browser cannot find the resource. Thanks for your assistance.

Harry
 
Ninad Kulkarni
Ranch Hand
Posts: 802
Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check whether Tomcat is properly started or not
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2536
113
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Harry,

This problem is mostly caused by a problem in your directory structure.

Have a try on the following instructions: How to create a web-application without an IDE

Regards,
Frits
 
Harry Henriques
Ranch Hand
Posts: 206
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the replies.

Unfortunately, Tomcat 7 is up and running in my Eclipse Helios IDE, and I an even invoke a form.html in another Dynamic Web Project in the same workspace.

I am able to create a directory structure in Ubuntu that enables me to independently invoke my web-app outside of the Eclipse Helios IDE using Tomcat 7.

My problem is that I cannot invoke my web-app inside of Eclipse Helios IDE while Tomcat 7 is up and running.

Any more suggestions?

Harry
 
Harry Henriques
Ranch Hand
Posts: 206
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the rest of the code:





 
Harry Henriques
Ranch Hand
Posts: 206
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[SOLVED]

Setup Eclipse and Tomcat to play nice together

This is nice to do, but not necessarily the solution to my problem.

CHANGE THE BUILD PATH IN ECLIPSE HELIOS

1. Right click on the Project and choose Properties

2. Choose Java Build Path in the Left Panel. Click the Source Tab in the Right Panel.

3. Change the Default Output Folder in the textbox at the bottom of the page: YourProjectName/WebContent/WEB-INF/classes

4. Click OK.

THIS IS WHAT SOLVED MY PROBLEM - Configure Tomcat 7

1. Open the Server View, if it's not displayed already, then Window -> Show View -> Other -> Server -> Servers

2. In Server View, right click on: Tomcat v7.0 at localhost [Stopped]

3. Choose Add and Remove ... from ListView

4. Choose the project that was created (i.e. HearingImpaired) from Available projects and ADD the project to Configured projects. Click OK.

5. Restart/Start Tomcat 7 container.

STEP 4 OF PART 2 DID THE TRICK !
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic