Jess,

> Sorry, I love Java and the idea of JSP, but the idea of not doing the
> HTML/XML escaping for you but not allowing you to let XML tools decide the
> encoding and do it for you is *insane*.  JavaSoft needs to either add such
> escaping to its JspWriter API and/or let one set the encoding of the
> JspWriter in a reliable, spec-guaranteed way.  The way the JSP spec suggests
> an internationalization strategy in an appendix that does not even cover
> these bases instead of thoroughly specifying it as a core requirement in the
> body of the spec is *shameful*.

Well, maybe not shameful...

With most browsers you hardly need any &-style escpaing any more. (Okay - maybe
a week excuse.)

XML and JSP were married only after they have in the race for a while. So to a
certain degree they just not fit exactly. It's just natural that if both concepts
try to solve as single problem, the two solutions might not be compatible. I
believe that this is the case with char encoding in JSP and XML.

JSP aimes at developers who don't want to deal too much with programming, but
rather presentation, easy representation, perhaps scripting - therefore it takes
into account that there is an encoding the page is authored in and an encoding that
the page is delivered in. I agree - it would be nice, if you could explicitly
specify these two independent from each other:

1) the encoding of the page at authoring time
2) the used encoding for delivering at runtime

But that is not explicitly possible right now. You should send this as a request
for enhancement to the spec people.

>   And you are right not to have that confidence.
>
>   The above mentioned approach is logical and definitely works with some,
>   maybe all
>   engines, BUT: it is not explicitly defined in the spec!
>
> And I will state quite explicitly that the spec is clearly broken in this
> regard!

Maybe you should just use servlets and simply include the jsp you need to have -
that way the jsps aren't allowed to change the encoding/mime-type of the page and
you can reliably set it in the servlet, while your jsp still does most of the work.
Just map the servlet to "/path/*" and include to "/jsppath/" + req.pathInfo(). You
need to set a different path as the /* mapping is 'stronger' than the *.jsp
mapping.

ciao,

-hendrik

- - - - - - - - - - - - - - - - - - - - - - - - - - -
  tagtraum industries      http://www.tagtraum.com/
  jo!                 small&smart 2.2 servletengine
  Java Server & Servlets   The web-application book
  The WebApp Framework        http://www.webapp.de/

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to