JK2 and Apache1.3 win

2002-10-18 Thread Vjeran Marcinko
Hi.
I'm having problem instaling jk2 connector on my Apache 1.3 win...
I downloaded 'mod_jk2-1.3.27.dll' and used basic configuration, that meaning 
'workers2.properties' as follows :

[shm]
file=${serverRoot}/logs/shm.file
size=1048576
# 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
[uri:/examples/*]
worker=ajp13:localhost:8009

I didn't chage anything in jk2.properties file on Tomcat since it starts default 
channelSocket on port 8009.
And now I get following errors in jk2.log during initialization : 

[Wed Oct 16 13:24:02 2002]  (error) [jk_shm.c (358)]: shm.create(): error mmapping 
c:/program files/apache group/apache/logs/shm.file
[Wed Oct 16 13:24:02 2002]  (error) [jk_shm.c (358)]: shm.create(): error mmapping 
c:/program files/apache group/apache/logs/shm.file
[Wed Oct 16 13:24:02 2002]  (error) [jk_shm.c (358)]: shm.create(): error mmapping 
c:/program files/apache group/apache/logs/shm.file
[Wed Oct 16 13:24:02 2002]  (error) [jk_shm.c (358)]: shm.create(): error mmapping 
c:/program files/apache group/apache/logs/shm.file
[Wed Oct 16 13:24:02 2002]  (error) [jk_shm.c (358)]: shm.create(): error mmapping 
c:/program files/apache group/apache/logs/shm.file

And following during some request on /examples web app:
[Wed Oct 16 13:25:03 2002]  (error) [jk_endpoint.c (90)]: workerEnv.init() create slot 
epStat.0 failed
[Wed Oct 16 13:25:03 2002]  (error) [mod_jk2.c (427)]: mod_jk.handler() Error 
connecting to tomcat 21000

Can you tell me something more, because this verbosity above doesn't help me much...

regards,
Vjeran





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




Native parts of connectors ?

2002-09-19 Thread Vjeran Marcinko

Hi.
Can someone point me to place where one can find compiled native parts of Tomcat 
connectors for Linux/Win ? I'm mostly intrerested in jk and jk2 connector. I noticed 
jakarta-tomcat-connectors folder, but it has been empty for months.

Thanx,
Vjeran



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




POSTing to Tomcat 4.0.x

2002-05-21 Thread Vjeran Marcinko

Hi people.
I asked similar question ,but since there was no reply I'm gonna try again -
Has anyone successufuly executed POST to Tomcat 4.0.x from some java app using 
URLConnection class ?
I would really like to see this piece of code, since I used some code that I found on 
the web and it worked with Tomcat3.2.x, but not with 4.0.x version of Tomcat

Thanx,
Vjeran



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




Tomcat 4.0.x bug with POST parameters ?

2002-05-20 Thread Vjeran Marcinko

Hi.
Tomcat 4.0.x versions don't acquire POST parameters sent by my applet using 
java.net.URLConnection class, although Tomcat 3.2.x does everything perfectly. When I 
want to fetch parameters using request.getParameterNames() (or any other method for 
acquiring parameters), it provides me with empty enumeration. 
I use following code for posting data ...BTW, string strPOST has form like :
param1=value1param2=value2param3=

// opening connection to servlet
   URL urlServlet = new URL(strServletURL);
   URLConnection conServlet = urlServlet.openConnection();
   conServlet.setDoOutput(true);
   conServlet.setDoInput(true);
   conServlet.setUseCaches(false);
   conServlet.setRequestProperty(Content-Type, application/x-www-form-urlencoded);
   conServlet.setRequestProperty(Content-Length,   + strPOST.length());
   OutputStream os = conServlet.getOutputStream();
   os.write(strPOST.getBytes());
   os.flush();
   os.close();

   // receiving data from InputStream
   .. conServlet.getInputStream()); .

What am I doing wrong ? Everything worked with previous versions of Tomcat...

Regards,
Vjeran



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




Bizzare usage of servlets. And problems ...

2002-05-15 Thread Vjeran Marcinko

Hi there.
Don't ask me why, but I created a servlet that never exits, thus being able to send 
data to constantly opened response's output stream (this is possible using 
chunked-encoding response). Yes, i know that HTTP protocol isn't meant to be used for 
persistent connection, but believe me, my project requires this.

Anyway, I developed this servlet using Tomcat in standalone mode, and everything works 
great. But since I have to integrate it with Apache, I switched from HttpConnector to 
Ajp13 connector, and things don't work anymore. Some bytes don't reach my client 
application. Then I tried doing integration with Warp connector, and this time it 
doesn't pass any bytes through to client...
Obviously Apache+connector_ module don't pass bytes back to client in a way that 
HttpConnector does properly, so can anyone tell me where is the problem, and can it be 
solved somehow ?
I guess there is maybe some buffering going on inside connector module waiting for 
response's output stream to be closed (which never happens in my case), or some 
timeout, or something else ...?!

Thanx,
Vjeran



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




Re: Bizzare usage of servlets. And problems ...

2002-05-15 Thread Vjeran Marcinko


- Original Message - 
From: Shimon Crown [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, May 15, 2002 10:25 AM
Subject: Re: Bizzare usage of servlets. And problems ...


 A couple of years back (or maybe even more ) Just van Broeke published
 article in which he described what he called pushlets that did this sort
 of thing. At the time I was very interested in this. However it seems that
 his mechanism refused to work with Apache and he devised an alternative
 pullet scheme that used polling to do this sort of thing. Apparently there
 are very good reasons for this not working (or rather it may work but not
 for Apache and if you put a proxy in the way then you really mess things
 up). At about this stage I lost interest in it and wrote my own polling
 scheme for getting the data I required. In any case if you go to
 www.pushlets.com you can see his efforts.

Well, I would be glad to see it working just with Apache+Tomcat combination, and not 
worrying yet about proxies. I tried my 'push' servlet with Apache + Resin combination, 
and it works (with some minor bugs though), but I'm looking for free solution, thus 
Tomcat being my choice. Since it works with Apache+Resin, I doubt that Apache is 
messing up my datapath, thus Tomcat's connector is probably doing it.

Cheers,
Vjeran



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




Tomcat and Apache load-balancing ?

2002-02-13 Thread Vjeran Marcinko

Hi people of good will.
I am currently working on load-balance-enabling
my web-app, and I noticed that session balancing
is solved in Tomcat in such way that Apache's module
redirects request to the Tomcat instance which created session.
Since I'm only reading about one Apache and multiple
Tomcat instances, I was wondering does this whole balancing
solution also work with balanced Apache system.
In other words, I need solution that works with balanced
Apache and balanced Tomcat system

Thanx,
Vjeran



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Tomcat and Apache load-balancing ?

2002-02-13 Thread Vjeran Marcinko


- Original Message - 
From: [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, February 13, 2002 9:28 PM
Subject: Re: Tomcat and Apache load-balancing ?


 On Wed, Feb 13, 2002 at 01:00:31PM +0100, Vjeran Marcinko wrote:
 
 It should work as long as the load-balancer for the apache's has session
 afinity. That is, if the load-balancer can spot out going sessions and
 direct any request with that session id to the apache that created it.
 
 Each tomcat will only be able to be served by a single apache.

But I thought I've read somewhere that mod_jk is responsible for
determining which Tomcat instance is to be picked based upon request's
session ID ? Or, was I wrong ?

-Vjeran



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Load balancing app context ?

2002-02-10 Thread Vjeran Marcinko


- Original Message - 
From: Jose Solorzano [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Sunday, February 10, 2002 2:32 PM
Subject: RE: Load balancing app context ?


 
 What kind of state do you store in those variables?
 
 With multiple VMs, you can store user/session state in cookies, in a shared
 database or you
 can use an application server.
 
 --Jose

Well, I know it sounds weird, but I'm storing servlet's output stream
in those variables. And than I block this servlet, thus it won't be able to
close its output stream, which is the thing that happens when servlet
thread goes out of its service() method.
This way I have persistent output stream to client. And then all future
HTTP requests can fetch this stored output stream and send some data
back to client. But since I have multiple JVMs, this stored variable
isn't unique anymore, because there are as many variables as there are
JVMs, and each of them has its own servlet instance, right ?
Thing works perfectly with one servlet engine instance, but I guess it
won't do in load-balancing case...
I didn't consider session till now, since client is applet and not browser,
and I'm not sure how good is applet's URLConnection doing with cookies ?

-Vjeran





--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Load balancing app context ?

2002-02-10 Thread Vjeran Marcinko


- Original Message - 
From: [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Sunday, February 10, 2002 10:35 PM
Subject: Re: Load balancing app context ?


 What you describe is what TC4.0.2 + mod_jk + apache does. You assign a unique
 jvmRoute to each of you tomcats and mod_jk does the rest. 
 
 Also note that any attributes assigned to a session can only be
 available in one VM.

OK, but mod_jk will take care that client is redirect to exact JVM where
the right session object resides, right ?
But is this whole web-app context thing funny ? I mean, let's say you
are developer who read JSP user guide, and you learnt that you should
use 'application' (ServletContext) object if you want to store data available
to all servlet in that web-app ...And let's say you spent few months developing
some web-app based on that assumption, and suddenly, suprise, it
doesn't work in load-balancing case, which is normally used for every
serious level trafic site ?

Thanx,
Vjeran



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Load balancing app context ?

2002-02-09 Thread Vjeran Marcinko

Hi.
Just a short question.
I have a web-app that has to have some global
sharing context for my web-app in Tomcat's load
balancing case (multiple JVMs).
Till now, I simply was defining all shared variables
outside service() method, so different HTTP request
can have access to these instance variables (usually
initialized in init() method). 
So my short question is :
Will this work in load balancing case, when I have 
multiple JVMs ? I'm afraid each JVM will have its
own instance of this servlet, thus having each own
instance of this servlet's instance variable, thus data
stored in this variable during one HTTP request cannot
be accessible to other HTTP request, because they are
running on different JVMs..Right ?

Thanx,
Vjeran




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]