Skip to main content

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

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



Back to the top