change server default enconding -Where to set JAVA_OPTS in catalina.sh for UTF8?

2006-10-10 Thread Java Development Team
Hi everyone.
Iam trying to change server default enconding from ISO8859_1 to UTF8.
Till now I found 2 differrent solutions. 
The fisrt one is to use the following in my catalina.sh:
set JAVA_OPTS=-Djavax.servlet.request.encoding=UTF-8 -Dfile.encoding=UTF-8

Putting this line in the start of my catalina.sh I get 
Java not starting up, Tomcat not running. 
Does anyone know how to fix this , if any specific .jars needed etc...

The second one is to use filters which i will try if dont get any luck with the 
above which seems to be more efficient solution. 

Thank you
Zis




Re: Switching default index page from xml to xql

2006-10-10 Thread Java Development Team
Hi,
 if Iunderstood corectly you have a seperate application that you want
change its welcome page.
You should put the prefferred welcome page in the applications web.xml
ex.

   prefferredfile.xql

This is the default way of doing this in web apps
I hope Ive helped

- Original Message - 
From: "Kor Kiley" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Tuesday, October 10, 2006 4:29 PM
Subject: Re: Switching default index page from xml to xql


> Charles,
>
> Thank you for your response.
>
> This isn't the default application.  It's an application called eXist.
> Here's a short description straight from the eXist web site:
>
> "eXist is an Open Source native XML database featuring efficient,
> index-based XQuery  processing, automatic
> indexing, extensions for full-text search, XUpdate
>  support, XQuery update
> extensions  and tight
> integration with existing XML development tools. The database implements
> the current XQuery 1.0 working drafts, with exception of the schema
> import and schema validation features defined as optional in the XQuery
> specification."
>
> The default eXist welcome page is index.xml.  The media librarian
> working on the project has created an index.xql which she would like to
> be the welcome page.  The page itself works fine but we don't know how
> to make it execute, by default, instead of an index.xml or index.jsp, etc.
>
> Kor
>
>
> Caldarale, Charles R wrote:
> >> From: Kor Kiley [mailto:[EMAIL PROTECTED]
> >> Subject: Switching default index page from xml to xql
> >>
> >> I want to change the default index for my tomcat welcome
> >> page from an index.xml file to an index.xql file.
> >>
> >
> > Do you really mean index.jsp?  There is no index.xml in the default ROOT
> > webapp.  Also note the following comment in the default ROOT/index.jsp:
> >
> > "NOTE: This page is precompiled. If you change it, this page will
> > not change since it was compiled into a servlet at build time. (See
> > $CATALINA_HOME/webapps/ROOT/WEB-INF/web.xml as to how it was mapped.)"
> >
> >  - Chuck
> >
> >
> > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> > MATERIAL and is thus for use only by the intended recipient. If you
> > received this in error, please contact the sender and delete the e-mail
> > and its attachments from all computers.
> >
> > -
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -- 
> Kor Kiley
> UVM Libraries Systems
> Bailey/Howe Library
> University of Vermont
> (802)656-8290
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: change server default enconding -Where to set JAVA_OPTS in catalina.sh for UTF8?

2006-10-11 Thread Java Development Team
I have used a sevlet filter and  translte from ISO8859_1 to UTF8 just works
through all application.

> > 1) there are 20 results for Djavax.servlet.request.encoding in google ^^
> > (but am really not sure this parameter really exists in tomcat)
>
> My bad. I kept the "-" in front which, of course, suppressed the
> results. The option isn't in the spec and isn't in the 5.5.x code
> base. Maybe it is an option from an old version since the only
> references appear to be Tomcat related.

Adding the Djavax.servlet.request.encoding gave me corect UTF8 encoding for
servlets that insert stuff directly in database which was problematic.
JAVA_OPTS="-Djavax.servlet.request.encoding=UTF-8 -Dfile.encoding=UTF-8
${JAVA_OPTS}"

The corect one thanx to david

>
> > 2) URIEncoding="UTF-8" set the encoding used for html link, the default
> > is platform dependent.
>
> Indeed, which is why I mentioned it. As per the docs and the spec, the
> default is always ISO-8859-1 regardless of the platform default
> encoding. Any query parameters in the URL will be decoded on this
> basis. request.setEncoding() has no effect on this unless
> useBodyEncodingForURI="true" is set on the connector.

I didnt knew about this parameter that is probably why URIEncoding="UTF-8"
had no effect while I was testing .

> The other place where encoding can trip you up is if you include
> static resources within a JSP. There is a fileEncoding parameter on
> the default servlet that may help.

I dont know about this either. How do I get  access to  default servlet

Thank you Mark and David
Zissis



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]