]
Christophe Bouthier updated JBWEB-189:
--------------------------------------
Attachment: testcaseone.war
testcasetwo.war
testcaseone.war defines no mapping: files > 250 Kb are NOT served.
testcasetwo.war defines mapping to default sevlet: files > 250 Kb are served only every
other time.
Problem in web fragment when loading static file of size > 250Kb
----------------------------------------------------------------
Key: JBWEB-189
URL:
https://jira.jboss.org/browse/JBWEB-189
Project: JBoss Web
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Tomcat
Affects Versions: JBossWeb-3.0.0.Beta2, JBossWeb-3.0.0.Beta3, JBossWeb-3.0.0.Beta4,
JBossWeb-3.0.0.Beta5, JBossWeb-3.0.0.Beta6, JBossWeb-3.0.0.Beta7
Environment: Ubuntu 10.04
Linux 2.6.32-25-generic-pae
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Server VM (build 17.1-b03, mixed mode)
Using JBoss 6.0.0 M2 to M5, or JBoss Web 3.0.0 beta 2 (so this correspond to jbossweb
3.0.0 beta 2 to jbossweb 3.0.0 beta 7).
Reporter: Christophe Bouthier
Assignee: Remy Maucherat
Attachments: testcaseone.war, testcasetwo.war
When a war contains a jar with a web fragment, the server don't serve static files
that have a size more than 250 Kb.
If in the web fragment we define a servlet mapping with the type of the file to the
default servlet, then the file is served only every other time.
This is totally reproductible.
Attached are two war files, containing only a web-fragment in a jar. The web fragment
only contains static files.
The first war contains a plain web fragment, when the second one contains a web fragment
that defines servlet mapping to the default servlet:
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.txt</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.js</url-pattern>
</servlet-mapping>
Both web fragments contains the same files, but with different file extensions (html,
txt, of js). Half of them are just under the 250 Kb limit (filesmall), half of them are
just after (filebig).
filesmall and filebig files contains the same thing ("lorem ipsum"), just a bit
more in filebig.
Just download either any JBoss AS 6.0 from milestone M2 (until M5) or JBoss Web 3.0 Beta
2, without changing anything in the config, and put the two war files in the default
deploy folder.
The file to test are :
http://localhost:8080/testcaseone/filesmall.html
http://localhost:8080/testcaseone/filebig.html
http://localhost:8080/testcaseone/filesmall.txt
http://localhost:8080/testcaseone/filebig.txt
http://localhost:8080/testcaseone/filesmall.js
http://localhost:8080/testcaseone/filebig.js
http://localhost:8080/testcasetwo/filesmall.html
http://localhost:8080/testcasetwo/filebig.html
http://localhost:8080/testcasetwo/filesmall.txt
http://localhost:8080/testcasetwo/filebig.txt
http://localhost:8080/testcasetwo/filesmall.js
http://localhost:8080/testcasetwo/filebig.js
All "filesmall.*" files are served without any problem, even if you reload the
page.
All "testcaseone/filebig.*" files are NOT served, even if the page is
reloaded.
All 'testcasetwo/filebig.*" files are served only every other time: click reload
several time and you will see.
Here is a sample of the log when the file is correctly served:
2010-11-04 14:30:16,345 INFO
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/testcaseone]]
(http-127.0.0.1-8080-1) default: DefaultServlet.serveResource: Serving resource
'/filesmall.html' headers and data
2010-11-04 14:30:16,345 INFO
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/testcaseone]]
(http-127.0.0.1-8080-1) default: DefaultServlet.serveFile:
contentType='text/html'
2010-11-04 14:30:16,345 INFO
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/testcaseone]]
(http-127.0.0.1-8080-1) default: DefaultServlet.serveFile: contentLength=246887
Here is a sample of the log when the file is NOT correctly served:
2010-11-04 14:30:25,464 INFO
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/testcaseone]]
(http-127.0.0.1-8080-1) default: DefaultServlet.serveResource: Serving resource
'/filebig.html' headers and data
(and nothing more, nothing from DefaultServlet.serveFile
It should also be noted that the problem doesn't appears in tomcat 7.0.2 or later.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: