[jboss-user] [JBoss Seam] - Re: Open PDF in IE
jpb2
do-not-reply at jboss.com
Tue Jan 30 06:26:55 EST 2007
Thank you for the quick response.
Here´s the workaround with a Wrapper for the SeamRedirectFilter.
It appends dummy=dummy.pdf to the end of the url.
public class RedirectFilterWrapper extends SeamRedirectFilter {
|
| public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
| throws IOException, ServletException {
| super.doFilter(request, wrapResponse((HttpServletResponse)response), chain);
| }
|
| private static ServletResponse wrapResponse(HttpServletResponse response) {
| return new HttpServletResponseWrapper(response) {
|
| public void sendRedirect(String url) throws IOException {
| String param = "dummy=dummy.pdf";
|
| url = new StringBuilder( url.length() + param.length() +1)
| .append(url)
| .append( url.contains("?") ? '&' : '?' )
| .append(param)
| .toString();
|
| super.sendRedirect(url);
| }
| };
| }
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008233#4008233
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008233
More information about the jboss-user
mailing list