Summary: | <c:import> with relative URL ignores content encoding of resource | ||
---|---|---|---|
Product: | Taglibs | Reporter: | Willis Boyce <wboyce> |
Component: | Standard Taglib | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED INVALID | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | other |
Description
Willis Boyce
2003-07-28 05:26:55 UTC
>Although the
>characters from the imported JSP were encoded using UTF-8, because the
><c:import> tag has no charEncoding attribute, the getString method decodes
>them as ISO-8859-1, and of course, they are incorrect.
Hi Wills,
Sorry if I didn't understand correctly your problem, but have you tried to set
the charEncoding attribute to UTF-8? If so, did it work this way?
Felipe
My head hurts, but I finally think I understand your problem :-) Orion uses the OutputStream of c:import's ResponseWrapper and you'd like the following two things to happen: 1. calling setContentType() on the ResponseWrapper should not be ignored 2. getString() on the ResponseWrapper should take into consideration the contentType that may have been set by (1). However, the JSTL spec is quite clear in section 7.4 that relative URLs in the same context are processed in the same way as the include action of the JSP spec. And the JSP spec clearly states that: An included page cannot change the response status code or set headers. This precludes invoking methods like setCookie. Attempts to invoke these methods will be ignored. A quick look at Jasper in Tomcat shows that the ResponseWrapper used in a <jsp:include> action even throws an exception if getOutputStream() is called. We should probably do that as well in JSTL for <c:import> of a relative URL to be consistent with <jsp:include>. At any rate, I don't think there is anything we can do for the problem you've stated in this bug report. If you think otherwise, we'll be happy to consider your counter arguments. |