?
Solved

how to return Tomcat server (startup batch file) messages (JSP)

Posted on 2005-03-10
9
Medium Priority
?
212 Views
Last Modified: 2013-11-24
How Can I get the messages in the (startup) and put it into a string.
That is I want to print the trace of messages when I mail.On JSP Page.
 I am able to see that trace on startup batch file by enabling session.setDebug(true).
Now I want to print it on the JSP page.Can Any Body have an Idea.
0
Comment
Question by:kamran
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 35

Expert Comment

by:TimYates
ID: 13515413
You mean something like this?

If not, I don't understand...can you explain more?

<%
    BufferedReader fr = new BufferedReader( new FileReader( "/tomcatinstalldir/logs/catalina.out" ) ) ;
    String line = "" ;
    while( ( line = fr.readLine() ) != null )
    {
        out.print( line ) ;
        out.print( "<br>" ) ;
    }
    fr.close() ;
%>
0
 

Author Comment

by:kamran
ID: 13515996
Problem is that I have hosted the side on linux based server.So I Can't have the directory access where tomcat is install .
Also When I am testing this code locally there is no   (catalina.out) file in the logs
directory.I am using tomcat version 4.
Plese help if you can.  
0
 
LVL 35

Expert Comment

by:TimYates
ID: 13516079
>> Also When I am testing this code locally there is no   (catalina.out) file in the logs directory.

It may have a name based on the name of your webapp...

what files are in there?  And what is the name of your webapp?

>> So I Can't have the directory access where tomcat is install

Not sure you can get round this then :-(
0
Not sure which OpenStack Certification to get?

So you’ve realized you might want to get certified in OpenStack, but you’re not sure what the benefits might be or even which one you should take. You know there are several certification courses you can choose from, but how do you know which one is right for you?

 
LVL 6

Expert Comment

by:durgaprasad_j
ID: 13517331
hi,
    if you dont have access to the install dir.. it is not possible to get the messages.

>>>    I am testing this code locally there is no   (catalina.out) file in the logs

           just open the catalina.sh and search for logs/ , then you will find the name of the log file, where it is writing to.

           
0
 
LVL 1

Expert Comment

by:nadhuvi
ID: 13517363
yes,, please follow the suggection by durgaprasad and reading the file catalina.sh will help to indetify the log file name.... it used to be catalina.out
0
 
LVL 6

Expert Comment

by:durgaprasad_j
ID: 13517507
hi,
 
  if you setup tomcat locally, try these.
     if you want to get those messages in your konsole, try "sh catalina.sh run" [ it will show the messages on to your kernel ].
now redirect these messages into the file that you want. "sh catalina.sh run > mylogfile.txt". [ you simly read those messages and send]

Dp
0
 
LVL 6

Accepted Solution

by:
durgaprasad_j earned 1000 total points
ID: 13517514
 if you want to get those messages in your konsole, try "sh catalina.sh run" [ it will show the messages on to your kernel ].

 (Should be )

  if you want to get those messages in your konsole, try "sh catalina.sh run" [ it will show the messages on to your konsole ].
0
 
LVL 35

Expert Comment

by:TimYates
ID: 13559249
No comment, and a grade C?

That seems a little unfair...

Some questions don't have a valid answer you know...
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses
Course of the Month7 days, 21 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question