Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] Problem with Jetty OSGi and JSP Content-Type

Hi,

please ignore this problem. It was a PEBKAC.

There was an issue in the processing so that instead of "rd.forward" the
call went to "rd.include".

Fixing my code solved the issue ;-)

Sorry for that.

Jens

On 03/03/2015 12:19 PM, Jens Reimann wrote:
> Hi,
>
> I am running Jetty as OSGi application (with Equinox) as described here [1]
>
> For my web application I am registering an context implementation
> (extending WebAppContext) and registering the servlet in "void
> preConfigure ()".
>
> Now at some point I forward the request to JSP, using:
>
>     RequestDispatcher rd = request.getRequestDispatcher ( path );
>     rd.forward( request, response );
>
> However, the final HTTP response does not contain any "Content-Type"
> header, although it is specified in the JSP:
>
>     <%@ page language="java" contentType="text/html; charset=UTF-8"
> pageEncoding="UTF-8"%>
>
> I would expect the request to take over the content type from the entry
> point JSP file.
>
> I also had troubles in the past with UTF-8. For JSPs it did not take the
> setting from "pageEncoding" either. I solved this differently, but I
> guess this is related to the same issue here.
>
> Any idea or help is appreciated!
>
> Thanks
>
> Jens
>
>
> [1]
> https://www.eclipse.org/jetty/documentation/current/framework-jetty-osgi.html
>
> _______________________________________________
> jetty-dev mailing list
> jetty-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/jetty-dev




Back to the top