aspose file tools*
The moose likes JSP and the fly likes Internet Explorer and downloading zip files/ view XML source files. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Internet Explorer and downloading zip files/ view XML source files." Watch "Internet Explorer and downloading zip files/ view XML source files." New topic
Author

Internet Explorer and downloading zip files/ view XML source files.

Rudy Rusli
Ranch Hand

Joined: Jun 01, 2006
Posts: 114
In my JSP application, I have some XML files and some ZIP files.
When I try to view the XML source files in Internet Explorer, it gives me this:
"The XML source file is unavailable for viewing"
When I try to access the zip files in Internet Explorer, it gives me this:
"Internet Explorer cannot download myZipFile.zip from myHost.
Internet Explorer was not able to open this internet site. The requested site is either unavailable or cannot be found. Please try again later."

It's okay in Mozilla. I noticed that when I remove <security-constraint> tag in my web.xml, I can access or view sources okay in Internet Explorer.
But I need the security-constraint tag.
Could somebody please advice?

Thanks in advance for all the help.
Below is the <security-constraint> tag that I put in my web.xml

--------------------------------------------------------------------------------------------------------

<security-constraint>
<web-resource-collection>
<web-resource-name>user-resource</web-resource-name>
<description>pages which require login</description>
<url-pattern>*.jsp</url-pattern>
<url-pattern>*.html</url-pattern>
<url-pattern>*.xml</url-pattern>
<url-pattern>*.zip</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>

<auth-constraint>
<description>Must authenticate before querying the system</description>
<role-name>role1</role-name>
<role-name>role2</role-name>
</auth-constraint>

<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Internet Explorer and downloading zip files/ view XML source files.