|Re: WTP learning curve, documentation and Eclipse WTP-developing Java... mismatch. [message #513395 is a reply to message #513254]
||Wed, 10 February 2010 00:27
| Larry Isaacs
Registered: July 2009
Jorge Dieguez wrote:|
> Hello WTP team,
> I'm working on a dynamic web application in the context of my own
> project. I have bought the book Eclipse WTP-Developing Java web
> applications but, for my frustration I haven't been able to pass
> successfully even the 2 iteration example code. I have tried most of the
> advice given in more than 20 threads posted in both Tomcat and WTP and
> also making sure that my developing envirement match that of the book
> (Tomcat 5.0.28 which implements Servlet 2.4 and JSP2.0), but still not
> luck. I have even tried later versions i.e. Tomcat 6.0 but It seems that
> part of the problem lays in the way servlets are run in Tomcat 6.0 where
> the use of invoker servlet is commented out and discouraged. Thread: WTP
> TomCat integration. HTTP 404 Still once again. Still I tried the
> suggestions in WTP-Tomcat FAQ (Why does my Tomcat 6.0 server fail to
> start after I enable the Invoker servlet?) without luck.
> I would like you guys to recommend me some more up to date documentation
> or better a book where I can get more comprehensive grasp at WTP.
> Many thanks for your help and support.
That book should be fine. The examples in most books require you to
walk a "narrow path" to get the example to work as expected. Any
deviations, and the example doesn't work as expected. Adding to the
challenge are the Eclipse improvements that make details in the book
somewhat out of date.
I was able to work through Iteration 1 and 2 using Tomcat 6.0.24 and
5.0.28 with no problems using a Servlet 2.5 and 2.3 Dynamic Web
Projects. If you are having problems, then best is to determine where
you are deviating from "the path".
Note that Tomcat response to the majority of problems in a webapp is the
404 error. Also, you can have multiple problems present. Fix problem #1
and you still get a 404 error from problem #2. You can't tell from the
404 error if you actually fixed problem #1.
If you saw the browser displaying an "invoker" url (i.e. contained
"/servlet/<class name>"), I believe that would imply the servlet mapping
in the web.xml isn't correct (WTP thought the servlet didn't have a
mapping) for the servlet you used with Run As -> Run on Server. For
example, if you created the servlet as "Helloservlet", then after it was
created, renamed it to "HelloServlet", that would "disconnect" the
servlet mapping in the web.xml. You might think a "harmless" deviation
like this wouldn't matter, but it does. You would need to manually
modify the web.xml to "reconnect" the servlet mapping.
I would recommend you stick with Tomcat 6.0.x. There is no benefit to
using Tomcat 5.0.28. Since what you currently have for projects isn't
working, you might start over from scratch and post back when something
doesn't behave as expected.
Powered by FUDForum
. Page generated in 0.02286 seconds