You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jeff Macomber <JM...@NetByTel.com> on 2002/08/05 15:37:01 UTC

Log4j and Tomcat 4.0.3

Hi all,

I am attempting to configure my system to use Log4j with Tomcat 4.0.3LE on
RH Linux 7.1 with JDK1.4.  I am having difficulty getting the logging
working using the short manual on the jakarta site.  I have added the
appropriate -D option to my environment specifying a default config file.  I
have also tried just putting it in the /<APPNAME>/WEB-INF/classes directory
as the doc specifies. I put the Log4j jar file in the common/lib and
received the error:

log4j:WARN No appenders could be found for logger
(org.apache.coyote.http11.Http11Protocol).
log4j:WARN Please initialize the log4j system properly.

I tried putting the jar file in other locations including server/lib, /lib,
and WEB-INF/lib and had other error most commonly a NoClassDefFound
exception. Has anyone successfully configured Log4j with the above listed
configuration?  Could you please tell me the location I should have the jar
file and the location you used for your config file?  

Thanks,
Jeff

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Log4j and Tomcat 4.0.3

Posted by Richard Plukker <ri...@bowtie.nl>.
Hi Jeff,
+
I think the location of the log4j.jar is correct.
What is wrong that in your log4j config there is no logging appender 
declaration or a false syntax.
Please send your log4j configuration in an e-mail so I can check that.

good luck,

Richard

Jeff Macomber wrote:

>Hi all,
>
>I am attempting to configure my system to use Log4j with Tomcat 4.0.3LE on
>RH Linux 7.1 with JDK1.4.  I am having difficulty getting the logging
>working using the short manual on the jakarta site.  I have added the
>appropriate -D option to my environment specifying a default config file.  I
>have also tried just putting it in the /<APPNAME>/WEB-INF/classes directory
>as the doc specifies. I put the Log4j jar file in the common/lib and
>received the error:
>
>log4j:WARN No appenders could be found for logger
>(org.apache.coyote.http11.Http11Protocol).
>log4j:WARN Please initialize the log4j system properly.
>
>I tried putting the jar file in other locations including server/lib, /lib,
>and WEB-INF/lib and had other error most commonly a NoClassDefFound
>exception. Has anyone successfully configured Log4j with the above listed
>configuration?  Could you please tell me the location I should have the jar
>file and the location you used for your config file?  
>
>Thanks,
>Jeff
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>  
>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat support HTTP PUT? Do HTTP PUT from HTML?

Posted by Nikola Milutinovic <Ni...@ev.co.yu>.
> 1. Does Tomcat 4.03 support HTTP PUT?

Tomcat doesn't mind, since it is the job of particular HttpServlet to support PUT. See docs on HttpServlet and "doPut()"

> 2. [A slightly off-topic question] Is there any way to do an HTTP PUT
> from HTML?  I would like to have an HTML form that gets filled in by the
> user.  Upon the user clicking the Submit button, some script kicks in to
> harvest all the data in the HTML form, create an XML string using the
> data, and then HTTP PUT the XML string to the Tomcat server.  I can 
> write Javascript to harvest the HTML form data, and compose an XML
> string.  However, I don't know how to then HTTP PUT the XML string to
> the server.  Any ideas?  /Roger

The main usage of "PUT" HTTP method is to place an object on the server. HTML forms can use either "GET" or "POST" methods to submit their data. "PUT" is reserved for Web Authoring tools, like Netscape Composer.

Anyhow, today the prefered method for placing content on the web server is WebDAV, which is present in Tomcat and supported by at least Macromedia Dreamweaver, if not others, by now.

As for servlets writing into the WebApp directory tree, I guess they can do that (I haven't checket the specs, but if WebDAV servlet can do it, than any other servlet can). So, there is no need to play with "PUT", since you'll hardly see it from the client, the way you're going.

Nix.

RE: Tomcat support HTTP PUT? Do HTTP PUT from HTML?

Posted by Mike Jackson <mj...@cdi-hq.com>.
Maybe this is a stupid question, but why not just POST it?  I have something
that I did that generates XML and then just POSTs it to the web server, I
don't bother to try to read any parameters from it, I just read from the
input stream and parse the xml.  Seems fairly straight forward to me...

--mikej
-=-----
mike jackson
mjackson@cdi-hq.com

> -----Original Message-----
> From: Roger L. Costello [mailto:costello@mitre.org]
> Sent: Monday, August 05, 2002 9:29 AM
> To: Tomcat Users List
> Cc: Costello,Roger L.
> Subject: Tomcat support HTTP PUT? Do HTTP PUT from HTML?
>
>
> Hi Folks,
>
> I have two questions:
>
> 1. Does Tomcat 4.03 support HTTP PUT?
>
> 2. [A slightly off-topic question] Is there any way to do an HTTP PUT
> from HTML?  I would like to have an HTML form that gets filled in by the
> user.  Upon the user clicking the Submit button, some script kicks in to
> harvest all the data in the HTML form, create an XML string using the
> data, and then HTTP PUT the XML string to the Tomcat server.  I can
> write Javascript to harvest the HTML form data, and compose an XML
> string.  However, I don't know how to then HTTP PUT the XML string to
> the server.  Any ideas?  /Roger
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat support HTTP PUT? Do HTTP PUT from HTML?

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Mon, 5 Aug 2002, Roger L. Costello wrote:

> Date: Mon, 05 Aug 2002 12:29:01 -0400
> From: Roger L. Costello <co...@mitre.org>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Cc: "Costello,Roger L." <co...@mitre.org>
> Subject: Tomcat support HTTP PUT?  Do HTTP PUT from HTML?
>
> Hi Folks,
>
> I have two questions:
>
> 1. Does Tomcat 4.03 support HTTP PUT?
>

Tomcat doesn't support it directly, but it's easy to make your servlet
support it -- just implement the doPut() method in HttpServlet.  For
example, the manager webapp in Tomcat 4.1.x uses PUT in the implementation
of the "deploy" command.

Note that browsers don't generally support being the client side of a PUT.

> 2. [A slightly off-topic question] Is there any way to do an HTTP PUT
> from HTML?  I would like to have an HTML form that gets filled in by the
> user.  Upon the user clicking the Submit button, some script kicks in to
> harvest all the data in the HTML form, create an XML string using the
> data, and then HTTP PUT the XML string to the Tomcat server.  I can
> write Javascript to harvest the HTML form data, and compose an XML
> string.  However, I don't know how to then HTTP PUT the XML string to
> the server.

It sounds like you want to program your browser to do the first part of
this -- unless you're writing an applet that looks like a challenge.

You are likely to be better off exploring the <input type="file"> element
that pops up a file browser for the user to pick which file to be
uploaded.  You'll need software at the server end for this as well -- two
good choices are the file upload stuff at www.servlets.com or the
commons-fileupload package nightly build at Jakarta.

>  Any ideas?  /Roger

Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Tomcat support HTTP PUT? Do HTTP PUT from HTML?

Posted by "Roger L. Costello" <co...@mitre.org>.
Hi Folks,

I have two questions:

1. Does Tomcat 4.03 support HTTP PUT?

2. [A slightly off-topic question] Is there any way to do an HTTP PUT
from HTML?  I would like to have an HTML form that gets filled in by the
user.  Upon the user clicking the Submit button, some script kicks in to
harvest all the data in the HTML form, create an XML string using the
data, and then HTTP PUT the XML string to the Tomcat server.  I can 
write Javascript to harvest the HTML form data, and compose an XML
string.  However, I don't know how to then HTTP PUT the XML string to
the server.  Any ideas?  /Roger


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Log4j and Tomcat 4.0.3

Posted by Dan Lipofsky <da...@nuserve.com>.
> log4j:WARN No appenders could be found for logger
> (org.apache.coyote.http11.Http11Protocol).
> log4j:WARN Please initialize the log4j system properly.

Are you calling PropertyConfigurator.configure?
We use tomcat 3.2.4, and have a JDP that runs on startup that calls code
like this

public class Init {
   public static void init() {
        URL url = Init.class.getResource("log4j.properties");
        PropertyConfigurator.configure(url);
   }
}

If the startup JSP doesn't get called we get error messages like yours.
- Dan



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>