Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Can't get Eclipse and Tomcat working properly together(I'm trying to implement a HelloWorld servlet, and failing)
Can't get Eclipse and Tomcat working properly together [message #1036130] Sun, 07 April 2013 21:26 Go to next message
Chris Crawford is currently offline Chris Crawford
Messages: 7
Registered: January 2012
Junior Member
Here's the situation: Mac OS 10.7.5, 8 GB RAM, Eclipse Juno, Tomcat 7.
I'm a highly experienced beginner, in that I've been using Eclipse for 6 or 7 years now and still don't know more than 10% of the environment. I'm like a programmer's version of Grandma who has to be told where to click to get her browser to work. Yes, I can write Java code -- so long as we keep it simple. I'm really a designer who's managed to fake it as a programmer for 30+ years now. I've faked it with FORTRAN, BASIC, Forth, 6502, Pascal, C, C++, and now I'm faking it with Java on Eclipse.
The purpose of this long preamble is to warn you that as soon as you start talking about ANT or command-lines, I'm lost. Please, use short words, pat me on the head once in a while, and keep it simple.

I have decided that I need to learn to run my stuff over the web, so it's time to hoist up my pants and learn servlets. I managed to get the pieces together: Eclipse for J2EE, and Tomcat 7. Then I found a good HelloWorld example at a web page that this blog won't let me link to. I followed its handholding instructions to the letter, and the damn thing actually ran! But then it hit a problem that apparently hit many others who used it: Tomcat dumped a 404 error ("requested resource is not available") on me. I have gone through lots of gyrations to solve the problem, and none have worked.

One problem appears to be with this line of code in the HelloWorld example:
@WebServlet("/HelloWorldServlet/HelloWorld")
I tried lots of variations on that, to no avail.

On another forum, somebody informed me that there's an apparent flaw in Eclipse's organization of files in the WebContent/WEB-INF directory: what's in the build directory should be mirrored to there. In other words, I ended up with this: Webcontent/WEB-INF/classes/com/srccodes/example/HelloWorld.class. However, when I implemented his suggestion, the problem remained.

The only diagnostic I could get was this warning from Tomcat on the console:
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:HelloWorldServlet' did not find a matching property.

I can think of only one intelligent question to ask about this mess: is there any way I can get Tomcat to tell me exactly what 'requested resource' it is that Tomcat wants but is not available?

Thanks for any help. Be warned, though, that any answer you give is likely to get a response from me along the lines of "What's XXX mean?"
Re: Can't get Eclipse and Tomcat working properly together [message #1036656 is a reply to message #1036130] Mon, 08 April 2013 12:57 Go to previous messageGo to next message
Russell Bateman is currently offline Russell Bateman
Messages: 3136
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 4/7/2013 7:26 PM, Chris Crawford wrote:
> Here's the situation: Mac OS 10.7.5, 8 GB RAM, Eclipse Juno, Tomcat 7.
> [snip]


Chris,

You should be asking this in the Eclipse web tools platform forum.
Re: Can't get Eclipse and Tomcat working properly together [message #1036687 is a reply to message #1036656] Mon, 08 April 2013 13:34 Go to previous messageGo to next message
Chris Crawford is currently offline Chris Crawford
Messages: 7
Registered: January 2012
Junior Member
Thanks, Russell. I was torn between the two fora, but decided that my level of ignorance trumps everything else. Fortunately, I got some advice from somebody else, and so far, that's working, so I'll not need to bug anybody else.
Re: Can't get Eclipse and Tomcat working properly together [message #1088003 is a reply to message #1036687] Fri, 16 August 2013 08:34 Go to previous messageGo to next message
Eleanor Mann is currently offline Eleanor Mann
Messages: 1
Registered: August 2013
Junior Member
what did you find out? I am having the exact same problem. If the response is better posted in a different forum could you reply with a link? Thanks!
Re: Can't get Eclipse and Tomcat working properly together [message #1088040 is a reply to message #1036687] Fri, 16 August 2013 09:44 Go to previous message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2237
Registered: July 2009
Senior Member
>One problem appears to be with this line of code in the HelloWorld example:
>@WebServlet("/HelloWorldServlet/HelloWorld")

What message are you getting?


---
Nitin Dahyabhai
Eclipse WTP, IBM
Previous Topic:EMF store - bug in history view of project
Next Topic:Unhandled event loop exception ,No more handles
Goto Forum:
  


Current Time: Wed Jul 30 09:25:51 EDT 2014

Powered by FUDForum. Page generated in 0.05592 seconds