You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Chris <bg...@lafn.org> on 2003/08/10 00:12:53 UTC

problem with tomcat servlet

I typed in a simple servlet example from the book "Tomcat Kick Start" 
(Sams).  Basically I put the html and servlet class as follow:

$CATALINA/webapps/mybasic_servlet/CurrencyForm.html
$CATALINA/webapps/mybasic_servlet/WEB-INF/classes/CurrencyConverter.class

When I start Tomcat, and access: 
http://localhost:8080/mybasic_servlet/CurrencyForm.html and type a 
number in the text input and submit, the browser returns a 404 error

The requested resource (/mybasic_servlet/servlet/CurrencyConverter) is 
not available.

If I add a web.xml file to $CATALINA/webapps/mybasic_servlet/WEB-INF/, 
and the web.xml uses
   <servlet-mapping>
        <servlet-name>Currency Converter</servlet-name>
        <url-pattern>/convert</url-pattern>
    </servlet-mapping>

and changes my html to  <FORM METHOD=GET ACTION="convert">
Now after restarting Tomcat, and access: 
http://localhost:8080/mybasic_servlet/CurrencyForm.html and type a 
number in the text input an submit, this time the servlet gets triggered.


I have enclosed the files and would really apprceciate if someone 
explain this 404 error to me.

Thanks in advance.

-chris




Re: [VOTE] 5.0.7 stability rating

Posted by Eric Carmichael <ec...@alumni.rice.edu>.
Remy Maucherat wrote:

> Note 2: As far as I am concerned, the 5.0.7 build is feature complete
> (ie, my TODO list is empty).

FYI, there are still a handful of TODOs in the Jasper code, at least one of
which ("need to check for uniqueness of attribute name, variable name-given,
and variable alias") is required for spec compliance.

Eric

Re: [VOTE] 5.0.7 stability rating

Posted by Eric Carmichael <ec...@alumni.rice.edu>.
Remy Maucherat wrote:

> Note 2: As far as I am concerned, the 5.0.7 build is feature complete
> (ie, my TODO list is empty).

FYI, there are still a handful of TODOs in the Jasper code, at least one of
which ("need to check for uniqueness of attribute name, variable name-given,
and variable alias") is required for spec compliance.

Eric

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: [VOTE] 5.0.7 stability rating

Posted by Remy Maucherat <re...@apache.org>.
Jean-Francois Arcand wrote:
>>> I'm working on (1) ( (2) will be easy once (1) is fixed) now and hope 
>>> to have something soon.
>>
>> Great, I don't care about either ;-) 
> 
> lol :-)
> 
>> None of this is critical for a beta (off by default, and it is so slow 
>> you'd have to be crazy to enable it). 
> 
> Then I'm crazy :-) (to debug Xerces yes I'm crazy)
> 
>> I don't understand what you mean in (2): TLD validation is not 
>> implemented ? 
> 
> I mean it is impossible to turn on xml validation ( the getter/setter 
> are not implemented, so the default value is always set to false ). 
> Costin's re-factoring was too agressive :-)

Validation works from the deployer (which is IMO a better place that on 
the server side in most cases). Of course, that won't add TLD 
validation, if it's indeed missing.

This is not a critical issue as far as I am concerned, however. Given 
the timing, I'll push for 5.0.7 to be a first beta unless there's a 
showstopper issue. We need as much beta time as we can get to test and 
debug Tomcat by the time the spec is released. Otherwise, this is not 
going to work, and trying to release a "perfect" beta doesn't make sense 
(if you think a first beta is going to be perfect, you can look at the 
initial .0 releases of each branch to see how perfect the first stable 
releases have been - no matter what, we'll find serious bugs given 
enough testers :) ).

Remy



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: [VOTE] 5.0.7 stability rating

Posted by Remy Maucherat <re...@apache.org>.
Jean-Francois Arcand wrote:
>>> I'm working on (1) ( (2) will be easy once (1) is fixed) now and hope 
>>> to have something soon.
>>
>> Great, I don't care about either ;-) 
> 
> lol :-)
> 
>> None of this is critical for a beta (off by default, and it is so slow 
>> you'd have to be crazy to enable it). 
> 
> Then I'm crazy :-) (to debug Xerces yes I'm crazy)
> 
>> I don't understand what you mean in (2): TLD validation is not 
>> implemented ? 
> 
> I mean it is impossible to turn on xml validation ( the getter/setter 
> are not implemented, so the default value is always set to false ). 
> Costin's re-factoring was too agressive :-)

Validation works from the deployer (which is IMO a better place that on 
the server side in most cases). Of course, that won't add TLD 
validation, if it's indeed missing.

This is not a critical issue as far as I am concerned, however. Given 
the timing, I'll push for 5.0.7 to be a first beta unless there's a 
showstopper issue. We need as much beta time as we can get to test and 
debug Tomcat by the time the spec is released. Otherwise, this is not 
going to work, and trying to release a "perfect" beta doesn't make sense 
(if you think a first beta is going to be perfect, you can look at the 
initial .0 releases of each branch to see how perfect the first stable 
releases have been - no matter what, we'll find serious bugs given 
enough testers :) ).

Remy



Re: [VOTE] 5.0.7 stability rating

Posted by Jean-Francois Arcand <jf...@apache.org>.

Remy Maucherat wrote:

> Jean-Francois Arcand wrote:
>
>> Remy Maucherat wrote:
>>
>>> <ballot>
>>> [X ] Alpha
>>> [ ] Beta
>>> </ballot>
>>>
>>> <plea>Please vote :)</plea>
>>>
>>> Add comments if needed. 
>>
>>
>> (1) Xerces validation doesn't work (seems the way we load the DTD is 
>> incorrect, producing the current error...but wait, we never know with 
>> Xerces ;-) ). Since validation was by default supported in 4.x, I'm 
>> considering this a regression.
>> (2) When ContextConfig was refactored, TldConfig was created but it 
>> is impossible right now to turn on xml validation (the implementation 
>> is missing). Knowing how it may sometimes create the proper TLD, I 
>> think the functionality needs to be implemented.
>>
>> I'm working on (1) ( (2) will be easy once (1) is fixed) now and hope 
>> to have something soon.
>
>
> Great, I don't care about either ;-) 

lol :-)

> None of this is critical for a beta (off by default, and it is so slow 
> you'd have to be crazy to enable it). 

Then I'm crazy :-) (to debug Xerces yes I'm crazy)

>
>
> I don't understand what you mean in (2): TLD validation is not 
> implemented ? 

I mean it is impossible to turn on xml validation ( the getter/setter 
are not implemented, so the default value is always set to false ). 
Costin's re-factoring was too agressive :-)

-- Jeanfrancois

>
>
> Remy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: [VOTE] 5.0.7 stability rating

Posted by Jean-Francois Arcand <jf...@apache.org>.

Remy Maucherat wrote:

> Jean-Francois Arcand wrote:
>
>> Remy Maucherat wrote:
>>
>>> <ballot>
>>> [X ] Alpha
>>> [ ] Beta
>>> </ballot>
>>>
>>> <plea>Please vote :)</plea>
>>>
>>> Add comments if needed. 
>>
>>
>> (1) Xerces validation doesn't work (seems the way we load the DTD is 
>> incorrect, producing the current error...but wait, we never know with 
>> Xerces ;-) ). Since validation was by default supported in 4.x, I'm 
>> considering this a regression.
>> (2) When ContextConfig was refactored, TldConfig was created but it 
>> is impossible right now to turn on xml validation (the implementation 
>> is missing). Knowing how it may sometimes create the proper TLD, I 
>> think the functionality needs to be implemented.
>>
>> I'm working on (1) ( (2) will be easy once (1) is fixed) now and hope 
>> to have something soon.
>
>
> Great, I don't care about either ;-) 

lol :-)

> None of this is critical for a beta (off by default, and it is so slow 
> you'd have to be crazy to enable it). 

Then I'm crazy :-) (to debug Xerces yes I'm crazy)

>
>
> I don't understand what you mean in (2): TLD validation is not 
> implemented ? 

I mean it is impossible to turn on xml validation ( the getter/setter 
are not implemented, so the default value is always set to false ). 
Costin's re-factoring was too agressive :-)

-- Jeanfrancois

>
>
> Remy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
>


Re: [VOTE] 5.0.7 stability rating

Posted by Remy Maucherat <re...@apache.org>.
Jean-Francois Arcand wrote:
> Remy Maucherat wrote:
> 
>> <ballot>
>> [X ] Alpha
>> [ ] Beta
>> </ballot>
>>
>> <plea>Please vote :)</plea>
>>
>> Add comments if needed. 
> 
> (1) Xerces validation doesn't work (seems the way we load the DTD is 
> incorrect, producing the current error...but wait, we never know with 
> Xerces ;-) ). Since validation was by default supported in 4.x, I'm 
> considering this a regression.
> (2) When ContextConfig was refactored, TldConfig was created but it is 
> impossible right now to turn on xml validation (the implementation is 
> missing). Knowing how it may sometimes create the proper TLD, I think 
> the functionality needs to be implemented.
> 
> I'm working on (1) ( (2) will be easy once (1) is fixed) now and hope to 
> have something soon.

Great, I don't care about either ;-) None of this is critical for a beta 
(off by default, and it is so slow you'd have to be crazy to enable it).

I don't understand what you mean in (2): TLD validation is not implemented ?

Remy


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: [VOTE] 5.0.7 stability rating

Posted by Remy Maucherat <re...@apache.org>.
Jean-Francois Arcand wrote:
> Remy Maucherat wrote:
> 
>> <ballot>
>> [X ] Alpha
>> [ ] Beta
>> </ballot>
>>
>> <plea>Please vote :)</plea>
>>
>> Add comments if needed. 
> 
> (1) Xerces validation doesn't work (seems the way we load the DTD is 
> incorrect, producing the current error...but wait, we never know with 
> Xerces ;-) ). Since validation was by default supported in 4.x, I'm 
> considering this a regression.
> (2) When ContextConfig was refactored, TldConfig was created but it is 
> impossible right now to turn on xml validation (the implementation is 
> missing). Knowing how it may sometimes create the proper TLD, I think 
> the functionality needs to be implemented.
> 
> I'm working on (1) ( (2) will be easy once (1) is fixed) now and hope to 
> have something soon.

Great, I don't care about either ;-) None of this is critical for a beta 
(off by default, and it is so slow you'd have to be crazy to enable it).

I don't understand what you mean in (2): TLD validation is not implemented ?

Remy


Re: [VOTE] 5.0.7 stability rating

Posted by Jean-Francois Arcand <jf...@apache.org>.

Remy Maucherat wrote:

> <ballot>
> [X ] Alpha
> [ ] Beta
> </ballot>
>
> <plea>Please vote :)</plea>
>
> Add comments if needed. 


(1) Xerces validation doesn't work (seems the way we load the DTD is 
incorrect, producing the current error...but wait, we never know with 
Xerces ;-) ). Since validation was by default supported in 4.x, I'm 
considering this a regression.
(2) When ContextConfig was refactored, TldConfig was created but it is 
impossible right now to turn on xml validation (the implementation is 
missing). Knowing how it may sometimes create the proper TLD, I think 
the functionality needs to be implemented.

 I'm working on (1) ( (2) will be easy once (1) is fixed) now and hope 
to have something soon.

-- Jeanfrancois



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: [VOTE] 5.0.7 stability rating

Posted by Jean-Francois Arcand <jf...@apache.org>.

Remy Maucherat wrote:

> <ballot>
> [X ] Alpha
> [ ] Beta
> </ballot>
>
> <plea>Please vote :)</plea>
>
> Add comments if needed. 


(1) Xerces validation doesn't work (seems the way we load the DTD is 
incorrect, producing the current error...but wait, we never know with 
Xerces ;-) ). Since validation was by default supported in 4.x, I'm 
considering this a regression.
(2) When ContextConfig was refactored, TldConfig was created but it is 
impossible right now to turn on xml validation (the implementation is 
missing). Knowing how it may sometimes create the proper TLD, I think 
the functionality needs to be implemented.

 I'm working on (1) ( (2) will be easy once (1) is fixed) now and hope 
to have something soon.

-- Jeanfrancois



[VOTE] 5.0.7 stability rating

Posted by Remy Maucherat <re...@apache.org>.
<ballot>
[ ] Alpha
[ ] Beta
</ballot>

<plea>Please vote :)</plea>

Add comments if needed.

Note 1: A note will be added about the need to disable smap generation 
in case of an error in SmapStratum during compilation. Other than this 
problem, I believe this build to be of good overall quality.

Note 2: As far as I am concerned, the 5.0.7 build is feature complete 
(ie, my TODO list is empty). I will now focus on tweaks and bugs. This 
probably means a slower release cycle (assuming this build is voted as 
beta). If anyone has ideas about new items, I think it's safe to say 
it's now or never (at least for the initial 5.0.x release) ;-)

Note 3: I'll be away with little internet connectivity between 08/13 and 
08/19 (included). If this vote could be wrapped up *before* I leave, it 
would be good, but it's not essential, so I don't want people to rush 
and skimp on testing (changing 5.0.7 from alpha to beta and making the 
necessary announcements should be simple enough).

Note 4: 4.1.x went to beta at 4.1.7 (5.0.x's codebase was then created 
from that tag). It is an interesting coincidence. However, I feel like 
5.0.x is considerably more stable than 4.1.x was at this stage (not very 
surprising, with brand new connectors and rewritten Jasper for 4.1.x), 
and I don't feel any particular urge to create a branch either ;-)

Remy


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


[VOTE] 5.0.7 stability rating

Posted by Remy Maucherat <re...@apache.org>.
<ballot>
[ ] Alpha
[ ] Beta
</ballot>

<plea>Please vote :)</plea>

Add comments if needed.

Note 1: A note will be added about the need to disable smap generation 
in case of an error in SmapStratum during compilation. Other than this 
problem, I believe this build to be of good overall quality.

Note 2: As far as I am concerned, the 5.0.7 build is feature complete 
(ie, my TODO list is empty). I will now focus on tweaks and bugs. This 
probably means a slower release cycle (assuming this build is voted as 
beta). If anyone has ideas about new items, I think it's safe to say 
it's now or never (at least for the initial 5.0.x release) ;-)

Note 3: I'll be away with little internet connectivity between 08/13 and 
08/19 (included). If this vote could be wrapped up *before* I leave, it 
would be good, but it's not essential, so I don't want people to rush 
and skimp on testing (changing 5.0.7 from alpha to beta and making the 
necessary announcements should be simple enough).

Note 4: 4.1.x went to beta at 4.1.7 (5.0.x's codebase was then created 
from that tag). It is an interesting coincidence. However, I feel like 
5.0.x is considerably more stable than 4.1.x was at this stage (not very 
surprising, with brand new connectors and rewritten Jasper for 4.1.x), 
and I don't feel any particular urge to create a branch either ;-)

Remy


RE: problem with tomcat servlet

Posted by Ias <ia...@apache-korea.org>.
The issus is explained in "Enabling invoker servlet" section at
http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.1.24/RELEASE-
NOTES
 
In addition, the Servlet 2.3 spec also states that mapping requests to
servlets based on web applicatioin deployment descriptor (i.e. web.xml) is
required so that an optional implicit mapping such as traditional
/servlet/ServletClassName is basically no more desired regarding compliance
with the spec. 
(Servlet 2.3 Spec FCS Chapter 11)
 
Hoping this policy is mentioned somewhere in
http://jakarta.apache.org/tomcat/tomcat-4.1-doc for more accessibility,
 
Ias.
 




  _____  

From: Chris [mailto:bg658@lafn.org] 
Sent: Saturday, August 09, 2003 3:13 PM
To: tomcat-dev@jakarta.apache.org


I typed in a simple servlet example from the book "Tomcat Kick Start"
(Sams).  Basically I put the html and servlet class as follow:

$CATALINA/webapps/mybasic_servlet/CurrencyForm.html
$CATALINA/webapps/mybasic_servlet/WEB-INF/classes/CurrencyConverter.class

When I start Tomcat, and access:
http://localhost:8080/mybasic_servlet/CurrencyForm.html and type a number in
the text input and submit, the browser returns a 404 error

The requested resource (/mybasic_servlet/servlet/CurrencyConverter) is not
available.

If I add a web.xml file to $CATALINA/webapps/mybasic_servlet/WEB-INF/, and
the web.xml uses 
   <servlet-mapping>
        <servlet-name>Currency Converter</servlet-name>
        <url-pattern>/convert</url-pattern>
    </servlet-mapping>

and changes my html to  <FORM METHOD=GET ACTION="convert">
Now after restarting Tomcat, and access:
http://localhost:8080/mybasic_servlet/CurrencyForm.html and type a number in
the text input an submit, this time the servlet gets triggered.


I have enclosed the files and would really apprceciate if someone explain
this 404 error to me.

Thanks in advance.

-chris