• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp-lifecycle

 
shanthisri mocherla
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Good Morning EveryBody!!!
I'm trying to do an exercise on JSP lifecycle from David Bridgewater's book.
I've written a few System.out.println() statements in jspInit() and jspDestroy() method declarations.

I'm unable to see the output on console.

can anyone exaplain what I have to do to see the output on the console .

my Code is:


I never tried the System.out.println statements from the JSP declarations!!.
I know that in scriptlets , we can use implicit variables like out for print statements.
can anyone explain me what to do??
Thanks
Waiting for the reply from friends

Shanthi
[ January 30, 2006: Message edited by: shanthisri mocherla ]
 
muthu kumaran
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Are u using tomact which came as an executable?
If so do have a look at Tomcat.X/logs/stdout.log
 
shanthisri mocherla
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Muthu
Thank you very much for your help.I could see my output in the logs.

but,I've a question.can I clear the stuff in the logs.
I just want to see the output.not the errors etc.
Is it possible??
Thanks for your reply.
Shanthi
 
muthu kumaran
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Shanthi,
Normally stdout would contain only those output statements that
would otherwise go to the console.The errors are placed in stderr.log

What error statements are you seeing in stdout.log ?
 
shanthisri mocherla
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Muthu
Thanks for your reply. I got it now.I thnk I've to stop and start the Tomcat each time I request a JSP.Otherwise I'll have everything from the previous requests on the stdout.log console.(including previous Http status 500 errors etc).

I've another question .
I'm getting this error

Generated servlet error:
C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\serv1\org\apache\jsp\lifecycle_jsp.java:21: cannot resolve symbol
symbol : method getSuperClass ()
location: class org.apache.jsp.lifecycle_jsp
System.out.println(this.getSuperClass().getName());
^
1 error


When I'm using this.getClass().getName();It is not giving me any error .But when I'm using this.getSuperClass().getName();I'm getting this error.
Is the syntax correct???
thanks in advance
Shanthi
 
muthu kumaran
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shanthi,
The problem is in the method getSuperclass().
The "c" in getSuperclass should not be in caps !!!

muthu
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic