Is web.xml being updated correctly [message #161623] |
Wed, 22 February 2006 11:20  |
Eclipse User |
|
|
|
Originally posted by: a.b.com
As a user of IBM WSAD/RAD for 5 years, I have written hundreds of JSPs and
dozens of servlets. Now I am using WTP 1.0 and Tomcat, since my customer
chooses to use that.
I am having some difficulties, which may be interpreted as RAD withdrawal
symptoms.
I created a new Web project called "second", chose to call the source
directory JavaSource since that is what I am used to, and created a simple
JSP called "test" in it, and ran it on the tomcat server. It ran correctly.
So far no problem.
Now I created a servlet in the JavaSource directory (in a valid package)
called "TestServlet" using the WTP servlet wizard, and added a minimal
number of lines of code to the doGet() method. I saved the servlet, which
took 5+ minutes at 100% cpu to complete, and looked at the web.xml in
WebContent/WEB-INF folder, and it had been updated by the wizard. I tried
to run the servlet and after another 5+ minute wait at 100% cpu for it do
deploy, I got the following page displayed:
| HTTP Status 404 - /second/TestServlet
|
| type Status report
| message /second/TestServlet
| description The requested resource (/second/TestServlet) is not
available.
|
| Apache Tomcat/5.0.30
I made no changes at this point. I just retried the JSP that had worked
before. Now after the 5+ minute delay again (lord knows why it needs to
republish when I have made no changes), I see the following page:
| HTTP Status 404 - /TestServlet/test.jsp
|
| type Status report
| message /TestServlet/test.jsp
| description The requested resource (/TestServlet/test.jsp) is not
available.
|
| Apache Tomcat/5.0.30
I have some questions:
1. What does it take to get a simple minimal servlet to execute under WTP
1.0?
2. Why does WTP change the web.xml so a JSP that previously worked no
longer works?
3. Why does WTP use build/classes instead of WEB-INF/classes as the default
destination for class files? Is there a standard? What is correct?
|
|
|
|
|
Re: Is web.xml being updated correctly [message #161959 is a reply to message #161815] |
Fri, 24 February 2006 11:26  |
Eclipse User |
|
|
|
Originally posted by: wknauf_NO_._INSIDE_hg-online.de
Hi Chris,
if you are having problems with the context root: there are several posts in
this group dealing with problems to change it.
For the facet: this one is enabled when you add a servlet with the wizard to it.
It may be that it is not enabled but the XDoclet builder is enabled: take a look
at "properties" -> "builders", there you can uncheck the XDoclet builder.
Hope this helps
Wolfgang
Chris Gage wrote:
> Wolfgang,
>
> Thanks for this interesting piece of information - more stuff to learn!!!!
> BUT... My project does not in fact have the WebDoclet facet enabled. I did
> not select it when I created the project. But WTP still edits my web.xml
> with bad data. I can invoke the servlet from a browser manually with the
> correct url but selecting the servlet or jsp and then doing
> RightButton-->Run As-->Run on Server generates a URL that NEVER works.
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.02615 seconds