RE: JspTagException- Stream closed
The RowSetIterate tag is declared in the JSP itself. All the JSPs having this RowSetIterate tag is throwing Stream closed exception. -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Wednesday, August 21, 2013 9:41 PM To: Tomcat Users List Subject: Re: JspTagException- Stream closed -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Tinu, On 8/20/13 9:59 PM, Babu, Tinu wrote: > Here is the piece of codes which is throwing the error. > > datasource="userRole" > "> datasource="userRole" dataitem="RoleDesc" /> > > > datasource="roles" > dataitem="RoleName" />"> dataitem="RoleDesc" /> > > Exception is always being thrown from the RowSetIterate Tags in JSPs. > This was working properly with Tomcat4 version and when we upgraded > our Tomcat to version 6 we started getting this strange exception. > > Please share your thoughts. Where is the row set itself declared? In the JSP? In a servlet somewhere that executes before the JSP? In general, I wouldn't recommend making any JDBC calls from within a JSP: I prefer to take care of all data acquisition in a servlet (or similar) before delegating the creation of a response to the view layer. But that's just me. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.14 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJSFMNUAAoJEBzwKT+lPKRYRDUQAMs3ugmVpr/K0kGMRIV2xHvG cb7Kd2uWrvAnFLqgbj6GuMFQvWsTXcbA3tlaa+iY3FSQEchFnzktONVdqml6CGsB UdumVqg0GFPI9vPM7nq4EOxTZg6QlaVsy2LJ0hbmc4vFaYD6s4uz21yd2IMZ8MJy FjGx6JylFn1c9RjLBegWRWUS3ykkapaZ8lwJU+QUnI1WxLp8mg37FV7ziwKIk5u5 yKc1nquQ/cj2aqUiEdpC2CEwmy05m2APiDmGT/UkKuZoHMRG1/OzLFlKg65RhlvB x0iPSDZv6iP/neZEtGmOsYiQLG9F5/v4ziV+kgsJYbhmb6jtYIYiHcBYrn425Q2W ERhqEuYRXR+2yRxt3/xzB0uSyg3eikhfwNoOrFH2OGgk4cpzSZJRW/E0N2EUYUwr ZRuGpOr4wgpPOrJ3A02hGYpBz2ZtbiingTl/72IlLcgBnBUapWzSazPl4BE7gPe/ VToMDtlxm74qiqtvr8C8swGAK9Y2xwmFkFI2GF2tu7STgbDfIA7f8eILYo3+m57S 3oI/O4aVf38HiKuA5pZmahSU5mLtCi4Fj0RmzDSSwLgi0WYfgUzCsqKDJKFns2qe PRNEyA8w7X4IKI4oJKgP/C7+gl3g8xycEo2C04Q6ZlZHjqfSBqJi6KnxJfdZLoYt t18eSlW8KZBzKKHP7QpT =011K -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Encoding post data on Tomcat 7 using 2.0.3 corrupted
This may be more of an application problem than a tomcat issue, but I am rather stuck with this one and hoping that somebody on this list may be able to shed some light on my issue. I am trying to post UTF-8 encoding text to my JSF2.2 application, however the data received does not seem to be encoded correctly.I narrowed this problem down to the weld listener. To illustrate the issue I modified the test page from the tomcat faq: 1. <%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2. 3. 4. 5. Character encoding test page 6. 7. 8. 9. Encoding : <%=request.getCharacterEncoding()%> 10. 11. Data posted to this form was: 12. <% 13. request.setCharacterEncoding("UTF-8"); 14. out.print(request.getParameter("mydata")); 15. %> 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. .g. ç,g(,ö,s,,?, etc Soße " Test data " 26. 27. So I have a simple web application which only consist of this page, and the weld library in WEB-INF/lib (weld-servlet-2.0.3.Final.jar). So far so good. However as soon as I include the weld listener in my web.xml file 1. 2. 3. http://java.sun.com/xml/ns/javaee"; 4. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 5. xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"; 6. version="3.0"> 7. 8. org.jboss.weld.environment.servlet.Listener 9. 10. 11. 12. 30 13. 14. 15. The post parameters are corrupted by the listener. I did enable URIEncoding="UTF-8" in the server.xml file, but this did not make any difference. 1. With the listener enabled data like "Soße" is received as "SoÃY"e", however once the listerner is removed everything works as expected.
buffer expand warning in Tomcat (apache-tomcat-8.0.0-RC1-embed)
greetings all, since commencing with version 8 (embedded) I have encountered no problems except when the HttpServletRequest object receives a message bigger than 16384 k. In that circumstance a warning(below) is repeated X times for messages bigger than 8192+(X*8192). I notice in the InternalNioInputBuffer.expand method, the comment "//should not happen" precedes the logging of the warning message. I am using a modified BufferedReader class with a buffer size of 8192 and the warning seems to coincide with each read. This same class has operated without a problem for years but I am sure my reader is causing this new problem. So the question is "how best to read a large message from the ServletInputStream in tomcat-8" = Aug 26, 2013 10:59:33 AM org.apache.coyote.http11.InternalNioInputBuffer expand WARNING: Expanding buffer size. Old size: 16384, new size: 24576 java.lang.Exception at org.apache.coyote.http11.InternalNioInputBuffer.expand(InternalNioInputBuffer.java:420) at org.apache.coyote.http11.InternalNioInputBuffer.readSocket(InternalNioInputBuffer.java:467) at org.apache.coyote.http11.InternalNioInputBuffer.nbRead(InternalNioInputBuffer.java:187) at org.apache.coyote.http11.InternalNioInputBuffer.available(InternalNioInputBuffer.java:171) at org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:818) at org.apache.coyote.Request.action(Request.java:373) at org.apache.catalina.connector.InputBuffer.available(InputBuffer.java:243) at org.apache.catalina.connector.CoyoteInputStream.available(CoyoteInputStream.java:137) at sun.nio.cs.StreamDecoder.inReady(StreamDecoder.java:362) at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:323) at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177) at java.io.InputStreamReader.read(InputStreamReader.java:184) at oodbpds.BigBufferedReader.read1(BigBufferedReader.java:136) at oodbpds.BigBufferedReader.read(BigBufferedReader.java:156) at oodbpds.ASIFTI.doPost(ASIFTI.java:90) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:223) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:107) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:75) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:90) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:494) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1009) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:632) at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1592) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1550) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) -- Vince Stewart
Re: APR connector does not work with SSL for Java 6 clients?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Jesse, On 8/25/13 1:08 PM, Jesse Barnum wrote: > On Aug 25, 2013, at 9:58 AM, Michael-O <1983-01...@gmx.net> wrote: > >> 1. Did you configure mod_ssl and APR Connector the same way? > I'm not sure how to make sure that they are configured > identically. The syntax in server.xml is not identical to the > syntax in apache2.conf. For example, in Apache's ssl.conf file, the > directive: SSLProtocol all -SSLv2 > > Does not work the same way in server.xml. In my connector element, > I tried setting an attribute SSLProtocol="all -SSLv2", but that > wouldn't parse at startup. I've tried SSLProtocol="TLSv1+SSLv3" > and SSLProtocol="ALL", and they all fail with a connection reset > message on the client. I also tried setting > SSLCipherSuite="HIGH:!ADH" as you recommended, as well as > "HIGH:MEDIUM:!aNULL:!MD5" which is the way I have it in Apache (the > default value), but that didn't make any difference. Try posting both your httpd.conf and server.xml configurations (i.e. the relevant stuff, not the whole thing). You might want to review http://tomcat.apache.org/tomcat-7.0-doc/config/http.html -- specifically the "SSLProtocol" attribute which lists the acceptable values. Hint: your attempts above are not supported. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.14 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJSGkylAAoJEBzwKT+lPKRYQmIP/R08IFCNU7HqBWUjfBiWQY7u xT/25q8XALJSk/qe0JT3Cw2y+xtbknM4NFZMle/6SersuHZpM8w2FWr7Xesqj42n pUxhT8/7STtsJrqPgk6Y9HoY9iQOS2UgVBh2pg6001orjZJGhHlZ0I4kllu8MlSd 0AndQdAjolHKnC3E1azhx5jNNujnL7qfIZ5xUtg1v5iietcGcnThKzKeGex9coE2 msDJTBFjDOH0KwU7Kri5j9AoT4mrRihPGWTQoQC7ml5UgCc6nnq2V0x0iIIv2x3x QS6CXVRL5K2rIU9WnCNYX7HUT/PvreUu0/UKM6V+5YdxY6iCdp0iIgtRiLtq/1WK FJu5d/241tKaiaXw0cYdN1caU5crovFdM/gYf7dqmPntGM8rW3fnQQyCfH6epSaR JfhytitMnEBr2hI2EQRZUSFq6iM1qn/NHj8mVUhFK2YwSWOwMyvz+syEWzCAb/5D z4uL90UloK3etCQH/ep0dpHKCmISlyXRDprdqP42/qMCAa48ejr+3rLQH8Jp74Qv iqnEdNyccnnpwZp4fZXRxAoU/pSaFAQ1A527/Tjw4a8PkJwKgKoJGLDe/O0b6YHf ZnoOJqKzPjhyZw/WBs8eg0daJAjJHYsYfPpFSnLyFEIH7AxqTvA702WyDOrYaShH GoFWn67XT+MZpGocEtwP =Dvf8 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: APR connector does not work with SSL for Java 6 clients?
On Aug 25, 2013, at 9:58 AM, Michael-O <1983-01...@gmx.net> wrote: > 1. Did you configure mod_ssl and APR Connector the same way? I'm not sure how to make sure that they are configured identically. The syntax in server.xml is not identical to the syntax in apache2.conf. For example, in Apache's ssl.conf file, the directive: SSLProtocol all -SSLv2 Does not work the same way in server.xml. In my connector element, I tried setting an attribute SSLProtocol="all -SSLv2", but that wouldn't parse at startup. I've tried SSLProtocol="TLSv1+SSLv3" and SSLProtocol="ALL", and they all fail with a connection reset message on the client. I also tried setting SSLCipherSuite="HIGH:!ADH" as you recommended, as well as "HIGH:MEDIUM:!aNULL:!MD5" which is the way I have it in Apache (the default value), but that didn't make any difference. > 2. Did you inspect the traffic with Wireshark? Help me a lot. I haven't used Wireshark, although I have called 'System.setProperty( "javax.net.debug", "all" )' which seems to give the same results in the Java console. > > Maybe you are running in a cypher mismatch too. What we do use is "TLSv1" and > "HIGH:!ADH". Everything below TLSv1 is outdated and insecure. Though TLSv1 is > (very) old too but it is the best match at the moment. > > Michael --Jesse Barnum, President, 360Works http://www.360works.com Product updates and news on http://facebook.com/360Works (770) 234-9293 == Don't lose your data! http://360works.com/safetynet/ for FileMaker Server ==
Re: APR connector does not work with SSL for Java 6 clients?
Am 2013-08-25 14:21, schrieb Jesse Barnum: How come Java 6 can connect to SSL running on Apache without this setting, but not to Tomcat running APR/SSL? On Aug 24, 2013, at 12:15 PM, Michael-O <1983-01...@gmx.net> wrote: I had this problem months ago too. APR Connector ist fine. The problem with Java 6 is that the URLConnection -- JSSE -- sends a SSLv2Hello and this breaks everything. I have restricted this for Java 6 clients at work. Java 7 does not suffer from this because this is disabled by default. First, do not top-post please. 1. Did you configure mod_ssl and APR Connector the same way? 2. Did you inspect the traffic with Wireshark? Help me a lot. Maybe you are running in a cypher mismatch too. What we do use is "TLSv1" and "HIGH:!ADH". Everything below TLSv1 is outdated and insecure. Though TLSv1 is (very) old too but it is the best match at the moment. Michael - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: APR connector does not work with SSL for Java 6 clients?
How come Java 6 can connect to SSL running on Apache without this setting, but not to Tomcat running APR/SSL? On Aug 24, 2013, at 12:15 PM, Michael-O <1983-01...@gmx.net> wrote: > I had this problem months ago too. APR Connector ist fine. The problem with > Java 6 is that the URLConnection -- JSSE -- sends a SSLv2Hello and this > breaks everything. I have restricted this for Java 6 clients at work. Java 7 > does not suffer from this because this is disabled by default.