You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2015/10/19 16:50:34 UTC
[Bug 58505] New: getParameter but null
https://bz.apache.org/bugzilla/show_bug.cgi?id=58505
Bug ID: 58505
Summary: getParameter but null
Product: Tomcat 7
Version: 7.0.63
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
Assignee: dev@tomcat.apache.org
Reporter: arliweng@gmail.com
on i686 archlinux
the ServletRequest.getParameterMap() size is 0 always when POST.
but fine when GET. and fine when i read from ServletRequest.getInputStream()..
only 7.0.62 work fine, i don't known what's happen.
i try version 7.0.63,7.0.64,8.0.28, all same problem.
that version i have manual download and run by root via bin/startup.sh, not by
archlinux's package or archlinux's aur system.
i try read something from changelog, but nothing about that.
this's my env:
[root@srv1-lb http]# uname -a
Linux srv1-lb 4.2.3-1-ARCH #1 SMP PREEMPT Sat Oct 3 19:08:23 CEST 2015 i686
GNU/Linux
[root@srv1-lb http]# java -version
openjdk version "1.8.0_60"
OpenJDK Runtime Environment (build 1.8.0_60-b24)
OpenJDK Server VM (build 25.60-b23, mixed mode)
[root@srv1-lb http]# ls /srv/http/apache-tomcat-7.0.6*
/srv/http/apache-tomcat-7.0.62:
bin lib logs RELEASE-NOTES temp work
conf LICENSE NOTICE RUNNING.txt webapps
/srv/http/apache-tomcat-7.0.63:
bin lib logs RELEASE-NOTES temp work
conf LICENSE NOTICE RUNNING.txt webapps
/srv/http/apache-tomcat-7.0.64:
bin lib logs RELEASE-NOTES temp work
conf LICENSE NOTICE RUNNING.txt webapps
[root@srv1-lb http]# cat /srv/http/apache-tomcat-7.0.64/conf/server.xml
<?xml version="1.0" encoding="UTF-8"?>
<Server port="8005" shutdown="SHUTDOWN">
<Service name="Catalina">
<Connector address="127.0.0.1" port="8080" maxHttpHeaderSize="8192"
maxThreads="1000"
minSpareThreads="10" maxSpareThreads="50" enableLookups="false"
acceptCount="100" connectionTimeout="10000" connectionLinger="50"
disableUploadTimeout="false" URIEncoding="UTF-8" maxPostSize="0" />
<Context reloadable="true" />
<Engine name="Catalina" defaultHost="arlihost">
<Host name="arlihost"
appBase="/srv/http/arlihost/webroot/"
unpackWARs="true" autoDeploy="true"
xmlValidation="false"
xmlNamespaceAware="false">
<Alias>1fawu.com</Alias>
</Host>
</Engine>
</Service>
</Server>
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 58505] getParameter but null
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58505
Chuck Caldarale <ch...@unisys.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|MOVED |INVALID
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 58505] getParameter but null
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58505
ArLi Weng <ar...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|INVALID |MOVED
--- Comment #6 from ArLi Weng <ar...@gmail.com> ---
(In reply to Konstantin Kolinko from comment #5)
> > maxPostSize="0" />
>
> The above setting is invalid. Its interpretation was changed in 7.0.63 (see
> the changelog).
thank u for reply..
sorry for delay, i have confirm is maxPostSize problem, resoleved when i change
to 10485760.
ps:i forget tell multipart mode on that test sample.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 58505] getParameter but null
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58505
--- Comment #1 from ArLi Weng <ar...@gmail.com> ---
this's p.java:
package j2eetest;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet(name = "p", urlPatterns = {"/p"})
public class p extends HttpServlet {
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
this.doPost(req, resp);
}
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
resp.setContentType("text/plain");
// InputStream in = req.getInputStream();
// byte[] bs = StreamReader.readAllBytes(in, false);
// resp.getWriter().write(String.valueOf(bs.length));
// resp.getWriter().write('\n');
// resp.getWriter().write(new String(bs)); // here is work fine
resp.getWriter().write('\n');
try {
resp.getWriter().write(req.getParameter("_mn")); //here i got null
resp.getWriter().write('\n');
resp.getWriter().write(String.valueOf(req.getParameterMap().size()));
} catch (Exception e) {
e.printStackTrace(new PrintWriter(resp.getWriter()));
}
}
}
this's 8.0.28(last test version) response:
java.lang.NullPointerException
at org.apache.catalina.connector.CoyoteWriter.write(CoyoteWriter.java:180)
at j2eetest.p.doPost(p.java:30)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:217)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 58505] getParameter but null
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58505
--- Comment #3 from ArLi Weng <ar...@gmail.com> ---
but work fine on archlinux x86_64(my work pc: Linux anix-pc 4.2.3-1-ARCH #1 SMP
PREEMPT Sat Oct 3 18:52:50 CEST 2015 x86_64 GNU/Linux)
may be jdk problem?
all same but i686 vs x86_64
[root@srv1-lb http]# pacman -Qs jre
local/jre8-openjdk 8.u60-1
OpenJDK Java 8 full runtime environment
local/jre8-openjdk-headless 8.u60-1
OpenJDK Java 8 headless runtime environment
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 58505] getParameter but null
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58505
--- Comment #2 from ArLi Weng <ar...@gmail.com> ---
(In reply to ArLi Weng from comment #1)
> this's p.java:
>
> package j2eetest;
>
> import java.io.IOException;
> import java.io.PrintWriter;
> import javax.servlet.ServletException;
> import javax.servlet.annotation.WebServlet;
> import javax.servlet.http.HttpServlet;
> import javax.servlet.http.HttpServletRequest;
> import javax.servlet.http.HttpServletResponse;
>
> @WebServlet(name = "p", urlPatterns = {"/p"})
> public class p extends HttpServlet {
>
> @Override
> protected void doGet(HttpServletRequest req, HttpServletResponse resp)
> throws ServletException, IOException {
> this.doPost(req, resp);
> }
>
> @Override
> protected void doPost(HttpServletRequest req, HttpServletResponse resp)
> throws ServletException, IOException {
> resp.setContentType("text/plain");
> // InputStream in = req.getInputStream();
> // byte[] bs = StreamReader.readAllBytes(in, false);
> // resp.getWriter().write(String.valueOf(bs.length));
> // resp.getWriter().write('\n');
> // resp.getWriter().write(new String(bs)); // here is work fine
>
> resp.getWriter().write('\n');
> try {
> resp.getWriter().write(req.getParameter("_mn")); //here i got
> null
> resp.getWriter().write('\n');
>
> resp.getWriter().write(String.valueOf(req.getParameterMap().size()));
> } catch (Exception e) {
> e.printStackTrace(new PrintWriter(resp.getWriter()));
> }
> }
> }
>
> this's 8.0.28(last test version) response:
>
> java.lang.NullPointerException
> at org.apache.catalina.connector.CoyoteWriter.write(CoyoteWriter.java:180)
> at j2eetest.p.doPost(p.java:30)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
> at
> org.apache.catalina.core.ApplicationFilterChain.
> internalDoFilter(ApplicationFilterChain.java:291)
> at
> org.apache.catalina.core.ApplicationFilterChain.
> doFilter(ApplicationFilterChain.java:206)
> at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
> at
> org.apache.catalina.core.ApplicationFilterChain.
> internalDoFilter(ApplicationFilterChain.java:239)
> at
> org.apache.catalina.core.ApplicationFilterChain.
> doFilter(ApplicationFilterChain.java:206)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.
> java:217)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.
> java:106)
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.
> java:502)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
> 88)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
> at
> org.apache.coyote.http11.AbstractHttp11Processor.
> process(AbstractHttp11Processor.java:1091)
> at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.
> process(AbstractProtocol.java:673)
> at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.
> java:1500)
> at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:
> 1456)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:
> 1142)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:
> 617)
> at
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.
> java:61)
> at java.lang.Thread.run(Thread.java:745)
btw: i have post that data: _mn=a
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 58505] getParameter but null
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58505
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|NEW |RESOLVED
--- Comment #4 from Mark Thomas <ma...@apache.org> ---
Bugzilla is not a support forum. Please take this to the users mailing list.
If that discussion results in a reproducible test case for behaviour that is
inconsistent with the Servlet specification then feel free to re-open this
issue and attach the test case.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 58505] getParameter but null
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58505
--- Comment #5 from Konstantin Kolinko <kn...@gmail.com> ---
> maxPostSize="0" />
The above setting is invalid. Its interpretation was changed in 7.0.63 (see the
changelog).
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org