History
|
Log In
H
OME
B
ROWSE PROJECT
F
IND ISSUES
Q
UICK SEARCH:
Learn more about
Quick Search
Issue Details
(
XML
|
Word
|
Printable
)
Key:
WW-1278
Type:
Bug
Status:
Closed
Resolution:
Fixed
Priority:
Major
Assignee:
Rainer Hermanns
Reporter:
tm_jee
Votes:
0
Watchers:
1
Operations
If you were
logged in
you would be able to see more operations.
WebWork
Prefix failed when Multipart form is submited
Created:
28/Mar/06 09:42 AM
Updated:
18/Jun/06 04:52 AM
Component/s:
None
Affects Version/s:
2.2.2
Fix Version/s:
2.2.3
File Attachments:
1.
WW-1278.patch
(2 kb)
Description
« Hide
Prefix failed when Multipart form is submited
see
http://forums.opensymphony.com/thread.jspa?threadID=23756&tstart=0
Description
Prefix failed when Multipart form is submited see
http://forums.opensymphony.com/thread.jspa?threadID=23756&tstart=0
Show »
All
Comments
Change History
Sort Order:
[
Permlink
|
« Hide
]
tm_jee
- [
28/Mar/06 09:46 AM
]
FilterDispatcher needs to wrap up mutipart request earlier before ActionMapper is give a chance to getMapping(...)
In FilterDispatcher ...
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {
.....
ServletContext servletContext = filterConfig.getServletContext();
try {
request = du.wrapRequest(request, servletContext);
} catch (IOException e) {
String message = "Could not wrap servlet request with MultipartRequestWrapper!";
LOG.error(message, e);
throw new ServletException(message, e);
}
ActionMapper mapper = ActionMapperFactory.getMapper();
ActionMapping mapping = mapper.getMapping(request);
.....
du.serviceAction(request, response, servletContext, mapping);
....
}
instead of current
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {
.....
ServletContext servletContext = filterConfig.getServletContext();
ActionMapper mapper = ActionMapperFactory.getMapper();
ActionMapping mapping = mapper.getMapping(request);
.....
....
try {
request = du.wrapRequest(request, servletContext);
} catch (IOException e) {
String message = "Could not wrap servlet request with MultipartRequestWrapper!";
LOG.error(message, e);
throw new ServletException(message, e);
}
du.serviceAction(request, response, servletContext, mapping);
....
}
[
Show »
]
tm_jee
- [
28/Mar/06 09:46 AM
] FilterDispatcher needs to wrap up mutipart request earlier before ActionMapper is give a chance to getMapping(...) In FilterDispatcher ... public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { ..... ServletContext servletContext = filterConfig.getServletContext(); try { request = du.wrapRequest(request, servletContext); } catch (IOException e) { String message = "Could not wrap servlet request with MultipartRequestWrapper!"; LOG.error(message, e); throw new ServletException(message, e); } ActionMapper mapper = ActionMapperFactory.getMapper(); ActionMapping mapping = mapper.getMapping(request); ..... du.serviceAction(request, response, servletContext, mapping); .... } instead of current public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { ..... ServletContext servletContext = filterConfig.getServletContext(); ActionMapper mapper = ActionMapperFactory.getMapper(); ActionMapping mapping = mapper.getMapping(request); ..... .... try { request = du.wrapRequest(request, servletContext); } catch (IOException e) { String message = "Could not wrap servlet request with MultipartRequestWrapper!"; LOG.error(message, e); throw new ServletException(message, e); } du.serviceAction(request, response, servletContext, mapping); .... }
[
Permlink
|
« Hide
]
tm_jee
- [
28/Mar/06 09:48 AM
]
Can someone review it and if its ok, patched it into SAF2.0 once the code in Apache inbator stabilized. Thx. :-)
[
Show »
]
tm_jee
- [
28/Mar/06 09:48 AM
] Can someone review it and if its ok, patched it into SAF2.0 once the code in Apache inbator stabilized. Thx. :-)
[
Permlink
|
« Hide
]
Benx Shen
- [
28/Mar/06 10:14 AM
]
I create a new class extending FilterDispatcher and override doFilter() method as above. It seems to work well.
[
Show »
]
Benx Shen
- [
28/Mar/06 10:14 AM
] I create a new class extending FilterDispatcher and override doFilter() method as above. It seems to work well.
[
Permlink
|
« Hide
]
Rainer Hermanns
- [
28/Mar/06 11:31 AM
]
Toby,
yes will do later this week...
Thanks
[
Show »
]
Rainer Hermanns
- [
28/Mar/06 11:31 AM
] Toby, yes will do later this week... Thanks
[
Permlink
|
« Hide
]
Rainer Hermanns
- [
18/Jun/06 04:52 AM
]
Fixed in CVS
[
Show »
]
Rainer Hermanns
- [
18/Jun/06 04:52 AM
] Fixed in CVS
In FilterDispatcher ...
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {
.....
ServletContext servletContext = filterConfig.getServletContext();
try {
request = du.wrapRequest(request, servletContext);
} catch (IOException e) {
String message = "Could not wrap servlet request with MultipartRequestWrapper!";
LOG.error(message, e);
throw new ServletException(message, e);
}
ActionMapper mapper = ActionMapperFactory.getMapper();
ActionMapping mapping = mapper.getMapping(request);
.....
du.serviceAction(request, response, servletContext, mapping);
....
}
instead of current
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {
.....
ServletContext servletContext = filterConfig.getServletContext();
ActionMapper mapper = ActionMapperFactory.getMapper();
ActionMapping mapping = mapper.getMapping(request);
.....
....
try {
request = du.wrapRequest(request, servletContext);
} catch (IOException e) {
String message = "Could not wrap servlet request with MultipartRequestWrapper!";
LOG.error(message, e);
throw new ServletException(message, e);
}
du.serviceAction(request, response, servletContext, mapping);
....
}