[MAGNOLIA-2909] POST requests to Magnolia fail if Struts filter chain is used before the Magnolia chain Created: 26/Oct/09 Updated: 23/May/13 Resolved: 23/May/13 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | 4.1.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Andreas Antener | Assignee: | Unassigned |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | post, struts, struts2 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
struts 2.1.6, tomcat 6 |
||
| Attachments: |
|
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
| Date of First Response: |
| Description |
|
First, what are we trying to do: JSP templates came in handy to include pages that are using struts tags. We added the struts filter-dispacher and mapped him BEFORE magnolia (see attachement). From now on, struts tags get executed and they work as expected. However, the thing that does not work anymore are POST requests that are directed to Magnolia itself (meaning every Magnolia dialog / input etc.). Magnolia terminates parsing those request with the following exception: java.io.IOException: Corrupt form data: premature ending I read that this could be an MultipartParser-library related incompatibility with Struts: Any suggestions? |
| Comments |
| Comment by Danilo Ghirardelli [ 03/Nov/09 ] |
|
In a similar project we used the opposite approach, having struts actions mapped as Magnolia paragraphs, and it worked out well (except that you should disable Magnolia cache for pages with struts content). If you are interested you can take a look at the code here: |
| Comment by Andreas Antener [ 04/Nov/09 ] |
|
Thank you for the hint. I had a short look into the code. Basically what you are doing is delegating the action to struts for processing in a renderer, right? In the meanwhile I tried to do something similar with a filter in the Magnolia filter chain. My filter just delegates the request to the struts dispacher. It works with post-requests if the filter is positioned after "multipartRequest". Also it was necessary to check on loops because struts calls Magnolia sites as result pages, which is why I'm not quite sure if this is the correct approach to solve it.. |
| Comment by Andreas Antener [ 23/May/13 ] |
|
Closing this issue since I believe it isn't relevant anymore. |