*
The moose likes Servlets and the fly likes What is the problem? 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 "What is the problem?" Watch "What is the problem?" New topic
Author

What is the problem?

Bal Sharma
Ranch Hand

Joined: Sep 19, 2001
Posts: 273
Hello Everybody:
I am trying to run tomcat. I had a problem for about a week, I could not compile servlet. William Brogden help me out on this. Thanks Bill, I can compile Servlet now. But, It is not working at displaying. I saved my complied class file at /example/WEB_INF/classes/ location. I used http://localhost:8080/examples/servlet/HelloServlet. It pops up file downloading window and starts downloading activity.
Had anyone this problem before? please let me know what is solution?
Thanks. BK
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15964
    
  19

It sounds like what you are saying is that when you visit the HelloServlet, it is attempting to output in a MIME format that isn't supported for display. Check your servlet source code for a statement that sets the content type header such as "response.setContentType("text/html")". If you don't have one, that may be your problem. Otherwise, make sure it's spelled right.


Customer surveys are for companies who didn't pay proper attention to begin with.
Bal Sharma
Ranch Hand

Joined: Sep 19, 2001
Posts: 273
<b>Thnak you Tom.</b>
You know what I am stupid. I had 'response.setContentType("text/html")' statement, but I mistyped. response.setContentType("test/html")". Zee! I wasted more than a week wondering as instalation problem. Rock and roll, I got rolling now. Thanks again BK
I hsd
Originally posted by Tim Holloway:
It sounds like what you are saying is that when you visit the HelloServlet, it is attempting to output in a MIME format that isn't supported for display. Check your servlet source code for a statement that sets the content type header such as "response.setContentType("text/html")". If you don't have one, that may be your problem. Otherwise, make sure it's spelled right.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is the problem?
 
Similar Threads
Servlets not loading
Problems Running Servlet code on Win 2000
Problem starting servlet
Tomcat Can't find Servlets
Need help