tags:

views:

121

answers:

5

I've worked with JBoss and WebLogic before, but at my current job, we're using OC4J, which is a first for me. I think that my problem might be related to that. I'm creating an EAR file that has one WAR file inside it. The top level JSPs seems to display correctly, but when I try to display a JSP in a subdirectory, like secure/index.do or secure/header.jsp, the browser asks me if I want to save the file. If I do save it, it's a 0 byte size file. Actually, I just also tried secure/index.xyz, which I know doesn't exist, and it did the same thing. I know those other files/servlets exist. Any hints on what might be causing this?

+1  A: 

I believe that the browser prompts you to save a file for content types it doesn't recognise. In this case, the server response probably contains a garbled or incorrect content type.

From the rest of your description of the problem, it sounds like a general server configuration problem. One thing you do is check if any sample projects (or EARs) are provided with the server and see if you can reproduce the same problem. If you see the same behaviour, this point to the configuration, if not, the it probably doesn't like your deployment.

Dana the Sane
+1  A: 

I agree with Dana the Sane. Probably your web server or JBoss is returning the wrong content type on responses. If you have Wireshark, then run wireshark on your client and then look at the HTTP headers on the response. I expect that the content type header is something that your browser doesn't know how to handle or display.

Eddie
A: 

If you are using firefox install LiveHTTPHeaders, see what the server returns to the browser when you visit the urls that give you trouble. If it's a weird content-type value or there is a content-disposition header, that's the problem.

Vasil
A: 

Eddie is right!

Otherwise it can be caused of an rendering error, if the load on the server is too high.

Martin K.
A: 

Found it. You guys were in essence correct on the content type issue, but there was an underlying bug in my code that caused that. I had created a Filter, called SecureActionFilter, which was called whenever there was a /secure/* URL. The problem is that I broke the chain. I forgot to add "chain.doFilter(req, res)" to the end of my "doFilter" method. Because of that, the request never got forwarded to the JSPs, and therefore nothing was returned to the browser, including any MIME type, and the browser then tried to save the 0-length content onto my file system.

Gary Kephart