Openbravo Issue Tracking System - Openbravo ERP | ||||||||||||
| View Issue Details | ||||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
| 0004788 | Openbravo ERP | A. Platform | public | 2008-09-01 18:45 | 2022-02-01 08:09 | |||||||
| Reporter | gorka_gil | |||||||||||
| Assigned To | Triage Platform Base | |||||||||||
| Priority | low | Severity | minor | Reproducibility | N/A | |||||||
| Status | new | Resolution | open | |||||||||
| Platform | OS | 5 | OS Version | |||||||||
| Product Version | pi | |||||||||||
| Target Version | Fixed in Version | |||||||||||
| Merge Request Status | ||||||||||||
| Review Assigned To | ||||||||||||
| OBNetwork customer | No | |||||||||||
| Web browser | ||||||||||||
| Modules | Core | |||||||||||
| Support ticket | ||||||||||||
| Regression level | ||||||||||||
| Regression date | ||||||||||||
| Regression introduced in release | ||||||||||||
| Regression introduced by commit | ||||||||||||
| Triggers an Emergency Pack | No | |||||||||||
| Summary | 0004788: In tomcat filters change HttpServletRequest to HttpServletRequestWrapper | |||||||||||
| Description | There is three filters for request: - CharsetFilter.java - CacheFilter.java - SessionExpirationFilter.java Now this filters edit directly the request/response objects. The recommended implementation is use a wrapper: http://java.sun.com/products/servlet/Filters.html [^] I try to implement it in the way: public void doFilter(ServletRequest request, ServletResponse response, FilterChain next) throws IOException, ServletException { HttpServletRequestWrapper reqWrapper = new HttpServletRequestWrapper((HttpServletRequest) request); next.doFilter(reqWrapper, response); reqWrapper.setCharacterEncoding(encoding); } But the problem is that the setCharacterEncoding must be done before receive the request, because after has no effect. The actual and working solution is: public void doFilter(ServletRequest request, ServletResponse response, FilterChain next) throws IOException, ServletException { request.setCharacterEncoding(encoding); next.doFilter(request, response); } and in the Web.xml set the CharsetFilter the first filter. Thanks to Ville for his collaboration. | |||||||||||
| Steps To Reproduce | Now (trunk 6707), works fine, but for test if a new implementation works: 1. Go to any window, for example, Sales order 2. In some field, for example, description 3. Introduce no standard characters, for example "€@#$%&" 4. Save | |||||||||||
| Proposed Solution | ||||||||||||
| Additional Information | ||||||||||||
| Tags | ToBeReviewed | |||||||||||
| Relationships |
| |||||||||||
| Attached Files | ||||||||||||
| Issue History | ||||||||||||
| Date Modified | Username | Field | Change | |||||||||
| 2008-09-01 18:45 | gorka_gil | New Issue | ||||||||||
| 2008-09-01 18:45 | gorka_gil | Assigned To | => cromero | |||||||||
| 2008-09-01 18:45 | gorka_gil | sf_bug_id | 0 => 2087168 | |||||||||
| 2008-09-01 18:45 | gorka_gil | OBNetwork customer | => No | |||||||||
| 2008-09-01 18:45 | gorka_gil | Regression testing | => No | |||||||||
| 2008-09-01 18:47 | gorka_gil | Relationship added | related to 0004774 | |||||||||
| 2008-09-01 18:55 | gorka_gil | Description Updated | ||||||||||
| 2008-09-01 18:56 | gorka_gil | Description Updated | ||||||||||
| 2008-09-01 18:57 | gorka_gil | Description Updated | ||||||||||
| 2008-11-10 13:10 | cromero | Assigned To | cromero => pjuvara | |||||||||
| 2008-11-16 19:54 | pjuvara | Tag Attached: ToBeReviewed | ||||||||||
| 2009-05-22 19:34 | pjuvara | Assigned To | pjuvara => iciordia | |||||||||
| 2017-03-10 17:06 | gorka_gil | Assigned To | iciordia => platform | |||||||||
| 2017-03-10 17:06 | gorka_gil | Note Added: 0094946 | ||||||||||
| 2022-02-01 08:09 | alostale | Assigned To | platform => Triage Platform Base | |||||||||
| Notes | |||||
|
|
|||||
|
|
||||