jsp:include parameters changes the page encoding

E

Eqbal

Hi,

I have a jsp:include directive on one of the JSP page and using params
to pass parameter. But it seems that when I do that my page encoding
changes. Before doing specifying the params the
request.getCharacterEncoding was returning null, but when I include
the params then it changes to ISO-8859-1. Any idea why this could be
happenning? I would be fine if it always was null.
 
J

John C. Bollinger

Eqbal said:
Hi,

I have a jsp:include directive on one of the JSP page and using params
to pass parameter. But it seems that when I do that my page encoding
changes. Before doing specifying the params the
request.getCharacterEncoding was returning null, but when I include
the params then it changes to ISO-8859-1. Any idea why this could be
happenning? I would be fine if it always was null.

I don't know why the servlet container / JSP engine implementation
chooses to do that (although I could offer a guess or two) but you
oughtn't to have any problem with this particular behavior. HTTP
specifies that if a character encoding is not given then ISO-8859-1 is
assumed, therefore the semantics of the request are unchanged.


John Bollinger
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top