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 pages have sometimes no output

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.


Thanks
Andre
 
Possible reasons for that is..You are having uncaught exceptions in your servlet or jsps.I had same problems in my jsps.So the jsp tags weren!t completed successfully so only the skeleton html was constructed.I will suggest putting console messages in suspicious lines.

Another reason maybe you may have forgotten to put no cache signs:
<%

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; );
%>

put these syntax in your <HEAD> part of your html... Salih Sipahi
Software Engineer.
City of Istanbul Turkey
ssipahi@yonbilgi.com
 

Thanks for the advice but I am sure it is not an uncaught exception as 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.


Andre
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top