Re: GNUPG & TC , could be OT!

2003-03-10 Thread Nikola Milutinovic
Power-Netz (Schwarz) wrote:
Hi,

we have the following constellation:

A webapp uses a java class to send emails , this class uses
another class to SIGN this email via GNUPG.
Is there a way to accomplish this via more common Java APIs, like JavaMail? 
S-MIME? I'm no exeprt in that field...

The host was up for app. 200 days without rebooting and
everything worked fine until last friday ( An idiot @ our
computer centre switched the machine off :-) ).
After rebooting TC did come up as expected but gnupg did
not find his config files like the seckeyring aso. .
gpg searched at /.gnupgp/ instead of /root/.gnupgp
Wht should it search "/root/.gnupgp"? Is "/root/" the home directory of "root"?

and what must happen happend , the signing didn't work anymore.
( logical, it didn't find the key anymore ;) ) .
Question is now: Why did it search at /.gnupg/ instead of the before used
/root/.gnupg/ ?
GnuPG, just as PGP, will try to locate *that* user's config directory. And the 
default is in ${HOME}/.gnupg (not gnupgp, AFAIK).

It restarted the TC before without problems from gnupg.
Could it be an export problem of envvars ?
maybe USERNAME?
Login as the user running tomcat and try to use GnuPG.

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Netscape navigator

2003-03-19 Thread Nikola Milutinovic
Susan Hoddinott wrote:
Does anyone know if there is a problem using Netscape Navigator with 
servlet pages generating their own html using the println function.  
Whenever I attempt to access servlets of this kind (which work fine 
under Explorer) I just get the HTML text (e.g.  etc.) displayed on 
the screen rather than what should be generated.  Is there something 
special I need to do?
Have you set "Content-type" header to "text/html"?

Nix.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Getting Notified in Tomcat 4.1.18

2003-03-19 Thread Nikola Milutinovic
B A L A J I wrote:
Hi,

I'm trying to extend Tomcat to get notified whenever a session is 
created or cleared. How is this possible in 4.1.18 version.?
Any help will be appreciated as I'm new to Tomcat.
Take a look at Listeners in Servlet 2.3 specification and in Tomcat, more 
specifically, SessionListener class.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Expression Language question

2003-06-02 Thread Nikola Milutinovic
 Simple question.

I have a JSP/Servlet combination in which Servlet is used to authenticate user and 
create a session. A JSP page then checks for the existence of the session and reads 
neccessary ID from it. I'm switching to JSTL and I'd like to switch to EL, now. Here 
is the old code, how can I translate it to EL?

OLD CODE
-
<%@ page contentType="text/html; charset=windows-1250"
 ...
 session="true"
 ...
%>
<%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/sql"; prefix="sql" %>
<%
if (session.isNew()) {
  response.sendRedirect( response.encodeRedirectURL( "Error.jsp?reason=Wrong+login" ) 
);
}
%>

NEW CODE (the only thing I can come up with)
-
<%@ page contentType="text/html; charset=windows-1250"
 ...
 session="true"
 ...
%>
<%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/sql"; prefix="sql" %>

  

-
Anybody got a better idea?

Nix. 

Re: Expression Language question

2003-06-02 Thread Nikola Milutinovic
> I think that's the ticket.

Yes, Tim, but I'd like to be able to differentiate between "user not logged in" - 
session.isNew() and "user logged in, but error in web-app" - !session.isNew() and 
session.getAttribute( "userID" ) == null.

Is there a way to call a method from EL? Like:



Or would this defeat the purpose of introducing EL?

Nix.


Re: Database connection "No suitable driver"?

2003-06-03 Thread Nikola Milutinovic
Your config looks fine. Have you placed Sybase's JDBC driver into 
"${CATALINA_HOME}/common/lib/"?

Nix.


JSTL and EL question

2003-06-03 Thread Nikola Milutinovic
Hi all.

I'm using JSTL (Java Standard Tag Library), the EL (Expression Language) version. I 
have a DB where one particual query can return exactly one row (primary key). So, I 
use this:



  SELECT * FROM user_tab WHERE user_id = ?
  


This works just fine and I can iterate over it using .


...


I would like to be able to access the row directly, since I'm 100% sure there will be 
only one. Trying this, fails:



or



Can anyone advise?

JSTL implementation is Jakarta-Standard-1.0.3

Nix.


Re: Database connection "No suitable driver"?

2003-06-03 Thread Nikola Milutinovic
> Yes.

Then there is something wrong with JDBC URL you're using to connect. That message is 
actually from DriverManager/DataSource code.

Nix.


Re: JSTL and EL question - SOLVED

2003-06-04 Thread Nikola Milutinovic
> Oh boy, I get to contribute after asking a lot of questions!  ; )
> 
> Here's a query I am using in a current project:
> 
> 
>select * from contestant_picks where contestant='q' and week = ? 
> order by entered desc
>
> 

It's good to know I'm not alone in using JSTL :-)

> I am using the maxRows option mainly because I don't need the db 
> returning all of the older data. Hmm, now that I think about it I can 
> probably add "and entered = max(entered)" or something like that. 
> Anyway, what I learned was that . and [] differed in an important way. 
> You can't evaluate a variable after the . but you can inside the []. As 
> a result my code worked out to:
> 
>
>
> 
> The gameNum variable will contain a string like "game1", "game2', etc. 
> These are the names of the columns in the table. The second line 
> replaces the gameNum variable inside the [] so I get the equivalent of 
> "picks.rows[0].game1". One other piece you are missing is "rows" from 
> the value. As a result the following code should work for your 
> situation:
> 
> 

Yes, I noticed that in the afternoon - silly me!

> I would highly recommend the book "core JSTL Mastering the JSP Standard 
> Tab Library" by David M Geary from Sun. It got me up to speed on JSTL 
> in less than a week. Now I can't wait for Tomcat 5 to support JSP 2.0.

Thanks for the advice.

Nix.


Re: JSTL and EL question - SOLVED

2003-06-04 Thread Nikola Milutinovic
- Original Message - 
From: "Schwartz, David (CHR)" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Wednesday, June 04, 2003 1:55 PM
Subject: RE: JSTL and EL question - SOLVED


> I'm still having problems. Can you please post a complete sample along with
> web.xml sample?

What exactly are your problems?

In web.xml you should declare taglibs:

 
  http://java.sun.com/jstl/core
  /WEB-INF/c.tld
 
 
  http://java.sun.com/jstl/sql
  /WEB-INF/sql.tld
 
 
 
  jdbc/EVracunDS
  javax.sql.DataSource
  Container
 

And then use this in your JSP:



  SELECT * FROM user_tab WHERE user_id = ?
  

...


...

Nix.


Re: JSTL and EL question - SOLVED

2003-06-05 Thread Nikola Milutinovic
- Original Message - 
From: "Schwartz, David (CHR)" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Wednesday, June 04, 2003 3:35 PM
Subject: RE: JSTL and EL question - SOLVED

> can you also send the taglib line from the top of jsp? 

Sure, look below.

> In web.xml you should declare taglibs:
> 
>  
>   http://java.sun.com/jstl/core
>   /WEB-INF/c.tld
>  
>  
>   http://java.sun.com/jstl/sql
>   /WEB-INF/sql.tld
>  
>  
>  
>   jdbc/EVracunDS
>   javax.sql.DataSource
>   Container
>  
> 
> And then use this in your JSP:

<%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/sql"; prefix="sql" %>

> 
> 
>   SELECT * FROM user_tab WHERE user_id = ?
>   
> 
> ...
> 
> 

Nix.


Re: JSTL and EL question - SOLVED

2003-06-05 Thread Nikola Milutinovic
> I thought I liked the idea of having the taglib in the web.xml file. 
> When I try it I'm getting "This absolute uri 
> (http://java.sun.com/jstl/core) cannot be resolved in either web.xml or 
> the jar files deployed with this application". Do I have to download it 
> somewhere in order to use it in the web.xml file? Any ideas?

:-)

OK, four things when dealing with ANY tag library:

1. PLACE JAR FILES

Place JAR files that hold implementation of the tag library in a directory where 
Tomcat will pick it up. Either make it "WEB-INF/lib/" (private) or 
"${CATALINA_HOME}/shared/lib" (all web-apps will have access to it). You could place 
it in "${CATALINA_HOME}/common/lib", but I don't see the point in Tomcat having access 
to those JARs. There was a discussion recently naming pros/cons of each choice 
(Craig), so look up the archives.

2. PLACE TLD

Place TLD files (Tag Library Descriptor) in either "WEB-INF/" or (if I recall 
correctly) "WEB-INF/taglibs/". The first placement will require for "location" in 
"web.xml" file to be absolute: "/WEB-INF/.tld", while the second will allow for 
relative links: ".tld"

3. DECLARE TLD IN WEB.XML

This part you've already seen.


   http://java.sun.com/jstl/core
   /WEB-INF/c.tld


4. DECLARE TLD USAGE IN JSP

This you've seen

<%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %>

The prefix is up to you.

Nix.


Re: How to UTF-8 your site.

2003-06-10 Thread Nikola Milutinovic
> > 1.
> > JSP pages must inlcude the header:
> > 
> > <%@ page
> >  contentType="text/html; charset=UTF-8"
> > %>
> 
> This is if you use JSP.  If you work with servlets, then you should output the
> appropriate headers.

Actually, it also sets encoding of the output stream. Or at least it used to in some 
versions of Tomcat. The full declaration would look like this:

<%@ page
  contentType="text/html; charset=UTF-8"
  pageEncoding="UTF-8"
  import="..."
  info="..."
  ...
%> 

> > 2.
> > In the Catalina.bat (windows) catalina.sh (windows) apache$jakarta_config.com
> > (OpenVMS), file there must be a switch added to the call to java.exe.  The
> > switch is:
> > 
> > -Dfile.encoding=UTF-8
> > 
> > I cannot find documentation for this environment variable anywhere or what it
> > actually does but it is essential.
> 
> It's not Tomcat-specific, tt should be probably somewhere in Java specifications.

Java/Tomcat should be independant of local settings and encodings. Each JSP carries 
sufficient information on it's static (pageEncoding) and output encoding 
(contentType). Servlets have to specify this explicitely (set "Content-type:" header 
in the ServletResponse and encoding of the output stream).

Resource files are a different story, again servlets have to set their encoding 
manually. Again, it should not be a global setting of the JVM.

> > 3.
> > For translation of inputs coming back from the browser there must be a method
> > that translates from the browser's ISO-8859-1 to UTF-8.  It seems to me that
> > -1 is used in all regions as I have had people in countries such as Greece &
> > Bulgaria test this and they always send input back in -1 encoding.  The
> > method which you will use constantly should go something like this:
> 
> I wonder why you need this.  I have no need to convert anything into UTF-8 by
> hand - Tomcat does it for me (and I work not only with European languages).  My
> code includes the following line:
> 
> req.setCharacterEncoding("UTF-8");
> 
> and everything works OK with IE and Mozilla.

Yup. One additional word of warning - browsers should be able to support multiple 
client encodings (Windows - switching from one keyboard to another). And they should 
be able to tell server which encoding was used for the data - HTTP/HTML have support 
for this. The problem is most browsers ignore this, so you'll have to assume that the 
data was encoded using some fixed encoding. The problem is present in my country - we 
use both cyrilic and latin alphabets. If the page is designated to be windows-1250 
encoded (latin) and user enters data using cyrilic keyboard with windows-1251, server 
will have no way of knowing this. Servlet author is forced to assume that the encoding 
is CP1250 and it will be wrong.

Nix.


Re: PHP and JSP on Tomcat

2003-06-11 Thread Nikola Milutinovic
> On Wed, 11 Jun 2003 01:03, Isai Arasu wrote:
> > Is it possible to run both JSP and PHP on Apache
> > Tomcat 5.0?
> 
> No, to do that you would have to install the Apache webserver and connect it 
> to Tomcat with mod_jk2:

Or to employ PHP servlet. Search Google.

Nix.


Re: Apache, Tomcat/JBoss, SSL, redirection

2003-06-11 Thread Nikola Milutinovic
> As I have not received any hints, is there a better list I should be posting this 
> type of question to?
>  Like I said, I think the question is reasonable but I might be overlooking 
> something completely obvious.

Don't give up on us :-)

The error you describe is strange, I've read it just now and I'm puzzled. Could you 
try to eliminate mod_jk from the picture?

Run a normal Coyote HTTPS on port 8083 and try the same thing. The redirection is 
Tomcat's job and maybe it is getting wrong info from mod_jk.

Nix.



Re: Problems with XML parsers and webapps

2003-06-18 Thread Nikola Milutinovic
> All,
> Our webapp was built to use the Xerces xml parser.  I'm trying to
> update our JDK and tomcat version to do testing for a production level
> upgrade.  I'm running into problems with the JVM using the Crimson
> parse.  The crimson parser does not agree with our XML files.  Does
> anyone know how to disable the crimson parser that is bundled with JDK
> 1.4? Would using the non-LE version of tomcat help resolve this problem?

You should be able to use the "endorsed dirs" mechanism to override anything that 
comes with the JKD. Tomcat also sets them up - see startup scripts.

Nix.


JK2 config

2003-06-21 Thread Nikola Milutinovic
Hi all.

Is there a comprehensive mod_jk2 guide? I'm mostly interested in comprehensive 
explanation of the syntax and semantcis of worker2.properties and jk2.properties files.

The docs coming with TC are confusing and full of holes, to say the least.

Right now, my immediate question would be: how to setup Apache 2.0.46 with virtual 
hosts on one machine to map TC (with virtual hosts) on another machine?

For instance:

Apache2: HOST: Legba.ev.co.yu (also holding Krb.ev.co.yu)
TC 4.1.24: HOST: Mercury.ev.co.yu (also holding Test.ev.co.yu)

Coyote HTTP/1.1 connector is working on TC and I can browse to 
http://Test.ev.co.yu:8080/test/index.jsp (you guys can't, it is on our Intranet :-)). 
Now, I would like to map a context "test" from TC:Host:"Test.ev.co.yu" into /my_test/* 
under "Krb.ev.co.yu" hosted on Apache.

What exactly should I do?

All the examples on the TC-docs make many assumptions or, shall we say, skip a lot of 
"explanation teritory".

Also, I've done this (almost) with mod_webapp and it makes sense to monkey around with 
VHosts under TC - each Apache VHost maps to the corresponding TC VHost, defined under 
WARP engine. Does it make sense when using JK1/2? Can I map a context defined under 
one VHost on TC under totally different VHost on Apache? Is there something special in 
the syntax of workers2.properties in such case?

TYIA,
Nix.

Re: ok, am I offically lost here

2003-06-22 Thread Nikola Milutinovic
> ok, there is a webapps directory, inside is a very
> dirs, examples, ROOT etc.
> 
> the normal root page loads up and I can get to the
> examples, the confusion starts here, the ROOT houses
> the index.jsp, but the examples are not UNDER ROOT
> they are a different dir back one in webapps.
> 
> WHEN I add a jsp page into the root it works fine

Basically, a JSP/Servlet container is a collection of virtual hosts (default 
installation holds "localhost" as default). A virtual host is a collection of web 
applications, also known as "Contexts" under Tomcat. "ROOT", "examples" and 
"tomcat-docs" are separate web applications and can reside ANYWHERE on the disk. Your 
server.xml file will specify *which* contexts exist and under what path they are 
mapped for their VHost. Take a closer look there.

This, of course, is for standard HTTP connectors. If you're gonna play with 
mod_jk/mod_jk2/mod_webapp in order to connect Apache and Tomcat then the story still 
holds true, but you need to setup Apache, too.

So, comming down from PHP can be a bit confusing, I know. With PHP, the whole VHost 
was one big web application. While that may seam flexible, it is also a magnet for bad 
design and misuse. "A new web application? Oh, lets just make a quick one." - repeat 
that 5 times and you'll have a mess. :-)

Nix.


Re: JK2 config

2003-06-23 Thread Nikola Milutinovic
Try Googling. There is a link to quite good piece of docs for JK2 that sits on 
Jakarta/Tomcat original site. Why isn't it present in the Tomcat's distribution?

Nix.
- Original Message - 
From: "NormW" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Sunday, June 22, 2003 9:49 AM
Subject: Re: JK2 config


> Good evening Nikola.
> Best of luck and I will watch your 'thread' with interest.
> I asked some technical questions about mod_jk2 a few weeks ago and got
> deafened by the silence.
> 
> Considering a predominance of questions here are about configuration issues,
> it is amazing there seems to be enough time to answer the questions (most
> anyway) and yet not enough time to get the docs up to scratch and reduce the
> 'clutter' here.
> 
> Depending on your skills, sometimes wading through the source code can
> reveal needed things of use. Another method would be to write up a list of
> specific things you want to know rather than seek the 'grail' of
> comprehensive mod_jk2 documentation. (The module itself is still 'under
> construction' and the  manual is developed from that.)
> 
> On the other hand... if it exists, one ought to read it. I know there is a
> document in the Tomcat 4 doc set about 'virtual' hosts configuration, which
> might get you started at least, and there are a number of documents with the
> Apache manual about the topic... If you have read them, ask questions to
> clarify what is there, if not,...
> 
> AFAIK, basically you need to add multiple  sections in Tomcat's
> server.xml and 'inside' those, nest the required  elements, then
> adjust the parameters to suit each host added to keep them unique It's a
> similar thing at the Apache end; create VirtualHost sections within
> httpd.conf, and inside these create  entries, inside which use
> 'JkUriSet  worker  '. If you create only one worker in
> workers2.properties,  can be the same one for all hosts. Create
> a channelSocket entry in workers2.properties that points to the Tomcat
> machine/port. Aim the  entry at the channelSocket entry and it
> ought to be very close to going.
> Norm
> 
> 
> Hi all.
> 
> Is there a comprehensive mod_jk2 guide? I'm mostly interested in
> comprehensive explanation of the syntax and semantcis of worker2.properties
> and jk2.properties files.
> 
> The docs coming with TC are confusing and full of holes, to say the least.
> 
> Right now, my immediate question would be: how to setup Apache 2.0.46 with
> virtual hosts on one machine to map TC (with virtual hosts) on another
> machine?
> 
> For instance:
> 
> Apache2: HOST: Legba.ev.co.yu (also holding Krb.ev.co.yu)
> TC 4.1.24: HOST: Mercury.ev.co.yu (also holding Test.ev.co.yu)
> 
> Coyote HTTP/1.1 connector is working on TC and I can browse to
> http://Test.ev.co.yu:8080/test/index.jsp (you guys can't, it is on our
> Intranet :-)). Now, I would like to map a context "test" from
> TC:Host:"Test.ev.co.yu" into /my_test/* under "Krb.ev.co.yu" hosted on
> Apache.
> 
> What exactly should I do?
> 
> All the examples on the TC-docs make many assumptions or, shall we say, skip
> a lot of "explanation teritory".
> 
> Also, I've done this (almost) with mod_webapp and it makes sense to monkey
> around with VHosts under TC - each Apache VHost maps to the corresponding TC
> VHost, defined under WARP engine. Does it make sense when using JK1/2? Can I
> map a context defined under one VHost on TC under totally different VHost on
> Apache? Is there something special in the syntax of workers2.properties in
> such case?
> 
> TYIA,
> Nix.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


Re: Virtual domains with Tomcat

2003-06-23 Thread Nikola Milutinovic
> How can I get Tomcat to recognize virtual domains?  This is trivial with 
> Apache and I can get Apache to fetch the correct jsp but I cannot get timcat 
> to process it.  If I turn off tomcat, apache sends the jsp source.  If I turn 
> tomcat on, I get the error 404 page

Anything in the logs?

I'm not totally sure, but I think you need to match VHosts in your Apache and your 
Tomcat. I'll be testing exactly that today with mod_jk2, Apache 2.0.46 and Tomcat 
4.1.24. For mod_webapp it is definite - you need:


  
  
  


  


I think the same applies to all other connectors: mod_jk, mod_jk2 and HTTP.

Nix.


Re: JK2 config

2003-06-23 Thread Nikola Milutinovic
> There are plenty of examples of both JK and JK2 configurations in the list 
> archives.  The topic comes up DAILY, and frankly, I don't think you can 
> blame people when they tire of posting the same thing day in and day out to 
> essentially the same questions.

Hi John.

I have found a link to Tomcat's site which holds a very good explanation for JK2. I'd 
sugest you place it into the distribution of TC and also add it to the newly created 
FAQ.

Basically, what we all need is just what that doc gives 
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/vhosthowto.html

Hope this helps.

Nix.


Re: JK2 config

2003-06-23 Thread Nikola Milutinovic
> The document that you are referring to, I think, is incomplete or wrong.
> When I tried it I found that some sections were in correct or
> misleading, or just didn't work.  So I found it best to just ignore that
> document.

Sorry to hear that. I haven't gotten around to testing it, yet. However, the
document seamed more complete than anything I've seen so far. I'll stick to
it until I hit a road-stop.

> As a side note, is there any reason why version 2.0.2 of JK2 doesn't
> include a Linux binary?  I've built one myself but shouldn't there be a
> binary?  Are there some settings that are hard coded when the library
> gets compiled?

I'm on Tru64 UNIX and am doomed (or blessed?) to compile and configure
everything myself.

Nix.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OT Passing parameters to a link with an anchor

2003-06-24 Thread Nikola Milutinovic
> I have the following link in a page that works fine:
> 
>  href="/itinerary/updatenode.do?id=&expanded=true">Trip
> 
> What I would like to do though is add an anchor so that I go to a particular
> point in the page so I tried including an anchor like this:
> 
>  href="/itinerary/updatenode.do#current?id=&expanded=true">Trip

This looks ugly, but I understand what you're trying to achieve. Have you tried 
reversing the order?

Trip

If I understand correctly, "#..." part is interpreted (or ignored) by the browser. So, 
the browser should cut off everything after the "#"sign, send request for the first 
part and jump to an anchor defined by the second part. So, in your case, the browser 
is cutting off the "current?id=&expanded=true" and expecting an anchor in the 
resulting page.

Nix.


Problems with mod_jk2

2003-06-24 Thread Nikola Milutinovic
Hi all.

"mod_jk2" is bugging me properly. It is not working right now and it never did. I 
could have made a number of mistakes, so if someone could point at them, I'd be 
grateful. This are the relevant files:

jk2.properties
--
handler.list=request,container,channelSocket

channelSocket.port=8009
channelSocket.address=192.168.61.16
--

server.xml
--
[SNIP]







  
  
  



worker2.properties

[logger]
level=DEBUG

[config:]
file=${serverRoot}/conf/add-on/workers2.properties
debug=0
debugEnv=0

[uriMap:]
info=Maps the requests. Options: debug
debug=0

# Alternate file logger
[logger.file:0]
level=DEBUG
file=${serverRoot}/logs/jk2.log

[shm:]
info=Scoreboard. Required for reconfiguration and status with multiprocess servers
file=${serverRoot}/logs/jk2.shm
size=100
debug=0
disabled=0

[workerEnv:]
info=Global server options
timing=1
debug=0
logger=logger.file:0


[channel.socket:Test.ev.co.yu:8009]
info=Ajp13 forwarding over socket
debug=0
host=Test.ev.co.yu
port=8009

[ajp13:Test.ev.co.yu:8009]
channel=channel.socket:Test.ev.co.yu:8009

[status:status]
info=Status worker, displays runtime information

[uri:Kerberos-1.ev.co.yu/jkstatus]
info=Display status information and checks the config file for changes.
group=status:status

[uri:Kerberos-1.ev.co.yu/evracun-jk2/*]
info=EVracun application on Test.ev.co.yu
context=/evracun
group=ajp13:Test.ev.co.yu:8009
-

apache_error.log
--
[Tue Jun 24 14:22:20 2003] [notice] mod_jk.post_config() first invocation
[Tue Jun 24 14:22:22 2003] [notice] LDAP: Built with OpenLDAP LDAP SDK
[Tue Jun 24 14:22:22 2003] [notice] LDAP: SSL support unavailable
[Tue Jun 24 14:22:23 2003] [notice] Digest: generating secret for digest 
authentication ...
[Tue Jun 24 14:22:23 2003] [notice] Digest: done
[Tue Jun 24 14:22:24 2003] [notice] mod_jk.post_config() second invocation
[Tue Jun 24 14:22:24 2003] [error] jk2_init() Can't find child 26827 in scoreboard
[Tue Jun 24 14:22:24 2003] [error] jk2_init() Can't find child 26576 in scoreboard
--

jk2.log
---
[Tue Jun 24 14:22:19 2003] ( info ) [jk_logger_file.c (184)]  Initializing log file 
/usr/opt/Apache-2.0.46W/logs/jk2.log
[Tue Jun 24 14:22:22 2003] ( info ) [jk_logger_file.c (184)]  Initializing log file 
/usr/opt/Apache-2.0.46W/logs/jk2.log
[Tue Jun 24 14:22:24 2003] (error ) [jk_logger_file.c (172)]  Can't open log file 
/usr/opt/Apache-2.0.46W/logs/jk2.log
[Tue Jun 24 14:22:24 2003] (debug ) [jk_uriMap.c (377)]  uriMap.init() Fixing Host 
Kerberos-1.ev.co.yu
[Tue Jun 24 14:22:24 2003] (debug ) [jk_uriMap.c (464)]  uriMap: fix uri null context 
null host *
[Tue Jun 24 14:22:24 2003] (debug ) [jk_uriMap.c (464)]  uriMap: fix uri /jkstatus 
context null host Kerberos-1.ev.co.yu
[Tue Jun 24 14:22:24 2003] (debug ) [jk_uriMap.c (464)]  uriMap: fix uri 
/evracun-jk2/* context /evracun host Kerberos-1.ev.co.yu
[Tue Jun 24 14:22:24 2003] ( info ) [jk_uriMap.c (490)]  uriMap: creating context 
Kerberos-1.ev.co.yu/evracun
[Tue Jun 24 14:22:24 2003] (debug ) [jk_uriMap.c (464)]  uriMap: fix uri null context 
null host *
[Tue Jun 24 14:22:24 2003] (debug ) [jk_uriMap.c (464)]  uriMap: fix uri / context / 
host Kerberos-1.ev.co.yu
[Tue Jun 24 14:22:24 2003] (debug ) [jk_uriMap.c (464)]  uriMap: fix uri / context / 
host *
[Tue Jun 24 14:22:24 2003] (debug ) [jk_uriMap.c (464)]  uriMap: fix uri /evracun 
context /evracun host Kerberos-1.ev.co.yu
[Tue Jun 24 14:22:24 2003] ( info ) [jk_workerEnv.c (403)]  workerEnv.init() ok 
/usr/opt/Apache-2.0.46W/config/add-on/workers2.prop
erties
[Tue Jun 24 14:22:24 2003] (error ) [mod_jk2.c (557)]  mod_jk child init 1 -2
[Tue Jun 24 14:22:24 2003] (error ) [jk_logger_file.c (172)]  Can't open log file 
/usr/opt/Apache-2.0.46W/logs/jk2.log
[Tue Jun 24 14:22:24 2003] (debug ) [jk_uriMap.c (377)]  uriMap.init() Fixing Host 
Kerberos-1.ev.co.yu
[Tue Jun 24 14:22:24 2003] (debug ) [jk_uriMap.c (464)]  uriMap: fix uri null context 
null host *
[Tue Jun 24 14:22:24 2003] (debug ) [jk_uriMap.c (464)]  uriMap: fix uri /jkstatus 
context null host Kerberos-1.ev.co.yu
[Tue Jun 24 14:22:24 2003] (debug ) [jk_uriMap.c (464)]  uriMap: fix uri 
/evracun-jk2/* context /evracun host Kerberos-1.ev.co.yu
[Tue Jun 24 14:22:24 2003] ( info ) [jk_uriMap.c (490)]  uriMap: creating context 
Kerberos-1.ev.co.yu/evracun
[Tue Jun 24 14:22:24 2003] (debug ) [jk_uriMap.c (464)]  uriMap: fix uri null context 
null host *
[Tue Jun 24 14:22:24 2003] (debug ) [jk_uriMap.c (464)]  uriMap: fix uri / context / 
host Kerberos-1.ev.co.yu
[Tue Jun 24 14:22:24 2003] (debug ) [jk_uriMap.c (464)]  uriMap: fix uri / context / 
host *
[Tue Jun 24 14:22:24 2003] (debug ) [jk_uriMap.c (464)]  uriMap: fix uri /evracun 
context /evracun host Kerberos-1.ev.co.yu
[Tue Jun 24 14:22:24 2003] ( info ) [jk_workerEnv.c (403)]  workerEnv.init() ok 
/usr/opt/Apache-2.0.46W/config/add-on/workers2.prop
erties
[T

Re: Problems with mod_jk2

2003-06-24 Thread Nikola Milutinovic
> Good morning Nikola.
> What do you have in your http.conf file(s)?
> I assume Test.ev.co.yu is the machine you are running Tomcat on and is DNS
> resolvable?

Here it is.

#
# Global JK2 settings

JkSet config.file /usr/opt/Apache-2.0.46W/config/add-on/workers2.properties



ServerName  Kerberos-1.ev.co.yu:80
DocumentRoot/usr/users/test/public_html
ServerAdmin [EMAIL PROTECTED]
ErrorLog/usr/users/test/logs/error.log
CustomLog   /usr/users/test/logs/access.log common



Re: Problems with mod_jk2

2003-06-24 Thread Nikola Milutinovic

- Original Message - 
From: "Mark Eggers" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, June 25, 2003 7:58 AM
Subject: Re: Problems with mod_jk2


> What are the ownership and permissions on the
> following directory?
> 
> /usr/opt/Apache-2.0.46W/logs

Legba:/usr/users/root# l /usr/opt/Apache-2.0.46W/logs
lrwxrwxrwx   1 root system28 Jun 20 13:33 /usr/opt/Apache-2.0.46W/logs -> 
/var/opt/Apache-2.0.46W/logs
Legba:/usr/users/root# l /var/opt/Apache-2.0.46W 
total 24
drwxr-xr-x   2 root system  8192 Jun 24 14:22 logs
drwx--   2 apache   http8192 Jun 13 11:31 proxy
drwxr-xr-x   2 root system  8192 Jun 24 14:32 run

So, it is basically 755 root:system. The jk2.log gets created with perm 600 root:system

Nix.


Re: [way - OT] oracle and utf8

2003-07-08 Thread Nikola Milutinovic
> My dba says that oracle's implementation of UTF-8 is a clusterf**k. I'm 
> wondering if he is going crazy.

What exactly would that mean? My knowledgeof clusters is moderate, but I don't see 
what would ANY implementation of UTF-8 have to do with clusters or f**king :-). OTOH, 
Oracle IS a Leviathan, so DBAs do go crazy from time to time...

Nix.


Re: Tomcat and Windows ADS

2003-07-24 Thread Nikola Milutinovic
> I would like to use the built in JAAS with my JBoss/Tomcat configuration
to
> use either form or digest authentication.

ADS will give you two major things:

 - Kerberos 5 authentication (use JAAS to access)
 - LDAP interface (use JNDI to access)

What will your Tomcat use of those services, is up to you. You could
authenticate your users against ADS, but without encryption, that would
defeat the purpose of Kerberos 5. HTTPS + basic authentication -> ADS sounds
OK. As for Digest, well, do the browsers support it? Last I heard, there
were problems.

Nix.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Failed ErrNO=61

2003-01-22 Thread Nikola Milutinovic
Ravindra K. Bhat wrote:

Hi,

Any ideas on how to solve the following error in Mod_jk.log:

[Wed Jan 22 08:57:20 2003]  [jk_connect.c (177)]: jk_open_socket,
connect() failed errno = 61
[Wed Jan 22 08:57:20 2003]  [jk_ajp_common.c (626)]: In
jk_endpoint_t::ajp_connect_to_endpoint, failed errno = 61


What is ERRNO(61) pn your system and what does it mean in the context of 
"connect()" system call?

Nix.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



Re: Can the JNDI Connection Pool re-connect after failure?

2003-01-29 Thread Nikola Milutinovic
Boris Folgmann wrote:

Ryan Cornia wrote:



Anyone using JNDI datasources that reconnect in case of a lost link to
the DB server?

Any examples? I'm using the I-net driver for Oracle



Interesting question. In fact I have the same problem, using DBCP and
PostgreSQL. I looked trough the Javadocs at
http://jakarta.apache.org/commons/dbcp/api/index.html
but did not find a resource argument for configuring something like a
reconnect. Any comments welcome.


I believe that if you set up "connection verification query" in your DataSource 
definition in server.xml it will reconnect. Haven't tried it, though.

Nix.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: unix security realm

2003-01-29 Thread Nikola Milutinovic
[EMAIL PROTECTED] wrote:

has anyone come across an implementation of a realm for Tomcat which
authenticates users against the operating system's logins/passwords?

thanks in anticipation 

Cyrus SASL 2.1.x has a JAR file with some classes that have SASL functionality. 
Maybe it is not too hard to write a wrapper for a Tomcat plugin/realm.

With SASL you gain access to several authentication mechanisms:

- Kerberos IV
- Kerberos V (GSSAPI)
- private user database
- One-Time Passwords
- LDAP (experimental, via SASLAuthDaemon)
- DEC OSF/1 SIA (for those who are running on DEC OSF/1, like me)

Nix.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can the JNDI Connection Pool re-connect after failure?

2003-01-30 Thread Nikola Milutinovic
Raible, Matt wrote:

I've discovered that this problem is related to a 90-minute timeout on our
firewall.  Tomcat sits outside of the firewall, and Oracle resides inside.
Since there's no activity for 90 minutes, it closes the connection.  Anyone
know of a workaround (+ sample code) for this?  I'm assuming a ping of some
sort using the database connection pool would work.


SOLUTION 1: Change timeout values on your firewall.
SOLUTION 2: Create a load-on-startup servlet that will "ping" the database every 
hour.

Nix.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Datasource

2003-02-26 Thread Nikola Milutinovic
SebastiĆ£o Carlos Santos wrote:
Georges,  
	For the documentation of JNDI Datasource HOW-TO, their files jar should be located in $CATALINA_HOME/common/lib. This road should be put in CLASSPATH of the system also.

*** REPLY SEPARATOR  ***

On 26/2/2003 at 13:31 Georges Roux wrote:


Hi,

I run under Linux, with tomcat 4.1.18 Standalone,
and want to set up some JDBC Datasource for connection pooling, where do 
I need to put the jar file?

/common/lib?
/shared/lib?
./common/lib will make JDBC driver available to Tomcat and all web-apps.
./shared/lib will make JDBC driver available to all web-apps, but not to Tomcat.
Make your pick.

Nix.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Catalina Home/Base

2003-02-26 Thread Nikola Milutinovic
Hi all.

I have a small dilemma regarding CATALINA_HOME and CATALINA_BASE environment. 
Why are all loggers set to have a default dir ${CATALINA_HOME}/logs? Shouldn't 
it be ${CATALINA_BASE}/logs?

At the moment, I am building a Tru64 UNIX package of Tomcat 4.1.18. Tru64 has a 
recomendation to distribute all files of one package into three separate groups:

/opt/${PKG} - boot/startup files, kernel modules
/usr/opt/${PKG} - readonly files (files users will not normally change)
/var/opt/${PKG} - changable files (tmp, logs, spool, data,...)
With this philosophy, I have distributed tomcat like this:

ROOT: startup files
USR:  ./bin
  ./common
  ./config
  ./server
  ./shared
  ./webapps
VAR:  ./logs
  ./temp
  ./work
Now my problem is in setting up the environment. CATALINA_HOME should be USR, 
while CATALINA_BASE should be VAR. This doesn't work for logs. I know I can 
manually set all loggers to log into VAR area. My question is: is there some 
mistake in my view of how things should be setup? IMHO, logs belong to VAR area.

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat UML Diagram

2003-07-30 Thread Nikola Milutinovic
> Am I asking a dumb Q or there is just no such thing around?

There is no such thing. UML is a information system modelling language.
Tomcat is a JSP/Servlet container - a part of J2EE server specification
implementation (web application interface). So, Tomcat implements only a
segment of an IS. What is more, it implements a GUI, for which UML is not
very well suited.

There are UML tools ou there, Poseideon UML (successor of Argus UML),
Rational Rose/XDE/..., NetBeans have an extension, IBM Eclipse also has an
extension,... They can all produce code which can be refined to be used with
Tomcat (IOW, JSP/Servlet classes can be derived from some of the UML
classes), but there is nothing specific to Tomcat.

Nix.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] JDBC confusion

2003-08-14 Thread Nikola Milutinovic
> Hello List... newbie question coming up:

Phaser charged...
Shields at 80%...
Photon torpedos loaded...

> If I set up a jdbc connection object in one servlet, do I have to close it each time
> or can the same connection be re-utilized by other servlets each using a different
> sql statement (perhaps storing the connection as a session attribute?).

This might give you a speed boost, since openning a connection can be time consuming. 
But that is the main idea behind JDBC connection pooling, so why re-invent the wheel? 
Poorly, I might add.

> Is there a significant resource saving by not creating a JDBC connection object for 
> each database access?

That depends on a particular JDBC driver, but usually no. You'll most likely save time.

> I'm thinking of storing a connection for each user in the session, as opposed to 
> pooling
> - primarily because I'm not sure how a database pool works nor how to set it up.

A JDBC connection pool does what you want and more. It opens several connections and 
keeps them ready and waiting in the connection pool. The minimum and maximum number of 
connections are usually configurable (at least with DBCP in Tomcat). Physical 
maintainance of connections (checking if it is OK) is also implemented in DBCP. So, 
why don't you save yourself a lot of trouble and use JDBC connection pool over JNDI, 
as described in Tomcat docs?

I had it working with Tomcat 2.1.24 and PostgreSQL 7.3.2. It also couples nicely with 
JSTL's "sql" tags.

> Should I do a re-think on this?

Most definitely.

> I'm using one postgresql 7.3.3

Switching to 7.3.4 is recomended - there is a critical startup bug introduced in 7.3.3.

Nix.


Re: Help! heavy traffic is crapping out our site every 5 min! DBCP exceptions

2003-08-14 Thread Nikola Milutinovic
> now, given that i can confirm that i am closing connections (calling
close()
> on them, which returns them to the pool), can you suggest how i might
locate
> where those connections are not getting released? i have read some stuff
> about dbcp not being entirely reliable in releasing connections. is that
> true? argh.

One question. Why should DBCP *release* a connection?

The way I see it, DBCP is running fine. Let me explain.

The job of any JDBC connection pool is to open connections for you, to keep
a pool of pre-opened connection "ready to serve" and to manage it. Nobody
ever mentiones *closing* the connections. Well, they can be closed, usually
in two situations:

1. the number of unused connections is over the maxUnused
2. the pool has decided to "recycle" the connections (to clean up memory
leaks and garbage)

You are definitely not falling under (1) - heavy load of your site will
consumes more and more of the DB. You are most likely not a candidate for
(2), either - after 5 minutes no reasonable connection pool will consider
any particular connection "stale" or a "candidate for recycling to prevent
memory leaks".

So, again, why should you see connections being closed, if the load of oyur
site is growing?

OTOH, if you are using connections from the pool and returning them on
regular basis, then there shouldn't be an increase of numebr of open
connections. If you can verify this scenario, then you have located a bug:

1. count open connections
2. open a connection from the pool
3. do something
4. close a connection (this should return it to the pool)
5. repeat a number of times (10 loops, 100 loops, 1000 loops,...)

See what happens. This activity should not make any change in the number of
connections. The only thing you should expect is the recycling of
connections that I have mentioned, which would happen after some time or
after a numebr of uses.

Nix.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Digest

2003-08-14 Thread Nikola Milutinovic
> In a jsp application i want to calculate digested passowrds dynamically
> According to the Realm How To ... i write this code in a jsp :
> 
> <% String digest = 
> org.apache.catalina.realm.RealmBase.Digest(request.getParameter("password"), 
> "MD5"); %>

Isn't there a "Digest" method in some, more public place? JAAS or some cryptography?

> Here is the result :
> 
> org.apache.jasper.JasperException: Unable to compile class for JSP 
> Generated servlet error:
> [...] package org.apache.catalina.realm does not exist [...]

In other words, "javac" has no knowledge of Tomcat's internal classes, as it shouldn't.

> [javac] String digest = 
> org.apache.catalina.realm.RealmBase.Digest(request.getParameter("password"), 
> "MD5");
> [javac]
> 
> How can i fix that ? catalina.jar is not in tomcat classpath ?

I'd sugest looking for "Digest" in some of the public APIs of Java platform. That way 
you will be transparent to the container (IOW, you'll be able to run your web-app on 
something other than Tomcat).

Nix.


Re: [OT] how to pronounce Apache ?

2003-08-14 Thread Nikola Milutinovic
> Apache has NOTHING to do with indigenous American people.
> It stands for "a patchy" software.

If that's a pun, it's a bit out of place. If it's a joke, so be it. If it is an 
oppinion, then you got something mixed up - what's the feather on the web site for?

Nix.


Re: Problems running in a chroot jail.

2003-08-22 Thread Nikola Milutinovic
> I looked at truss output but I don't see anything obvious except at the 
> very end:
> 
> 1367: sysconfig(_CONFIG_NPROC_CONF) = 1
> 1367: sysconfig(_CONFIG_NPROC_ONLN) = 1
> 1367: sysconfig(_CONFIG_PHYS_PAGES) = 65536
> 1367: open("/dev/zero", O_RDWR) Err#2 ENOENT

When you try to run something in ChRoot jail, you should provide it with the expected 
environment. "/dev/zero", "/dev/null" and many others may be needed by your process 
and may cause them to crash if they are not there.

> 1367: write(1, " #\n", 2) = 2
> 1367: write(1, " #   H o t S p o t   V i".., 48) = 48
> 1367: write(1, " #   P l e a s e   r e p".., 30) = 30
> 1367: write(1, " #   h t t p : / / j a v".., 44) = 44
> 1367: write(1, " #\n", 2) = 2
> 1367: write(1, " #   J a v a   V M :   J".., 61) = 61
> 1367: write(1, " #\n", 2) = 2

So far, nothing too obvious...

> 1367: Incurred fault #6, FLTBOUNDS  %pc = 0xFE237F3C
> 1367:   siginfo: SIGSEGV SEGV_MAPERR addr=0x0078
> 1367: Received signal #11, SIGSEGV [default]
> 1367:   siginfo: SIGSEGV SEGV_MAPERR addr=0x0078
> 1367: *** process killed ***
> 
> It looks like it's trying to convert a floating point exception into a 
> segfault.

What makes you say that?

Make /dev/zero available, first.

Nix.


Re: Tomcat 4 on Compaq Tru64?

2003-08-22 Thread Nikola Milutinovic
Does anybody have any succes with Tomcat on Tru64? I think I need to alter
some shell scripts, but I have no clue what and where to make what changes?

I have set the JAVA_HOME to the Compaq Fast JVM, but the startup.sh gives me
thins in the catalina.out:

 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [
-debug ] [ -nonaming ] { start | stop }

---

:-)

Sounds familiar. You'll have to hack your Tomcat scripts just a little bit.
Alter these two:

startup.sh
--
# Setup JAVA_HOME
# Alter the last command line to this:
exec "$PRGDIR"/"$EXECUTABLE" start -config ${CATALINA_HOME}/conf/server.xml

shutdown.sh

# Setup JAVA_HOME
# Alter the last command line to this:
exec "$PRGDIR"/"$EXECUTABLE" stop -config ${CATALINA_HOME}/conf/server.xml

This is a bug/feature of Tru64's shells or some component. I've tried even
ZSh - the same.

Nix.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 4 on Compaq Tru64?

2003-08-23 Thread Nikola Milutinovic
> I'm not sure why it works that way. I've got Tomcat working on Tru64 by
> calling
>
>   bin/startup.sh start
>
> and
>
>   bin/shutdown.sh stop
>
> in the $CATALINA_HOME directory.

That's another way of handling it, I guess. Tru64 shows problems not in
those two scripts, but in "catalina.sh", when accessing "$@". Dunno why.

Nix.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] but IMPORTANT

2003-08-28 Thread Nikola Milutinovic
> Time to get the board out and move to Vanuatu ...

You'd be followed by half of Europe. Hasn't Germany opted for SuSE Linux as their OS 
for the government institutions?

Nix.

Re: dbtags and tomcat 4.1

2003-09-04 Thread Nikola Milutinovic
> You could use jstl instead, but from my experience SQL in the jsp is 
> more trouble then it is worth and causes imense headaches
> when you want to do something complicated.  Just a suggestion but it 
> could be a good time for you to have a look at migrating to Struts or 
> some other framework which suits your needs :D

In other words, when JSP becomes too complex, it is time to transform your design into 
J2EE blueprint (which is endorsed by Struts). Each request can have three components 
handling it:

- incoming JSP: packaging of request parameters into beans, attaching them to request 
scope
- main servlet: does all the work of "business logic" and attaches resulting 
beans/variables to request scope
- outgoing JSP: performs "presentation logic", based on data supplied to it via 
request scope.

Nix.

Re: Memory leaks?

2003-09-04 Thread Nikola Milutinovic
> But depending on the DB, it can cause problems from the DB with too many
> open ResultSets... I had an issue with performance testing where everything
> but ResultSets were being closed and the Oracle DB started throwing errors
> after about 500 queries.  Better safe than sorry.

Well, from what I know, in general (not Oracle specific). If you open a connection 
within some scope (Servlet, JSP, any other class), then create a statement and finally 
a result set, shouldn't deleting the most upper scope cause all these "lower levels" 
be closed and garbage collected?

With Servlets and JSP, of course, you have no control whatsoever as to when they will 
be put out of service. But suppose you are tidy and do a close on the connection - 
shouldn't that clean-up the underlying Statement(s) and ResultSet(s)? Even with 
connection pooling, this should work.

Nix.

Unusual network bind on TC 4.1.24 and a JK2 Q

2003-09-10 Thread Nikola Milutinovic
Hi all.

Network question
--

TC: 4.1.24
OS: Mandrake Linux 9.1
JVM: Sun 1.4.2b

java   3600  tomcat4   10u  IPv4   4319 TCP *:8009 (LISTEN)
java   3600  tomcat4   11u  sock0,04317 can't identify 
protocol
java   3600  tomcat4   12u  IPv4   4320 TCP localhost:8005 
(LISTEN)

That one in the middle is something I cannot identify. Where is it coming from? It is 
not TCP, UDP - the protocol is unknown to "lsof". I'll clarify, "can't identify 
protocol" message doesn't mean "lsof" cannot identify port (a.k.a. service), it cannot 
identify the IP protocol of this socket.

JK2 question
--

I'd like to setup mod_jk2 over a local UNIX socket. Do I need APR and jkjni.so in 
jk2.properties? It would seam logical, now that I look at it, since UNIX socket is not 
soemthing JVM has, but would require external (UNIX specific) JNI library.

Nix.

Building/using JK2 - linking problem

2003-09-10 Thread Nikola Milutinovic
Hi all.

I have built mod_jk2.so and jkjni.so from the latest tomcat-connectors-jk2-2.0.2. This 
is my jk2.properties:

handler.list=apr,channelUnix,request
channelUnix.file = /var/tomcat4/work/jk2.socket
shm.file = /var/tomcat4/work/jk2.shm
apr.NativeSo = /usr/lib/apache2-extramodules-2.0.44/jkjni.so

My problem is that when I try to start Tomcat I get errors in catalina.out:

Sep 10, 2003 2:40:44 PM org.apache.jk.server.JkMain start
INFO:
  APR not loaded, disabling jni components:
  java.io.IOException:
/usr/lib/apache2-extramodules-2.0.44/jkjni.so:
  /usr/lib/apache2-extramodules-2.0.44/jkjni.so:
undefined symbol: apr_md5_final

I have built jkjni.so with shared libraries. What should I do now?

- Specify libapr-0.so as another "apr.NativeSo"
- Relink jkjni.so to statically link other libraries (that should be possible, right?)
- Leave out "apr" from jk2.config (I think I need it for AF_UNIX socket!)

Thanks for any insight.

Nix.

Re: Active Directory Single Sign-On

2003-09-10 Thread Nikola Milutinovic
It sounds like we should come up with a de facto way of achieving SSO with
Tomcat and NTLM (since there is plenty of M$ workstations out
there).Which leads me to believe that a lot of people could very well
benefit from this.. I'm required to implement this for our intranet
application which I have found to be the most common need for such an
implementation..

---

Maybe I'm falling in from the blue, but isn't ADS offering Kerberos5
(GSS-API) authentication, which is the actual workhorse of ADS
single-sign-on?

Why wouldn't you implement SPNEGO + GSS-API as an authentication method?

I have heard that Tomcat can be a client for SASL mech GSS-API, actually any
client using JAAS can do that (take a look at Sun's JNDI tutorial). Couldn't
Tomcat act as a server within Kerberos5 scheme, using the same JAAS (sorry,
JASS is not my cup of tea)?

In other words, write a special authentication module for Tomcat that would
let Tomcat act as a kerberized Web server. At first instance it could be a
filter, but SPNEGO (present in RFCs) is a HTTP layer authentication scheme
and should be implemented alongside Basic and Digest MD5 authentication
mechs.

There exist modules for Apache which implement this, take a look at these
links:

https://sourceforge.net/projects/modgssapache/
http://meta.cesnet.cz/software/heimdal/negotiate.en.html
http://sourceforge.net/projects/modauthkerb

The idea behind all this is to register a web server (Tomcat or Apache) as
services under Kerberos (Active Directory, MIT, Heimdal) and let clients
authenticate to the Kerberos (Win2k and WinXP do this when you login to ADS)
and then let Kerberos "do it's stuff". That way, once a user logs onto ADS,
he/she will have a complete SSO - File Sharing, Web (IIS, Apache, Tomcat),
any other ADS service.

Nix.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Building/using JK2 - linking problem

2003-09-10 Thread Nikola Milutinovic
> I had similar problems with loading shared libraries
> until I recompiled jk2 after configuring it with the
> "./configure --with-apxs=/some/path/to/apache2/bin/apxs"
> command suggested in John Turner's "Solaris 8 + Tomcat
> HOWTO", which is, BTW, and excellent resource. I have
> been able to get everything working on Solaris except
> getting Apache to start Tomcat in process (I am stumped
> on that one).

I ran it with "configure --with-apxs2=/usr/bin/apxs2", I'll try your
sugestion tomorrow. Until two weeks ago I was bound to Tru64 UNIX only. To
make the matters worse, it was an obsoleted version 4.0D, so, many things
were working - barely.

I guess it takes time...

Thanks,
Nix.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Building/using JK2 - linking problem

2003-09-11 Thread Nikola Milutinovic
> I had similar problems with loading shared libraries
> until I recompiled jk2 after configuring it with the
> "./configure --with-apxs=/some/path/to/apache2/bin/apxs"

"configure" objects on this.

However, I'km wading through my problem. The problem is in unsatisfied references. 
"libapr" requires "libaprutil", which' in turn, requires other libraries, like db-4.0, 
expat, pthreads,...

I come from Tru64 UNIX. Is there some simple switch I'm missing? Do I really need to 
manually link all these libraries into jkjni.so?

Nix.

Re: Building/using JK2 - linking problem - SOLVED, mostly

2003-09-11 Thread Nikola Milutinovic
> I had similar problems with loading shared libraries
> until I recompiled jk2 after configuring it with the
> "./configure --with-apxs=/some/path/to/apache2/bin/apxs"

Got it to compile and load, had to add this into the
./src/jk/native2/server/apache2/Makefile:

JK_LDFLAGS=-L${APACHE2_LIBDIR} -lcrypt -lapr-0 -laprutil-0 -lgdbm -lexpat -l
db-4.0 -lpthread -ldl

Now, when loading, I get another, sort of, error:

Starting service Tomcat-Standalone
Apache Tomcat/4.1
[Thu Sep 11 18:55:22 2003] (error ) [jk_config_file.c (279)]
config.update(): Can't find config
file ${serverRoot}/conf/workers2.properties
[Thu Sep 11 18:55:22 2003] ( info ) [jk_config.c (251)]
config.setAttribute() Error setting conf
ig: file ${serverRoot}/conf/workers2.properties
[Thu Sep 11 18:55:22 2003] ( info ) [jk_logger_file.c (184)]  Initializing
log file stderr
[Thu Sep 11 18:55:22 2003] (error ) [jk_shm.c (333)]  shm.init(): No file
[Thu Sep 11 18:55:22 2003] ( info ) [jk_workerEnv.c (403)]  workerEnv.init()
ok ${serverRoot}/con
f/workers2.properties

FWIW, the socket is there, but SHM file is not. I don't exactly need it (I
think), so it's not a big deal. Is there anything more comprehensive on the
purpose of particular components?

I guess I have a vague idea what "apr" does, I'm clear on "channelSocket"
and "channelUnix", but what is the purpose of "request"?

Nix.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



OT: HEADS-UP: viral storm out there

2003-09-19 Thread Nikola Milutinovic
Hi all.

This is off topic and is a cross-post, so I'll be brief. There is a very nasty virus 
out there and I urge everybody to get their AV in order. The virus is known as: 
"W32.Gibe-F" or "W32.Swen-A".

Yesterday, I got cca. 200 viral messages.

Today, it's about 800 viral messages!

I suspect that a lot of viral traffic directed to me is coming from users on one of 
the lists I'm crossposting to. Check yourselves.

Nix.

Re: OT: sloppy English

2003-09-22 Thread Nikola Milutinovic
> i disaggree, unforuntealy i don't have time to perfom complete spel checks
or
> fix grammar on all words. i try to be as coherent as possible but since i
do
> this for free, you get what your pay for. please killfile me if it is that
> bothersome.
>
> I don't mind bad grammar and spelling. I detest those which don't read the
> docs, the faq and search the archives before asking a question.
>
> I'll take bad grammar over bad questions any day.

Agreed, but the main point was in:

- capital letters at the beginning of the sentence
- capital "I" for first person
- at least an attempt at punctuating sentences

This IS a part of syntax of, perhaps not all, langauages of our users, but
these rules should be common to most users visiting this list. I do
acknowlege that there are languages that use different rules (japanese,
chinese, arabic,...), but all users writing to this list are using character
sets that are compliant with these rules.

So, all that Christian asked for was to *re-read the message before posting*
(a Goot Idea (tm)) and to make it more readable. That helps a lot to anyone
who's reading the message.

Perhaps his wording was a bit offensive, but he is right. Sometimes I
couldn't understand what the poster was asking. I'll survive bad punctuation
and capitalization, but it takes extratime for me and leaves me with a
feeling that the poster was in a hurry or sloppy.

Nix.

P.S. Please feel free to point out any and all mistakes I've made. I like
being correct and don't mind being corrected.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat Admin Password

2003-09-25 Thread Nikola Milutinovic
> Hi All,
> I can't  log as administrator in to Tomcat 4.1.24 using 
> 
>  username : admin 
>  password : setup
> 
> is this the default password?

There is no default password, you have to enter your own in tomcat-users.xml

Nix.

Re: Compile jk2 2.0.4 connector on Tru64

2004-03-31 Thread Nikola Milutinovic
Eulogio Robles wrote:

You are right, it worked... almost :-)

I get this error :

libtool: install: warning: remember to run `libtool --finish 
/usr/local/apache2/modules'
/sbin/cp 
../../../build/jk2/apache2//usr/local/apache2/modules/mod_jk2.so 
../../../build/jk2/apache2/mod_jk2.so
cp: ../../../build/jk2/apache2//usr/local/apache2/modules/mod_jk2.so: No 
such file or directory
make[1]: *** [../../../build/jk2/apache2/mod_jk2.so] Error 1
make[1]: Leaving directory 
`/usr/local/src/jakarta-tomcat-connectors-jk2-2.0.4-src/jk/native2/server/apache2' 

make: *** [jk2-build] Error 1
# find ../.. -name "*.so" -print
../../jk/build/jk2/apache2/usr/local/apache2/modules/libmod_jk2.so
../../jk/build/jk2/apache2/.libs/libmod_jk2.so
Anyway, I used the resulting libmod_jk2.so with my Apache server and it 
worked without problems
It's good news. And, yes, I ran into that myself and corrected it manually 
(copied mod_jk2.so where the script expected it). After that the make builds JNI 
module, so if you've configured for that be sure to correct the situation. JNI 
module (jkjni.so) is required for UNIX Sockets and for running Tomcat as 
in-process of Apache.

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Application loading twice

2004-04-02 Thread Nikola Milutinovic
Shapira, Yoav wrote:

Hi,
It's probably because you have autoDeploy set to true AND an explicit
context with a different path for your webapp.  So tomcat deploys it
twice, one with your explicit context and once via autoDeploy with a
path="/" + the app name, i.e. "/myApp".  Pick one, in your case probably
you should set autoDeploy="false".
 

What should one do if he has a VHost with many web applications, all of 
them rooted in one dir (i.e. "~owner/WebApps/") and wants to setup some 
context bound things, like DataSources?

If "autodeploy" is on, the webapp with DataSource will load twice. If it 
is off, then each webapp has to be deployed manually.

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JK2 connector built and installed but is there something wrong?

2004-04-07 Thread Nikola Milutinovic
kwilding wrote:

Hi,
   This is a minimalistic workers2.properties. Remember to change  to
your ip address. It works for me on SuSE.
Kevan
# comment these lines out in production
[logger.apache2]
level=DEBUG
[shm]
file=/usr/local/apache2/logs/shm.file
size=1048576
Is this neccessary?

# Example socket channel, override port and host.
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1
# define the worker
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009
# Uri mapping
# Add your ip address instead of 
[uri:/*.jsp]
worker=ajp13:localhost:8009
# Define the communication channel 
[channel.socket:localhost:8009]
info=Ajp13 forwarding over socket
tomcatId=localhost:8009
host=127.0.0.1
Why the double definition of comm socket? Or is it appended together? Anyway, it 
should be in one section, IMHO.

#This maps to a context test
# in the webapps folder
[uri:/test/*]
worker=ajp13:localhost:8009
info=Map the test system


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Inter Servlet Communication

2004-04-08 Thread Nikola Milutinovic
Gareth Western wrote:

Hi,
Can someone fill me in as to what I need to do to make objects that are 
instanstiated in one servlet available to another servlet? I tried 
using  getServletContext().setAttribute("some.name", myObj) however I 
was unable to retrieve the object in the other servlet.
I notice there are some 'public' ServletContext attributes such as

org.apache.catalina.jsp_classpath
javax.servlet.context.tempdir
org.apache.catalina.resources
org.apache.catalina.WELCOME_FILES
So where/how does Tomcat define these?
If you wish to share things, runtime, you should use one of defined contexts:

- page context
- request context
- session context
- application context
If servlets are in the same request chain, you can use request context. If they 
are in the same session instance, you can use session context. Or you can use 
application context.

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: use own property file for db-connection

2004-04-12 Thread Nikola Milutinovic
Amrun wrote:

Hi everyone, 

I'm working with Tomcat 5.0 and I'm trying to write a little webapplication.
In this case I need to get the data from a database. Now I want to write my
own property-file from which I can get the information about the driver,
user
and password. I've done this before, but I haven't done it on a webserver so
The correct way to go is DataSources. Check out Tomcat's docs on JNDI and 
DataSources.

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


JK2 JNI link bug [Was: Re: Apache2+Jk2+Tomcat5]

2004-04-12 Thread Nikola Milutinovic
Yang Xiao wrote:

Hi list,
I'm trying to get Apache 2.0.49/JK2/Tomcat 5.0.19 to work
I was able to get JK2 to compile and placed the mod_jk2.so and libjkjni.so
in /usr/local/apache/modules
But when I start the Tomcat server, I'm getting this error
INFO: APR not loaded, disabling jni components: java.io.IOException:
java.lang.UnsatisfiedLinkError: /usr/local/apache/modules/libjkjni.so:
/usr/local/apache/modules/libjkjni.so: undefined symbol: apr_md5_final
It is a constant problem with JK2 JNI lib. I've had it on 2.0.2 and on 2.0.4. 
libjkjni.so needs to be linked against all three APR libs: -lapr -laprutil -lexpat.

This is the case on Linux (Mandrake 9.1) and on Tru64 UNIX (4.0D). After 
modifying the Makefile, it went OK. It loads and works.

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Followup jk2 + apache vhosts + tomcat sessions

2004-04-13 Thread Nikola Milutinovic
Jens Saade wrote:

Hi,

I already sent an email named "jk2 + apache vhosts + tomcat sessions" 
but no response yet. Maybe I didn't describe my problem clearly enough 
so here is another go:

I've got an apache http 1.3.x running in front with multiple vhosts. 
Some of those vhosts are redirected to a single tomcat 5 instance via 
jk2 connector. I use these vhosts as "entry points" to the application 
running inside the tomcat server. They should share tomcats http 
session. Atm each vhost opens a new session for e.g. vhost 1-3. Is it 
possible to make them somehow share the same tomcat http session? Or is 
there a better way to achieve what I want?

 apache http
with |
 +-+--+---+-+
vhost1vhost2 vhost3 vhost4vhost5
 | |  |   | |
 jk2   jk2   jk2 phpsimple html
 | |  |
single .. tomcat .. instance
with application
All those Tomcat web-apps (contexts) should/must be on matching VHosts (see 
 tag for server.xml). There is no way to share a session between 
different contexts, unless you wish to implement something external.

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JK2 JNI link bug [Was: Re: Apache2+Jk2+Tomcat5]

2004-04-13 Thread Nikola Milutinovic
Yang Xiao wrote:

Hi,
Thanks for the help
I went back and modified the Makefile with all 3 libraries as you have said,
recompiled and now I'm getting a different error:
INFO: APR not loaded, disabling jni components: java.io.IOException:
java.lang.UnsatisfiedLinkError: /usr/local/apache/modules/libjkjni.so:
/usr/local/apache/lib/libaprutil-0.so.0: undefined symbol: gdbm_errno
I'm not too good with C library programming, so can you help to explain what
this is?
 

Ugh, looks like there is another link dependency. "libaprutil" wants a 
link to GDBM library. Try to locate something looking like 
"/usr/lib/lib*dbm*" and add that to Makefile, without leading "lib", 
like this "-ldbm".

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JK2 JNI link bug [Was: Re: Apache2+Jk2+Tomcat5]

2004-04-13 Thread Nikola Milutinovic
Yang Xiao wrote:

Hem, unfortunately, I tried that, which worked, but then tomcat complains
about another XML library not being linked. I'm building Apache from scratch
now... please help.
Well, you can always try to get it all. Re-building Apache from scratch might be 
a scarry task. You'll need a lot of development RPMs.

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JTA support

2004-04-15 Thread Nikola Milutinovic
Robert KrĆ¼ger wrote:

Hi Freddy,

do you know (or anyone else for that matter) where to find instructions 
 how to configure a minimal JBoss to provide Tomcat 5 with JTA? On the 
JBoss website I can only see bundles with Tomcat 4. In case you succeed. 
I would be interested in having a look at your configuration files. In 
the medium term I would like to get rid of our current hacked 
Tyrex-based JTA solution.
I think JBoss 3.2.4RCx ships with Tomcat 5.0.18 as default and has 4.1.x as 
optional (under doc/examples or some such path).

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JTA support

2004-04-15 Thread Nikola Milutinovic
Freddy Villalba Arias wrote:

Hi,

Sorry if I misled you.

I'm using JBoss v3.2.3. According to that version's download page:

"(includes Tomcat 4.1.29 JBossWeb HTTP server and JSP/Servlet engine,
EJB, CMP2.0, JCA, IIOP, Clustering, JTA, JMX and more)"
Look under doc/examples, there is a build dir for Tomcat 5.0.1x. You'll need a 
working Ant to build it.

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JTA support

2004-04-15 Thread Nikola Milutinovic
Freddy Villalba Arias wrote:

You are right, Nik. There it is.

However, I believe the default used by JBoss (as shipped, of course)
will be v4.1.29... right? (haven't confirmed it yet) :)
I don't think so. There is absolutely no reason to stick with 4.1 branch if 5.0 
is stable (and it looks that way). In any case, even 3.2.3 had both branches, 
only 4.1 was the default.

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: jboss tomcat integration

2004-04-16 Thread Nikola Milutinovic
Peter Choe wrote:

thanks for the reply.

so, once the initialcontext is set up in the environment, i just need 
to put everything (jsp, servlets, ejbs) under the webapps directory?


No, I believe the idea is to let JBoss handle everything except 
JSP/Servlet. So EJBs will be on JBoss.

and i would start jboss without starting the embedded tomcat?  how can 
i disable the embedded tomcat that comes with jboss not to start?


JBoss' Tomcat is just another service in JBoss' current deployment. 
Locate the dir of your currently deployed server and just (re)move 
Tomcat's deployment SAR from that dir. If the docs are true, you don't 
even need to restart JBoss, it will automatically remove the service 
from the loaded services.

What's the big enchantment with running your own standalone Tomcat and 
not the one included (and integrated) with JBoss? Other than being able 
to run the lates Tomcat available. With JBoss you have it all neatly 
packet and integrated. And if you're warried about not using the latest 
and greatest, well, what about bugs in JBoss (IOW, not running the 
latest and greatest of JBoss)?

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: jboss tomcat integration

2004-04-19 Thread Nikola Milutinovic
Peter Choe wrote:

it's just that i have a lot of things configured on tomcat and i am not 
too familiar with jboss yet.
Most of those things can be configured on JBoss, too. Note that things tied to 
JNDI (DataSources, etc.) are not configured from Tomcat, but from JBoss.

my preference is to have things very modular for easier upgrade and 
switching.
That will be difficult with JBoss. Tomcat is not an add-on package in JBoss, it 
is rather tightly integrated. I mean, yes, it is a service and you can 
deploy/undeploy it at will, but upgrading to a new version is not something that 
is documented. And sources of Tomcat do require hacking, in order to fit it into 
JBoss.

i guess after some time when i get use to jboss, i'll just so the 
integrated package.
Sooner, rather than later, I hope :-)

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: jk2 connectivity options

2004-04-19 Thread Nikola Milutinovic
Pete Stokes wrote:

Hi.

I'm assuming that JK2 over AF_UNIX socket is meant for apache / tomcat 
on the same box?
Yes. And you'll need JK JNI module, too. (libjkjni.so or jkjni.so).

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: jboss tomcat integration

2004-04-19 Thread Nikola Milutinovic
Peter Choe wrote:

do you know where the corresponding configuration files for tomcat is in 
jboss (i.e. server.xml, tomcat-user.xml)?
Huh. somewehre in the JBoss config dir. And JNDI stuff is in some other file.

i have apache and jk2 set up on a different server to pass request to 
tomcat for web applications.  i would think that this doesn't need to be 
changed if tomcat is running embedded in jboss, right?
Correct.

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JK/JK2 startup explanation

2004-04-19 Thread Nikola Milutinovic
Daniel Gibby wrote:

I'm especially wondering if I need to jave apr, JK and JK2 running. I 
was trying to only use JK2 with unixSockets... maybe that isn't what 
is actually happening, eh?
Can I disable JNI?
How do I use just JK or JK2?


JNI is used mainly in two situations: starting Tomcat from within 
Apache's process (in-process JNI) and UNIX socket communication. If 
you're planning to use "channelSocket" and start Apache and Tomcat 
separately, you can skip JNI. JK is production grade, while JK2 is said 
to be "not for production". As far as I'm concerned, JK2 is the choice. 
I've had it in production for several months, no problem.

The examples for setting up jk / jk2 are not very clear as to what 
does what and what the options are...


True. I wish one of the developers would take time to just LIST the 
handlers and options, so we can know what to experiment with.

I know that most of the time the examples are trying to be inclusive 
for everything on all platforms, but what that ends up meaning is that 
it is hard to see what someone wants specifically for a specific 
platform. In my case, I just want the fastest and least buggy 
connection between apache 2 and tomcat 4 on RedHat Linux 9. I'm sure 
that enough people have that configuration that it would seem that you 
could find a specific example of how to set that up without including 
everyone else's possible configurations in the same doc.

Anyway here is my jk2.properties:
channelUnix.file=/usr/local/jakarta-tomcat/work/jk2.socket
shm.file=/usr/local/jakarta-tomcat/work/jk2.shm
handler.list=apr,channelUnix,request
channelJni.disabled = 0
apr.NativeSo=/usr/local/jakarta-tomcat/server/lib/jkjni.so
What defaults are set besides those that I've got here?
This looks good. Here is mine:

jk2.config
--
# Set the desired handler list
# handler.list=apr,request,channelJni
handler.list=apr,request,channelUnix,shm
#
shm.file=${jkHome}/work/jk2.shm
apr.NativeSo=/usr/lib/apache2-extramodules/jkjni.so
request.tomcatAuthentication=false
channelUnix.file=${jkHome}/work/tomcat.sock
--
workers2.properties
-
[logger]
level=DEBUG
#
[config:]
debug=0
debugEnv=0
#
[uriMap:]
info=Maps the requests. Options: debug
debug=0
# Alternate file logger
[logger.file:0]
level=DEBUG
file=/var/log/httpd/mod_jk2.log
#
[shm:]
info=Scoreboard. Required for reconfiguration and status with 
multiprocess servers
file=/var/run/jk2.shm
size=100
debug=0
disabled=0
#
[workerEnv:]
info=Global server options
timing=1
debug=0
#
[channel.un:unixsock]
info=Main socket to Tomcat engine
file=/var/tomcat4/work/tomcat.sock
#
[status:]
info=Status worker, displays runtime informations
#
[ajp13:unixsock]
info=Default AJP 1.3 worker
channel=channel.un:unixsock
#
[uri:/jkstatus/*]
info=Display status information and checks the config file for changes.
group=status:
#
[uri:www.elektrovojvodina.co.yu/racun]
info=Consumers electrical bill
group=ajp13:unixsock
-

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Virtual Host, Locations and Mod_JK2

2004-04-19 Thread Nikola Milutinovic
Angus Mezick wrote:

Use the uri property in workers2.properties instead of using JkUriSet.
I do it that way and have no such problems:
[uri:www.guidestar.org/*.jsp]
group=lbWWW
I know, I have this, too. But, still, why is  approach not working as 
it should?

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JK2 configure thinks apache 2.0.48 is apache 1.3 on solaris 9

2004-04-19 Thread Nikola Milutinovic
Greg Adams wrote:

8. ./configure --with-apxs2=/usr/apache2/bin/apxs
Shouldn't this be "/usr/apache2/sbin/apxs"?

When I install Apache 2.0.49 in a custom dir of my choice, "apxs" goes into 
${PREFIX}/sbin/ directory.

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JK2 configure thinks apache 2.0.48 is apache 1.3 on solaris 9

2004-04-20 Thread Nikola Milutinovic
Greg Adams wrote:

Nope, at least not in my install..

maul(grega):/usr/apache2 % find /usr/apache2 -name "apxs"
/usr/apache2/bin/apxs
maul(grega):/usr/apache2 %
 

Aha, OK. That depends on a chosen layout.

Anyway, look into "config.status" and "config.log" files to see what 
went wrong.

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Apache2 encryption to Tomcat5

2004-04-22 Thread Nikola Milutinovic
Parsons Technical Services wrote:

Pete,

I know it can be done, but I don't have the experience to tell you how.

What will work is to set up a vpn/encrypted connection between the two
machines.
Googling I found this site:
http://ringstrom.mine.nu/ipsec_tunnel/
Or simple hack with SSH tunneling or SSLTunnel or OpenVPN or ...

The idea is not to introduce a new (and untested) protocol that will 
make things secure. Or obuse the existing protocols. Use what is suited 
best for the task. AJP13 is for connecting Web Servers with Tomcat. 
VPN/SSH/SSL are for creating encrypted links/tunnels/connections.

Withthat approach, you'll have modularity and clarity. You will be able 
to run mod_jk/jk2 or HTTP forwarding oblivious of any encryption.

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: What is the relationship between the JK2 uri compoennt and the context?

2004-04-22 Thread Nikola Milutinovic
It is simply the case that what is forwarded via AJP13 is some sort of 
HTTP request (it has all the headers, request URI,...). In that sense, 
the request URI that you mapped from "workers2.properties" must exist on 
the Tomcat side, too.

In the environment of VHosts, you need to match VHosts on both Apache 
and Tomcat, plus the paths. So if you are mapping 
http://www.myserv.com/pbt/* to Tomcat, Tomcat must have  deployed within .

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat and HTTPD on the same box: What's the best mod_jk2 protocol?

2004-05-14 Thread Nikola Milutinovic
Chong Yu Meng wrote:

Hi Andrew !

Clute, Andrew wrote:

If it is channelUnix, I just now need to figure out this crazy
'undefined symbols: apr_md5_final' error.
 

I wrote a document for compiling mod_jk2 on Fedora Core 1, in which I 
specified the necessary packages, one of which is the APR libraries. 
You can find the document here : 
http://www.connecties.com/cymulacrum/tomcat5/book1.html


I have managed to compile it on Mandrake. It required not just libapr 
and libapr-util, but libgdbm and libpcre. I've seen reports that on some 
platforms, it needed even more (one lib required another, etc), the list 
of libs grew to some 10 libraries. It takes some personal persistance to 
wade through it all - link, try, read error report, locate the library 
holding the %$#$#%@ function, goto STEP_ONE,...

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JK2 equivalent of JkMount

2004-05-17 Thread Nikola Milutinovic
Jack Lauman wrote:
Is there a JK2 equivalent of JkMount?  If there is what is the JK2 
syntax for:

JkMount /members/minutes/*.jsp worker1
JkUriSet, I believe. There are docs in Tomcat on JK connectors.
Nix.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JK2 uri context question

2004-05-17 Thread Nikola Milutinovic
Jack Lauman wrote:
I have a site where users enter the members area through a URL like this:
http://www.domain.com/members/minutes.jsp
My workers2.properties file
[uri:/minutes/*]
group:ajp13:localhost:8009
How do you remap the members directory so that jk2 know that it point to 
a tomcat app called minutes in the root context?
With the above, you map one set of URI to a worker, which (in case of 
"ajp13") will deliver it to some Tomcat instance. Tomcat instance will 
parse the URI (yes, it does that) and decide which context (web 
application) it belongs to.

In short, both your Apache and Tomcat must have a matching definition of 
VHosts and paths. I believe there is also a "path" parameter in the 
"[uri:...]", which can map to a new path, so paths can differ. I've 
never done it myself - I had matching paths.

Nix.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: jk2 problems

2004-05-17 Thread Nikola Milutinovic
[EMAIL PROTECTED] wrote:
I'm getting error in my apache tomcat configuration and
I don't know why.
I'm running Tomcat 4.1.18 with apache 2.0.49 under linux.
And I can't make apache running with mod jk stuff.
Here is an extract of my apache httpd.conf file
LoadModule jk2_module modules/mod_jk2.so

JkWorkersFile 
/opt/jboss/prod-intraneta/intraneta/prod/conf/workers.properties
JkLogFile /var/log/apache/inet/jk.log
JkLogLevel info 
JkMount /jmx-console/* ajp13 


when I start apache, I get the error message below
Invalid command 'JkWorkersFile', perhaps mis-spelled or defined by a 
module not included in the server configuration

can someone tells me what I'm doing wrong
Those directives are from mod_jk and you're using mod_jk2. Take a look 
at Tomcat docs (on Jakarta's site, if you can't get your local copy 
running). There is a section on JK connectors. The examples are mostly OK.

Nix.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Jk2 compiling problem sorted ..Do you know.. How?

2004-06-01 Thread Nikola Milutinovic
Filip Hanik - Dev wrote:
Any clues on sorting this problem alternately?
don't start apache until tomcat is up and running
Which is an event not trivial to catch. I know of hacks, like tailing 
"catalina.out" log and seeing when the "last of the Mohicans" has 
loaded, but, again, it is not trivial to catch. Or better said, it is 
particualr to each setup. You would have to tailor your own hacks.

I wish there was a way to query Tomcat and see if it loaded ALL it's 
stuff. Or at least the engine... Could we trail logs for that?

Nix.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JSVC problems with Tomcat 5.0.19 & Linux

2004-06-01 Thread Nikola Milutinovic
[EMAIL PROTECTED] wrote:
Hi Yoav Shapira,
Look into a simple unix administration book 
 - for granting rights for ports(binding) to non-root user and u might
save some time (may be money too) for this tool. 
How does one go about it?
I've never seen anything like that on our Digital UNIX or Tru64 UNIX. If 
it is a Linux-only feature, then it is not what we want. I have DoP on 
Tru64 UNIX (Division of Privileges), but I'm not sure that is sufficient 
and I AM sure it is Tru64 specific.

Nix.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat FAQs on Wiki

2003-12-01 Thread Nikola Milutinovic
Mark Eggers wrote:

Folks,

I have put some of my documentation on the Tomcat Wiki
at:
http://nagoya.apache.org/wiki/apachewiki.cgi?TomcatWeb

These are sort of bare-bones documents about some ways
to connect Tomcat/Apache on Linux, Tomcat/Apache on
Windows/2000, and Tomcat/IIS 5 on Windows/2000.
Hopefully this will be of some use.
How does one contribute? I know Wiki is supposed to be free for everyone to 
edit, but I've never done it. Any quick pointers, links,...?

I have managed to setup mod_jk2 over UNIX socket.

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat FAQs on Wiki

2003-12-02 Thread Nikola Milutinovic
Tim Funk wrote:

Google for Wiki. Most of the links are great and you'll learn more about 
Wiki than you wish to know.

The best page about Wikis is this one: http://c2.com/cgi/wiki
I still haven't figured out how to publish to Wiki and frankly, I don't have the 
time. I'm up to my ass in crocodiles. After having setup Linux + PostgreSQL + 
Apache + Tomcat, I have to move the server into the open Internet.

I can write the brief article on setting it up tot he list. Would someone post 
it to WiKi?

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat FAQs on Wiki - mod_jk2 howto

2003-12-02 Thread Nikola Milutinovic
Tim Funk wrote:

Writing anything like that for the list is a good thing since we can 
always link to it in the archives ;)
Here goes.

STEP 1
--
Build "mod_jk2.so" and "jkjni.so" - do whatever needs to be done :-)

STEP 2
--
Place mod_jk2.so and jkjni.so with other Apache modules. In case of Mandrake 
9.1, it was in /usr/lib/apache2-extramodules

STEP 3
--
Setup your Apache virtual host. Although you can run without it, I prefer going 
the "right way". In my case:

/etc/httpd/conf.d/75_mod_jk2.conf
-
#
# Sample Apache configuration file for mod_jk2.
# Include this in your httpd.conf.
#


LoadModule  jk2_module extramodules/mod_jk2.so



#
# Restrict access to JK status handler
#

Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from 192.168.61.110


/etc/httpd/2.0/conf/vhosts/External.ev.co.yu

ServerName  External.ev.co.yu
ServerAdmin [EMAIL PROTECTED]
DocumentRoot/home/www/public_html
ErrorLog/home/www/logs/error.log
CustomLog   /home/www/logs/access.log common

ScriptAlias /cgi-bin/ "/home/www/cgi-bin/"


AllowOverride FileInfo AuthConfig Limit Indexes
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec

Order allow,deny
Allow from all


Order deny,allow
Deny from all



AllowOverride None
Options FollowSymLinks
Order allow,deny
Allow from all


STEP 4
--
Setup virtual host on Tomcat.

/etc/tomcat/server.xml
--

  
  
  

  

STEP 5
--
Setup JK2 on Tomcat side.

/etc/tomcat4/jk2.properties
---
# Set the desired handler list
# handler.list=apr,request,channelJni
handler.list=apr,request,channelUnix
#
apr.NativeSo=/usr/lib/apache2-extramodules/jkjni.so
request.tomcatAuthentication=false

channelUnix.file=${jkHome}/work/tomcat.sock

STEP 6 !!!
--
Ensure that jkjni.so picks up "serverConf" value from environment! The easiest 
way for me was to edit /etc/tomcat/tomcat4.conf and add:

serverRoot=/etc/httpd/2.0
export serverRoot
If you're not using RPM version, just make sure that *that* variable is defined 
in the script starting tomcat. This is needed by jkjni.so, so it can locate 
workers2.properties. And if you're wondering, jkjni.so is needed to talk to UNIX 
domain socket. Tomcat can open it without using "handler apr" and jkjni.so, but 
refuses to communicate over it.

STEP 7
--
Setup your Apache side of JK2. Edit ${serverConf}/worker2.properties file. You 
must define socket channel, ajp13 worker and at least one URI mapping to your 
virtual host. Needless to say, VHost definitions on Tomcat and Apache must 
(should?) match.

/etc/httpd/2.0/conf/workers2.properties
---
[logger]
level=DEBUG
[config:]
debug=0
debugEnv=0
[uriMap:]
info=Maps the requests. Options: debug
debug=0
# Alternate file logger
[logger.file:0]
level=DEBUG
file=/var/log/httpd/mod_jk2.log
[workerEnv:]
info=Global server options
timing=1
debug=0
[channel.un:unixsock]
info=Main socket to Tomcat engine
file=/var/tomcat4/work/tomcat.sock
[status:]
info=Status worker, displays runtime informations
[ajp13:unixsock]
info=Default AJP 1.3 worker
channel=channel.un:unixsock
[uri:/jkstatus/*]
info=Display status information and checks the config file for changes.
group=status:
[uri:external.ev.co.yu/bill]
info=Consumers bill
group=ajp13:unixsock
STEP 8
--
Restart Tomcat and then Apache.

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Servlets with JDBC connectivity

2003-12-03 Thread Nikola Milutinovic
Peter Harrison wrote:
On Wed, 03 Dec 2003 16:18, Todd O'Bryan wrote:


How do people handle this elegantly? The requirements are: a single,
globally visible (within a webapp) database interface and the ability
to access multiple databases easily.


The first point is to use a singleton to set up the database connection - or 
more correctly the connection pool. This way you can request a connection and 
return it to the pool easily. Of course every time you use one you will have 
to use try-catch blocks. Sorry no way around that.
Both Tomcat and J2EE specification support javax.sql.DataSource objects over 
JNDI. That is how we handle it elegantly.

A DataSource object is specified by the administrator and created by the 
container. Container then deploys it under specified JNDI name. A servlet (or 
EJB) can then lookup this object and use it, something like this:

import java.sql.*;
import javax.sql.*;
import javax.naming.*;
InitialContext ic = new InitialContext();
DataSource ds = (DataSource)ic.lookup( "java:comp/env/jdbc/MyDataSource" );
Connection conn = ds.getConnection();
Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Auto start scripts

2003-12-03 Thread Nikola Milutinovic
Robin Rigby wrote:
Have very limited experience of Linux or Tomcat.  Not even really sure
if this is a Tomcat issue or a Linux issue.
Main question:  How do I run a Tomcat4 script from /etc/rc.d/init.d so
that Tomcat starts automatically?
Tomcat works fine when I run startup.sh as root.  However, common sense
and many passing references on the mailing list suggest that root is not
the best choice.  

- What user do people normally use?
- Should I create a user for the purpose?
- What attributes and permissions should it have?
- Is this related to the "tomcat" "tomcat" element in the default
tomcat-users.xml?
I'd sugest:

- download TC-4.1.24 RPMs and install them
- study it, see how it arranges files, permissions, etc...
- configure your own TC 4.1.29 accordingly
- or just (carefully) "paste" 4.1.29 over existing 4.1.24 RPM install
Setting up TC correctly or, even more, building your own RPMs can be very time 
consuming. The layout of 4.1.24 RPMs seams OK to me. There is a site, JPackage, 
I think, which has newer RPMs, but they have moved other packages from TC into 
separate ones (JavaMail, JDBC-ext,...), so getting it all together is not easy. 
Plus they have their own dependencies, which I couldn't provide on Mandrake.

Nixie.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat5 close to production?

2003-12-08 Thread Nikola Milutinovic
Philip Busby wrote:
Is there any word, or any place where I could check the status of Tomcat5 to
move to production?
My host would rather not go through with a Tomcat5 install until it comes
out of beta, but I like all of the new things in JSP2. Will Tomcat5 be going
production within a month or two or four or eight?
Tomcat 5.0.16 is STABLE version (read: non-beta, non-alpha = GOLD).

There will be bugs, those bugs will be removed in future releases, but such is 
life. For the time being, if Tomcat is your choice of production environment, 
then 5.0.16 is a production version.

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Apache Tomcat jk2... is it possible?

2003-12-11 Thread Nikola Milutinovic
Federico Fernandez Cruz wrote:

Hi all!

I am using tomcat 5 and I want to do some integration work with Apache 
and mod_jk2.

Is there a direct way to map a whole web application in apache? It works 
but I have to write a lot of  [uri:*] commands in mi 
workers2.properties file.
What do you mean by "whole web application"?

That URI mapping IS mapping one whole web-app.

I am planning to do some work with Apache SSL. Will I be able to read 
all those SSL variables from Tomcat?
You should be able to access client certificate via HttpRequest object.

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: google yourself

2003-12-11 Thread Nikola Milutinovic
Ostad, James wrote:

have you googled yourself at goole.com?
I don't know how they get all of our listserv communications.
Any one knows how they do that?
There is a web archive of this list.

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Apache Tomcat jk2... is it possible?

2003-12-11 Thread Nikola Milutinovic
Federico Fernandez Cruz wrote:

By "whole web application" I mean the entire application... well...

I have a context inside Tomcat called UserMan. I want to map an Apache 
URL to this application...

In my workers2.properties I put these lines...

[uri:/UserMan]
info=Example webapp in the default context.
context=/UserMan
debug=0
This should suffice, although you haven't specified a worker for this context.

[uri:/UserMan/*]
info=Extension mapping
But my JSPs redirect to /UserMan/nav/ and I get errors about resource 
not available...  then I have to put another lines

[uri:/UserMan/nav/*.jsp]
info=Extension mapping
I think that this method is  error prone so that was my question. How to 
map the whole web application?
Maybe I am doing something wrong.. (sure!)
Here is mine (although I haven't tried accessing in subdir):

[logger]
level=DEBUG
[config:]
debug=0
debugEnv=0
[uriMap:]
info=Maps the requests. Options: debug
debug=0
# Alternate file logger
[logger.file:0]
level=DEBUG
file=/var/log/httpd/mod_jk2.log
[workerEnv:]
info=Global server options
timing=1
debug=0
[channel.un:unixsock]
info=Main socket to Tomcat engine
file=/var/tomcat4/work/tomcat.sock
[status:]
info=Status worker, displays runtime informations
[ajp13:unixsock]
info=Default AJP 1.3 worker
channel=channel.un:unixsock
[uri:/jkstatus/*]
info=Display status information and checks the config file for changes.
group=status:
[uri:www.elektrovojvodina.co.yu/racun]
info=Consumer bill
group=ajp13:unixsock
context=/racun
Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Apache SSL variables -> Imposible!

2003-12-12 Thread Nikola Milutinovic
Federico Fernandez Cruz wrote:

I have connected Apache and Tomcat (5) using JK2. The communication is 
right, but I can't access any apache SSL variables!
No matter what I do. It's impossible!

I have read several docs and all I get is frustration! :-(

Can someone tell me how to do it, pleease?
Access your HttpServletRequest object and look for X509Certificates. I'm not 
sure what is the proper name, but it should be in the servlet specification.

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: javax.mail.SendFailedException: Sending failed

2003-12-12 Thread Nikola Milutinovic
Ashwin Kutty wrote:

Was wondering if someone could help me out here.  I am trying a product
out called DSPACE which gives the following error in catalina.out
2003-12-12 08:53:34,957 INFO  org.dspace.app.webui.servlet.RegisterServlet
@ anonymous:session_id=B3D285B12E90E6BCCAF3E4097712D59B:error_emai$
javax.mail.SendFailedException: Sending failed;
  nested exception is:
javax.mail.SendFailedException: Invalid Addresses;
  nested exception is:
javax.mail.SendFailedException: 550 5.7.1 <[EMAIL PROTECTED]>...
Relaying denied
I think this is indicative. Your SMTP server is not allowing relaying. Or at 
least it is seeing your action as relaying.

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Need some Tomcat Configuration help badly

2003-12-14 Thread Nikola Milutinovic
> >> BTW, there is a bug with Tomcat which will cause it to run out of
> >> memory after a number of restarts.  You will probably run into this
> >> with 30 students uploading new classes.  You will also want to make
> >> sure that the fork attribute for the JspServlet is set to true as well
> >> as compiling JSPs will leak memory unless the compiling process is
> >> forked.
> >
> > Is this true only for Tomcat4 or for version 5 as well?
>
> True for both.

It strikes me odd, I've been hearing about "memory leak while recompiling
JSPs" for a couple of years. Is it really there and is it going to be
removed in the near future? I recall that being attributed to "javac" memory
leaks. That's why they advise to pre-compile JSP for production environment.
I cannot fathom how can it be:

a) so consistent
b) not dependant on JDK version

Any insight?

Nix.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Need some Tomcat Configuration help badly

2003-12-17 Thread Nikola Milutinovic
Dick Steflik wrote:

I had the same question. In all of the years I've worked with Java I've 
always thought  it was free of memory leaks. If you use a different 
compiler does the problem go away. Is that how people like JRun 
(Macromedia)  and WebSphere (IBM) avoid the problem?
It could be. Someone here mentioned using Jikes for Tomcat as a workaround 
(solution). I know that Jikes has bugs, here and there, but it can be made to 
work and it comes with Tomcat. Considering that "javac" has an all present bug 
(this memory leak), Jikes is better. I guess commercial solutions use their own 
implementations or fork off to get rid of memory leak.

Why does JavaC have that memory leak?

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: DOES_ANYONE_HAVE_CONFIGURED_MOD_JK2+APACHE+TOMCAT_USING_unix_channel

2003-12-30 Thread Nikola Milutinovic
Ingmars Rubenis wrote:
Hello All!

I am using standart Red Hat 9.0 apache http server 2.40
Tomcat 4.2.24
Mod_jk2... .rpm
RedHat 9.0 - ugh!

I have not tried to install it from source.
Do try.

I have tried all kind of mod_jk2 rpms, but still I get error:
INFO: APR not loaded, disabling jni components: java.io.IOException:
/usr/lib/httpd/modules/jkjni.so: /usr/lib/httpd/modules/jkjni.so: undefined
symbol: apr_md5_final
Looks like jkjni.so (or should I say, dynamic loader) cannot load "libapr.so". 
Checkout your dynamic library settings. It could also be in "libaprutil.so", not 
sure.

Does anybody have installed mod_jk2 rpm successfully as connector using unix
socket, please write back to list.
I've built mod_jk2 v2.0.2 from source on Mandrake 9.1 with Apache 2.0.48 and 
Tomcat 4.1.24. I'm using UNIX socket. Search the archives, I've posted my config 
files two or three weeks ago. There are a couple of gotcha-s.

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: jk2_init() Can't find child xxxx in none of the 1024 scoreboard slots

2004-01-04 Thread Nikola Milutinovic
Subject: Fw: jk2_init() Can't find child  in none of the 1024 scoreboard
slots


> Hi Peter,
>
> I'm using Apache 2.0.48, Tomcat 4.1.29, Jakarta-Tomcat-Connectors 4.1.29.
> I'm hoping the problem it is not the mod_jk2.so module as I went to great
> trouble in order to generate it on my RH9 Linux Kernal Version 2.4.20-8
> platform. I had to recompile apr, apr-util code and only "ant native"
> managed to build mod_jk2.so

> ### error.log file in Apache2.0.48 log
> ###
> [Sat Jan 03 23:01:48 2004] [error] jk2_init() Can't find child 7398 in
none
> of the 256 scoreboard slots
> [Sat Jan 03 23:01:48 2004] [error] jk2_init() Can't find child 7399 in
none
> of the 256 scoreboard slots
> [Sat Jan 03 23:01:48 2004] [error] jk2_init() Can't find child 7400 in
none
> of the 256 scoreboard slots
> [Sat Jan 03 23:01:48 2004] [error] jk2_init() Can't find child 7402 in
none
> of the 256 scoreboard slots
> [Sat Jan 03 23:01:48 2004] [notice] Apache/2.0.48 (Unix) mod_jk2/2.0.3-dev
> configured -- resuming normal operations

These are mostly harmless messages. The only way I found to avoid them was a
rather long one.

In order for Apache + mod_jk2 to find neighbour children is to configure
shared memory for mod_jk2. And it must be configured on both Apache and
Tomcat side. If you drop Tomcat side, then it will complain. :-)

For shared memory in Coyote-jk2 handler, you need to build jkjni.so (you may
screem in agony :-)). JK-JNI gives you "Java Native Interface"
functionality, which includes UNIX SHM and UNIX file sockets.

In order for jkjni.so to function correctly, it must have an environment
variable "serverRoot" defined on the process level, or it will not be able
to locate workers2.properties (it is in Apache's config dir). To be honest,
jkjni.so was designed for another purpose - running Tomcat from within
Apache process (in-process). This environment variable is provided by
Apache. All of us who wish to run a standalone Tomcat and still use jkjni.so
must emulate this. The only way I found to do that was to place

export serverRoot=/etc/httpd/2.0

in Tomcat's config/startup scripts. Like I said - it is long one.

> [Sun Jan 04 12:08:37 2004] [notice] caught SIGTERM, shutting down

Normal shutdown, I'd say.

> ### jk2.prorperties ###
> ## THIS FILE MAY BE OVERRIDEN AT RUNTIME. MAKE SURE TOMCAT IS STOPED
> ## WHEN YOU EDIT THE FILE.
> ## COMMENTS WILL BE _LOST_
> ## DOCUMENTATION OF THE FORMAT IN JkMain javadoc.
> # Set the desired handler list
> # handler.list=apr,request,channelJni

Why are you using "channelJni"?

You could use "apr,request,channelSocket" and drop JNI completely. Take look
at Tomcats docs and JK2 section.

> ## workers.properties 
> worker.list=ajp13
> worker.ajp13.port=8009
> worker.ajp13.host=localhost
> worker.ajp13.type=ajp13
> 

Why are you using "workers.properties"? It is for mod_jk. For mod_jk2 you
must use "worker2.properties".

Consult docs at http://jakarta.apache.org -> Tomcat -> Documentation.

Nix.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Threaded servlets okay in a compliant container?

2004-01-05 Thread Nikola Milutinovic
Ralph Einfeldt wrote:

- Nobody (the spec included) prevents you from creating threads
  You just have to follow some rules.
Yes, but it should make you think twice before indulging in something like that. 
It also might prevent re-inventing the wheel.

- Besides creating threads I prefer to use servlets/jsp's
  that are triggered from the outside to do regular jobs.
  (Using cron and wget to trigger the action)
  This way you don't have to deal with threads and the job 
  runs inside the servlet environment.
Why would a cron triggered job benefit from Servlet container environment? 
Servlets are mainly for HTTP client/server interaction. Cron jobs are for no 
interaction.

I could imagine (and approve) a cron job firing JMS message to be caught by a 
Message EJB, but a Servlet...?

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Threaded servlets okay in a compliant container?

2004-01-05 Thread Nikola Milutinovic
Ralph Einfeldt wrote:

The cronjob is requesting an url with wget
and triggers tis way a servlet.
I understood the mechanism being used, I did not understand the benefit.

That's easy and sufficient to do regular jobs
like sending newsletters, cleaning up files, 
that don't require any interaction)
Why is it easier to do those things from a Servlet, than a regular shell script?

If you want to trigger those actions remotely, I'd advise you to look at Secure 
SHell products, like OpenSSH.

How did you provide authentication and security for those Servlet triggered 
jobs? HTTP user/pass? HTTPS user/pass? With SSH you're as safe as with HTTPS, 
with less fuss - just create private keys and make them trusted on the target 
remote account (in OpenSSH you'd paste "id_rsa.pub" and "id_dsa.pub" from client 
account to ~/.ssh/authorized_keys2 of target account).

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Threaded servlets okay in a compliant container?

2004-01-05 Thread Nikola Milutinovic
Ralph Einfeldt wrote:

The servlet has access to all information inside the container/context 
that may be needed to do the job. For an external job this can be much 
harder. (Iterate over all sessions to do something with them, access
attributes with application scope, access attributes from server.xml/ 
web.xml) It's also easier to protect resources from concurrent 
access (to synchronize them if nessesary).
Aha, I get it - local Tomcat clean-up. Hmm, OK, I guess it makes sense.

The actions are triggered locally, the access to the servlet is 
restricted to local hosts.
If the server is a sealed one, with only minimal number of user accounts you 
should be pretty safe. Although you could implement a simple user/pass 
authentication, "wget" supports it. Just to make sure that only authorized user 
account can fire a request from the localhost.

Nix.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  1   2   3   4   5   6   >