File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes servlet not displaying is downloading Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet not displaying is downloading" Watch "servlet not displaying is downloading" New topic

servlet not displaying is downloading

Luther Adon
Ranch Hand

Joined: Apr 27, 2002
Posts: 51
Thanks muchly for the assistance previously. I fixed the classpath and the placement and it works better.
Now a new problem, database connection and query work fine now but my computer is treating getting the servlet page not as a webpage but as a downloadable file of which I need to chose. The code that follows is all that is applicable:

I hope someone can help me I feel so close and none of my books cover this type of error.
Thank you in advance
[ August 21, 2002: Message edited by: Luther Adon ]
yogendra babu

Joined: Jul 01, 2002
Posts: 17
If the parameter to setContentType of response Object is other than text/html the servlet will start get downloading.Check what is the content type u set for the response object in your code
Luther Adon
Ranch Hand

Joined: Apr 27, 2002
Posts: 51
Thank you kindly,
works like a charm now.
I agree. Here's the link:
subject: servlet not displaying is downloading
Similar Threads
Storing resultset into arraylist
Servlet becomming slow
Servlet becomming slow
org.apache.jasper.JasperException: java.lang.ArrayIndexOutOfBoundsException: 8
HTTP method GET is not supported by this URL