Problem:  When accessing files other than a .jsp (pdf, xls, etc.) within
the protected directory, the browser does not recognize the mime type
and does not allow me to open the file.  Pdf and xls files that are not
in protected folders can be opened without any problem.

Error Message:  The file you are downloading cannot be opened by the
default program.  It is either corrupted etc., etc.

Tomcat versions:  I encounter this problem with either Tomcat 4.1 and
5.5

Authentication setup:  Tomcat example Form-based auth. (ie.
/jsp-examples/security/protected)

                                 I have the same problem whether using
BASIC or FORM (I don't run SSL)

Sequence of events:

1.      I enter URL to access index.jsp in protected folder
(http://myServerName:8080/jsp-examples/security/protected/index.jsp) 
2.      The login form is displayed 
3.      I enter the userid and password (tomcat, tomcat) and click the
"Log In" button 
4.      The index.jsp file displays normally showing a successful login.

5.      I enter URL to access a pdf file in the protected folder
(http://myServerName:8080/jsp-examples/security/protected/testfile.pdf) 
6.      IE displays a pop-up that gives me only Save and Cancel choices,
but no Open button.  The message states that "The file you are
downloading cannot be opened by the default program. It is either
corrupted ...etc. etc. 

 

A variation of the problem:

      1.   I enter URL to access testfile.pdf in protected folder
(http://myServerName:8080/jsp-examples/security/protected/testfile.pdf)

      2.   The login form is displayed

3.   I enter the userid and password (tomcat, tomcat) and click the "Log
In" button

4.   The pdf file opens normally within IE.  Great!!!  

      5.   I enter URl to access a different pdf file within the
protected directory
(http://myServerName:8080/jsp-examples/security/protected/testfile2.pdf)

6.   IE displays a pop-up that gives me only Save and Cancel choices,
but no Open button.  The message states that "The file you are
downloading cannot be opened by the default program. It is either
corrupted ...etc. etc.

 

In Summary:

    I can't implement Tomcat's User Authentication if pdf files can't be
opened from a protected directory.  My setup is straight out of the box,
so I can't figure out what could be making this happen.  I have spent
days searching the web looking for a solution without success.  Please,
if anyone can help... I don't know what else to try.

 


The information contained in this e-mail is confidential information intended 
only for the use of the individual or entity named above. If the reader of this 
message is not the intended recipient, you are hereby notified that any 
dissemination, distribution, copy or use of this e-mail is strictly prohibited. 
 If you have received this e-mail in error, please notify us immediately at the 
e-mail address above and delete the original message.  Thank you.

Reply via email to