Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JSP output not shown 2

Status
Not open for further replies.

Andre555

Programmer
Feb 4, 2002
4
GB
Hi,

I have Tomcat 4.06 installed running as a stand alone server for development reasons. I have various web apps set up using Servlets and JSP pages. All was working fine until last week when the JSP pages stoped outputing anything. They compile fine and the Servlet code it generates looks fine, no errors are found in the Tomcat log but nothing appears on the screen any more and when I do a right click and view source there is only the skeleton HTML page. Any help would be great.


AS I said previously all the Tomcat examples have stopped working and the very simple JSP test I did below does not work.


<HTML>
<HEAD>
<%response.setHeader(&quot;Pragma&quot;,&quot;No-Cache&quot;);
response.setDateHeader(&quot;Expires&quot;,0);
response.setHeader(&quot;Cache-Control&quot;,&quot;no-Cache&quot;);
response.setContentType(&quot;text/html;charset=ISO-8859-9&quot; );
%>

</HEAD>
<BODY>
Normal HTML text = HELLO
JSP text = <%=&quot;HELLO&quot; %>
</BODY>
</HTML>

This like everything else at the moment comes out as a blank page.


One interesting thing I did note is the HTML skeleton that is generated is this:
<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;>
<HTML><HEAD>
<META http-equiv=Content-Type content=&quot;text/html; charset=windows-1252&quot;></HEAD>
<BODY></BODY></HTML>

Which seems to be ignoring the charecter set I tried to use.

I have looked in the Tomcat logs access logs and the content length for any JSP request is always - . Any help would be great.

Thanks
Andre
 
I feel that your problem is with the characterset you have specified in the content type

response.setContentType(&quot;text/html;charset=ISO-8859-9&quot;);

To display language characters correctly you need to install the corresponding language package


 
YenHoTsi, EXACTLY what i got in IE when i added that to a existing jsp page! Good call!

-pete
 
I'm on Tomcat 4.1.17 and have the same problem as Andre555, but I wasn't using a special character set, just en-us. The problem doesn't go away when I delete the character set reference altogether. Like Andre, the HTML generated when the page is blank is unrelated to the actual HTML in my JSP. The weirdest part of it is that if I keep refreshing the page, it occasionally works for no apparent reason. It's focing me to behave according to the classic definition of insanity--&quot;doing the same thing over and over but expecting different results&quot; :)

Anyone else seen this? Any suggestions for me? Thanks a bunch!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top