JSP Not fully loaded on WebSphere Application Server 8.5

I plan to upgrade from WebSphere Application Server (WAS) 7 to version 8.5. I deployed an application that works fine on WAS 7, and I have not made any changes to it since the migration.

However, on WAS 8.5, JSP pages do not load completely. When I browse these pages through Source View, I see that the HTML content is only half loaded. In particular, HTML itself is not populated with closing tags.

In WAS 7, the result of "View Source" is as follows:

<html>
...
...
<td..../>
<td..../>
<td..../>
...
...
</html>

But the same thing in WAS 8.5 looks like this:

<html>
...
...
<td..../>
<td..../>
<td..

I have done the following:

  • JSP WAS 7 WAS 8.5. , , . HTML .
  • JavaScript IE, .
  • .

:

  • <td>, , JSP. ?
  • - - Websphere, ?
  • - , ?

, , .

+4
1

, , , .

, - .

, EncodingFilter, , , , response.setBufferSize .

:

public class ResponseBufferFilter implements Filter
{
    private FilterConfig filterConfig;

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
    {
        try
        {
            // or better take the value from filterConfig.getInitParameter
            response.setBufferSize(100000000);

            chain.doFilter(request, response);
        }
        catch(Exception e)
        {
            e.printStackTrace();
            throw new ServletException(e.getMessage(), e);
        }
    }

    @Override
    public void init(FilterConfig filterConfig) throws ServletException
    {
        this.filterConfig = filterConfig;
    }

    @Override
    public void destroy()
    {
        filterConfig = null;
    }
}

:

<filter>
    <filter-name>Response Buffer Filter</filter-name>
    <filter-class>test.example.filter.ResponseBufferFilter</filter-class>
</filter>
<filter-mapping>
    <filter-name>Response Buffer Filter</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
    <filter-name>SetCharacterEncoding</filter-name>
    <!-- provide the class causing unwanted behavior -->
    <filter-class>org.apache.catalina.filters.SetCharacterEncodingFilter</filter-class>
    <init-param>
        <param-name>encoding</param-name>
        <param-value>UTF-8</param-value>
    </init-param>
</filter>
<filter-mapping> 
    <filter-name>SetCharacterEncoding</filter-name> 
    <url-pattern>/*</url-pattern> 
</filter-mapping> 

, , , , , .

0

All Articles