[JBoss JIRA] Updated: (JBWEB-38) PDf file serving speed should be increased.static file serving speed by byte range req should be increased
by Remy Maucherat (JIRA)
[ http://jira.jboss.com/jira/browse/JBWEB-38?page=all ]
Remy Maucherat updated JBWEB-38:
--------------------------------
Summary: PDf file serving speed should be increased.static file serving speed by byte range req should be increased (was: PDf file serving speed should be increased.static file serving speed by byte range req should be increased)
Issue Type: Feature Request (was: CTS Challenge)
Component/s: Core
(was: Tomcat Module)
> PDf file serving speed should be increased.static file serving speed by byte range req should be increased
> -----------------------------------------------------------------------------------------------------------
>
> Key: JBWEB-38
> URL: http://jira.jboss.com/jira/browse/JBWEB-38
> Project: JBoss Web
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Core
> Affects Versions: JBossWeb embedded - AS 4.0.0
> Environment: jboss 3.2.5 , windows/unix
> Reporter: dev per
> Assigned To: Remy Maucherat
> Attachments: test.war
>
>
> Our application serves pdf file over the web.This how we do pdf streaming
> 1.browser sends a request for a pdf file
> 2.Our application adds a header Accpet-Ranges which servers like a flag by which browser understands that this server can send response in byte ranges(streaming).
> 3.Jboss sends the header set by our application along with so many other headers to browser. Jboss tries to send some pdf content
> 4. As soon as Browser sees the flag and it sends request to Jboss to send pdf content in ranges of bytes .browser can request for any rangesof bytes withing contnet length of file.One request may have multiple byte range requests
> 4.Jboss sends the requested bytes to browser.
> Though streaming happens when we open Pdf , sometimes intial appearance of pdf in the browser take a longer time.
> To debug this problem we used a http sniffer and tried to open some other pdfs avilable over internet.This what we found by tracking our application and other pdfs in inetrnet
> a.PDfs over the internet opens up faster than our application pdfs over internet.
> b.reason is those server sends only few thousands of bytes and responds to byte range req from browser.
> c.But jboss application server we use tries to send few hunderd thousand bytes before it services the byte range request from browser.this makes the initial pdf appearance slow.
> Note:the req and resp header of inetrepdfs are same as what we set in our application .
> I think modifying tomcat DefaultServlet , to send only some thousand bytes and service byte range requests as soon as they are recieved , will fix the problem.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 2 months
[JBoss JIRA] Created: (JBAS-4854) Duplicate Content-Type charset attribute causes exception
by Joni Niemi (JIRA)
Duplicate Content-Type charset attribute causes exception
---------------------------------------------------------
Key: JBAS-4854
URL: http://jira.jboss.com/jira/browse/JBAS-4854
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Web (Tomcat) service
Affects Versions: JBossAS-4.2.1.GA
Environment: Windows XP, JBOSS AS 4.2.1.GA
Reporter: Joni Niemi
Assigned To: Remy Maucherat
New maemo Mozilla browser has a "feature" which sends duplicate charset parameter in the POST Content-type header. This causes following exception:
java.io.UnsupportedEncodingException: UTF-8;charset=UTF-8
at java.lang.StringCoding.decode(StringCoding.java:170)
at java.lang.String.<init>(String.java:444)
at java.lang.String.<init>(String.java:516)
at org.apache.catalina.connector.Request.setCharacterEncoding(Request.java:1469)
at org.apache.catalina.connector.RequestFacade.setCharacterEncoding(RequestFacade.java:307)
at com.sun.faces.context.ExternalContextImpl.setRequestCharacterEncoding(ExternalContextImpl.java:167)
at javax.faces.application.ViewHandler.initView(ViewHandler.java:259)
at org.ajax4jsf.application.ViewHandlerWrapper.initView(ViewHandlerWrapper.java:138)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:208)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at com.jamonapi.http.JAMonTomcatValve.invoke(JAMonTomcatValve.java:72)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:419)
at org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:393)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1513)
at java.lang.Thread.run(Thread.java:619)
The erraneous* Content-Type header causing this is
"Content-Type: application/x-www-form-urlencoded; charset=UTF-8;charset=UTF-8"
("User-agent: Mozilla/5.0 (X11; U; Linux armv6l; en-GB; rv:1.9a6pre) Gecko/20070810
Firefox/3.0a1 Tablet browser 0.1.16 RX-34_2007SE_4.2007.38-2")
Windows version of Mozilla causes no problems:
"Content-Type: application/x-www-form-urlencoded; charset=UTF-8"
(User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fi; rv:1.8.1.7) Gecko/20070914
Firefox/2.0.0"
* I don't think RFC2616 strictly speakings prohibits duplicate attributes.
This seems to be Catalina issue, but I don't know which version JBOSS AS 4.2.1.GA is using, so I'm submitting this here.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 2 months
[JBoss JIRA] Created: (JBAS-5518) JSP compilation exception with pageEncoding="utf-8" and file with byte order marks
by Ralf Zimmermann (JIRA)
JSP compilation exception with pageEncoding="utf-8" and file with byte order marks
-----------------------------------------------------------------------------------
Key: JBAS-5518
URL: http://jira.jboss.com/jira/browse/JBAS-5518
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Web (Tomcat) service
Affects Versions: JBossAS-4.2.2.GA
Environment: Windows XP, x86
Reporter: Ralf Zimmermann
Assigned To: Remy Maucherat
The following exception is thrown on page compilation, if the attribute "pageEncoding" of the page directive ist set to "utf-8" (lower case) and the
JSP-File has byte order marks. If the attribute is set to "UTF-8" (upper case) or the file has no byte order marks, the compilation workes fine.
{code}
12:32:16,946 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /dialog.jsp(2,0) Page-encoding specified in XML prolog (UTF-8) is different from that specified in page directive (utf-8)
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:236)
at org.apache.jasper.compiler.Validator$DirectiveVisitor.comparePageEncodings(Validator.java:362)
at org.apache.jasper.compiler.Validator$DirectiveVisitor.visit(Validator.java:197)
at org.apache.jasper.compiler.Node$PageDirective.accept(Node.java:590)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2338)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2388)
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2394)
at org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2338)
at org.apache.jasper.compiler.Validator.validate(Validator.java:1700)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:178)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:316)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
at de.cit.jsp.control.DispatchServlet.forward(DispatchServlet.java:286)
at de.cit.jsp.control.DispatchServlet.doGet(DispatchServlet.java:272)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at de.cit.util.javax.servlet.ValidationFilter.doFilter(ValidationFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at de.cit.util.javax.servlet.jsp.XHtmlContentTypeFilter.doFilter(XHtmlContentTypeFilter.java:36)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:420)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)
at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:366)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:619)
{code}
Case insensitive camparison in org.apache.jasper.compiler.Validator.comparePageEncodings(...) seems to fix the problem:
{code}
/*
* Compares page encodings specified in various places, and throws
* exception in case of page encoding mismatch.
*
* @param pageDirEnc The value of the pageEncoding attribute of the page
* directive @param pageDir The page directive node
*
* @throws JasperException in case of page encoding mismatch
*/
private String comparePageEncodings(String pageDirEnc,
Node.PageDirective pageDir) throws JasperException {
Node.Root root = pageDir.getRoot();
String configEnc = root.getJspConfigPageEncoding();
/*
* Compare the 'pageEncoding' attribute of the page directive with
* the encoding specified in the JSP config element whose URL
* pattern matches this page. Treat "UTF-16", "UTF-16BE", and
* "UTF-16LE" as identical.
*/
if (configEnc != null) {
if (!pageDirEnc.equalsIgnoreCase(configEnc)
&& (!pageDirEnc.toUpperCase().startsWith("UTF-16") || !configEnc
.toUpperCase().startsWith("UTF-16"))) {
err.jspError(pageDir,
"jsp.error.config_pagedir_encoding_mismatch",
configEnc, pageDirEnc);
} else {
return configEnc;
}
}
/*
* Compare the 'pageEncoding' attribute of the page directive with
* the encoding specified in the XML prolog (only for XML syntax,
* and only if JSP document contains XML prolog with encoding
* declaration). Treat "UTF-16", "UTF-16BE", and "UTF-16LE" as
* identical.
*/
if ((root.isXmlSyntax() && root.isEncodingSpecifiedInProlog()) || root.isBomPresent()) {
String pageEnc = root.getPageEncoding();
if (!pageDirEnc.equalsIgnoreCase(pageEnc)
&& (!pageDirEnc.toUpperCase().startsWith("UTF-16") || !pageEnc
.toUpperCase().startsWith("UTF-16"))) {
err.jspError(pageDir,
"jsp.error.prolog_pagedir_encoding_mismatch",
pageEnc, pageDirEnc);
} else {
return pageEnc;
}
}
return pageDirEnc;
}
{code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 2 months