Re: tomcat with jcaptcha

2008-07-07 Thread Mark Thomas

WILLIAMer wrote:

Sorry i forget to write down the environment.
The application used by tomcat version 5.5 and LINUX.


There are currently 27 different 5.5.x versions. Knowing which one you are 
using would help.


You still haven't told us how you made eCom the 'default' webapp.

Mark



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat 6 and docBase problem

2008-07-07 Thread Angelo Chen

hi,

Thanks for the response, i did not set 'allowLinking', but the app still
runs ok, the only problem is the error in  Error starting static Resources.
I updated context.xml to be like this :

?xml version=1.0 encoding=UTF-8?
Context path=/  allowLinking=true
/Context

the error still there, forgive my ignorance, what's the use of Document base
really? Thanks,

Angelo



Caldarale, Charles R wrote:
 
 From: Angelo Chen [mailto:[EMAIL PROTECTED]
 Subject: tomcat 6 and docBase problem

 java.lang.IllegalArgumentException: Document base
 /usr/local/apache-tomcat-6.0.16/webapps/abc does not
 exist or is not a readable directory at
 org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:141)
 
 Look at the allowLinking attribute:
 http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
 
  - Chuck
 
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you
 received this in error, please contact the sender and delete the e-mail
 and its attachments from all computers.
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/tomcat-6-and-docBase-problem-tp18309063p18310835.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat with jcaptcha

2008-07-07 Thread WILLIAMer

I trace the jcaptcha code.
Jcaptcha set a parameter name captchaId in session when this servlet
use(when link to login.page).
And when user submit the form.Its will get captchaId from session.
Then compare the two captchaId.

So i system out the captchaId, and see whats wrong.
when i link http://myDomain/eCom/Login.jsp, the first captchaId i can see
in tomcat console.
Then i submit. Its work and I see the second captchaId is the same with
first.

But another http://myDomain/Login.jsp, the two captcahId are different.
I think that session cause the jcaptcha not work.

How could i work out this?
And i still let the dir eCom with my root dir.
Because i must let the url like http://myDomain/;.

-- 
View this message in context: 
http://www.nabble.com/tomcat-with-jcaptcha-tp18309636p18310916.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat with jcaptcha

2008-07-07 Thread WILLIAMer

Sorry my english is poor.

I use the version 5.5.20.
and i add one line like under let the eCom becomes root in
tomcat/conf/server.xml
Context path= docBase=eCom debug=0/ before tag /Host


markt-2 wrote:
 
 WILLIAMer wrote:
 Sorry i forget to write down the environment.
 The application used by tomcat version 5.5 and LINUX.
 
 There are currently 27 different 5.5.x versions. Knowing which one you are 
 using would help.
 
 You still haven't told us how you made eCom the 'default' webapp.
 
 Mark
 
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/tomcat-with-jcaptcha-tp18309636p18311025.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Graceful shutdown

2008-07-07 Thread Antonio Parolini

Hi, Ben

 1) Define a status worker [1] and one (or more) workers.

Interresting.  Will this status worker thing work -without- a webserver as
Frontend (like Apache) ?

I'm looking now into the use of JMX to solve this issue, by  trying to block
new HTTP requests using the /manager/jmxproxy/ before shuting down the
server.

-antonio





-- 
View this message in context: 
http://www.nabble.com/Graceful-shutdown-tp18274673p18311209.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Configuring DataSources using jsp: reload context.xml?

2008-07-07 Thread Jonas Wagner
Good morning,

I'm still trying to figure out how I can cause tomcat to re-read JNDI
resources. Here is one way I found out earlier:

 After further tests I found out that the server will reload JNDI data
 sources if all the following steps are performed:
 1. Change the configuration
 2. Execute _any_ servlet or jsp using the eclipse command Run As... 
Run on Server
 3. Restart Tomcat

As you can see, this only works from within Eclipse, and I have no clue
how I could cause a JNDI reload in a production environment. In the
meantime, I tried some further things, e.g. updating the
last-modified-date of web.xml to cause a redeploy. I also did some more
googling, but to no avail.

Does anybody know a way to cause Tomcat to rebuild the JNDI context of
an application? Or is there a better way to dynamically configure Data
Sources? Any ideas are welcome.

In the worst case I'd need to fall back on a custom config file and
database connections using DriverManager, but this would destroy all
benefits of pooled connections etc :-(

Thanks,
Jonas

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat with jcaptcha

2008-07-07 Thread WILLIAMer

I think i find why the sessions are different.

The Login.jsp i put in eCom/Admin/.
for example:
link http://myDomain/;, the session is A,
link http://myDomain/Admin/;, the session is B,
link http://myDomain/eCom/Admin/, ths session is B,
link http://myDomain/eCom/;, the session is B,

why i set the the eCom become the root dir,
but these dirs under eCom cant get the same session when use root path.

Is there any approach to setting?
 
-- 
View this message in context: 
http://www.nabble.com/tomcat-with-jcaptcha-tp18309636p18311821.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: nsapi_redirector.so file

2008-07-07 Thread sandeep gelli
Hi Rainer,

Finally got it. I have changed my page redirection from response.redirect()
to requestDispatcher.forward() and it worked. This was actually a trail and
error that i did, any logic behind this?

Thanks
Sandeep


On 7/5/08, Rainer Jung [EMAIL PROTECTED] wrote:

 sandeep gelli schrieb:

 Hi Rainer,

 Any advise on this?


 The log looks fine. All requests, that are processed by the plugin are
 forwarded to the backend and return a result to the client. Those requests
 are:

 10.111.33.24 port=443 uri=/XXX/balance_transfer/form_bt0.jsp
 10.111.33.24 port=443 uri=/XXX/css/font.css
 10.111.33.24 port=443 uri=/XXX/js/formvalidation.js
 10.111.33.24 port=443 uri=/XXX/js/pageprogress.js
 10.111.33.24 port=443
 uri=/XXX/balance_transfer/js/custom_formvalidation.js
 10.111.33.24 port=443 uri=/XXX/balance_transfer/images/hd_bt.jpg
 10.111.33.24 port=443 uri=/XXX/balance_transfer/images/spacer.gif
 10.111.33.24 port=443 uri=/XXX/images/spinner.gif
 10.111.33.24 port=443 uri=/XXX/balance_transfer/form_controller

 Only the last one doesn't produce a full response page. Instead your
 application returns a redirect to:

 https://10.111.33.24/XXX/balance_transfer/form_bt1.jsp

 Is that the same server, port and protocol, that you use when you call the
 start page with the browser? I guess the redirect is using the wrong
 server/port/protocol and that's why the request for

 https://10.111.33.24/XXX/balance_transfer/form_bt1.jsp

 doesn't reach the plugin.

 Regards,

 Rainer

 Thanks
 Sandeep

 On Fri, Jul 4, 2008 at 9:50 AM, sandeep gelli [EMAIL PROTECTED]
 wrote:

 Hi Rainer,

 Attached is the nsapi.log, including the initialization phase. All my
 config files in the target system are in UNIX format.

 Thanks
 Sandeep


 On 7/3/08, Rainer Jung [EMAIL PROTECTED] wrote:

 sandeep gelli wrote:

 Hi Rainer,

 Below is the URL from which i have downloaded the 64-bit
 nsapi_redirector.so
 file. When i use this file


 http://apache.oss.eznetsols.org/tomcat/tomcat-connectors/jk/binaries/solaris/jk-1.2.26/sparc/

 I receive the following error message when i use this file.

 Sun ONE Web Server 6.1 B08/22/2003 12:37
 [https-online-forms]: failure: CORE3170: Configuration initialization
 failed: Error running init function load-modules: dlopen of
 /usr/src/nsapi/lib/nsapi_redirector.so failed (ld.so.1: webservd:
 fatal:
 /usr/src/nsapi/lib/nsapi_redirector.so: wrong ELF class: ELFCLASS64)
 [https-online-forms]: failure: server initialization failed

 So for compiling the src, i used gcc 3.3 version, which gave me a 250kb
 file(which doesnt seems to be correct).My sun one webserver is running
 on
 32-bit mode

 When i use the 32-bit so file, the server successfully starts up, and i
 can

 I assume we are now talking about the file



 http://apache.oss.eznetsols.org/tomcat/tomcat-connectors/jk/binaries/solaris/jk-1.2.26/sparc/nsapi_redirector-1.2.26-sjsws6.1sp11.so

 and not your own compilation?

 Let's completely forget about the 64 Bit file. That can't work.

 see the title page. When i submit the page, i can see the logs in the

 tomcat
 and tomcat successfully responding to the request. But, the webserver
 is
 unable to get the response from the tomcat. The 404 status is from the
 webserver.

 OK, since you already increased the log level of the plugin to debig:
 what
 are the contents of

 /usr/src/nsapi/logs/nsapi.log

 including the startup phase and the first request?

 Attached are my config files.

 Just to make sure: all config files were in DOS format. Make sure, that
 they are in Unix format on the target system.

 Your config can be optimized, but should not be the source of basic
 trouble.


 Thanks
 Sandeep

 Regards,

 Rainer

 On 7/3/08, Rainer Jung [EMAIL PROTECTED] wrote:

 As a first step, answering the questions in my previous mail would be
 helpful. As a secodn step, showing your configuration. Third: what do
 you
 mean by page not found? Is it a browser generated error, e.g.
 because
 the
 web server crashes and the browqser doesn't get an answer, or do your
 get a
 reply from the web server with status code 404, or maybe from Tomcat?

 Regards,

 Rainer

 sandeep gelli wrote:

 Hi Rainer,

 Thanks for the prompt response. Let me explain my scenario. I am
 trying
 to
 redirect the requests from sun webserver to tomcat. All worked fine
 with
 my
 windows pc(32-bit) and when trying to deploy the same in my solaris
 system,
 i am able to get the first page. After submitting the first page, i
 am
 getting the page not found error.

 When checked in the nsapi.log, i dont see any errors.So, i thought it
 could
 be because of the nsapi_redirector.so, which is the only change made
 transferring the application from windows to unix.

 Any advise on this would be of great help to me, as i am struggling
 with
 this issue from the last two weeks.

 Thanks  Rgds
 Sandeep Gelli


 On 7/3/08, Rainer Jung [EMAIL PROTECTED] wrote:

 Hi Sandeep,

 sandeep gelli schrieb:

 Hi,

 Can anyone help me providing 

Re: Tomcat bottleneck on InternalInputBuffer.parseRequestLine

2008-07-07 Thread Christophe Fondacci

Hi Clovis,

Thanks for your answers.

Open files on our production servers are 1024.
Here is the complete output of ulimit -a :
core file size  (blocks, -c) 0
data seg size   (kbytes, -d) unlimited
max nice(-e) 0
file size   (blocks, -f) unlimited
pending signals (-i) 36352
max locked memory   (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files  (-n) 1024
pipe size(512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
max rt priority (-r) 0
stack size  (kbytes, -s) 8192
cpu time   (seconds, -t) unlimited
max user processes  (-u) 36352
virtual memory  (kbytes, -v) unlimited
file locks  (-x) unlimited

Our production servers are connected with gigabit ethernet. However the 
servers used to reproduce the problems are only 100MBPS ethernet. The 
problem occurs in both test and production environment.


Our TCP keep alive settings are :
tcp_keepalive_time is 7200.
tcp_keepalive_intvl is 75
tcp_keepalive_probes is 9

I am monitoring threads call stack using jprofiler which displays the stack 
from my initial mail.


I've tried the suggestion from Filip Hanik (maxKeepAliveRequests=1 in my 
tomcat connector). But I was still able to reproduce the problem.


Then I switched the connector to the NIO connector (I was previously using 
the HTTP/1.1 default connector). I was not able to reproduce the problem 
after hours of test (it usually happens after 10-20 minutes of heavy load). 
Pushed the configuration change to one of our 4 productions servers to 
monitor the efficiency.


So far we didn't have any problem on the server with NIO connector after 5 
production days...


Christophe.




- Original Message - 
From: Clovis Wichoski [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Friday, July 04, 2008 4:17 AM
Subject: Re: Tomcat bottleneck on InternalInputBuffer.parseRequestLine


hi, Christophe,

well, i still dont find the reason about what is my problem, but some things
that help me to avoid the problem to occurs frequently,

i checked the limit for open files on linux, you can check yous with ulimit
-a, here i set to 4096,

how the machines are connected? its with gigabit ethernet?

please show us all your configuration on /proc/sys/net/ipv4/ the most
important is:

cat /proc/sys/net/ipv4/tcp_keepalive_time

but the what more impact on the performance was the right configuration of
JDBC driver on the pool, i use MaxDB and the driver have a problem, that
when getting new physical connections, the drive have a singleton pattern,
that we cant get connections in parallel (really parallel, with multi-core
processors) and when this parallel attempts to get connections occurs, we
get stuck threads, but note, maybe the problem isnt with driver, its just a
suspect, since i dont have a solution for this.
another suspect is that, for some strange reason the socket on java exists,
but the socket on linux (inode) dont exists anymore, and until java know
this, the system stucks, until timeout, but i cant figure or simulate this,
since its really a rare case, and for me just occurs only one time, and i
dont have a way to prove that, i'm try to check my problem using the follow
script:

#!/bin/bash
today=`date +%Y%m%d%H%M%S`
psId=`/opt/java/jdk1.6.0_06/bin/jps | grep Bootstrap |  cut -d' ' -f1`
/opt/java/jdk1.6.0_06/bin/jstack -l $psId 
/mnt/logs/stack/stack${today}.txt
echo --- pstack ---  /mnt/logs/stack/stack${today}.txt
pstack $psId  /mnt/logs/stack/stack${today}.txt
echo --- lsof ---  /mnt/logs/stack/stack${today}.txt
lsof  /mnt/logs/stack/stack${today}.txt
echo --- ls -l /proc/${psId}/fd/ ---  /mnt/logs/stack/stack${today}.txt
ls -l /proc/${psId}/fd/  /mnt/logs/stack/stack${today}.txt
echo stack do processo $psId gravado em /mnt/logs/stack/stack${today}.txt

when users reports a stuck, i run this script manually, ten times, then
compare outputs, IBM have a tool that you can use to read better the jstack
output, i dont remember the name right now, but tomorrow i will post the
link here.

lets see if we can share knowledge to win this fight, ;)

regards

Clóvis

On Tue, Jul 1, 2008 at 12:23 PM, Christophe Fondacci 
[EMAIL PROTECTED] wrote:


Hello all,

We have a problem with tomcat on our production server.
This problem may be related to the one listed here :
http://grokbase.com/profile/id:hNxqA0ZEdnD-6GYFRNs-iIkKEvF907FNWdczKYQ719Q

Here it is :
- We got 2 tomcat servers on 2 distinct machines.
- 1 server is our application (let's call it A for Application server)
- The other server is hosting solr (let's call it S for Solr server)
- All servers are Tomcat 6.0.14 running on jdk 1.6.0_02-b05 on Linux
(Fedora core 6)
- Server A performs http requests to server S by 2 ways :
A http get (using apache commons HttpClient) with URL like

Re: nsapi_redirector.so file

2008-07-07 Thread Rainer Jung

sandeep gelli wrote:

Hi Rainer,

Finally got it. I have changed my page redirection from response.redirect()
to requestDispatcher.forward() and it worked. This was actually a trail and


Thanks for letting us know.


error that i did, any logic behind this?


No, not really. Do you see the final request, i.e. the redirect request 
(the one for form_bt1.jsp) in the web server access log?


Do you get the same response, if you call the URL e.g. via the curl 
client (and also set the cookie)?


Is every redirect broken? I.e. do you have 301 or 302 status codes in 
your access log and the app works across those requests?


Maybe there is some interaction with the j2ee plugin defined in 
magnus.conf and the block


Object name=jsp092
...
/Object

in obj.conf.

Regards,

Rainer


On 7/5/08, Rainer Jung [EMAIL PROTECTED] wrote:

sandeep gelli schrieb:


Hi Rainer,

Any advise on this?


The log looks fine. All requests, that are processed by the plugin are
forwarded to the backend and return a result to the client. Those requests
are:

10.111.33.24 port=443 uri=/XXX/balance_transfer/form_bt0.jsp
10.111.33.24 port=443 uri=/XXX/css/font.css
10.111.33.24 port=443 uri=/XXX/js/formvalidation.js
10.111.33.24 port=443 uri=/XXX/js/pageprogress.js
10.111.33.24 port=443
uri=/XXX/balance_transfer/js/custom_formvalidation.js
10.111.33.24 port=443 uri=/XXX/balance_transfer/images/hd_bt.jpg
10.111.33.24 port=443 uri=/XXX/balance_transfer/images/spacer.gif
10.111.33.24 port=443 uri=/XXX/images/spinner.gif
10.111.33.24 port=443 uri=/XXX/balance_transfer/form_controller

Only the last one doesn't produce a full response page. Instead your
application returns a redirect to:

https://10.111.33.24/XXX/balance_transfer/form_bt1.jsp

Is that the same server, port and protocol, that you use when you call the
start page with the browser? I guess the redirect is using the wrong
server/port/protocol and that's why the request for

https://10.111.33.24/XXX/balance_transfer/form_bt1.jsp

doesn't reach the plugin.

Regards,

Rainer

Thanks

On 7/3/08, Rainer Jung [EMAIL PROTECTED] wrote:


sandeep gelli wrote:


see the title page. When i submit the page, i can see the logs in the


tomcat
and tomcat successfully responding to the request. But, the webserver
is
unable to get the response from the tomcat. The 404 status is from the
webserver.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat 6 and docBase problem

2008-07-07 Thread Caldarale, Charles R
 From: Angelo Chen [mailto:[EMAIL PROTECTED]
 Subject: RE: tomcat 6 and docBase problem

 I updated context.xml to be like this :
 ?xml version=1.0 encoding=UTF-8?
 Context path=/  allowLinking=true
 /Context

The above is flawed, regardless of which context.xml you're referring to.  In 
the first place, a path attribute of / is never correct; in the second, a 
path attribute is not allowed unless the Context element is in server.xml, 
where it never should be.

So what context.xml file did you update?  If it's the one in Tomcat's conf 
directory, you can leave the allowLinking in there and it will apply to all 
webapps, but the path attribute must be removed.  If you want allowLinking only 
for a specific webapp, place the Context element in META-INF/context.xml 
inside the webapp, but again remove the path attribute.

 what's the use of Document base really?

It tells Tomcat where the application is deployed.  In modern versions of 
Tomcat, it should only be used when the Context element is in 
conf/Catalina/[host]/[appName].xml and the directory or war file for the webapp 
is stored outside of the [host] appBase directory.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat with jcaptcha

2008-07-07 Thread Caldarale, Charles R
 From: WILLIAMer [mailto:[EMAIL PROTECTED]
 Subject: Re: tomcat with jcaptcha

 Sorry my english is poor.

Better than my Mandarin or Taiwanese.

 tomcat/conf/server.xml
 Context path= docBase=eCom debug=0/ before tag /Host

That is wrong, for a couple of reasons.  First, putting Context elements in 
server.xml is strongly discouraged, and exists only for compatibility with 
older versions of Tomcat.  The Context element should be in your webapp's 
META-INF/context.xml file, if it's needed at all.  Second, your configuration 
above creates a double deployment of your webapp, once as the default, and then 
again as eCom, since the webapp is located in the Host appBase directory.

To fix this, first get rid of the Context element - you don't need it.  Next, 
remove any existing ROOT directory (or ROOT.war file) in the Host appBase 
directory (named webapps, by default), and rename your eCom directory or war 
file to ROOT (case sensitive).  That is the proper way of specifying the 
default webapp.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat with jcaptcha

2008-07-07 Thread Johnny Kewl


- Original Message - 
From: WILLIAMer [EMAIL PROTECTED]

To: users@tomcat.apache.org
Sent: Monday, July 07, 2008 5:51 AM
Subject: tomcat with jcaptcha




Hi! all,
I have an application named eCom unnder the tomcat/webapps and using
jcatpcha with the login page.
I set the eCom becomes the root dir(path) with the server.xml.
So, http://myDomain/ will equal http://myDomain/eCom/.
And its seems ok and work with every page.

But there is an error when I try to login. The jcaptcha give me an
exception.
com.octo.captcha.service.CaptchaServiceException: Invalid ID, could not
validat
e unexisting or already validated captcha

So i try another login page with the http://myDomain/eCom/, but its work
fine.
In fact , the login page is the same.
I think http://myDomain/Login.jsp; and http://myDomain/eCom/Login.jsp; 
is

the same.
Because i set the dir eCom become my root dir.

I dont know how this error cause?

I try to google this exception , but no one likes me.


Ha ha... you nice guy difficult question ;)

Sessions dont share across webapps

It sounds like you making duplicate webapps in different contexts... ie 
eCom, ROOT

Session will *not* move across

Its easier to REDIRECT from ROOT to ecom/login.
Not have two webapps

If you *have to* try share sessions, then read about...
Connector port=8080   and the... emptySessionPath=true
This will make browser cookies come back to all webapp not a good 
thing... slow


Then read up on
Context  and the crossContext=true

This allows one to pass data between webapps... so you can call across from 
one webapp to another and get captcha ID...


This is all more complicated than being Robert Mugabe's psychiatrist ;) 
but google on this and you will learn...
If using Tomcat security... not possible to move authorization from one 
webapp to another


Also read up on singletons... ie sharing data in common/lib its another 
way to share data across webapps and probably the best way if combined 
with you make your own path-less / cookie and use that
So you can have one webapp and one servlet generating captcha images and get 
the ID... check text yourself.


The reason browser do not send back cookie information is that if they use a 
cookie path. like  /webapp1 and it will not come back to /webapp2

But cookies *can* be made pathless...

I got my own captch software so dont know Jcaptcha... but you should ask 
this question to the JCatcha guys... its a common problem and maybe they 
have the answer... they have probably done it already... possibly through 
dB/singleton/cross context/shared file ... you see its hard problem... many 
solutions.


You english is hard to understand but I thing the question is... I got 
one webapp with a servlet generating captcha images... for all my other 
webapps... how to I share the check text to do this I need to track a 
cookie across contexts... can JCaptcha do it?


 but one thing you cant do, is just duplicate a webapp in /admin /root 
/eCom and think that the security and session will work across them... 
it wont.


Its not so much about the way Tomcat works... its about the way *browsers 
work*


Good Luck...

ps: Think about this... this is the way we do captcha...

We generate many captcha images on disk *one time* the webapp picks one 
randomly say image_1500.gif and sends it... and the dB knows that image 
1500 is Check Me thats small enuf to put in all webapps and a dB is 
happy to work across webapps each webapp has its own session... and 5 
lines of code ;)


The whole captcha problem starts when a different webapp is doing the 
random selection... this is also very quick, captcha takes a long time to 
generate and your linux server can be headless... because captcha 
generation needs the Java UI to work ;)


---
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Some PHP files redirect?

2008-07-07 Thread logicalpat

I setup PHP to work with Tomcat according to 
http://nexus.zteo.com/2008/02/15/how-to-setup-php5-with-tomcat-5/ these
instructions  and it seems to work fine if I try to view a simple .php page.
However, I downloaded the Drupal CMS and tried to go to
http://localhost:8080/phptest/drupal/index.php and it tries to look up that
URL for a few seconds but it can't find it. Also, I'm not sure if this is
related but going to http://localhost:8080/phptest/drupal/ gives a 404,
shouldn't it automatically go to the index.php?

Thanks!
-- 
View this message in context: 
http://www.nabble.com/Some-PHP-files-redirect--tp18316109p18316109.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


Re: tomcat with jcaptcha

2008-07-07 Thread Johnny Kewl


- Original Message - 
From: Johnny Kewl [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, July 07, 2008 2:53 PM
Subject: Re: tomcat with jcaptcha




- Original Message - 
From: WILLIAMer [EMAIL PROTECTED]

To: users@tomcat.apache.org
Sent: Monday, July 07, 2008 5:51 AM
Subject: tomcat with jcaptcha




Hi! all,
I have an application named eCom unnder the tomcat/webapps and using
jcatpcha with the login page.
I set the eCom becomes the root dir(path) with the server.xml.
So, http://myDomain/ will equal http://myDomain/eCom/.
And its seems ok and work with every page.

But there is an error when I try to login. The jcaptcha give me an
exception.
com.octo.captcha.service.CaptchaServiceException: Invalid ID, could not
validat
e unexisting or already validated captcha

So i try another login page with the http://myDomain/eCom/, but its work
fine.
In fact , the login page is the same.
I think http://myDomain/Login.jsp; and http://myDomain/eCom/Login.jsp; 
is

the same.
Because i set the dir eCom become my root dir.

I dont know how this error cause?

I try to google this exception , but no one likes me.


Ha ha... you nice guy difficult question ;)

Sessions dont share across webapps

It sounds like you making duplicate webapps in different contexts... ie 
eCom, ROOT

Session will *not* move across

Its easier to REDIRECT from ROOT to ecom/login.
Not have two webapps

If you *have to* try share sessions, then read about...
Connector port=8080   and the... emptySessionPath=true
This will make browser cookies come back to all webapp not a good 
thing... slow


Then read up on
Context  and the crossContext=true

This allows one to pass data between webapps... so you can call across 
from one webapp to another and get captcha ID...


This is all more complicated than being Robert Mugabe's psychiatrist 
;) but google on this and you will learn...
If using Tomcat security... not possible to move authorization from one 
webapp to another


Actually ... I'm wrong here TC has a Single Sign On Valve...
So read about this as well...

Also read up on singletons... ie sharing data in common/lib its 
another way to share data across webapps and probably the best way if 
combined with you make your own path-less / cookie and use that
So you can have one webapp and one servlet generating captcha images and 
get the ID... check text yourself.


The reason browser do not send back cookie information is that if they use 
a cookie path. like  /webapp1 and it will not come back to /webapp2

But cookies *can* be made pathless...

I got my own captch software so dont know Jcaptcha... but you should ask 
this question to the JCatcha guys... its a common problem and maybe they 
have the answer... they have probably done it already... possibly through 
dB/singleton/cross context/shared file ... you see its hard problem... 
many solutions.


You english is hard to understand but I thing the question is... I 
got one webapp with a servlet generating captcha images... for all my 
other webapps... how to I share the check text to do this I need to 
track a cookie across contexts... can JCaptcha do it?


 but one thing you cant do, is just duplicate a webapp in /admin /root 
/eCom and think that the security and session will work across them... 
it wont.


Its not so much about the way Tomcat works... its about the way *browsers 
work*


Good Luck...

ps: Think about this... this is the way we do captcha...

We generate many captcha images on disk *one time* the webapp picks 
one randomly say image_1500.gif and sends it... and the dB knows that 
image 1500 is Check Me thats small enuf to put in all webapps and a 
dB is happy to work across webapps each webapp has its own session... 
and 5 lines of code ;)


The whole captcha problem starts when a different webapp is doing the 
random selection... this is also very quick, captcha takes a long time 
to generate and your linux server can be headless... because captcha 
generation needs the Java UI to work ;)


---
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



OutOfMemoryError happening in embedded instance of Tomcat 6 (Apache OFBiz project)

2008-07-07 Thread Jacopo Cappellato

Hi all,

I am one of the committers and PMC member of the Apache OFBiz project  
(ofbiz.apache.org).
Our project is using an embedded instance of Tomcat to run the web  
applications that compose the OFBiz suite of ERP applications.


A few weeks ago, with rev. 659490, we have upgraded Tomcat from to  
5.5.23 to 6.0.16.
Since then, we have noticed in some production server some  
OutOfMemoryError: Java heap space exceptions that make the instances  
pretty unstable after some time they are up.
My suspect is that we are not creating the Tomcat instance in the  
right way, but I am not sure where is the error... and I'm not sure  
about the question I should ask here.

However, maybe someone of you could help with some advices or hints.

This is the code we used to create the instance of Tomcat 5.5.23 (that  
was working fine):


http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java?revision=585848view=markup

and this is the new code for 6.0.16:

http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java?view=markup

Thanks so much,

Jacopo



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Restart TC with cron/sh

2008-07-07 Thread Piller Sébastien

Hello,

I have my application in production for a month now. I've some problem 
of memory leak that force me to restart TC each few days. I'm trying to 
automate this operation with a cron that runs a *.sh file. But I don't 
know how what to write in it. Actually, I've this:


/usr/local/tomcat/bin/shutdown.sh
killall -9 java
/usr/local/tomcat/bin/startup.sh

But when I run it using SSH, it makes a weird error:

[EMAIL PROTECTED] bin]# /usr/local/tomcat/bin/restart.sh
: No such file or directoryrt.sh: line 1:* 
/usr/local/tomcat/bin/shutdown.sh*

: no process killed
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:   /usr/java/jre1.5.0_06

... but shutdown.sh exists!

Does anybody have an example of a script that restart Tomcat?

Thanks a lot!




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Restart TC with cron/sh

2008-07-07 Thread Edoardo Panfili

Piller Sébastien ha scritto:

Hello,

I have my application in production for a month now. I've some problem 
of memory leak that force me to restart TC each few days. I'm trying to 
automate this operation with a cron that runs a *.sh file. But I don't 
know how what to write in it. Actually, I've this:


/usr/local/tomcat/bin/shutdown.sh
killall -9 java
/usr/local/tomcat/bin/startup.sh

But when I run it using SSH, it makes a weird error:

[EMAIL PROTECTED] bin]# /usr/local/tomcat/bin/restart.sh
: No such file or directoryrt.sh: line 1:* 
/usr/local/tomcat/bin/shutdown.sh*

: no process killed
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:   /usr/java/jre1.5.0_06

... but shutdown.sh exists!

Does anybody have an example of a script that restart Tomcat?

Thanks a lot!

If you are using debian (and other linux versions)maybe
/etc/init.d/tomcat restart

Edoardo

--
Jabber: [EMAIL PROTECTED]
tel: 075 9142766


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Restart TC with cron/sh

2008-07-07 Thread Piller Sébastien

Sorry, I've no tomcat in /etc/init.d/.

Edoardo Panfili a écrit : 

If you are using debian (and other linux versions)maybe
/etc/init.d/tomcat restart

Edoardo




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Restart TC with cron/sh

2008-07-07 Thread Edoardo Panfili

Piller Sébastien ha scritto:

Sorry, I've no tomcat in /etc/init.d/.

Are you using linux? if so, what distribution?
How do you start Tomcat at startup time?

edoardo


Edoardo Panfili a écrit :

If you are using debian (and other linux versions)maybe
/etc/init.d/tomcat restart

Edoardo




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Jabber: [EMAIL PROTECTED]
tel: 075 9142766


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Restart TC with cron/sh

2008-07-07 Thread Piller Sébastien
Yes, we're running Linux. I'm not sure what's my distrib. I'm using our 
dedicated hosting, administrated via ssh. When I need to start tomcat, I 
just use the startup.sh script (the one in /bin/). Same to shutdown: use 
shutdown.sh.


It's possible to restart TC with a .sh, isn't it?


Edoardo Panfili a écrit :

Piller Sébastien ha scritto:

Sorry, I've no tomcat in /etc/init.d/.

Are you using linux? if so, what distribution?
How do you start Tomcat at startup time?

edoardo


Edoardo Panfili a écrit :

If you are using debian (and other linux versions)maybe
/etc/init.d/tomcat restart

Edoardo




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Restart TC with cron/sh

2008-07-07 Thread Felix Schumacher
On Mon, July 7, 2008 4:11 pm, Piller Sébastien wrote:
 Yes, we're running Linux. I'm not sure what's my distrib. I'm using our
 dedicated hosting, administrated via ssh. When I need to start tomcat, I
 just use the startup.sh script (the one in /bin/). Same to shutdown: use
 shutdown.sh.
Have you transferred the restart.sh from a windows box? Maybe you have
dos/windows line breaks, which are CR+LF. Such a combination can kill a
innocent looking shell script.

 It's possible to restart TC with a .sh, isn't it?


 Edoardo Panfili a écrit :
 Piller Sébastien ha scritto:
 Sorry, I've no tomcat in /etc/init.d/.
 Are you using linux? if so, what distribution?
 How do you start Tomcat at startup time?

 edoardo

 Edoardo Panfili a écrit :
 If you are using debian (and other linux versions)maybe
 /etc/init.d/tomcat restart

 Edoardo



 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]






 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Restart TC with cron/sh

2008-07-07 Thread Andrew Miehs

On 07/07/2008, at 4:11 PM, Piller Sébastien wrote:

Yes, we're running Linux. I'm not sure what's my distrib. I'm using  
our dedicated hosting, administrated via ssh. When I need to start  
tomcat, I just use the startup.sh script (the one in /bin/). Same to  
shutdown: use shutdown.sh.


It's possible to restart TC with a .sh, isn't it?


Dear Sébastien,

You can use cron to stop and restart tomcat every day - A little bit  
of shell scripting may be required.


The apache distribution of tomcat can be stopped and started by using

cd $TOMCAT_HOME
./bin/shutdown.sh

./bin/startup.sh

(some developers ASSUME that $TOMCAT_HOME is the working directory)

As you are already having memory difficulties though, you may find  
that shutdown.sh does not work correctly - and that you may need to  
use kill -9.


Either way however, should you be using this tomcat for a 'commercial  
purpose' running on a '*nix' machine, I can only strongly recommend  
that you find someone who can administer this machine.



Best of luck.

Andrew
-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to enable crossContext=true?

2008-07-07 Thread bladu

Hi, 

I am a user of Apache Tomcat 6.0.16 in Netbeans 6.1 and I would want to know
where I have to put the crossContext=true to run applications that are in
different context   

Thanks with anticipation
-- 
View this message in context: 
http://www.nabble.com/How-to-enable-crossContext%3D%22true%22--tp18318178p18318178.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Restart TC with cron/sh

2008-07-07 Thread David Smith
Check to be sure the proper environment variables are set when the 
script runs.  When I read the error message, I understand the error to 
be more like I can't find rt.sh from line 1 of 
/usr/local/tomcat/bin/shutdown.sh.  You can test to confirm that 
suspicion by just dropping in an echo line at the beginning of 
shutdown.sh to confirm it is finding shutdown.sh and is executing it's 
contents.


Also I'd be careful to put some sleep delay before the killall command 
as it can take a few seconds for tomcat to shutdown depending on how the 
webapps were designed.


--David

Piller Sébastien wrote:

Hello,

I have my application in production for a month now. I've some problem 
of memory leak that force me to restart TC each few days. I'm trying 
to automate this operation with a cron that runs a *.sh file. But I 
don't know how what to write in it. Actually, I've this:


/usr/local/tomcat/bin/shutdown.sh
killall -9 java
/usr/local/tomcat/bin/startup.sh

But when I run it using SSH, it makes a weird error:

[EMAIL PROTECTED] bin]# /usr/local/tomcat/bin/restart.sh
: No such file or directoryrt.sh: line 1:* 
/usr/local/tomcat/bin/shutdown.sh*

: no process killed
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:   /usr/java/jre1.5.0_06

... but shutdown.sh exists!

Does anybody have an example of a script that restart Tomcat?

Thanks a lot!



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Restart TC with cron/sh

2008-07-07 Thread Piller Sébastien

Felix,

Felix Schumacher a écrit :

   Have you transferred the restart.sh from a windows box? Maybe you have
   dos/windows line breaks, which are CR+LF. Such a combination can kill a
   innocent looking shell script.

thank you, that was exactly what was wrong. I was using CR/LF-windows 
style EOL in my restart.sh. Now it works much more better :)


Andrew Miehs a écrit :
Either way however, should you be using this tomcat for a 'commercial 
purpose' running on a '*nix' machine, I can only strongly recommend 
that you find someone who can administer this machine.
I'm the only one developper... So I've to do everything myself... 
Development, deployment, tuning, profiling, maintenance, customer calls, 
etc... Yes, I'm sometimes alone in the dark...


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Restart TC with cron/sh

2008-07-07 Thread Piller Sébastien

The last answer of F. Schumacher was the right. I was messing with

David Smith a écrit :
Check to be sure the proper environment variables are set when the 
script runs.  When I read the error message, I understand the error to 
be more like I can't find rt.sh from line 1 of 
/usr/local/tomcat/bin/shutdown.sh.  You can test to confirm that 
suspicion by just dropping in an echo line at the beginning of 
shutdown.sh to confirm it is finding shutdown.sh and is executing it's 
contents.


I put a ping 127.0.0.1 -c 10 between shutdown.sh and killall -9. 
Now it has a delay ~ 10s before the killall call.
Also I'd be careful to put some sleep delay before the killall command 
as it can take a few seconds for tomcat to shutdown depending on how 
the webapps were designed.


--David


Thank you everybody for your advices :)

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Creation of datasource using JMX programmatically

2008-07-07 Thread Thierry Templier
Hello,

I need to dynamically create a datasource within
Tomcat (5.5 or 6.0) using the JMX service of the
server.

Firstly I activate the service using the following
parameters:
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=
-Dcom.sun.management.jmxremote.ssl=false

At this time, I can access the server with a JMX
client like MC4J. I can see all the configured web
applications and all their associated resources
included datasources. I have the following structure:
Domain Catalina:
- host=localhost
  - path=/MyWebApp
- class=javax.sql.DataSource
  - name=jdbc/ds1

I want to register a similar datasource using JMX. I
try to use the following code:

MBeanServer server =
ManagementFactory.getPlatformMBeanServer();

try {
BaseModelMBean mbean = new BaseModelMBean();

AttributeList attributes = new AttributeList();
attributes.add(new Attribute(maxIdle, 30));
[...]
attributes.add(new Attribute(modelerType,
  org.apache.tomcat.dbcp.dbcp.BasicDataSource));
[...]

mbean.setAttributes(attributes);

String mbeanName =
Catalina:type=DataSource,name=\jdbc/ds2\,class=javax.sql.DataSource,path=/MyWebApp,host=localhost;

ObjectInstance mbeanObjectName = 
  server.registerMBean(mbean,
new ObjectName(mbeanName));

The entry is added in the jmx tree but there no
property. I don't know if it's correct to use the
BaseModelMBean to do that...

Is it the correct way to configure a datasource using
JMX? Is there another better solution to do that?

Thanks for your answers!
Thierry

Take a look at my blog:
http://jroller.com/page/Templth/
(old: http://templth.blogspot.com/)


  
_ 
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OutOfMemoryError happening in embedded instance of Tomcat 6 (Apache OFBiz project)

2008-07-07 Thread Filip Hanik - Dev Lists
just use the -XX:+HeapDumpOnOutOfMemoryError and see what is causing the 
OOME


Filip

Jacopo Cappellato wrote:

Hi all,

I am one of the committers and PMC member of the Apache OFBiz project 
(ofbiz.apache.org).
Our project is using an embedded instance of Tomcat to run the web 
applications that compose the OFBiz suite of ERP applications.


A few weeks ago, with rev. 659490, we have upgraded Tomcat from to 
5.5.23 to 6.0.16.
Since then, we have noticed in some production server some 
OutOfMemoryError: Java heap space exceptions that make the instances 
pretty unstable after some time they are up.
My suspect is that we are not creating the Tomcat instance in the 
right way, but I am not sure where is the error... and I'm not sure 
about the question I should ask here.

However, maybe someone of you could help with some advices or hints.

This is the code we used to create the instance of Tomcat 5.5.23 (that 
was working fine):


http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java?revision=585848view=markup 



and this is the new code for 6.0.16:

http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java?view=markup 



Thanks so much,

Jacopo



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



javajni.c] [error] Could not create instance of java/io/FileOutputStream

2008-07-07 Thread alla winter
Hello,
I am running Tomcat 5.5.25 on Win64  2003 server as a service
It was running ok till now.
The following error appears in the log:
[2008-07-07 11:14:47] [info] Procrun (2.0.3.0) started
[2008-07-07 11:14:47] [info] Running Service...
[2008-07-07 11:14:47] [info] Starting service...
[2008-07-07 11:14:47] [591  javajni.c] [error] Could not create instance of
java/io/FileOutputStream
[2008-07-07 11:14:48] [info] Service started in 1640 ms.
I didn't have any changes for the configuration nor anything else...
The only thing I can think of we have put a shared option on the tomcat
install directory.  But now I had removed the shared option, rebooted the
server, removed the service and install it again; see the following

E:\apache-tomcat-5.5.25\binservice.bat install
Installing the service 'Tomcat5' ...
Using CATALINA_HOME:e:\apache-tomcat-5.5.25
Using CATALINA_BASE:e:\apache-tomcat-5.5.25
Using JAVA_HOME:c:\jdk1.5.0_14
Using JVM:  c:\jdk1.5.0_14\jre\bin\server\jvm.dll
The service 'Tomcat5' has been installed.
E:\apache-tomcat-5.5.25\binnet start tomcat5
The Apache Tomcat service is starting.
The Apache Tomcat service was started successfully.

But, nothing helps, and I get the same error.
Note, I can still start Tomcat with startup.bat and run my application
successfully.

I would appreciate your help into this matter,
thanks


Mod_JK / Tomcat Connector Default Maintenance Page

2008-07-07 Thread Replogle, Andrew
Hello,
 
I've noticed that when my tomcat instances are down and the ajp
transports unreachable the tomcat connector displays a generic
maintenace page. Is there a way to tell the tomcat connector to point to
a custom site-down / maintenance page?
 
I'm using version 1.2.26 of the Isapi redirector with IIS 6. 
 
 
TIA,
 
Andrew


Multiple tomcat versions in a same machine

2008-07-07 Thread sridharmnj

Hi,

Is it possible to have two different tomcat versions servers in one machine.
Like.. Tomcat 5.0.27 and Tomcat 6.0 in the same machine.
If yes, please let me know the configuration process.

Thanks,
Sridhar
-- 
View this message in context: 
http://www.nabble.com/Multiple-tomcat-versions-in-a-same-machine-tp18321942p18321942.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Multiple tomcat versions in a same machine

2008-07-07 Thread sridharmnj

I will explain the need clearly.

We have a system with java 1.3 and tomcat 5.0.27. Some applications x and y
are running on this configuration.
Now we are developing another application which runs on java 1.5 and tomcat
6.0. 

Can we have this entire setup in one machine only?
I mean, my system should contain two jdks one with 1.3 and one with 1.5. And
also should contain two tomcat servers one with 5.0.27 and one with 6.0.


sridharmnj wrote:
 
 Hi,
 
 Is it possible to have two different tomcat versions servers in one
 machine.
 Like.. Tomcat 5.0.27 and Tomcat 6.0 in the same machine.
 If yes, please let me know the configuration process.
 
 Thanks,
 Sridhar
 

-- 
View this message in context: 
http://www.nabble.com/Multiple-tomcat-versions-in-a-same-machine-tp18321942p18322105.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Mod_JK / Tomcat Connector Default Maintenance Page

2008-07-07 Thread Len Popp
Since you're running Tomcat behind IIS, you should be able to
configure a custom page in IIS for HTTP 503 errors. I know this is
possible with the Apache web server, I suppose IIS can do it too.

(Tomcat's error-page directive doesn't work because the webapp, or all
of Tomcat, is down so it can't generate a custom error page.)
-- 
Len


On Mon, Jul 7, 2008 at 13:08, Replogle, Andrew [EMAIL PROTECTED] wrote:
 Hello,

 I've noticed that when my tomcat instances are down and the ajp
 transports unreachable the tomcat connector displays a generic
 maintenace page. Is there a way to tell the tomcat connector to point to
 a custom site-down / maintenance page?

 I'm using version 1.2.26 of the Isapi redirector with IIS 6.


 TIA,

 Andrew


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Multiple tomcat versions in a same machine

2008-07-07 Thread Len Popp
Yes, you can do that. The exact procedure depends on what OS you're
using and how you're starting Tomcat.
-- 
Len


On Mon, Jul 7, 2008 at 13:30, sridharmnj [EMAIL PROTECTED] wrote:

 I will explain the need clearly.

 We have a system with java 1.3 and tomcat 5.0.27. Some applications x and y
 are running on this configuration.
 Now we are developing another application which runs on java 1.5 and tomcat
 6.0.

 Can we have this entire setup in one machine only?
 I mean, my system should contain two jdks one with 1.3 and one with 1.5. And
 also should contain two tomcat servers one with 5.0.27 and one with 6.0.


 sridharmnj wrote:

 Hi,

 Is it possible to have two different tomcat versions servers in one
 machine.
 Like.. Tomcat 5.0.27 and Tomcat 6.0 in the same machine.
 If yes, please let me know the configuration process.

 Thanks,
 Sridhar


 --
 View this message in context: 
 http://www.nabble.com/Multiple-tomcat-versions-in-a-same-machine-tp18321942p18322105.html
 Sent from the Tomcat - User mailing list archive at Nabble.com.


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Multiple tomcat versions in a same machine

2008-07-07 Thread David Smith
Yes it's possible.  Just install each in it's own directory and alter 
each tomcat's server.xml to elliminate port conflicts and that includes 
the shutdown port.


--David

sridharmnj wrote:

I will explain the need clearly.

We have a system with java 1.3 and tomcat 5.0.27. Some applications x and y
are running on this configuration.
Now we are developing another application which runs on java 1.5 and tomcat
6.0. 


Can we have this entire setup in one machine only?
I mean, my system should contain two jdks one with 1.3 and one with 1.5. And
also should contain two tomcat servers one with 5.0.27 and one with 6.0.


sridharmnj wrote:
  

Hi,

Is it possible to have two different tomcat versions servers in one
machine.
Like.. Tomcat 5.0.27 and Tomcat 6.0 in the same machine.
If yes, please let me know the configuration process.

Thanks,
Sridhar




  



--
David Smith
Network Operations Supervisor
Department of Entomology
Cornell University
2132 Comstock Hall
Ithaca, NY 14853
Phone: (607) 255-9571
Fax: (607) 255-0940


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Fwd: javajni.c] [error] Could not create instance of java/io/FileOutputStream

2008-07-07 Thread alla winter
I will answer on this question myself just in case if somebody else hit this
problem:  file system security was updated incorrectly: the user SYSTEM was
removed.  As soon as it was fixed, everything  went normal
thanks
-- Forwarded message --
From: alla winter [EMAIL PROTECTED]
Date: Mon, Jul 7, 2008 at 11:34 AM
Subject: javajni.c] [error] Could not create instance of
java/io/FileOutputStream
To: users@tomcat.apache.org


Hello,
I am running Tomcat 5.5.25 on Win64  2003 server as a service
It was running ok till now.
The following error appears in the log:
[2008-07-07 11:14:47] [info] Procrun (2.0.3.0) started
[2008-07-07 11:14:47] [info] Running Service...
[2008-07-07 11:14:47] [info] Starting service...
[2008-07-07 11:14:47] [591  javajni.c] [error] Could not create instance of
java/io/FileOutputStream
[2008-07-07 11:14:48] [info] Service started in 1640 ms.
I didn't have any changes for the configuration nor anything else...
The only thing I can think of we have put a shared option on the tomcat
install directory.  But now I had removed the shared option, rebooted the
server, removed the service and install it again; see the following

E:\apache-tomcat-5.5.25\binservice.bat install
Installing the service 'Tomcat5' ...
Using CATALINA_HOME:e:\apache-tomcat-5.5.25
Using CATALINA_BASE:e:\apache-tomcat-5.5.25
Using JAVA_HOME:c:\jdk1.5.0_14
Using JVM:  c:\jdk1.5.0_14\jre\bin\server\jvm.dll
The service 'Tomcat5' has been installed.
E:\apache-tomcat-5.5.25\binnet start tomcat5
The Apache Tomcat service is starting.
The Apache Tomcat service was started successfully.

But, nothing helps, and I get the same error.
Note, I can still start Tomcat with startup.bat and run my application
successfully.

I would appreciate your help into this matter,
thanks


RE: Mod_JK / Tomcat Connector Default Maintenance Page

2008-07-07 Thread Replogle, Andrew
Unfortunately, in IIS, 400, 403.9, 411, 414, 500, 500.11, 500.14,
500.15, 501, 503, and 505 codes are all uncustomizable, so if I were
going to do this anywhere, it would have to be done at the plugin level
=[

Does anyone know if its possible to change the default page of:

Service temporary unavailable!

The server is temporarily unable to service your request due to
maintenance downtime

To point to a custom page? I looked through the workers.properties and
uri properties references and couldn't find any directives to specify
such a page. 

TIA,

Andrew 

-Original Message-
From: Len Popp [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 07, 2008 12:35 PM
To: Tomcat Users List
Subject: Re: Mod_JK / Tomcat Connector Default Maintenance Page

Since you're running Tomcat behind IIS, you should be able to configure
a custom page in IIS for HTTP 503 errors. I know this is possible with
the Apache web server, I suppose IIS can do it too.

(Tomcat's error-page directive doesn't work because the webapp, or all
of Tomcat, is down so it can't generate a custom error page.)
--
Len


On Mon, Jul 7, 2008 at 13:08, Replogle, Andrew
[EMAIL PROTECTED] wrote:
 Hello,

 I've noticed that when my tomcat instances are down and the ajp
 transports unreachable the tomcat connector displays a generic
 maintenace page. Is there a way to tell the tomcat connector to point
to
 a custom site-down / maintenance page?

 I'm using version 1.2.26 of the Isapi redirector with IIS 6.


 TIA,

 Andrew


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Access Local File System

2008-07-07 Thread bperquku

Hi,

I managed to create the second webapp that points on c:/. BUT, now i face
another problem. Now i have to webapps, first one VideoWebApp, and the
second one VideoServer (which i use for flv files located on c:/video). I'm
not able to upload files from VideoWebApp to VideoServer. Does anyone had
the same similar problem.

Thanks a lot,
-- 
View this message in context: 
http://www.nabble.com/Access-Local-File-System-tp18296333p1832.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Mod_JK / Tomcat Connector Default Maintenance Page

2008-07-07 Thread Rainer Jung

Replogle, Andrew wrote:

Unfortunately, in IIS, 400, 403.9, 411, 414, 500, 500.11, 500.14,
500.15, 501, 503, and 505 codes are all uncustomizable, so if I were
going to do this anywhere, it would have to be done at the plugin level
=[

Does anyone know if its possible to change the default page of:

Service temporary unavailable!

The server is temporarily unable to service your request due to
maintenance downtime

To point to a custom page? I looked through the workers.properties and
uri properties references and couldn't find any directives to specify
such a page. 


The feature doesn't exist. Please file an enhancement request in bugzilla.

If you can compile the plugin yourself, you could in the meantime redefine

char HTML_ERROR_503[]

in iis/jk_isapi_plugin.c. The variable contains the HTML response page 
used by the redirector for 503 status.


Regards,

Rainer


TIA,

Andrew 


-Original Message-
From: Len Popp [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 07, 2008 12:35 PM

To: Tomcat Users List
Subject: Re: Mod_JK / Tomcat Connector Default Maintenance Page

Since you're running Tomcat behind IIS, you should be able to configure
a custom page in IIS for HTTP 503 errors. I know this is possible with
the Apache web server, I suppose IIS can do it too.

(Tomcat's error-page directive doesn't work because the webapp, or all
of Tomcat, is down so it can't generate a custom error page.)
--
Len


On Mon, Jul 7, 2008 at 13:08, Replogle, Andrew
[EMAIL PROTECTED] wrote:

Hello,

I've noticed that when my tomcat instances are down and the ajp
transports unreachable the tomcat connector displays a generic
maintenace page. Is there a way to tell the tomcat connector to point

to

a custom site-down / maintenance page?

I'm using version 1.2.26 of the Isapi redirector with IIS 6.


TIA,

Andrew


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Multiple tomcat versions in a same machine

2008-07-07 Thread Len Popp
That doesn't solve the problem of using different versions of Java.
To use different Javas you have to either set the JAVA_HOME variable
or change the Tomcat service settings, whichever is appropriate in
your environment.
-- 
Len


On Mon, Jul 7, 2008 at 13:42, David Smith [EMAIL PROTECTED] wrote:
 Yes it's possible.  Just install each in it's own directory and alter each
 tomcat's server.xml to elliminate port conflicts and that includes the
 shutdown port.

 --David

 sridharmnj wrote:

 I will explain the need clearly.

 We have a system with java 1.3 and tomcat 5.0.27. Some applications x and
 y
 are running on this configuration.
 Now we are developing another application which runs on java 1.5 and
 tomcat
 6.0.
 Can we have this entire setup in one machine only?
 I mean, my system should contain two jdks one with 1.3 and one with 1.5.
 And
 also should contain two tomcat servers one with 5.0.27 and one with 6.0.


 sridharmnj wrote:


 Hi,

 Is it possible to have two different tomcat versions servers in one
 machine.
 Like.. Tomcat 5.0.27 and Tomcat 6.0 in the same machine.
 If yes, please let me know the configuration process.

 Thanks,
 Sridhar






 --
 David Smith
 Network Operations Supervisor
 Department of Entomology
 Cornell University
 2132 Comstock Hall
 Ithaca, NY 14853
 Phone: (607) 255-9571
 Fax: (607) 255-0940


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Mod_JK / Tomcat Connector Default Maintenance Page

2008-07-07 Thread Replogle, Andrew
Thanks Rainer, I'll see if I can't get what we need in that var and
recompile. I'll also submit a feature request, and if I can figure it
out, submit a solution for referencing a file.

Thanks for the prompt reply,
It's greatly appreciated.

Andrew

-Original Message-
From: Rainer Jung [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 07, 2008 1:42 PM
To: Tomcat Users List
Subject: Re: Mod_JK / Tomcat Connector Default Maintenance Page

Replogle, Andrew wrote:
 Unfortunately, in IIS, 400, 403.9, 411, 414, 500, 500.11, 500.14, 
 500.15, 501, 503, and 505 codes are all uncustomizable, so if I were 
 going to do this anywhere, it would have to be done at the plugin 
 level =[
 
 Does anyone know if its possible to change the default page of:
 
 Service temporary unavailable!
 
 The server is temporarily unable to service your request due to 
 maintenance downtime
 
 To point to a custom page? I looked through the workers.properties and

 uri properties references and couldn't find any directives to specify 
 such a page.

The feature doesn't exist. Please file an enhancement request in
bugzilla.

If you can compile the plugin yourself, you could in the meantime
redefine

char HTML_ERROR_503[]

in iis/jk_isapi_plugin.c. The variable contains the HTML response page
used by the redirector for 503 status.

Regards,

Rainer

 TIA,
 
 Andrew
 
 -Original Message-
 From: Len Popp [mailto:[EMAIL PROTECTED]
 Sent: Monday, July 07, 2008 12:35 PM
 To: Tomcat Users List
 Subject: Re: Mod_JK / Tomcat Connector Default Maintenance Page
 
 Since you're running Tomcat behind IIS, you should be able to 
 configure a custom page in IIS for HTTP 503 errors. I know this is 
 possible with the Apache web server, I suppose IIS can do it too.
 
 (Tomcat's error-page directive doesn't work because the webapp, or all

 of Tomcat, is down so it can't generate a custom error page.)
 --
 Len
 
 
 On Mon, Jul 7, 2008 at 13:08, Replogle, Andrew 
 [EMAIL PROTECTED] wrote:
 Hello,

 I've noticed that when my tomcat instances are down and the ajp 
 transports unreachable the tomcat connector displays a generic 
 maintenace page. Is there a way to tell the tomcat connector to point
 to
 a custom site-down / maintenance page?

 I'm using version 1.2.26 of the Isapi redirector with IIS 6.


 TIA,

 Andrew

-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



mod_jk connection error?

2008-07-07 Thread Tom Cat
Hello,

I am new to Tomcat and apache. I have successfully install both the
apache webserver and tomcat, and now wish to link them together. Here
is my system info:

mod_jk version 1.2.26
apache version 2.2.9
tomcat verison 6.0.16
Ubuntu Linux kernel 2.6.24-19-generic

I can successfully view html files on http://localhost, and Tomcat
works fine for http://localhost:8080, but when I try to view
http://localhost/index.jsp I get a 500 Internal Server Error.

Here are some related files:

-
workers.properties--
-

workers.tomcat_home=/usr/local/tomcat

workers.java_home=/usr/lib/jvm/java-6-openjdk/

ps=/

worker.list=ajp12, ajp13

worker.ajp12.port=8007
worker.ajp12.host=localhost
worker.ajp12.type=ajp12

worker.ajp12.lbfactor=1

worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13

worker.ajp13.lbfactor=1

worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=ajp12, ajp13


worker.inprocess.type=jni

worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar

worker.inprocess.cmd_line=start

#
# The JVM that we are about to use
#
# This is for Java2
#
# Windows
worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(ps)jvm.dll
# IBM JDK1.3
#worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(ps)libjvm.so
# Unix - Sun VM or blackdown
#worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)lib$(ps)i386$(ps)classic$(ps)libjvm.so

#
# And this is for jdk1.1.X
#
#worker.inprocess.jvm_lib=$(workers.java_home)$(ps)bin$(ps)javai.dll


#
# Setting the place for the stdout and stderr of tomcat
#
worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout
worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr

#
# Setting the tomcat.home Java property
#
#worker.inprocess.sysprops=tomcat.home=$(workers.tomcat_home)

#
# Java system properties
#
# worker.inprocess.sysprops=java.compiler=NONE
# worker.inprocess.sysprops=myprop=mypropvalue

#
# Additional path components.
#
# worker.inprocess.ld_path=d:$(ps)SQLLIB$(ps)bin
#


relevant httpd.conf
section---


LoadModule jk_module /usr/local/apache2/modules/mod_jk.so
JkWorkersFile /usr/local/tomcat/conf/workers.properties
JkShmFile /usr/local/apache2/logs/mod_jk.shm
JkLogFile /usr/local/apache2/logs/mod_jk.log
JkLogLevel info
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
JkMount /*.jsp ajp12

--
mod_jk.log
--
[Mon Jul 07 17:02:40 2008] [13093:3083507904] [warn]
jk_map_validate_property::jk_map.c (410): The attribute
'worker.inprocess.class_path' is deprecated - please check the
documentation for the correct replacement.
[Mon Jul 07 17:02:40 2008] [13093:3083507904] [warn]
jk_map_validate_property::jk_map.c (410): The attribute
'worker.inprocess.cmd_line' is deprecated - please check the
documentation for the correct replacement.
[Mon Jul 07 17:02:40 2008] [13093:3083507904] [warn]
jk_map_validate_property::jk_map.c (410): The attribute
'worker.inprocess.jvm_lib' is deprecated - please check the
documentation for the correct replacement.
[Mon Jul 07 17:02:40 2008] [13093:3083507904] [warn]
jk_map_validate_property::jk_map.c (410): The attribute
'worker.inprocess.stdout' is deprecated - please check the
documentation for the correct replacement.
[Mon Jul 07 17:02:40 2008] [13093:3083507904] [warn]
jk_map_validate_property::jk_map.c (410): The attribute
'worker.inprocess.stderr' is deprecated - please check the
documentation for the correct replacement.
[Mon Jul 07 17:02:40 2008] [13093:3083507904] [info] init_jk::mod_jk.c
(2825): mod_jk/1.2.26 initialized
[Mon Jul 07 17:02:53 2008] [29808:3083507904] [info]
jk_open_socket::jk_connect.c (566): connect to 127.0.0.1:8007 failed
(errno=111)
[Mon Jul 07 17:02:53 2008] [29808:3083507904] [error]
service::jk_ajp12_worker.c (149): In jk_endpoint_t::service, Error sd
= -1
[Mon Jul 07 17:02:53 2008] [29808:3083507904] [info]
jk_handler::mod_jk.c (2364): Service error=0 for worker=ajp12
[Mon Jul 07 17:02:53 2008] [29809:3083507904] [info]
jk_open_socket::jk_connect.c (566): connect to 127.0.0.1:8007 failed
(errno=111)
[Mon Jul 07 17:02:53 2008] [29809:3083507904] [error]
service::jk_ajp12_worker.c (149): In jk_endpoint_t::service, Error sd
= -1
[Mon Jul 07 17:02:53 

Re: mod_jk connection error?

2008-07-07 Thread Steve Ochani
On 7 Jul 2008 at 17:33, Tom Cat wrote:

Date sent:  Mon, 07 Jul 2008 17:33:50 -0400
From:   Tom Cat [EMAIL PROTECTED]
Subject:mod_jk connection error?
To: users@tomcat.apache.org
Send reply to:  Tomcat Users List users@tomcat.apache.org

 Hello,
 
 I am new to Tomcat and apache. I have successfully install both
 the
 apache webserver and tomcat, and now wish to link them together.
 Here
 is my system info:
 
 mod_jk version 1.2.26
 apache version 2.2.9
 tomcat verison 6.0.16
 Ubuntu Linux kernel 2.6.24-19-generic
 
 I can successfully view html files on http://localhost, and Tomcat
 works fine for http://localhost:8080, but when I try to view
 http://localhost/index.jsp I get a 500 Internal Server Error.
 
 Here are some related files:
 
 
 -
 workers.properties--
 
 
 -
 
 workers.tomcat_home=/usr/local/tomcat
 
 workers.java_home=/usr/lib/jvm/java-6-openjdk/
 
 ps=/
 
 worker.list=ajp12, ajp13
 
 worker.ajp12.port=8007
 worker.ajp12.host=localhost
 worker.ajp12.type=ajp12
 
 worker.ajp12.lbfactor=1
 
 worker.ajp13.port=8009
 worker.ajp13.host=localhost
 worker.ajp13.type=ajp13
 
 worker.ajp13.lbfactor=1
 
 worker.loadbalancer.type=lb
 worker.loadbalancer.balance_workers=ajp12, ajp13
 
 
 worker.inprocess.type=jni
 
 worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomca
 t.jar
 
 worker.inprocess.cmd_line=start
 
 #
 # The JVM that we are about to use
 #
 # This is for Java2
 #
 # Windows
 worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)cl
 assic$(ps)jvm.dll
 # IBM JDK1.3
 #worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)c
 lassic$(ps)libjvm.so
 # Unix - Sun VM or blackdown
 #worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)lib$(ps)i
 386$(ps)classic$(ps)libjvm.so
 
 #
 # And this is for jdk1.1.X
 #
 #worker.inprocess.jvm_lib=$(workers.java_home)$(ps)bin$(ps)javai.dll
 
 
 #
 # Setting the place for the stdout and stderr of tomcat
 #
 worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inproces
 s.stdout
 worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inproces
 s.stderr
 
 #
 # Setting the tomcat.home Java property
 #
 #worker.inprocess.sysprops=tomcat.home=$(workers.tomcat_home)
 
 #
 # Java system properties
 #
 # worker.inprocess.sysprops=java.compiler=NONE
 # worker.inprocess.sysprops=myprop=mypropvalue
 
 #
 # Additional path components.
 #
 # worker.inprocess.ld_path=d:$(ps)SQLLIB$(ps)bin
 #
 
 
 
 relevant httpd.conf
 section-
 --
 
 
 
 LoadModule jk_module /usr/local/apache2/modules/mod_jk.so
 JkWorkersFile /usr/local/tomcat/conf/workers.properties
 JkShmFile /usr/local/apache2/logs/mod_jk.shm
 JkLogFile /usr/local/apache2/logs/mod_jk.log
 JkLogLevel info
 JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
 JkMount /*.jsp ajp12
 
 
 --
 mod_jk.log--
 --
 
 --
 [Mon Jul 07 17:02:40 2008] [13093:3083507904] [warn]
 jk_map_validate_property::jk_map.c (410): The attribute
 'worker.inprocess.class_path' is deprecated - please check the
 documentation for the correct replacement.
 [Mon Jul 07 17:02:40 2008] [13093:3083507904] [warn]
 jk_map_validate_property::jk_map.c (410): The attribute
 'worker.inprocess.cmd_line' is deprecated - please check the
 documentation for the correct replacement.
 [Mon Jul 07 17:02:40 2008] [13093:3083507904] [warn]
 jk_map_validate_property::jk_map.c (410): The attribute
 'worker.inprocess.jvm_lib' is deprecated - please check the
 documentation for the correct replacement.
 [Mon Jul 07 17:02:40 2008] [13093:3083507904] [warn]
 jk_map_validate_property::jk_map.c (410): The attribute
 'worker.inprocess.stdout' is deprecated - please check the
 documentation for the correct replacement.
 [Mon Jul 07 17:02:40 2008] [13093:3083507904] [warn]
 jk_map_validate_property::jk_map.c (410): The attribute
 'worker.inprocess.stderr' is deprecated - please check the
 documentation for the correct replacement.
 [Mon Jul 07 17:02:40 2008] [13093:3083507904] [info]
 init_jk::mod_jk.c
 (2825): mod_jk/1.2.26 initialized
 [Mon Jul 07 17:02:53 2008] [29808:3083507904] [info]
 jk_open_socket::jk_connect.c (566): connect to 127.0.0.1:8007
 failed
 (errno=111)
 [Mon Jul 07 17:02:53 2008] [29808:3083507904] 

Re: mod_jk connection error?

2008-07-07 Thread Tom Cat
Thanks

Changing ajp12 to ajp13 did the trick.

I will try to remove all the deprecated references but honestly, at
this point, I am just happy it is working.

On 7/7/08, Steve Ochani [EMAIL PROTECTED] wrote:
 On 7 Jul 2008 at 17:33, Tom Cat wrote:

  Date sent:  Mon, 07 Jul 2008 17:33:50 -0400
  From:   Tom Cat [EMAIL PROTECTED]
  Subject:mod_jk connection error?
  To: users@tomcat.apache.org
  Send reply to:  Tomcat Users List users@tomcat.apache.org


   Hello,
  
   I am new to Tomcat and apache. I have successfully install both
   the
   apache webserver and tomcat, and now wish to link them together.
   Here
   is my system info:
  
   mod_jk version 1.2.26
   apache version 2.2.9
   tomcat verison 6.0.16
   Ubuntu Linux kernel 2.6.24-19-generic
  
   I can successfully view html files on http://localhost, and Tomcat
   works fine for http://localhost:8080, but when I try to view
   http://localhost/index.jsp I get a 500 Internal Server Error.
  
   Here are some related files:
  
   
   -
   workers.properties--
   
   
   -
  
   workers.tomcat_home=/usr/local/tomcat
  
   workers.java_home=/usr/lib/jvm/java-6-openjdk/
  
   ps=/
  
   worker.list=ajp12, ajp13
  
   worker.ajp12.port=8007
   worker.ajp12.host=localhost
   worker.ajp12.type=ajp12
  
   worker.ajp12.lbfactor=1
  
   worker.ajp13.port=8009
   worker.ajp13.host=localhost
   worker.ajp13.type=ajp13
  
   worker.ajp13.lbfactor=1
  
   worker.loadbalancer.type=lb
   worker.loadbalancer.balance_workers=ajp12, ajp13
  
  
   worker.inprocess.type=jni
  
   worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomca
   t.jar
  
   worker.inprocess.cmd_line=start
  
   #
   # The JVM that we are about to use
   #
   # This is for Java2
   #
   # Windows
   worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)cl
   assic$(ps)jvm.dll
   # IBM JDK1.3
   #worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)c
   lassic$(ps)libjvm.so
   # Unix - Sun VM or blackdown
   #worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)lib$(ps)i
   386$(ps)classic$(ps)libjvm.so
  
   #
   # And this is for jdk1.1.X
   #
   #worker.inprocess.jvm_lib=$(workers.java_home)$(ps)bin$(ps)javai.dll
  
  
   #
   # Setting the place for the stdout and stderr of tomcat
   #
   worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inproces
   s.stdout
   worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inproces
   s.stderr
  
   #
   # Setting the tomcat.home Java property
   #
   #worker.inprocess.sysprops=tomcat.home=$(workers.tomcat_home)
  
   #
   # Java system properties
   #
   # worker.inprocess.sysprops=java.compiler=NONE
   # worker.inprocess.sysprops=myprop=mypropvalue
  
   #
   # Additional path components.
   #
   # worker.inprocess.ld_path=d:$(ps)SQLLIB$(ps)bin
   #
  
   
   
   relevant httpd.conf
   section-
   --
   
   
  
   LoadModule jk_module /usr/local/apache2/modules/mod_jk.so
   JkWorkersFile /usr/local/tomcat/conf/workers.properties
   JkShmFile /usr/local/apache2/logs/mod_jk.shm
   JkLogFile /usr/local/apache2/logs/mod_jk.log
   JkLogLevel info
   JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
   JkMount /*.jsp ajp12
  
   
   --
   mod_jk.log--
   --
   
   --
   [Mon Jul 07 17:02:40 2008] [13093:3083507904] [warn]
   jk_map_validate_property::jk_map.c (410): The attribute
   'worker.inprocess.class_path' is deprecated - please check the
   documentation for the correct replacement.
   [Mon Jul 07 17:02:40 2008] [13093:3083507904] [warn]
   jk_map_validate_property::jk_map.c (410): The attribute
   'worker.inprocess.cmd_line' is deprecated - please check the
   documentation for the correct replacement.
   [Mon Jul 07 17:02:40 2008] [13093:3083507904] [warn]
   jk_map_validate_property::jk_map.c (410): The attribute
   'worker.inprocess.jvm_lib' is deprecated - please check the
   documentation for the correct replacement.
   [Mon Jul 07 17:02:40 2008] [13093:3083507904] [warn]
   jk_map_validate_property::jk_map.c (410): The attribute
   'worker.inprocess.stdout' is deprecated - please check the
   documentation for the correct replacement.
   [Mon Jul 07 17:02:40 2008] 

Problem with Context Parameters

2008-07-07 Thread Jean-François Ménard
Hi all,

Using Tomcat 6.0.13, I try to define some context parameters in my
context file (in conf/Cataline/localhost/app_name.xml) as described
in the documentation
(http://tomcat.apache.org/tomcat-6.0-doc/config/context.html) but it
simply doesn't work!  I can see the parameters defined in my web.xml,
but not those defined in my context file.

Is that supposed to work at all?

Example:

Context path=application

  Parameter name =aParameterName value=aValue /

/Context

Shouldn't the parameter be visible by the servlet context? ex.
context.getInitParameter(aParameterName)

Am I missing something, or Tomcat is not working as described in the doc?

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Access Local File System

2008-07-07 Thread Johnny Kewl


- Original Message - 
From: bperquku [EMAIL PROTECTED]

To: users@tomcat.apache.org
Sent: Monday, July 07, 2008 8:25 PM
Subject: Re: Access Local File System




Hi,

I managed to create the second webapp that points on c:/. BUT, now i face
another problem. Now i have to webapps, first one VideoWebApp, and the
second one VideoServer (which i use for flv files located on c:/video). 
I'm

not able to upload files from VideoWebApp to VideoServer. Does anyone had
the same similar problem.

Thanks a lot,


Not sure if you talking about form uploading or the script doesnt work? I 
think the later.


I dont know that SWFObject script you using... I dont even know if it can 
play FLV files.
Are you sure it doesnt need a SWF file... I think FLV is just the video 
format inside SWF... anyway for that you going to have to talk to the guys 
that made the script...


You should be able to open a browser and type 
http://domain/VideoServer/AFile.flv
And if the browser wants to download the file... you know that the docbase 
webapp is working...

Then you just got to figure out how to make that script happy...

A guess is that you going to have to type something like 
../VideoServer/AFile.flv

Couple of dots in front...

Anyway now the script guys should be able to help you... the file is URL 
addressable ;)


Have fun...

---
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
--- 



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat 5.0 rolling stdout

2008-07-07 Thread Puneet C Mathur
 Hi

The stdout log file on a tomcat server is getting pretty full do to the
amount of data being written out by a third party application.

Is there a way to have stdout.log rolling every day/limited by size, rather
than having one big file? (using log4j.properties or something).

We are running Tomcat 5.0.30 on Windows as a service.

I am new to Tomcat, would appreciate help.

Thanks in advance.

Puneet


Re: Tomcat 5.0 rolling stdout

2008-07-07 Thread Steve Ochani
On 8 Jul 2008 at 9:39, Puneet C Mathur wrote:

Date sent:  Tue, 08 Jul 2008 09:39:10 +1000
From:   Puneet C Mathur [EMAIL PROTECTED]
Subject:Tomcat 5.0 rolling stdout
To: users@tomcat.apache.org
Send reply to:  Tomcat Users List users@tomcat.apache.org

  Hi
 
 The stdout log file on a tomcat server is getting pretty full do to

due not do


 the
 amount of data being written out by a third party application.

Tell the makers of the third party app to use a logging mechanism.

 
 Is there a way to have stdout.log rolling every day/limited by size,
 rather
 than having one big file? (using log4j.properties or something).

Review this thread:


http://marc.info/?l=tomcat-userm=120725811918281w=2



-Steve O.




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Exceptions in Servlet when flushing response to a client having closed the connection?

2008-07-07 Thread Morten Mortensen

Hi

Having created a Servlet, I want to be sure, that the content written to
the HTTP-response is flushed all the way through the TCP connection
carrying the HTTP-request and -response.

In case the TCP connection to the HTTP-client has been closed - e.g. if
the client has timed out - I would like to see some form of IOException
within my servlet, when the Servlet ends up performing a
HttpServletResponse.flushBuffer() (or
HttpServletResponse.getOutputStream().flush()).

The below fragment of Servlet-code writes a line of text, sleeps 10
seconds and then writes another line of text. When initiating a request
from IE and aborting the request after about five seconds, the
Servlet-code ends up catching an IOException - in Tomcat it becomes a
ClientAbortException wrapping a SocketException with the text
Connection reset by peer: socket write error. This makes my Servlet
aware of the connection to the client being cut.

When initiating a request from some Java code by using HttpURLConnection
with a read-timeout of five seconds, I see the same type of reaction
within the Servlet if and only if I do no end up doing a proper cleanup
containing a call to HttpURLConnection.getInputStream().close(). If the
call to close() is not made, the Servlet catches a IOException. But if
the call to close() is made, the Servlet does *not* detect the
HTTP-client cutting or closing the connection; no IOException is seen
within the Servlet. Why is this?

If I instead of IE use FireFox and initate a request and abort this
request after about five seconds, the Servlet also does not detect the
stream carrying the HTTP-reponse being cut or closed. Why is this?

(As far as I can tell from the net, both FireFox and Opera closes the
TCP connection in a proper way.)

If e.g. the FireFox browser correctly closes the TCP/IP connection, the
Servlet-container must somehow detect this. But why does this not imply
an IOException being generated within the Servlet, when the Servlet
performs explicit flushing?

Surely, a cut or closed TCP connection can not be ignored by Tomcat?

 ?

Regards
  Morten Sabroe Mortensen


 -
 public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws
  IOException,
  ServletException
  {
try
{
  response.setStatus(HttpServletResponse.SC_OK);

  response.setContentType(text/plain);
  response.setCharacterEncoding(UTF-8);

  Writer w=response.getWriter();

  w.write(Hello, this is the servlet speaking!);
  w.write(\n);
  w.flush();

  Thread.sleep(10*1000);

  w.write(Goodbye.);
  w.write(\n);
  w.flush();

  response.flushBuffer();

  System.out.println(: response.isCommitted():
+response.isCommitted());
}
catch (IOException ex)
{
  System.out.println(: *** VUUPS! ***);

  ex.printStackTrace(System.out);

  IOException exception=new IOException();
  exception.initCause(ex);
  throw exception;
}
catch (Throwable ex)
{
  ex.printStackTrace(System.out);

  throw new RuntimeException(ex);
}
  }
 -


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat 6 and docBase problem

2008-07-07 Thread Angelo Chen

Hi,

I updated context.xml in the webapp and also the ROOT.xml in the
conf/Catalina/abc.com/ROOT.xml, all has this:

?xml version=1.0 encoding=UTF-8?
Context allowLinking=true
/Context

and still getting this error:

SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base
/usr/local/apache-tomcat-6.0.16/webapp/abc does not exist or is not a
readable directory

looks like not the allowLinking problem as program runs despite that error,
any idea? Thanks




Caldarale, Charles R wrote:
 
 From: Angelo Chen [mailto:[EMAIL PROTECTED]
 Subject: RE: tomcat 6 and docBase problem

 I updated context.xml to be like this :
 ?xml version=1.0 encoding=UTF-8?
 Context path=/  allowLinking=true
 /Context
 
 The above is flawed, regardless of which context.xml you're referring to. 
 In the first place, a path attribute of / is never correct; in the
 second, a path attribute is not allowed unless the Context element is in
 server.xml, where it never should be.
 
 So what context.xml file did you update?  If it's the one in Tomcat's conf
 directory, you can leave the allowLinking in there and it will apply to
 all webapps, but the path attribute must be removed.  If you want
 allowLinking only for a specific webapp, place the Context element in
 META-INF/context.xml inside the webapp, but again remove the path
 attribute.
 
 what's the use of Document base really?
 
 It tells Tomcat where the application is deployed.  In modern versions of
 Tomcat, it should only be used when the Context element is in
 conf/Catalina/[host]/[appName].xml and the directory or war file for the
 webapp is stored outside of the [host] appBase directory.
 
  - Chuck
 
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you
 received this in error, please contact the sender and delete the e-mail
 and its attachments from all computers.
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/tomcat-6-and-docBase-problem-tp18309063p18330135.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Valid parameters for executable init parameter for cgi servlet

2008-07-07 Thread sridharmnj

Hi,
Can anyone please explain me the valid values for excutable init parameter
for cgi servlet.
When I see the CGIServlet source code, its default value is perl. What are
the other valid values, for other than perl scripts?
Thanks,
Sridhar
-- 
View this message in context: 
http://www.nabble.com/Valid-parameters-for-executable-init-parameter-for-cgi-servlet-tp18330571p18330571.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat with jcaptcha

2008-07-07 Thread WILLIAMer

Thanks for replies :)
Sorry, my english is hard to read!

I google for how to set the apps to default(ROOT) though chinese keywords,
there are kinds of lists.
However, i read different version have different approach. I try some and
get useful with add one line 
code that i wrote that post before.

Now, i think i just only one question :)
I know the sessions cant share with two directory(apps).
But iinclude parent and child directory?
The dir Admin just under the dir eCom.

I get the same session at Admin and eCom if no set the eCom default.
But i set eCom default, the sessions are different between Admin and
eCom.
I think that i set the eCom become ROOT and these directories under eCom
will be set(include Admin), too.
-- 
View this message in context: 
http://www.nabble.com/tomcat-with-jcaptcha-tp18309636p18330689.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat with jcaptcha

2008-07-07 Thread Caldarale, Charles R
 From: WILLIAMer [mailto:[EMAIL PROTECTED]
 Subject: Re: tomcat with jcaptcha

 Now, i think i just only one question :)
 I know the sessions cant share with two directory(apps).
 But iinclude parent and child directory?
 The dir Admin just under the dir eCom.

If you're asking if one webapp can be deployed inside another webapp's 
directory, the answer is definitely no.  Each webapp must be in a separate 
directory (or war file) immediately under the Host appBase directory, or else 
in a directory completely outside of the Host appBase.  Under no 
circumstances can webapp deployments overlap.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat with jcaptcha

2008-07-07 Thread WILLIAMer

MY webapps tree: eCom-Admin -Login.jsp
-Account - some .jsp
-Other directory
I think Admin and eCom are not two webapps
And Admin is not a webapps deployed inside eCom, right?
 

Caldarale, Charles R wrote:
 
 From: WILLIAMer [mailto:[EMAIL PROTECTED]
 Subject: Re: tomcat with jcaptcha

 Now, i think i just only one question :)
 I know the sessions cant share with two directory(apps).
 But iinclude parent and child directory?
 The dir Admin just under the dir eCom.
 
 If you're asking if one webapp can be deployed inside another webapp's
 directory, the answer is definitely no.  Each webapp must be in a separate
 directory (or war file) immediately under the Host appBase directory, or
 else in a directory completely outside of the Host appBase.  Under no
 circumstances can webapp deployments overlap.
 
  - Chuck
 
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you
 received this in error, please contact the sender and delete the e-mail
 and its attachments from all computers.
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/tomcat-with-jcaptcha-tp18309636p18331041.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]