Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 309094 - Extension alias not properly managed when registering a servlet
Summary: Extension alias not properly managed when registering a servlet
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Server-Side (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.6 M7   Edit
Assignee: Simon Kaegi CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-14 06:10 EDT by gianluca Mising name CLA
Modified: 2010-04-21 21:51 EDT (History)
2 users (show)

See Also:


Attachments
This is my version of ProxyServlet with my fix (9.89 KB, text/x-java)
2010-04-14 06:20 EDT, gianluca Mising name CLA
simon_kaegi: iplog+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gianluca Mising name CLA 2010-04-14 06:10:04 EDT
Build Identifier: Build id: 20090619-0625

Extension alias like "/*.do" are non properly managed if in the pathInfo part of the url is present more than one ".". An uri like ".../mysample.do" works fine but an uri like ".../my.sample.do" does not work.  
When registering a servlet in a standard j2ee environment a mapping like "*.do" serves correctly both uri.

Reproducible: Always

Steps to Reproduce:
1.Register a servlet with "/*.do" as alias
2.Invoke an url like "http://localhost:8080/my.sample.do"
3.The servlet is not invoked and an error is generated
Comment 1 gianluca Mising name CLA 2010-04-14 06:20:06 EDT
Created attachment 164813 [details]
This is my version of ProxyServlet with my fix

I fix the problem in my environment just changing the 	

"findExtensionAlias(String alias)" method, 

changing from 

int dot = lastSegment.indexOf('.');

to

int dot = lastSegment.lastIndexOf('.');
Comment 2 Simon Kaegi CLA 2010-04-20 11:21:48 EDT
Thanks. Look correct and I'll take a look at committing this fix shortly.
Comment 3 Simon Kaegi CLA 2010-04-21 21:51:42 EDT
Fixed in HEAD.