• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What is the problem?

 
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Bal Sharma
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<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.


 
Remember to always leap before you look. But always take the time to smell the tiny ads:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic