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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cant display scripts in hello.jsp 1

Status
Not open for further replies.

pancy

Technical User
Jan 23, 2004
17
0
0
HK
Dear all,
Hi!
I am a beginner. I have installed Tomcat v5.0.25 and I tried writing a hello world JSP program using notepad.
I stored my program as hello.jsp and put it in the webapps directory. I got the WEB/INF folder there with web.xml inside.


This is my jsp file -(so simple)

<HTML>
<TITLE>The JSP Test Page</TITLE>
<HEAD></HEAD>
<BODY>
HelloWorld!!!
<%
out.println("-- so says the test program.");
%>
</BODY>
</HTML>

I can load the page but I cannot see the words displayed using the script
ie.
I can see "Hello world!!!"
but not

"-- so says the test program."

Can anyone please suggest me what I missed?

Many Thanks!
Pancy
 
Try to change
Code:
out.println("-- so says the test program.");
into
Code:
[b]O[/b]ut.println("-- so says the test program.");
 
13sio's suggestion will not work - it will just result in a compiler error.

It sounds like you have an earlier version cached, either in your browser, or by tomcat in the /work directory.

Change "Hello World" to "Hello world 2" to test this, and then come back to us with the results ...

--------------------------------------------------
Free Database Connection Pooling Software
 
Dear sedj
I changed helloworld1.jsp to helloworld2.jsp
WOOooO It worked!!!!!!
YEAHHHHHHHHH!!!!!!!!!!!!!
Thanks a million!!!!!

But why is it so?

many thanks,
pancy :) :)
 
Either :

1) Your browser cached the result of your jsp page. (Delete cached files).
2) Tomcat would not reload the new source - if in doubt destroy the relevant directory in TOMCAT_HOME/work/Catalina/localhost

--------------------------------------------------
Free Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top