Can not work correctly with servlet
-----------------------------------
Key: WW-2989
URL: https://issues.apache.org/struts/browse/WW-2989
Project: Struts 2
Issue Type: Bug
Components: Dispatch Filter
Affects Versions: 2.1.6
Environment: tomcat 5.5,jdk 1.5,struts2 2.1.6,spring 2.5
Reporter: skzr.org
Thanks,
Please excuse my English!
---------------------------------
希望Struts在处理输入流时,尽量不要破坏输入流,比如非struts的请求时,不要试图提取输入流中的参数,因为可能输入流是一个二进制数据流,他应当由客户自己定义的处理器进行处理
I think struts intercepter the input stream of request, don't destruction the
stream if the not struts's mapping!
And in the filter,don't put the input stream to a paramter map,may be change
input stream to paramter map postponed to intercept is a good idea!
---------------------------------
web.xml
1 struts2 with : FilterDispather class and mapping "/*"
2 myServlet with: MyServlet class and mapping "/myServlet"
-----------------------
I open a stream from applet to server with a servlet!
HttpURLConnection con = (HttpURLConnection ) new
URL("http://localhost:8080/skzr/myServlet").openConection();
con.setRequestMethod("POST");
con.setDoOutput(true);
con.connect();
ObjectOutputStream out = new ObjectOutputStream(con.getOutputStream())
Boj o1 = new Boj();
out.writeObject(o1);
First:
I think send a stream data to server,but I found struts to intercept and
destruction of the input stream.I can't work with servlet!
I fond
the---->org.apache.struts2.dispatcher.mapper.DefaultActionMapper.extensions =
new ArrayList<String>() {{ add("action"); add("");}}; <--- this intercept the
"",so struts excute the DefaultActionMapper.dropExtension return
"myServlet",but It's not a struts mapping!
My must to mapping my servlet to "/myServlet.do"
Second:
when i change my servlet to "/myServlet.do",but the web.xml is
StrutsPrepareFilter and StrutsExecuteFilter!
I found the input stream is been destroyed!
希望Struts2处理数据时更加的清晰!
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.