Re: Skills Challenge - off topic

2000-11-08 Thread Wyn Easton

Good one.
I like it.
Thanks.
BTW-What is L-A-I-N...?

--- Kurt Bernhard Pruenner <[EMAIL PROTECTED]> wrote:
> Wyn Easton wrote:
> > How can I somehow set a debug flag in my JSPs to use US ASCII
> > if the flag is set and UTF-8 if not?
> > I've tried surrounding the "page" JSP tag with an "if", but
> > the page directive is processed first and moved to the beginning of
> > the generated java file. I've tried replacing the String
> > "text/html;charset=utf-8" with a String variable, no luck.
> > Hmmm...
> 
> How about using 
> 
> <%
> if (DEBUG)
>  response.setContentType("text/html;charset=utf-8")
> else
>  response.setContentType("text/html;charset=")
> %>
> 
> somewhere in the beginning of the page? You could probably put this
> and other
> things you need on every page into a seperate file and just use
> 
> <%@ include file=".jsp" %> 
> 
> at the top of your files...
> 
> Problem solved? :)
> 
> -- 
> Kurt Pruenner - Haendelstrasse 17, 4020 Linz, Austria | Briareos at
> Olymp BBS:
> http://www.mp3.com/Leak http://www.ssw.uni-linz.ac.at | ssh
> [EMAIL PROTECTED]
> ...It might be written "Mindfuck", but it's spelt
> "L-A-I-N"...
> np: Vladislav Delay - Pietola (Multila)


=
Wyn Easton
[EMAIL PROTECTED]

__
Do You Yahoo!?
Thousands of Stores.  Millions of Products.  All in one Place.
http://shopping.yahoo.com/



Re: Skills Challenge - off topic

2000-11-08 Thread Wyn Easton

Got it!
I left in the page directive
<%@ page contentType="text/html;charset=utf-8"%>
and I surrounded response.setContentType("text/html;charset=8859_1");
with the test for a debug flag.
Works great.

--- Wyn Easton <[EMAIL PROTECTED]> wrote:
> Hi All,
> 
> I just changed several JSPs to support language translations.
> I added <%@ page contentType="text/html;charset=utf-8"%>
> to the beginning of all of my JSPs. This is great for NLS, but
> the Netscape JavaScript Debugger only understands US ASCII and
> will not work with utf-8 (bummer).
> Now the challenge...
> How can I somehow set a debug flag in my JSPs to use US ASCII 
> if the flag is set and UTF-8 if not?
> I've tried surrounding the "page" JSP tag with an "if", but
> the page directive is processed first and moved to the beginning of
> the generated java file. I've tried replacing the String
> "text/html;charset=utf-8" with a String variable, no luck.
> Hmmm...
> 
> 
> 
> 
> 
> =
> Wyn Easton
> [EMAIL PROTECTED]
> 
> __
> Do You Yahoo!?
> Thousands of Stores.  Millions of Products.  All in one Place.
> http://shopping.yahoo.com/


=
Wyn Easton
[EMAIL PROTECTED]

__
Do You Yahoo!?
Thousands of Stores.  Millions of Products.  All in one Place.
http://shopping.yahoo.com/



Re: Skills Challenge - off topic

2000-11-08 Thread Kurt Bernhard Pruenner

Wyn Easton wrote:
> How can I somehow set a debug flag in my JSPs to use US ASCII
> if the flag is set and UTF-8 if not?
> I've tried surrounding the "page" JSP tag with an "if", but
> the page directive is processed first and moved to the beginning of
> the generated java file. I've tried replacing the String
> "text/html;charset=utf-8" with a String variable, no luck.
> Hmmm...

How about using 

<%
if (DEBUG)
 response.setContentType("text/html;charset=utf-8")
else
 response.setContentType("text/html;charset=")
%>

somewhere in the beginning of the page? You could probably put this and other
things you need on every page into a seperate file and just use

<%@ include file=".jsp" %> 

at the top of your files...

Problem solved? :)

-- 
Kurt Pruenner - Haendelstrasse 17, 4020 Linz, Austria | Briareos at Olymp BBS:
http://www.mp3.com/Leak http://www.ssw.uni-linz.ac.at | ssh [EMAIL PROTECTED]
...It might be written "Mindfuck", but it's spelt "L-A-I-N"...
np: Vladislav Delay - Pietola (Multila)



Skills Challenge - off topic

2000-11-08 Thread Wyn Easton

Hi All,

I just changes several JSPs to support language translations.
I added <%@ page contentType="text/html;charset=utf-8"%>
to the beginning of all of my JSPs. This is great for NLS, but
the Netscape JavaScript Debugger only understands US ASCII and
will not work with utf-8 (bummer).
Now the challenge...
How can I somehow set a debug flag in my JSPs to use US ASCII 
if the flag is set and UTF-8 if not?
I've tried surrounding the "page" JSP tag with an "if", but
the page directive is processed first and moved to the beginning of
the generated java file. I've tried replacing the String
"text/html;charset=utf-8" with a String variable, no luck.
Hmmm...





=
Wyn Easton
[EMAIL PROTECTED]

__
Do You Yahoo!?
Thousands of Stores.  Millions of Products.  All in one Place.
http://shopping.yahoo.com/