GeeCON Prague 2014*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Tomcat showing error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Tomcat showing error" Watch "Tomcat showing error" New topic
Author

Tomcat showing error

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9400
    
    2

Guys,

I have a tomcat installation on port 7080 and when I try to access it using http://localhost:7080, I'm getting 5 squares in the response of my webpage. What could the problem be?? I'm guessing some response content type is not proper. Where can I set the response types for Tomcat server itself??? Please help guys!


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9400
    
    2

I'm not understanding this. Is there any mime-type setting for the Tomcat server as such??
Priya Viswam
Ranch Hand

Joined: Dec 28, 2006
Posts: 81
You can configure mime types in tomcat. Please check the file web.xml in the conf folder of tomcat.


SCJP 1.5<br />SCWCD 1.4
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
I think the problem is with the encoding.Browser is getting bytes of some different code page and not able to convert those and ending up with square boxes.Try setting encoding along with the mime in response header.


Rahul Bhattacharjee
LinkedIn - Blog
satya mahapatra
Ranch Hand

Joined: Jan 07, 2006
Posts: 134
Try on port 8080. It may work.


Regards,<br />Satya<br />SCJP,SCWCD
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9400
    
    2

Priya,

I checked the web.xml in the conf folder of tomcat and set the mime-type correctly. Here is the part of that web.xml file from the conf folder of tomcat,



I'm getting "application/octet-stream" as the response when I request for the resource. If you see the italicized part in the file above, you will find "application/octet-stream" and I'm getting this as the response...

[ May 02, 2007: Message edited by: Jothi Shankar Kumar Sankararaj ]
[ May 02, 2007: Message edited by: Jothi Shankar Kumar Sankararaj ]
 
GeeCON Prague 2014
 
subject: Tomcat showing error