You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "Ru, Simon" <Si...@WorldChain.com> on 2001/08/02 19:45:10 UTC

partial URLPatternMatching in Tomcat 4.0 (Servlet 2.3 spec)?

I wonder if Servlet 2.3's Filter allow partial URLPatternMatching. Something
like:

<filter-mapping> 
<filter-name>timerFilter</filter-name> 
<url-pattern>/Controller?action=timer*</url-pattern> 
</filter-mapping> 
If it can, then we can use the Filtering mechanism as a controller to do
request dispatching. We can avoid having thousands if statements in the
Controller and we can easily modify the dispatching route without recompile.

If it can't, is it something worth enhancing? What needs to add to have that
capability? Thanks in advance. 

Simon Ru
Software Engineer
(510) 897-5331
http://www.worldchain.com


-------------------------------------------------------------------------- 
Note:  The information contained in this message may be privileged and
confidential and protected from disclosure. If the reader of this message is
not the intended recipient, or an employee or agent responsible for
delivering this message to the intended recipient, you are hereby notified
that any dissemination, distribution or copying of this communication is
strictly prohibited. If you have received this communication in error,
please notify us immediately by replying to the message and deleting it from
your computer. Thank you. 
--------------------------------------------------------------------------

Out of Memory.

Posted by Harden ZHU <ha...@sympatico.ca>.
Hi

After I run tomcat 3.2.1 under Win2000 or Unix for couple days, I will get
out of memory problem.
What can be wrong? And how to solve it? Thanks.

Harden


RE: partial URLPatternMatching in Tomcat 4.0 (Servlet 2.3 spec)?

Posted by Loïc Lefèvre <ll...@fivia.com>.
Would/Must the RewriteValve do that?

Loïc Lefèvre

-----Message d'origine-----
De : Craig R. McClanahan [mailto:craigmcc@apache.org]
Envoyé : samedi 4 août 2001 04:08
À : 'tomcat-user@jakarta.apache.org'
Cc : 'tomcat-dev@jakarta.apache.org'
Objet : Re: partial URLPatternMatching in Tomcat 4.0 (Servlet 2.3 spec)?





On Thu, 2 Aug 2001, Ru, Simon wrote:

> I wonder if Servlet 2.3's Filter allow partial URLPatternMatching.
Something
> like:
>
> <filter-mapping>
> <filter-name>timerFilter</filter-name>
> <url-pattern>/Controller?action=timer*</url-pattern>
> </filter-mapping>
> If it can, then we can use the Filtering mechanism as a controller to do
> request dispatching. We can avoid having thousands if statements in the
> Controller and we can easily modify the dispatching route without
recompile.
>
> If it can't, is it something worth enhancing? What needs to add to have
that
> capability? Thanks in advance.
>

While what you propose might be quite nice, Tomcat needs to conform to the
servlet spec's rules for what a legal <url-pattern> can contain -- it's
the same for both filter mappings and servlet mappings -- and this pattern
is not legal.

One strategy would be to match for "/Controller/*" and let the filter look
at the query parameters to decide whether or not to do anything
special.  Otherwise, it can just pass the request on unmolested.

> Simon Ru
> Software Engineer
> (510) 897-5331
> http://www.worldchain.com
>

Craig McClanahan


Re: partial URLPatternMatching in Tomcat 4.0 (Servlet 2.3 spec)?

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Thu, 2 Aug 2001, Ru, Simon wrote:

> I wonder if Servlet 2.3's Filter allow partial URLPatternMatching. Something
> like:
> 
> <filter-mapping> 
> <filter-name>timerFilter</filter-name> 
> <url-pattern>/Controller?action=timer*</url-pattern> 
> </filter-mapping> 
> If it can, then we can use the Filtering mechanism as a controller to do
> request dispatching. We can avoid having thousands if statements in the
> Controller and we can easily modify the dispatching route without recompile.
> 
> If it can't, is it something worth enhancing? What needs to add to have that
> capability? Thanks in advance. 
> 

While what you propose might be quite nice, Tomcat needs to conform to the
servlet spec's rules for what a legal <url-pattern> can contain -- it's
the same for both filter mappings and servlet mappings -- and this pattern
is not legal.

One strategy would be to match for "/Controller/*" and let the filter look
at the query parameters to decide whether or not to do anything
special.  Otherwise, it can just pass the request on unmolested.

> Simon Ru
> Software Engineer
> (510) 897-5331
> http://www.worldchain.com
> 

Craig McClanahan


Re: partial URLPatternMatching in Tomcat 4.0 (Servlet 2.3 spec)?

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Thu, 2 Aug 2001, Ru, Simon wrote:

> I wonder if Servlet 2.3's Filter allow partial URLPatternMatching. Something
> like:
> 
> <filter-mapping> 
> <filter-name>timerFilter</filter-name> 
> <url-pattern>/Controller?action=timer*</url-pattern> 
> </filter-mapping> 
> If it can, then we can use the Filtering mechanism as a controller to do
> request dispatching. We can avoid having thousands if statements in the
> Controller and we can easily modify the dispatching route without recompile.
> 
> If it can't, is it something worth enhancing? What needs to add to have that
> capability? Thanks in advance. 
> 

While what you propose might be quite nice, Tomcat needs to conform to the
servlet spec's rules for what a legal <url-pattern> can contain -- it's
the same for both filter mappings and servlet mappings -- and this pattern
is not legal.

One strategy would be to match for "/Controller/*" and let the filter look
at the query parameters to decide whether or not to do anything
special.  Otherwise, it can just pass the request on unmolested.

> Simon Ru
> Software Engineer
> (510) 897-5331
> http://www.worldchain.com
> 

Craig McClanahan