Laran Evans | 1 Apr 07:03 2005
Picon

Problem creating server from embedded server

I have a class named Main inside a .jar file.

Inside Main I'm trying to instantiate a Server to serve a web-app.

Inside the .jar file I have the following files (among others).

/Manage.jsp
/org/my/Main.class
/org/my/MyServlet.class
/WEB-INF/web.xml

This is the code I'm calling inside Main.

Server server = new Server();

try {
   server.addListener(":9001");
   server.addWebApplication("/", ".");
} catch(Throwable t) {
   LOG.log(Level.SEVERE, t.getMessage(), t);
}

And the exception I get is:

Mar 31, 2005 11:55:59 PM org.mortbay.http.HttpServer doStart
INFO: Version Jetty/5.1.2
Mar 31, 2005 11:55:59 PM org.mortbay.util.FileResource <clinit>
INFO: Checking Resource aliases
Mar 31, 2005 11:55:59 PM org.mortbay.xml.XmlParser <init>
WARNING: Schema validation may not be supported
(Continue reading)

Steve Sobol | 1 Apr 08:51 2005
Picon

Re: Problem creating server from embedded server

Laran Evans wrote:
> I have a class named Main inside a .jar file.
> 
> Inside Main I'm trying to instantiate a Server to serve a web-app.
> 
> Inside the .jar file I have the following files (among others).
> 
> /Manage.jsp
> /org/my/Main.class
> /org/my/MyServlet.class
> /WEB-INF/web.xml
> 
> Element type
>  "web-app" is not declared.
> Mar 31, 2005 11:55:59 PM org.mortbay.xml.XmlParser$Handler error
> WARNING: ERROR <at> null line:24 col:-1 : org.xml.sax.SAXParseException: 

Do you have a DOCTYPE declaration at the top of your web.xml?
If you do, can you share it with us?

--

-- 
JustThe.net - Apple Valley, CA - http://JustThe.net/ - 888.480.4NET (4638)
Steven J. Sobol, Geek In Charge / sjsobol <at> JustThe.net / PGP: 0xE3AE35ED

"The wisdom of a fool won't set you free"
     --New Order, "Bizarre Love Triangle"

-------------------------------------------------------
This SF.net email is sponsored by Demarc:
A global provider of Threat Management Solutions.
(Continue reading)

Laran Evans | 1 Apr 09:51 2005

ClassNotFoundException, but Jetty doesn't say which class isn't found

ClassNotFoundException when loading a servlet. But Jetty doesn't tell me 
WHICH class is missing. The servlet class is in a jar that I'm 100% 
positive is in the system classpath when the server starts.

---

This is the code ...

Server server = new Server();
server.addListener(":" + p);
server.addWebApplication("/", "./docroot/");
server.start();

---

... and this is the exception ...

WARNING: /AccountServlet:
java.lang.ExceptionInInitializerError
         at 
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

         at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
         at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
         at java.lang.Class.newInstance0(Class.java:308)
(Continue reading)

nick.wadge | 1 Apr 10:21 2005

Compression Filter Problem

Hi all
 
I'm running Jetty 4.2.11 and JBoss 3.2.2 and have written a filter to compress the response for certain Mime Types.  All seems to work well for .html files, but I run into problems with .pdf and .jsp files.
 
With .pdf files, I get the save/open file dialog, rather than having the pdf open in the browser.  Regardless of whether I select open or save, I then get a message that IE is not able to access the site.
 
With JSPs, I just get a blank page.
 
I thought this may be a problem with my filter, but having downloaded a free one from the web, I get the same problems.
 
Spoofing the request, seems to return the correct headers and the correct content length.
 
I've also tried this with Jetty 5 and get the same thing.
 
Does anyone have any idea why this may be happening or can suggest some free software that they know works.
 
Many thanks
Nick

Set yourself a tennis challenge!
Enter this year's Nomura Inter-Company Tennis Challenge
Entries close 15 April 2005
www.nomura-tennis.co.uk


PLEASE READ: The information contained in this email is confidential
and intended for the named recipient(s) only. If you are not an intended
recipient of this email you must not copy, distribute or take any
further action in reliance on it and you should delete it and notify the
sender immediately. Email is not a secure method of communication and
Nomura International plc cannot accept responsibility for the accuracy
or completeness of this message or any attachment(s). Please examine this
email for virus infection, for which Nomura International plc accepts
no responsibility. If verification of this email is sought then please
request a hard copy. Unless otherwise stated any views or opinions
presented are solely those of the author and do not represent those of
Nomura International plc. This email is intended for informational
purposes only and is not a solicitation or offer to buy or sell
securities or related financial instruments. Nomura International plc is
regulated by the Financial Services Authority and is a member of the
London Stock Exchange.

Jan Bartel | 1 Apr 11:15 2005

Re: Compression Filter Problem

Nick,

Have you got the following set:

response.setContentType (mimetype);
response.setHeader("Content-Location", filename);
response.setHeader("Content-Disposition","attachment;filename="+filename);

If you turn off the compression, does the save/open dialog work? What
kind of compression are you using?

regards
Jan

nick.wadge <at> uk.nomura.com wrote:
> Hi all
>  
> I'm running Jetty 4.2.11 and JBoss 3.2.2 and have written a filter to 
> compress the response for certain Mime Types.  All seems to work well 
> for .html files, but I run into problems with .pdf and .jsp files.
>  
> With .pdf files, I get the save/open file dialog, rather than having the 
> pdf open in the browser.  Regardless of whether I select open or save, I 
> then get a message that IE is not able to access the site.
>  
> With JSPs, I just get a blank page.
>  
> I thought this may be a problem with my filter, but having downloaded a 
> free one from the web, I get the same problems.
>  
> Spoofing the request, seems to return the correct headers and the 
> correct content length.
>  
> I've also tried this with Jetty 5 and get the same thing.
>  
> Does anyone have any idea why this may be happening or can suggest some 
> free software that they know works.
>  
> Many thanks
> Nick
> 
> Set yourself a tennis challenge!
> Enter this year's Nomura Inter-Company Tennis Challenge
> Entries close 15 April 2005
> www.nomura-tennis.co.uk
> 
> 
> PLEASE READ: The information contained in this email is confidential
> and intended for the named recipient(s) only. If you are not an intended
> recipient of this email you must not copy, distribute or take any
> further action in reliance on it and you should delete it and notify the
> sender immediately. Email is not a secure method of communication and
> Nomura International plc cannot accept responsibility for the accuracy
> or completeness of this message or any attachment(s). Please examine this
> email for virus infection, for which Nomura International plc accepts
> no responsibility. If verification of this email is sought then please
> request a hard copy. Unless otherwise stated any views or opinions
> presented are solely those of the author and do not represent those of
> Nomura International plc. This email is intended for informational
> purposes only and is not a solicitation or offer to buy or sell
> securities or related financial instruments. Nomura International plc is
> regulated by the Financial Services Authority and is a member of the
> London Stock Exchange.
> 

-------------------------------------------------------
This SF.net email is sponsored by Demarc:
A global provider of Threat Management Solutions.
Download our HomeAdmin security software for free today!
http://www.demarc.com/info/Sentarus/hamr30
_______________________________________________
Jetty-support mailing list
Jetty-support <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jetty-support

Chris Haynes | 1 Apr 11:15 2005
Picon

Re: Compression Filter Problem

Don't even try to compress PDF downloads. The MSIE/ADOBE combination relies on multiple, direct byte-indexed access to the 'file'. See several archived posts concerning PDF and MSIE.
 
As for .jsp, well, its up to the JSP class what kind of response it generates. Normally it is HTML and so, with the matching content-related headers in the response, I don't know why it should not work.  Check what headers are being generated. But are your responses from JSP queries really that large that you need compression?
 
Chris Haynes
----- Original Message -----
Sent: Friday, April 01, 2005 9:21 AM
Subject: [Jetty-support] Compression Filter Problem

Hi all
 
I'm running Jetty 4.2.11 and JBoss 3.2.2 and have written a filter to compress the response for certain Mime Types.  All seems to work well for .html files, but I run into problems with .pdf and .jsp files.
 
With .pdf files, I get the save/open file dialog, rather than having the pdf open in the browser.  Regardless of whether I select open or save, I then get a message that IE is not able to access the site.
 
With JSPs, I just get a blank page.
 
I thought this may be a problem with my filter, but having downloaded a free one from the web, I get the same problems.
 
Spoofing the request, seems to return the correct headers and the correct content length.
 
I've also tried this with Jetty 5 and get the same thing.
 
Does anyone have any idea why this may be happening or can suggest some free software that they know works.
 
Many thanks
Nick

Set yourself a tennis challenge!
Enter this year's Nomura Inter-Company Tennis Challenge
Entries close 15 April 2005
www.nomura-tennis.co.uk


PLEASE READ: The information contained in this email is confidential
and intended for the named recipient(s) only. If you are not an intended
recipient of this email you must not copy, distribute or take any
further action in reliance on it and you should delete it and notify the
sender immediately. Email is not a secure method of communication and
Nomura International plc cannot accept responsibility for the accuracy
or completeness of this message or any attachment(s). Please examine this
email for virus infection, for which Nomura International plc accepts
no responsibility. If verification of this email is sought then please
request a hard copy. Unless otherwise stated any views or opinions
presented are solely those of the author and do not represent those of
Nomura International plc. This email is intended for informational
purposes only and is not a solicitation or offer to buy or sell
securities or related financial instruments. Nomura International plc is
regulated by the Financial Services Authority and is a member of the
London Stock Exchange.

Chris Haynes | 1 Apr 11:32 2005
Picon

Re: Compression Filter Problem

Er, actually, on second thoughts I now think compression _should_ work with PDF. Sorry.
 
Your problems are almost certainly to do with headers.
 
You should be including a Content-Encoding header, such as
    Content-Encoding: gzip
or
    Content-Encoding: compress
 
If you are still having trouble, post the headers here so we can look at them, and tell us which compression algorithm you are using.
 
Chris Haynes
----- Original Message -----
Sent: Friday, April 01, 2005 10:15 AM
Subject: Re: [Jetty-support] Compression Filter Problem

Don't even try to compress PDF downloads. The MSIE/ADOBE combination relies on multiple, direct byte-indexed access to the 'file'. See several archived posts concerning PDF and MSIE.
 
As for .jsp, well, its up to the JSP class what kind of response it generates. Normally it is HTML and so, with the matching content-related headers in the response, I don't know why it should not work.  Check what headers are being generated. But are your responses from JSP queries really that large that you need compression?
 
Chris Haynes
----- Original Message -----
Sent: Friday, April 01, 2005 9:21 AM
Subject: [Jetty-support] Compression Filter Problem

Hi all
 
I'm running Jetty 4.2.11 and JBoss 3.2.2 and have written a filter to compress the response for certain Mime Types.  All seems to work well for .html files, but I run into problems with .pdf and .jsp files.
 
With .pdf files, I get the save/open file dialog, rather than having the pdf open in the browser.  Regardless of whether I select open or save, I then get a message that IE is not able to access the site.
 
With JSPs, I just get a blank page.
 
I thought this may be a problem with my filter, but having downloaded a free one from the web, I get the same problems.
 
Spoofing the request, seems to return the correct headers and the correct content length.
 
I've also tried this with Jetty 5 and get the same thing.
 
Does anyone have any idea why this may be happening or can suggest some free software that they know works.
 
Many thanks
Nick
nick.wadge | 1 Apr 11:49 2005

RE: Compression Filter Problem

Thanks for the responses!
 
These are the headers for the jsp request
 
HTTP/1.1 200 OK
Date: Fri, 01 Apr 2005 09:33:35 GMT
Server: Unknown
Content-Encoding: gzip
Transfer-Encoding: chunked
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
Pragma: no-cache
Content-Type: text/html; charset=UTF-8
Set-Cookie: JSESSIONID=508tf9876kob5;path=/test
 
and these for the pdf
 
HTTP/1.1 200 OK
Date: Fri, 01 Apr 2005 09:44:13 GMT
Server: Unknown
Content-Encoding: gzip
Transfer-Encoding: chunked
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/pdf
Last-Modified: Wed, 01 Dec 2004 14:58:12 GMT
Accept-Ranges: bytes
 
It may well be a header issue, but as I said, I get the same problem with an off the shelf compression filter, which wouldn't particularly indicate a bug in my own filter.
 
I'm not setting the Content-Disposition header because I don't want the open/save dialog to appear;  I want the pdf to open in the browser (MSIE 6.0 SP1) as it does when the content is not compressed.
 
Thanks again
 
Nick
 
 
 
 
 
-----Original Message-----
From: jetty-support-admin <at> lists.sourceforge.net [mailto:jetty-support-admin <at> lists.sourceforge.net]On Behalf Of Chris Haynes
Sent: 01 April 2005 10:32
To: jetty-support <at> lists.sourceforge.net
Subject: Re: [Jetty-support] Compression Filter Problem

Er, actually, on second thoughts I now think compression _should_ work with PDF. Sorry.
 
Your problems are almost certainly to do with headers.
 
You should be including a Content-Encoding header, such as
    Content-Encoding: gzip
or
    Content-Encoding: compress
 
If you are still having trouble, post the headers here so we can look at them, and tell us which compression algorithm you are using.
 
Chris Haynes
----- Original Message -----
Sent: Friday, April 01, 2005 10:15 AM
Subject: Re: [Jetty-support] Compression Filter Problem

Don't even try to compress PDF downloads. The MSIE/ADOBE combination relies on multiple, direct byte-indexed access to the 'file'. See several archived posts concerning PDF and MSIE.
 
As for .jsp, well, its up to the JSP class what kind of response it generates. Normally it is HTML and so, with the matching content-related headers in the response, I don't know why it should not work.  Check what headers are being generated. But are your responses from JSP queries really that large that you need compression?
 
Chris Haynes
----- Original Message -----
Sent: Friday, April 01, 2005 9:21 AM
Subject: [Jetty-support] Compression Filter Problem

Hi all
 
I'm running Jetty 4.2.11 and JBoss 3.2.2 and have written a filter to compress the response for certain Mime Types.  All seems to work well for .html files, but I run into problems with .pdf and .jsp files.
 
With .pdf files, I get the save/open file dialog, rather than having the pdf open in the browser.  Regardless of whether I select open or save, I then get a message that IE is not able to access the site.
 
With JSPs, I just get a blank page.
 
I thought this may be a problem with my filter, but having downloaded a free one from the web, I get the same problems.
 
Spoofing the request, seems to return the correct headers and the correct content length.
 
I've also tried this with Jetty 5 and get the same thing.
 
Does anyone have any idea why this may be happening or can suggest some free software that they know works.
 
Many thanks
Nick

Set yourself a tennis challenge!
Enter this year's Nomura Inter-Company Tennis Challenge
Entries close 15 April 2005
www.nomura-tennis.co.uk


PLEASE READ: The information contained in this email is confidential
and intended for the named recipient(s) only. If you are not an intended
recipient of this email you must not copy, distribute or take any
further action in reliance on it and you should delete it and notify the
sender immediately. Email is not a secure method of communication and
Nomura International plc cannot accept responsibility for the accuracy
or completeness of this message or any attachment(s). Please examine this
email for virus infection, for which Nomura International plc accepts
no responsibility. If verification of this email is sought then please
request a hard copy. Unless otherwise stated any views or opinions
presented are solely those of the author and do not represent those of
Nomura International plc. This email is intended for informational
purposes only and is not a solicitation or offer to buy or sell
securities or related financial instruments. Nomura International plc is
regulated by the Financial Services Authority and is a member of the
London Stock Exchange.

nick.wadge | 1 Apr 12:31 2005

RE: Compression Filter Problem

The off-the-shelf filter I used was this:
 
 
It would be interesting to see if anyone else gets the same problem with pdf and jsp files.
 
Cheers
Nick
-----Original Message-----
From: jetty-support-admin <at> lists.sourceforge.net [mailto:jetty-support-admin <at> lists.sourceforge.net]On Behalf Of Wadge, Nick
Sent: 01 April 2005 10:50
To: jetty-support <at> lists.sourceforge.net
Subject: RE: [Jetty-support] Compression Filter Problem

Thanks for the responses!
 
These are the headers for the jsp request
 
HTTP/1.1 200 OK
Date: Fri, 01 Apr 2005 09:33:35 GMT
Server: Unknown
Content-Encoding: gzip
Transfer-Encoding: chunked
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
Pragma: no-cache
Content-Type: text/html; charset=UTF-8
Set-Cookie: JSESSIONID=508tf9876kob5;path=/test
 
and these for the pdf
 
HTTP/1.1 200 OK
Date: Fri, 01 Apr 2005 09:44:13 GMT
Server: Unknown
Content-Encoding: gzip
Transfer-Encoding: chunked
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/pdf
Last-Modified: Wed, 01 Dec 2004 14:58:12 GMT
Accept-Ranges: bytes
 
It may well be a header issue, but as I said, I get the same problem with an off the shelf compression filter, which wouldn't particularly indicate a bug in my own filter.
 
I'm not setting the Content-Disposition header because I don't want the open/save dialog to appear;  I want the pdf to open in the browser (MSIE 6.0 SP1) as it does when the content is not compressed.
 
Thanks again
 
Nick
 
 
 
 
 
-----Original Message-----
From: jetty-support-admin <at> lists.sourceforge.net [mailto:jetty-support-admin <at> lists.sourceforge.net]On Behalf Of Chris Haynes
Sent: 01 April 2005 10:32
To: jetty-support <at> lists.sourceforge.net
Subject: Re: [Jetty-support] Compression Filter Problem

Er, actually, on second thoughts I now think compression _should_ work with PDF. Sorry.
 
Your problems are almost certainly to do with headers.
 
You should be including a Content-Encoding header, such as
    Content-Encoding: gzip
or
    Content-Encoding: compress
 
If you are still having trouble, post the headers here so we can look at them, and tell us which compression algorithm you are using.
 
Chris Haynes
----- Original Message -----
Sent: Friday, April 01, 2005 10:15 AM
Subject: Re: [Jetty-support] Compression Filter Problem

Don't even try to compress PDF downloads. The MSIE/ADOBE combination relies on multiple, direct byte-indexed access to the 'file'. See several archived posts concerning PDF and MSIE.
 
As for .jsp, well, its up to the JSP class what kind of response it generates. Normally it is HTML and so, with the matching content-related headers in the response, I don't know why it should not work.  Check what headers are being generated. But are your responses from JSP queries really that large that you need compression?
 
Chris Haynes
----- Original Message -----
Sent: Friday, April 01, 2005 9:21 AM
Subject: [Jetty-support] Compression Filter Problem

Hi all
 
I'm running Jetty 4.2.11 and JBoss 3.2.2 and have written a filter to compress the response for certain Mime Types.  All seems to work well for .html files, but I run into problems with .pdf and .jsp files.
 
With .pdf files, I get the save/open file dialog, rather than having the pdf open in the browser.  Regardless of whether I select open or save, I then get a message that IE is not able to access the site.
 
With JSPs, I just get a blank page.
 
I thought this may be a problem with my filter, but having downloaded a free one from the web, I get the same problems.
 
Spoofing the request, seems to return the correct headers and the correct content length.
 
I've also tried this with Jetty 5 and get the same thing.
 
Does anyone have any idea why this may be happening or can suggest some free software that they know works.
 
Many thanks
Nick

Set yourself a tennis challenge!
Enter this year's Nomura Inter-Company Tennis Challenge
Entries close 15 April 2005
www.nomura-tennis.co.uk


PLEASE READ: The information contained in this email is confidential
and intended for the named recipient(s) only. If you are not an intended
recipient of this email you must not copy, distribute or take any
further action in reliance on it and you should delete it and notify the
sender immediately. Email is not a secure method of communication and
Nomura International plc cannot accept responsibility for the accuracy
or completeness of this message or any attachment(s). Please examine this
email for virus infection, for which Nomura International plc accepts
no responsibility. If verification of this email is sought then please
request a hard copy. Unless otherwise stated any views or opinions
presented are solely those of the author and do not represent those of
Nomura International plc. This email is intended for informational
purposes only and is not a solicitation or offer to buy or sell
securities or related financial instruments. Nomura International plc is
regulated by the Financial Services Authority and is a member of the
London Stock Exchange.


Set yourself a tennis challenge!
Enter this year's Nomura Inter-Company Tennis Challenge
Entries close 15 April 2005
www.nomura-tennis.co.uk


PLEASE READ: The information contained in this email is confidential
and intended for the named recipient(s) only. If you are not an intended
recipient of this email you must not copy, distribute or take any
further action in reliance on it and you should delete it and notify the
sender immediately. Email is not a secure method of communication and
Nomura International plc cannot accept responsibility for the accuracy
or completeness of this message or any attachment(s). Please examine this
email for virus infection, for which Nomura International plc accepts
no responsibility. If verification of this email is sought then please
request a hard copy. Unless otherwise stated any views or opinions
presented are solely those of the author and do not represent those of
Nomura International plc. This email is intended for informational
purposes only and is not a solicitation or offer to buy or sell
securities or related financial instruments. Nomura International plc is
regulated by the Financial Services Authority and is a member of the
London Stock Exchange.

Chris Haynes | 1 Apr 12:43 2005
Picon

Re: Compression Filter Problem

The only thing I can see wrong here is the 'Expires:' value.
 
Could be worth removing this header, or giving it a sane value.
 
Also, it would be nice to set the name of the server.
 
Maybe there are some set-up parameters needed by your filter to control these two headers?
 
 
Chris Haynes
----- Original Message -----
Sent: Friday, April 01, 2005 10:49 AM
Subject: RE: [Jetty-support] Compression Filter Problem

Thanks for the responses!
 
These are the headers for the jsp request
 
HTTP/1.1 200 OK
Date: Fri, 01 Apr 2005 09:33:35 GMT
Server: Unknown
Content-Encoding: gzip
Transfer-Encoding: chunked
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
Pragma: no-cache
Content-Type: text/html; charset=UTF-8
Set-Cookie: JSESSIONID=508tf9876kob5;path=/test
 
and these for the pdf
 
HTTP/1.1 200 OK
Date: Fri, 01 Apr 2005 09:44:13 GMT
Server: Unknown
Content-Encoding: gzip
Transfer-Encoding: chunked
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/pdf
Last-Modified: Wed, 01 Dec 2004 14:58:12 GMT
Accept-Ranges: bytes
 
It may well be a header issue, but as I said, I get the same problem with an off the shelf compression filter, which wouldn't particularly indicate a bug in my own filter.
 
I'm not setting the Content-Disposition header because I don't want the open/save dialog to appear;  I want the pdf to open in the browser (MSIE 6.0 SP1) as it does when the content is not compressed.
 
Thanks again
 
Nick
 
 
 
 
 
-----Original Message-----
From: jetty-support-admin <at> lists.sourceforge.net [mailto:jetty-support-admin <at> lists.sourceforge.net]On Behalf Of Chris Haynes
Sent: 01 April 2005 10:32
To: jetty-support <at> lists.sourceforge.net
Subject: Re: [Jetty-support] Compression Filter Problem

Er, actually, on second thoughts I now think compression _should_ work with PDF. Sorry.
 
Your problems are almost certainly to do with headers.
 
You should be including a Content-Encoding header, such as
    Content-Encoding: gzip
or
    Content-Encoding: compress
 
If you are still having trouble, post the headers here so we can look at them, and tell us which compression algorithm you are using.
 
Chris Haynes
----- Original Message -----
Sent: Friday, April 01, 2005 10:15 AM
Subject: Re: [Jetty-support] Compression Filter Problem

Don't even try to compress PDF downloads. The MSIE/ADOBE combination relies on multiple, direct byte-indexed access to the 'file'. See several archived posts concerning PDF and MSIE.
 
As for .jsp, well, its up to the JSP class what kind of response it generates. Normally it is HTML and so, with the matching content-related headers in the response, I don't know why it should not work.  Check what headers are being generated. But are your responses from JSP queries really that large that you need compression?
 
Chris Haynes
----- Original Message -----
Sent: Friday, April 01, 2005 9:21 AM
Subject: [Jetty-support] Compression Filter Problem

Hi all
 
I'm running Jetty 4.2.11 and JBoss 3.2.2 and have written a filter to compress the response for certain Mime Types.  All seems to work well for .html files, but I run into problems with .pdf and .jsp files.
 
With .pdf files, I get the save/open file dialog, rather than having the pdf open in the browser.  Regardless of whether I select open or save, I then get a message that IE is not able to access the site.
 
With JSPs, I just get a blank page.
 
I thought this may be a problem with my filter, but having downloaded a free one from the web, I get the same problems.
 
Spoofing the request, seems to return the correct headers and the correct content length.
 
I've also tried this with Jetty 5 and get the same thing.
 
Does anyone have any idea why this may be happening or can suggest some free software that they know works.
 
Many thanks
Nick

Set yourself a tennis challenge!
Enter this year's Nomura Inter-Company Tennis Challenge
Entries close 15 April 2005
www.nomura-tennis.co.uk


PLEASE READ: The information contained in this email is confidential
and intended for the named recipient(s) only. If you are not an intended
recipient of this email you must not copy, distribute or take any
further action in reliance on it and you should delete it and notify the
sender immediately. Email is not a secure method of communication and
Nomura International plc cannot accept responsibility for the accuracy
or completeness of this message or any attachment(s). Please examine this
email for virus infection, for which Nomura International plc accepts
no responsibility. If verification of this email is sought then please
request a hard copy. Unless otherwise stated any views or opinions
presented are solely those of the author and do not represent those of
Nomura International plc. This email is intended for informational
purposes only and is not a solicitation or offer to buy or sell
securities or related financial instruments. Nomura International plc is
regulated by the Financial Services Authority and is a member of the
London Stock Exchange.


Gmane