You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Asim Ghosh <as...@yahoo.co.uk> on 2004/06/16 12:45:13 UTC

Re: Parameters and where is log

hello,
 
 this is reply to your second query. U have to use <Logger> tag in server.xml and in code
 
ServletContext context;
 context.log("...."); 

Asim Ghosh

Gabi <ga...@idieikon.com> wrote:
Trying to pass from resin to apache, in resin Coonection='jdbc:bla bla...'/> I've put the equivalent in /WEB-INF/web-xml
as:


"Connection"


"jdbc:bla bla..."


But the servlet response is a NullPointer, I think it's not taking the value
from the session (HttpSession object). What am I doing wrong?

The second question is that in the servlet I put a
System.err.println("...."), I've the same server.xml like the default
/examples but using my webapp in change of /examples, so I've search in
catalina.out and all the localhost_admin... local_host_examples, I think
I've search in all the defined logs files but I don't find the line I've
print with System.err, do I've to put something more specific in web.xml or
something similar?


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


		
---------------------------------
 ALL-NEW Yahoo! Messenger - sooooo many all-new ways to express yourself 

Re: Order of WebApp Loading

Posted by Surendra Kumar <su...@cisco.com>.
Hi  QM
    Thanks for replying the mail. Can you provide more info about the
indirect way. I am not clear on this.
    The App#1 needs to be started first because the other apps depends upon
the services provided by the App #1.

Thanks
Surendra

----- Original Message -----
From: "QM" <qm...@brandxdev.net>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Wednesday, June 16, 2004 5:36 PM
Subject: Re: Order of WebApp Loading


> Please create a *new* message when mailing the list.
> Responding to an unrelated message makes it difficult to follow the list
> with a thread-aware mailer.
>
>
> :             I am using Tomcat 4.1.29 and i have several webapps in my
> : application.  I want to set one webapp to
> :             load first and the rest of the webapps should be loaded
after
> : it. I have tried changing the order in server.xml, but it
> :             didn'y help.
> :             Is  there any way i can set the order of   webapp loading ?
>
> Directly, through Tomcat, no.  Not possible.
> Indirectly, put the "special" app in its own container and make sure
> that starts first (i.e. in your init scripts).
>
> What's the rationale behind App #1 starting first?
>
> -QM
>
>
> --
>
> software  -- http://www.brandxdev.net
> tech news -- http://www.RoarNetworX.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Order of WebApp Loading

Posted by QM <qm...@brandxdev.net>.
Please create a *new* message when mailing the list.
Responding to an unrelated message makes it difficult to follow the list
with a thread-aware mailer.


:             I am using Tomcat 4.1.29 and i have several webapps in my
: application.  I want to set one webapp to
:             load first and the rest of the webapps should be loaded after
: it. I have tried changing the order in server.xml, but it
:             didn'y help.
:             Is  there any way i can set the order of   webapp loading ?

Directly, through Tomcat, no.  Not possible.
Indirectly, put the "special" app in its own container and make sure
that starts first (i.e. in your init scripts).

What's the rationale behind App #1 starting first?  

-QM


-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Order of WebApp Loading

Posted by Surendra Kumar <su...@cisco.com>.
Hi Everybody
            I am using Tomcat 4.1.29 and i have several webapps in my
application.  I want to set one webapp to
            load first and the rest of the webapps should be loaded after
it. I have tried changing the order in server.xml, but it
            didn'y help.
            Is  there any way i can set the order of   webapp loading ?

Thanks
Surendra
.





---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Parameters and where is log

Posted by Asim Ghosh <as...@yahoo.co.uk>.
http://jakarta.apache.org/tomcat/faq/misc.html#catalina.out
 
Where does System.out go? 
How do I rotate catalina.out? 

Gabi <ga...@idieikon.com> wrote:I've put the context with his own Logger, I can see all the info of this
host here, and in the JavaBean code I've put
ServletContext context;
context=session.getServletContext();
context.log("test message!!!");
But I don't see this message in the log.

And, there is a global way I can define that all the System.err. output has
to be printed in a text file? How?


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org



		
---------------------------------
 ALL-NEW Yahoo! Messenger - sooooo many all-new ways to express yourself 

RE: Parameters and where is log

Posted by Gabi <ga...@idieikon.com>.
With the first solution commented:
ServletContext context;
context=session.getServletContext();
context.log("test message!!!");
I can`t read anything but it's solved, because if i try the original
System.out and .err it outputs in catalina.out. Thanks to everubody.
Now I've to configure parameters correctly, (the first part of my email), in
resin where <context-param> tags and I'm translating it to
<context-param>
<param-name>...</param-name>
<param-value>...</param-value>
</context-param>
I suppose it's the correct way, but my servlet does not work, but it could
be another thing so (now) with the logs help I'll try to solve.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Parameters and where is log

Posted by Gabi <ga...@idieikon.com>.
That's what I've done, I've created a <Context path=... docBase=...>
<Logger className="org.apache.catalina.logger.FileLogger" prefix="web_log."
suffix=".txt" timestamp="true"/>

I see all the webapp output in web_log file, but not the message from the
applicacion, where I use the lines:
ServletContext context;
context=session.getServletContext();
context.log("test message!!!");

Perhaps the application does not have the correct HttpSession? (It works on
Resin, I've make the .war and deploy in tomcat, configure the <Context> in
server.xml and put all the resin.conf values of context-param inside web.xml
in the tomcat context-param format.
Am I missing something?



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Parameters and where is log

Posted by Asim Ghosh <as...@yahoo.co.uk>.
give the name of the log file in <Logger> tag and try to view that log file .
 
Asim Ghosh

Gabi <ga...@idieikon.com> wrote:
I've put the context with his own Logger, I can see all the info of this
host here, and in the JavaBean code I've put
ServletContext context;
context=session.getServletContext();
context.log("test message!!!");
But I don't see this message in the log.

And, there is a global way I can define that all the System.err. output has
to be printed in a text file? How?


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


		
---------------------------------
 ALL-NEW Yahoo! Messenger - sooooo many all-new ways to express yourself 

RE: Parameters and where is log

Posted by Gabi <ga...@idieikon.com>.
I've put the context with his own Logger, I can see all the info of this
host here, and in the JavaBean code I've put
   ServletContext context;
   context=session.getServletContext();
   context.log("test message!!!");
But I don't see this message in the log.

And, there is a global way I can define that all the System.err. output has
to be printed in a text file? How?


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org