Re: Question ad 2021 presentation videos

2022-06-28 Thread Rony G. Flatscher (Apache)

Hi Chris,

On 28.06.2022 15:31, Christopher Schultz wrote:


On 6/28/22 05:44, Rony G. Flatscher (Apache) wrote:

Is there a link for the 2021 Tomcat presentation videos, if any?


Oh, I'm sorry. I was working on getting those onto the Presentations page and I got distracted and 
didn't finish.


I'll try to get back to that, today.


Thank you!

---rony


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Question ad 2021 presentation videos

2022-06-28 Thread Rony G. Flatscher (Apache)

Hi Coty,

On 28.06.2022 15:07, Coty Sutherland wrote:

On Tue, Jun 28, 2022 at 5:44 AM Rony G. Flatscher (Apache) 
wrote:


Is there a link for the 2021 Tomcat presentation videos, if any?


Is the playlist at
https://www.youtube.com/playlist?list=PLU2OcwpQkYCyq45LTYr07svnrCGarSWs7
what you're looking for?


thank you very much that helps already a lot! I have been asked a couple of times about the 
presentation "Apache Tomcat: Enabling Scripting Languages in JSPs" as it demonstrates how to use 
Groovy, JavaScript, Jython, ooRexx and PHP in JSPs (and for that matter any Java scripting language, 
i.e. any scripting language that implements javax.script.ScriptEngine). Your link allows one to pick 
that presentation right away!


Thank you very much!

---rony


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Question ad 2021 presentation videos

2022-06-28 Thread Rony G. Flatscher (Apache)

Is there a link for the 2021 Tomcat presentation videos, if any?

---rony




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



AW: Variables in server.xml leads to error when stopping Tomcat

2022-05-05 Thread Boesch, Henning (G-GPPD)
Hello Torsten, hello Chris

> You need to put "-Dport.shutdown=12345" to the JAVA_OPTS because the 
> stop process needs that port.

Thanks for the answer, this worked for me.

> Henning, the reason you get the error message and Tomcat /still/ stops is 
> because the shutdown process uses an OS signal if the "normal" way doesn't 
> work. So it's not just a spurious error message: it's real.

Thanks for the explanation, I was just confused, because the variable was 
replaced correctly and sending the shutdown command manually did also work.

Regards
Henning

INTERNAL


Variables in server.xml leads to error when stopping Tomcat

2022-05-05 Thread Boesch, Henning (G-GPPD)
Hello,

we are running Tomcat 9.0.62 on AIX 7.2. In our server.xml we use variables for 
ports and other values:


...

The variables are set in setenv.sh (the port is an example):

export CATALINA_OPTS="-Dport.shutdown=12345 $CATALINA_OPTS"

Tomcat is starting with this configuration and working correctly, but when 
Tomcat is stopped with shutdown.sh we get the following error:

The stop command failed. Attempting to signal the process to stop through OS 
signal.
Tomcat stopped.
May 05, 2022 8:26:38 AM org.apache.catalina.startup.Catalina stopServer
SEVERE: Could not contact [localhost:8005] (base port [8005] and offset [0]). 
Tomcat may not be running.
May 05, 2022 8:26:38 AM org.apache.catalina.startup.Catalina stopServer
SEVERE: Error stopping Catalina
java.net.ConnectException: A remote host refused an attempted connect 
operation. (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at 
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:380)
at 
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:236)
at 
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:218)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403)
at java.net.Socket.connect(Socket.java:682)
at java.net.Socket.connect(Socket.java:622)
at java.net.Socket.(Socket.java:485)
at java.net.Socket.(Socket.java:255)
at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:667)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:508)
at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:391)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:481)

Despite this error message Tomcat is stopped, but this is still bad for 
monitoring purposes and irritates support. The port 8005 is not configured in 
the server.xml and it is not in use (we checked with netstat).

We have done some investigation and found out:

1. When ${port.shutdown} in server.xml is replaced with the real integer port 
value 12345 the error does not show up (but we cannot use the variable)
2. When we send the shutdown command to port 12345 (e.g. with telnet) Tomcat 
stops without errors (but we cannot use shutdown.sh)
3. We attached to the Tomcat JMX port, checked the mbeans and they return the 
correct values:
$>get -b Catalina:type=Server port
#mbean = Catalina:type=Server:
port = 12345;
$>get -b Catalina:type=Server serverInfo
#mbean = Catalina:type=Server:
serverInfo = Apache Tomcat/9.0.62;
$>get -b Catalina:type=Server serverNumber
#mbean = Catalina:type=Server:
serverNumber = 9.0.62.0;
$>get -b Catalina:type=Server address
#mbean = Catalina:type=Server:
address = localhost;
$>get -b Catalina:type=Server shutdown
#mbean = Catalina:type=Server:
shutdown = SHUTDOWN;
$>get -b Catalina:type=Server sateName
#mbean = Catalina:type=Server:
$>get -b Catalina:type=Server portWithOffset
#mbean = Catalina:type=Server:
portWithOffset = 12345;

Do you have any idea, why this error message happens and how we can get rid of 
it, when using variables in server.xml for the shutdown port.

Regards 
Henning

INTERNAL

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: AW: Maybe a stupid (Windows related) question

2022-03-24 Thread Rony G. Flatscher (Apache)
Hi Konstantin,

On 23.03.2022 23:29, Konstantin Kolinko wrote:
> ср, 23 мар. 2022 г. в 14:12, Rony G. Flatscher (Apache) :
>> skip...
>>
>> startup.bat uses start to run catalina.bat in a new cmd window with:
>>
>> call "%EXECUTABLE%" start %CMD_LINE_ARGS%
>>
>> catalina.bat then starts Tomcat as:
>>
>> %_EXECJAVA% %CATALINA_LOGGING_CONFIG% %LOGGING_MANAGER% %JAVA_OPTS% 
>> %CATALINA_OPTS% %DEBUG_OPTS%
>> -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%"
>> -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%"
>> -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% 2>&1 1>
>> D:\orx.debug\work_rii_tomcat\test.log
>>
>> This does not work.
> (It does not matter, but you somehow lost "%ACTION%" at the end of the
> above line.)
>
> If I prefix the above line with "echo" to see what command is being
> executed, like this:
>
> echo %_EXECJAVA% %CATALINA_LOGGING_CONFIG% %LOGGING_MANAGER%
> %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS%
> -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%"
> -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%"
> -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS%
> %ACTION% 1>>mylog.txt 2>&1
>
> then I get the following results:
>
> a) After calling "startup.bat" or "catalina.bat start" I see the
> following in mylog.txt:
>
> start "Tomcat" "C:\pathtojava\java.exe" .
> org.apache.catalina.startup.Bootstrap start
>
> b) After calling "catalina.bat run" I see the following:
>
> "C:\pathtojava\java.exe" . org.apache.catalina.startup.Bootstrap start
>
> Note the difference.
>
> It is the "start" command that creates a new window.  The "call"
> command that you mentioned is just a command to execute a different
> batch file and return to continue executing the original batch file.
>
> BTW, commands "help start" and "help call" print some reference for
> those commands.
>
>
> Looking at the reference for "start", I think your only option is to
> use "catalina.bat run" to start Tomcat. When I do so, the redirection
> works as expected.
>
>
> The following also works, without any modifications to the catalina.bat file:
>
> catalina.bat run 1>>mylog.txt 2>&1
>
> or with remote debugging being enabled:
>
> catalina.bat jpda run 1>>mylog.txt 2>&1

thank you very much for your information and explanations which solves this, 
many thanks!

(Was not aware of "catalina.bat run" and the like, adding to that your 
step-by-step explanations
made it a breeze to get this up and running as a result!)

Kudos!

---rony



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: AW: Maybe a stupid (Windows related) question

2022-03-23 Thread Rony G. Flatscher (Apache)
On 23.03.2022 18:21, EXT-Denton, Sam T wrote:
> I believe that "2>&1 1>D:\orx.debug\work_rii_tomcat\test.log" will first 
> redirect stderr to stdout, and then redirect stdout to the file, leaving 
> stderr pointing to the original stdout, which is presumably the terminal.
>
> Try "1>D:\orx.debug\work_rii_tomcat\test.log 2>&1"

Thank you, this does not change the behaviour.

---rony


>
>
> -Original Message-
> From: Rony G. Flatscher (Apache)  
> Sent: Wednesday, March 23, 2022 6:12 AM
> To: users@tomcat.apache.org
> Subject: Re: AW: Maybe a stupid (Windows related) question
>
> On 23.03.2022 11:45, Thomas Hoffmann (Speed4Trade GmbH) wrote:
>>> -Ursprüngliche Nachricht-
>>> Von: Rony G. Flatscher (Apache) 
>>> Gesendet: Mittwoch, 23. März 2022 11:34
>>> An: users@tomcat.apache.org
>>> Betreff: Re: Maybe a stupid (Windows related) question
>>>
>>> On 22.03.2022 20:18, Christopher Schultz wrote:
>>>
>>> ... cut ...
>>>
>>>> You still can't really "background" the process the way you can on
>>>> *nix. Sure, you can get your command-prompt back, but if you kill
>>>> cmd.exe, so does your child process die. And if you log out, that process
>>> dies as well.
>>>
>>> The problem is different: redirecting stderr and stdout does not redirect in
>>> this scenario (employing %CATALINA_HOME%\bin\startup.bat), rather
>>> output statements to stderr
>>> (System.err.println(...)) and stdout (System.out.println(...)) gets still
>>> displayed in the Tomcat window.
>>>
>>> This involves (at least in my experiments) editing bin\startup.bat and/or
>>> bin\catalina.bat which should not be necessary if understanding Tomcat's
>>> philsophy correctly. If adjustments are necessary it is advised to supply a
>>> "bin\setup.bat" script to do so.
>>>
>>> So what I would be looking for is either a configuration change or an
>>> environment variable to set which allows redirecting stdout and stderr to
>>> appropriate log files as is done with the service version by default.
>>>
>>>> Using the Windows Service is really the best way to do it on Windows.
>>> The use case is testing Tomcat 10 in various ways, including running it in
>>> debug mode and attaching via IntelliJ for inspection.
>>>
>>> ---rony
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>>> For additional commands, e-mail: users-h...@tomcat.apache.org
>> The bat-file uses the line:
>> call "%EXECUTABLE%" start %CMD_LINE_ARGS%
>>
>> At this place you might be able to redirect the output:
>> call "%EXECUTABLE%" start %CMD_LINE_ARGS%  > out.log
>>
>> You could also try to pass the redirect param to the argument of 
>> startup.bat, don’t know if this works, e.g.
>> startup.bat " > out.log"
> startup.bat uses start to run catalina.bat in a new cmd window with:
>
> call "%EXECUTABLE%" start %CMD_LINE_ARGS%
>
> catalina.bat then starts Tomcat as:
>
> %_EXECJAVA% %CATALINA_LOGGING_CONFIG% %LOGGING_MANAGER% %JAVA_OPTS% 
> %CATALINA_OPTS% %DEBUG_OPTS%
> -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%"
> -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%"
> -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% 2>&1 1>
> D:\orx.debug\work_rii_tomcat\test.log
>
> This does not work.
>
> ---rony
>
>

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Maybe a stupid (Windows related) question

2022-03-23 Thread Rony G. Flatscher (Apache)
On 23.03.2022 13:22, Mark Thomas wrote:
> On 23/03/2022 10:34, Rony G. Flatscher (Apache) wrote:
>> The use case is testing Tomcat 10 in various ways, including running it in 
>> debug mode and attaching
>> via IntelliJ for inspection.
>
> You can still do this when Tomcat is running as a service. Just set the 
> appropriate properties.

Yes, looks like I will have to do it that way.

(Currently I have a Tomcat 10 service installation that I shutdown and then run 
a different (newer),
separate Tomcat installation for testing purposes for which I need the 
redirection of stdout and
stderr.)

---rony



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Maybe a stupid (Windows related) question

2022-03-23 Thread Rony G. Flatscher (Apache)

On 23.03.2022 12:11, Rony G. Flatscher (Apache) wrote:
> On 23.03.2022 11:51, Konstantin Kolinko wrote:
>> вт, 22 мар. 2022 г. в 20:21, Rony G. Flatscher (Apache) :
>>> For debugging purposes I downloaded the zip-version of Tomcat 10.0.18 and 
>>> start it up using
>>> %CATALINA_HOME%\bin\startup.bat.
>>>
>>> 
>>>
>>> Probably I have been doing something wrong in the past hours and not seeing 
>>> the forest for the trees
>>> anymore I kindly request help: what is needed to successfully redirect 
>>> stderr and stdout to
>>> %CATALINA_HOME%\logs after unzipping Tomcat 10 and starting it on Windows 
>>> using
>>> %CATALINA_HOME%\bin\startup.bat?
>>>
>>> TIA for any help/pointer!
>> First, I second Chris's answer
>>
>> вт, 22 мар. 2022 г. в 22:19, Christopher Schultz 
>> :
>>> 
>>>
>>> ... Windows CAN redirect both stdout and stderr to
>>> two different places, and also to combine them just like you can on *nix:
>>>
>>> bin\catalina.bat run 2>&1 > stdout_stderr.log
>>>
>>> https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-xp/bb490982(v=technet.10)?redirectedfrom=MSDN
>>>
>> Note that
>> "startup.bat" is an equivalent of calling "catalina.bat start".
>> "shutdown.bat" is an equivalent of "catalina.bat stop".
>>
>> The above command (with " run") is a different one:
>> it starts Tomcat in the same console window, as opposed to " start"
>> that opens a new console window.
>>
>> Second,
>> To redirect java.util.logging output to a file, replace ConsoleHandler
>> in conf/logging.properties with a FileHandler that writes all those
>> log lines to a file.
>>
>> Actually, logging.properties already has such a FileHandler
>> configured. See the following line:
>>
>> .handlers = 1catalina.org.apache.juli.AsyncFileHandler,
>> java.util.logging.ConsoleHandler
>>
>> It configures handlers for "." (the root). So all the same information
>> is also being written to a "1catalina" FileHandler. Removing the
>> "ConsoleHandler" from that line will stop duplicating all those log
>> messages to the console.
> The %CATALINA_HOME%\conf\logging.properties got changed according to
> <https://serverfault.com/questions/252934/how-to-redirect-tomcat-console-log-to-files-tomcat-started-via-windows-bat>
> as:
>
> handlers = 1catalina.org.apache.juli.AsyncFileHandler,
> 2localhost.org.apache.juli.AsyncFileHandler, 
> 3manager.org.apache.juli.Async
> FileHandler, 4host-manager.org.apache.juli.AsyncFileHandler, 
> java.util.logging.ConsoleHandler
>
> # .handlers = 1catalina.org.apache.juli.AsyncFileHandler, 
> java.util.logging.ConsoleHandler
>
> .handlers = 1catalina.org.apache.juli.AsyncFileHandler
>
> ... cut ...
>
> Still stdout and stderr goes to the console. The redirection "2>&1 >test.log" 
> creates the empty file
> but no output is there.
>
>> Third,
>> If you app is actually calling System.err.println(), see about
>> "swallowOutput" setting here
>> https://tomcat.apache.org/tomcat-10.0-doc/logging.html#Console
>> https://tomcat.apache.org/tomcat-10.0-doc/config/context.html
> Will try that next thank you!

Tried two ways:

  * %CATALINA_HOME%\conf\context.xml adding attribute, so " only

Did not make a difference.

Having permutated so many different things I will delete everything and start 
over with a pristine
unzipped Tomcat 10 to see if that makes a difference.

---rony




Re: AW: Maybe a stupid (Windows related) question

2022-03-23 Thread Rony G. Flatscher (Apache)
On 23.03.2022 11:45, Thomas Hoffmann (Speed4Trade GmbH) wrote:
>> -Ursprüngliche Nachricht-
>> Von: Rony G. Flatscher (Apache) 
>> Gesendet: Mittwoch, 23. März 2022 11:34
>> An: users@tomcat.apache.org
>> Betreff: Re: Maybe a stupid (Windows related) question
>>
>> On 22.03.2022 20:18, Christopher Schultz wrote:
>>
>> ... cut ...
>>
>>> You still can't really "background" the process the way you can on
>>> *nix. Sure, you can get your command-prompt back, but if you kill
>>> cmd.exe, so does your child process die. And if you log out, that process
>> dies as well.
>>
>> The problem is different: redirecting stderr and stdout does not redirect in
>> this scenario (employing %CATALINA_HOME%\bin\startup.bat), rather
>> output statements to stderr
>> (System.err.println(...)) and stdout (System.out.println(...)) gets still
>> displayed in the Tomcat window.
>>
>> This involves (at least in my experiments) editing bin\startup.bat and/or
>> bin\catalina.bat which should not be necessary if understanding Tomcat's
>> philsophy correctly. If adjustments are necessary it is advised to supply a
>> "bin\setup.bat" script to do so.
>>
>> So what I would be looking for is either a configuration change or an
>> environment variable to set which allows redirecting stdout and stderr to
>> appropriate log files as is done with the service version by default.
>>
>>> Using the Windows Service is really the best way to do it on Windows.
>> The use case is testing Tomcat 10 in various ways, including running it in
>> debug mode and attaching via IntelliJ for inspection.
>>
>> ---rony
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
> The bat-file uses the line:
> call "%EXECUTABLE%" start %CMD_LINE_ARGS%
>
> At this place you might be able to redirect the output:
> call "%EXECUTABLE%" start %CMD_LINE_ARGS%  > out.log
>
> You could also try to pass the redirect param to the argument of startup.bat, 
> don’t know if this works, e.g.
> startup.bat " > out.log"

startup.bat uses start to run catalina.bat in a new cmd window with:

call "%EXECUTABLE%" start %CMD_LINE_ARGS%

catalina.bat then starts Tomcat as:

%_EXECJAVA% %CATALINA_LOGGING_CONFIG% %LOGGING_MANAGER% %JAVA_OPTS% 
%CATALINA_OPTS% %DEBUG_OPTS%
-D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%"
-Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%"
-Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% 2>&1 1>
D:\orx.debug\work_rii_tomcat\test.log

This does not work.

---rony




Re: Maybe a stupid (Windows related) question

2022-03-23 Thread Rony G. Flatscher (Apache)

On 23.03.2022 11:51, Konstantin Kolinko wrote:
> вт, 22 мар. 2022 г. в 20:21, Rony G. Flatscher (Apache) :
>> For debugging purposes I downloaded the zip-version of Tomcat 10.0.18 and 
>> start it up using
>> %CATALINA_HOME%\bin\startup.bat.
>>
>> 
>>
>> Probably I have been doing something wrong in the past hours and not seeing 
>> the forest for the trees
>> anymore I kindly request help: what is needed to successfully redirect 
>> stderr and stdout to
>> %CATALINA_HOME%\logs after unzipping Tomcat 10 and starting it on Windows 
>> using
>> %CATALINA_HOME%\bin\startup.bat?
>>
>> TIA for any help/pointer!
> First, I second Chris's answer
>
> вт, 22 мар. 2022 г. в 22:19, Christopher Schultz 
> :
>> 
>>
>> ... Windows CAN redirect both stdout and stderr to
>> two different places, and also to combine them just like you can on *nix:
>>
>> bin\catalina.bat run 2>&1 > stdout_stderr.log
>>
>> https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-xp/bb490982(v=technet.10)?redirectedfrom=MSDN
>>
> Note that
> "startup.bat" is an equivalent of calling "catalina.bat start".
> "shutdown.bat" is an equivalent of "catalina.bat stop".
>
> The above command (with " run") is a different one:
> it starts Tomcat in the same console window, as opposed to " start"
> that opens a new console window.
>
> Second,
> To redirect java.util.logging output to a file, replace ConsoleHandler
> in conf/logging.properties with a FileHandler that writes all those
> log lines to a file.
>
> Actually, logging.properties already has such a FileHandler
> configured. See the following line:
>
> .handlers = 1catalina.org.apache.juli.AsyncFileHandler,
> java.util.logging.ConsoleHandler
>
> It configures handlers for "." (the root). So all the same information
> is also being written to a "1catalina" FileHandler. Removing the
> "ConsoleHandler" from that line will stop duplicating all those log
> messages to the console.

The %CATALINA_HOME%\conf\logging.properties got changed according to
<https://serverfault.com/questions/252934/how-to-redirect-tomcat-console-log-to-files-tomcat-started-via-windows-bat>
as:

handlers = 1catalina.org.apache.juli.AsyncFileHandler,
2localhost.org.apache.juli.AsyncFileHandler, 3manager.org.apache.juli.Async
FileHandler, 4host-manager.org.apache.juli.AsyncFileHandler, 
java.util.logging.ConsoleHandler

# .handlers = 1catalina.org.apache.juli.AsyncFileHandler, 
java.util.logging.ConsoleHandler

.handlers = 1catalina.org.apache.juli.AsyncFileHandler

... cut ...

Still stdout and stderr goes to the console. The redirection "2>&1 >test.log" 
creates the empty file
but no output is there.

> Third,
> If you app is actually calling System.err.println(), see about
> "swallowOutput" setting here
> https://tomcat.apache.org/tomcat-10.0-doc/logging.html#Console
> https://tomcat.apache.org/tomcat-10.0-doc/config/context.html

Will try that next thank you!

---rony



Re: Maybe a stupid (Windows related) question

2022-03-23 Thread Rony G. Flatscher (Apache)
On 22.03.2022 20:18, Christopher Schultz wrote:

... cut ...

> You still can't really "background" the process the way you can on *nix. 
> Sure, you can get your
> command-prompt back, but if you kill cmd.exe, so does your child process die. 
> And if you log out,
> that process dies as well.

The problem is different: redirecting stderr and stdout does not redirect in 
this scenario
(employing %CATALINA_HOME%\bin\startup.bat), rather output statements to stderr
(System.err.println(...)) and stdout (System.out.println(...)) gets still 
displayed in the Tomcat
window.

This involves (at least in my experiments) editing bin\startup.bat and/or 
bin\catalina.bat which
should not be necessary if understanding Tomcat's philsophy correctly. If 
adjustments are necessary
it is advised to supply a "bin\setup.bat" script to do so.

So what I would be looking for is either a configuration change or an 
environment variable to set
which allows redirecting stdout and stderr to appropriate log files as is done 
with the service
version by default.

> Using the Windows Service is really the best way to do it on Windows.

The use case is testing Tomcat 10 in various ways, including running it in 
debug mode and attaching
via IntelliJ for inspection.

---rony

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Maybe a stupid (Windows related) question

2022-03-22 Thread Rony G. Flatscher (Apache)
For debugging purposes I downloaded the zip-version of Tomcat 10.0.18 and start 
it up using
%CATALINA_HOME%\bin\startup.bat.

This will create by default a separate process (terminal, commandline window) 
in which Tomcat runs
and dispatches all output including stdout and stderr output into that window.

By contrast the Windows service installation would redirect stdout and stderr 
by default to
%CATALINA_HOME%\logs\ using "tomcat10-stderr.yyy-mm-dd.log" and 
"tomcat10-stdout.-mm-dd.log" as
their name. The same would be desired for the "startup.bat" version of Tomcat 
10.

Searched  and
 to no avail. Searching 
the Internet the best
I could find
was

which indeed redirects the Tomcat startup information to
%CATALINA_HOME%\logs\catalina.-mm-dd.log, but not stdout and stderr which 
do not get redirected.
Using redirections directly in "startup.bat" or "catalina.bat" as suggested 
further down in the
serverfault.com did not yield the desired redirection.

Probably I have been doing something wrong in the past hours and not seeing the 
forest for the trees
anymore I kindly request help: what is needed to successfully redirect stderr 
and stdout to
%CATALINA_HOME%\logs after unzipping Tomcat 10 and starting it on Windows using
%CATALINA_HOME%\bin\startup.bat?

TIA for any help/pointer!

---rony



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: ApacheCon@Home, Tomcat-Track, request for input ...

2021-09-13 Thread Rony G. Flatscher (Apache)
In the meantime I have prepared a few nutshell examples to demonstrate how to 
use scripting
languages with Tomcat for the talk.

In case anyone is interested you can find them here (a rather old Linux 
machine):

  * Tomcat 9 (Java EE): <http://137.208.114.23:42857/demoASF2021/>, Java 8 LTS
  * Tomcat 10 (Jakarta EE): <http://137.208.114.23:42858/demoASF2021/>, Java 11 
LTS

The scripting languages (not sure whether I keep all of them for the talk) 
currently are:

  * ooRexx (implemented in C++ with a Java bridge)
  * JavaScript (Nashorn, JVM)
  * Groovy (JVM)
  * Jython (JVM)
  * PHP/Resin (JVM)

You will be able to see the sources of the JSPs and the code right via the 
supplied JSP-links.

Any remarks/feedback welcome!

---rony

P.S.: Please note, I will be off for a few days starting tomorrow noon such 
that the test server
will not be serviced.


On 20.08.2021 12:13, Rony G. Flatscher (Apache) wrote:
> Hi there,
>
> in a month ApacheCom@Home 2021 [1] starts and has a Tomcat Track [2] in which 
> I will present a talk
> "Apache Tomcat: Enabling Scripting Languages in JSPs" [3]. About getting 
> ready to prepare the slides
> and samples I was wondering whether anyone in the Tomcat community would have 
> questions, ideas,
> suggestions, curiosities etc. and would kindly request for input if you have 
> any.
>
> ---rony
>
> [1] ApacheCon@Home 2021: <https://www.apachecon.com/acah2021/tracks/>
> [2] Tomcat track: <https://www.apachecon.com/acah2021/tracks/tomcat.html>
> [3] Apache Tomcat: Enabling Scripting Languages in JSPs:
> <https://www.apachecon.com/acah2021/tracks/tomcat.html#T1540>


ApacheCon@Home, Tomcat-Track, request for input ...

2021-08-20 Thread Rony G. Flatscher (Apache)
Hi there,

in a month ApacheCom@Home 2021 [1] starts and has a Tomcat Track [2] in which I 
will present a talk
"Apache Tomcat: Enabling Scripting Languages in JSPs" [3]. About getting ready 
to prepare the slides
and samples I was wondering whether anyone in the Tomcat community would have 
questions, ideas,
suggestions, curiosities etc. and would kindly request for input if you have 
any.

---rony

[1] ApacheCon@Home 2021: 
[2] Tomcat track: 
[3] Apache Tomcat: Enabling Scripting Languages in JSPs:




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: How to access Tomcat session objects directly via JavaScript?

2021-05-16 Thread Rony G. Flatscher (Apache)
Leo,

On 16.05.2021 03:16, leo wrote:
> Hi Folks
>
> In a small scale personal project served by Tomcat I record things per 
> logged-in user. The user is
> available as an attribute to Tomcat’s session objects. In the JSP pages I 
> retrieve the session
> object *through Java* like this
>
>     <%
>     HttpSession session = request.getSession();
>     ...
>     user = (String)session.getAttribute("user");
>     ...
>     %>
>
> Then later on these pages *in the JavaScript* part I have:
>
>     
>     var user = "<%=user%>"
>     ...
>     
>
> In the JavaScript part I then do something with the *JavaScript* variable 
> `user`.
>
> I now would like to move away from JSP to normal HTML pages (stills served by 
> Tomcat with the
> session backend)
>
> Question: Can I get the content of the session object in pure JavaScript? Can 
> I somehow configure
> Tomcat to put the session info in some page headers or similar so that 
> JavaScript can read it
> directly?

what taglib are you using or is your example purely hypothetical?

---rony



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Defining environment variables for a webapp ?

2021-04-27 Thread Rony G. Flatscher (Apache)
Niranjan:

one correction:

On 27.04.2021 15:05, Rony G. Flatscher (Apache) wrote:
> ("heyhey.bat" is executed in a subprocess with a new environment such that 
> its PATH value is
> unchanged!). 

the above statement is wrong, the current environment is inherited with ooRexx' 
ADDRESS instruction
to run commands, sorry, should have double-checked before posting! :(

---rony


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Defining environment variables for a webapp ?

2021-04-27 Thread Rony G. Flatscher (Apache)
On 26.04.2021 20:19, Niranjan Rao wrote:
> On 4/14/21 5:29 AM, Rony G. Flatscher (Apache) wrote:
>> A JVM
>> AFAIK would not honor changes to the environment after it got started
>
> A serious question. Apologies for selective selection from the response.
>
> Are there any operating systems where change in environment is automatically 
> reflected in child
> process? My understanding was, processes always inherit parent environment 
> and have no way of
> knowing what changed.
>
> If you managed to spawn a process with different parent based on your 
> operating system, then you
> might see new values, but most of the spawn/exec calls (regardless of 
> language of implmentation)
> inherit the exact same environment variables. Some calls do allow you to 
> setup the environment
> variables for child process but struggling to figure out where grandparent 
> process informed parent
> about environment change which can be sent to grandchild.

Well, it depends what one does, e.g. spawning a new process is different than 
e.g. changing PATH in
the same process and then relying on the new value for PATH to take effect when 
looking for programs
to run/execute.

An example (Windows, ooRexx):

test.rex ... an ooRexx script that uses Rexx to find "subdir\hey.rex" and 
uses Windows to find
"subdir\heyhey.bat", both depend on PATH (which gets changed in the running 
program and takes
effect as can be seen by the output below); failure is shown with frownies, 
success with smileys :)

subdir\hey.rex ... an ooRexx script displaying the invocation information 
(operating system, how
invoked, fully qualified path to this program) and the current dir

subdir\heyhey.bat ... a batch file displaying some environment variable 
('windir')

Here the output of running "test.rex":

G:\test\orx\env>test.rex
1a) testcall():
:-( | not found!
1b) testcallbat():
'heyhey.bat' is not recognized as an internal or external command,
operable program or batch file.
:-( | not found! | RC=1

... about to add 'G:\test\orx\env\subdir' to PATH ...

2a) testcall():
--> hey.rex: parse source s: [WindowsNT SUBROUTINE 
G:\test\orx\env\subdir\hey.rex]
--> hey.rex: directory()   : [G:\test\orx\env]
:-) | ok!
2b) testcallbat():
*** heyhey.bat: just arrived ***
*** heyhey.bat: windir=C:\WINDOWS ***
*** heyhey.bat: about to return ***
:-) | RC=0

As long as PATH does not contain the "subdir" directory neither "hey.rex" nor 
"heyhey.bat" (this
even causes an error message) are found by Rexx or Windows, cf. 1a) and 1b 
(displays the return code
next to the frownie) above. Once the "subdir" directory gets added in the 
running program (in the
same process) and both programs are found by Rexx and Windows as can be seen by 
the output 2a) and
2b) ("heyhey.bat" is executed in a subprocess with a new environment such that 
its PATH value is
unchanged!).

HTH,

---rony

P.S.: For the record the three files:

subdir\hey.rex:

#!/usr/bin/env rexx
parse source s -- get invocation information
say "--> hey.rex:" "parse source s: ["s"]"   -- show invocation 
information
say "--> hey.rex:" "directory()   : ["directory()"]" -- show current 
directory

subdir\heyhey.bat:

@echo off
echo *** heyhey.bat: just arrived ***
echo *** heyhey.bat: windir=%windir% ***
echo *** heyhey.bat: about to return ***

test.rex:

#!/usr/bin/env rexx
say "1a) testcall():"   -- call a Rexx program
say testCall()
say "1b) testcallbat():"
res=testcallbat()   -- invoke a command
say res
say

newDir=directory()"\subdir"
say "... about to add '"newDir"' to PATH ..."
   -- define new value for PATH
newValue=value('PATH', ,"environment")";"newDir
oldValue=value('PATH', newValue, "environment")   -- change PATH value
say

say "2a) testcall():"   -- call a Rexx program
say testCall()
say "2b) testcallbat():"   -- invoke a command
res=testcallbat()   -- invoke a command
say res

::routine testcall   -- call another Rexx program
  signal on syntax   -- if syntax exception then jump to label "syntax:"
  call hey.rex   -- call the Rexx program, PATH gets searched
  return ":-) | ok!"-- everything went fine, return a smiley
syntax:  -- label
  return ":-( | not found!"   -- return frownie

::routine testcallbat -- call a Windows batch file
  address system "heyhey.bat" -- let Window search and execute the command
  if rc=0 then return ":-) | RC="rc -- if return code is 0 return smiley
  return ":-( | not found! | RC="rc   -- return code indicates 
problem, return frownie






Re: ApacheCon @Home 2021 Call for Presentations is open!

2021-04-25 Thread Rony G. Flatscher (Apache)
Hi Chris,

On 25.04.2021 15:57, Christopher Schultz wrote:
> On 4/24/21 13:23, Rony G. Flatscher (Apache) wrote:
>> Hi there,
>>
>> how about something like:
>>
>>  Apache Tomcat: Enabling Scripting Languages in JSPs
>>
>>  The Java Server Page (JSP) technology allows Java programmers to write 
>> webserver
>> applications by
>>  injecting Java code into HTML or XML pages which then get translated 
>> into Java programs,
>>  compiled and executed each time a client request refers to that JSP. 
>> This presentation
>>  introduces a new taglib which makes it possible to use any Java 
>> scripting language (exploiting
>>  either the Java scripting framework or the Apache Bean Scripting 
>> framework) in JSPs in addition
>>  to or instead of Java thereby serving client requests in the client's 
>> request thread. The
>> taglib
>>  allows among other things to fetch the script code from files and 
>> invoke such programs with the
>>  Servlet's service method arguments (request and response).
>>
>> Would such a presentation be of interest to the audience?
>
> I would definitely submit that to the ApacheCon @Home Call-for-Presentations. 
> Proposals are
> evaluated by a bunch of different people. most presentations I've seen come 
> across in the past
> have been accepted.

thank you for your thumbs up, just filed the proposal.

---rony



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: ApacheCon @Home 2021 Call for Presentations is open!

2021-04-24 Thread Rony G. Flatscher (Apache)
Hi there,

how about something like:

Apache Tomcat: Enabling Scripting Languages in JSPs

The Java Server Page (JSP) technology allows Java programmers to write 
webserver applications by
injecting Java code into HTML or XML pages which then get translated into 
Java programs,
compiled and executed each time a client request refers to that JSP. This 
presentation
introduces a new taglib which makes it possible to use any Java scripting 
language (exploiting
either the Java scripting framework or the Apache Bean Scripting framework) 
in JSPs in addition
to or instead of Java thereby serving client requests in the client's 
request thread. The taglib
allows among other things to fetch the script code from files and invoke 
such programs with the
Servlet's service method arguments (request and response).

Would such a presentation be of interest to the audience?

---rony


On 01.04.2021 21:13, Christopher Schultz wrote:
> All,
>
> ApacheCon @Home is coming to your city/town/village/hamlet/countryside this 
> September 21 - 23.
>
> Like last year's event, this one will be virtual, so there is no need to book
> travel/accommodations or potentially arrange for time-off from work. You 
> don't even need to wear
> pants if you don't want to.
>
> The Call for Presentations is open NOW. Please submit your Tomcat (or other!) 
> related presentation
> on this site:
>
> https://acah2021.jamhosted.net/
>
> Feel free to browse the Presentations Page[1] on the Tomcat web site for some 
> idea of what
> presentations have been given in the past. Anything related to Tomcat, 
> servlet (etc.) specs, Java
> web application development, etc. would be considered in-scope for the Tomcat 
> track. There are
> many other tracks planned as well.
>
> Yous presentation does /not need to be completed/ when you submit your idea. 
> So if you have an
> idea, go ahead and submit it. You will have a few months to build your idea 
> into a presentation.
>
> If you have any questions, please send a message to the users@ list with 
> "ApacheCon" in the
> subject. Please don't email me individually unless you have a question that 
> cannot be answered by
> anyone but me. My reply would go to the users@ list anyway, so you may as 
> well post the question
> to the list in the first place :)
>
> Thanks,
> -chris
>
> [1] https://tomcat.apache.org/presentations.html
>
>


Re: Making non-Java binareis available to Tomcat, how about ...

2021-04-23 Thread Rony G. Flatscher (Apache)
Hi Chris,

On 23.04.2021 05:12, Christopher Schultz wrote:
> On 4/21/21 08:53, Rony G. Flatscher (Apache) wrote:
>> Hi Chris,
>>
>> On 20.04.2021 16:47, Christopher Schultz wrote:
>> ... cut ...
>> When bringing non-Java binaries into the picture then they work in the 
>> process environment where
>>>> e.g. PATH defines which directories are looked up for finding executables 
>>>> (which might be
>>>> important
>>>> for some natives) and on Windows DLLs, and in Linux and MacOS shared 
>>>> libraries need to be found by
>>>> the non-Java native code. Hence the desire to allow setting up the process 
>>>> environment before
>>>> starting up Tomcat in a simple, but effective way.
>>>
>>> You may want to do a Google search for "java.library.path".
>>
>> have been aware of (and using) "java.library.path" for quite some time, it 
>> does not do for natives
>> what it does for the JVM. E.g. adding a path via something like
>>
>>     -Djava.library.path="%PATH%;x:\some\path" | 
>> -Djava.library.path="${PATH}:/some/path"
>>
>> does not change the process environment variable PATH accordingly (adding 
>> "x:\some\path" |
>> "/some/path" to the PATH environment variable) such that a native library 
>> can issue a command that
>> will be looked for in addition in "x:\some\path" | "/some/path" (just tested 
>> it again on Windows
>> with Java 8).
>
> Do you mean when you call exec() or similar (yuck!) or do you mean loading 
> dependencies for your
> native library? 
There are scenarios where the former is done in the context of the native 
binaries (not from Java).

> If you have native dependencies for your shared library, you should also put 
> them into the
> java.library.path.
>
> If you are calling exec() or system() or anything like that from your Java 
> code:

No, not from the Java code, but may be a valid scenario from/via the native 
binaries.

> 1. Don't
> 2. Don't use the PATH environment variable; always use full paths

There are scenarios where PATH becomes relevant (again for native binaries, not 
Java).

>>>> However, with CATALINA_OPTS you brought the startup/stop|shutdown/catalina 
>>>> scripts into the
>>>> picture,
>>>> which might be a possible solution (though being very wary 
>>>> altering/tampering such fundamental
>>>> scripts).
>>>
>>> I didn't suggest that you modify those scripts. I only suggested that you 
>>> use an environment
>>> variable that those scripts are aware of.
>>>
>>> Typically, admins will create a bin/setenv.sh script which sets all 
>>> environment variables
>>> necessary for local operation. You could even change the PATH variable -- 
>>> if you really want to do
>>> that -- there.
>>
>> Thank you very much for this pointer, seeing "setenv.{sh|bat}" being 
>> exercised in the Tomcat
>> supplied scripts, if it exists!
>
> That's why it's there.

:)

How about services/daemons?

> You can even set $PATH in there if you really want to.

Yes, indeed, which got me a little bit excited. :)

---rony



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Is there a way to know/infer that a JSP got freshly compiled from a taglib library ?

2021-04-21 Thread Rony G. Flatscher (Apache)
Hi Chris,

On 20.04.2021 16:59, Christopher Schultz wrote:
> On 4/20/21 07:06, Rony G. Flatscher (Apache) wrote:
>> On 19.04.2021 17:32, Christopher Schultz wrote:
>>> On 4/18/21 08:06, Rony G. Flatscher (Apache) wrote:
>>>> On 11.03.2021 12:23, Rony G. Flatscher (Apache) wrote:
>>>>> On 11.03.2021 11:53, Mark Thomas wrote:
>>>>>> On 10/03/2021 15:14, Rony G. Flatscher (Apache) wrote:
>>>>>>> Is there a way to know/infer that a JSP got freshly compiled from e.g. 
>>>>>>> a taglib library?
>>>>>>>
>>>>>>> For caching purposes it would be necessary to learn whether a JSP got 
>>>>>>> recompiled as the cache
>>>>>>> should
>>>>>>> be purged in that case.
>>>>>>>
>>>>>>> Is there a way to find out whether a JSP run is the very first after 
>>>>>>> (re-)compilation?
>>>>>>>
>>>>>>> Or can one rely that if a JSP gets recompiled that a new PageContext 
>>>>>>> gets created for it (or if
>>>>>>> reused does not contain any custom attributes placed there earlier at 
>>>>>>> the PAGE_SCOPE)?
>>>>>> Page scope gets reset at the end of a request so that won't work.
>>>>>>
>>>>>> It might not be perfect (containers are allowed to unload unused 
>>>>>> servlets/JSPs) but in you are
>>>>>> using Tomcat and haven't configured maxLoadedJsps or jspIdleTimeout then 
>>>>>> you should be able
>>>>>> to use
>>>>>> the jspInit() method. (See JSP spec for details).
>>>>
>>>> It seems that the implicit JSP "page" object can probably be used to 
>>>> determine whether a JSP got
>>>> recompiled as its hashCode() changes after recompilation.
>>>
>>> Something safer might be to keep a cache of datestamps keyed by JSP name 
>>> (or whatever). When the
>>> JSP's init() method is called, you could update the datestamp.
>>>
>>> Or do you need to know about the recompliation before the init() is called?
>>
>> The BodyTag interface [1,2] does not define an init() method, you think 
>> probably of the Servlet
>> interface [3,4].
>
> Aha, it wasn't clear to me that you needed to know at the taglib level that a 
> JSP had been
> recompiled.
>
>> Ad 'page' implicit object: if the 'page' object gets referenced in the 
>> taglib, then a re-compiled
>> version of the same JSP page is guaranteed to have a different hashCode() 
>> value
>
> Really? That seems ... awfully convenient and also quite hacky. Do you have a 
> reference to the
> spec that guarantees that modified hashcode?

Sorry, it is not "guaranteed" (there are no such specs), it should have 
probably read "guaranteed
for all practical usages". (When the caching of inline scripts gets implemented 
it may use the
page's className or the className@hashCode format as a string index into a 
HashMap and then check
whether the object exists and if so, is equal to the current 'page' object and 
act accordingly.)

>> and as such suffices
>> to determine whether a page got compiled since the last time this got 
>> checked in the taglib. The
>> motivation for learning about a (re-)fresh(ed) page is to remove any cached 
>> compiled scripts of that
>> jsp (if it got recompiled then something got changed in the jsp, so also 
>> scripts might have changed)
>> and from then on build a new cache.
>
> Yeah, I don't see a great way to do that. You can get the ServletContext from 
> the PageContext, but
> ... you would still need a lot of support in there to get what you want.

Currently the externally stored scripts get cached in a static HashMap, the 
page-related script
manager and its script engines get cached and controlled via PageContext 
attributes and ThreadLocal.

> What about cheating and just putting a Tag at the top-level where you have to 
> declare the
> "version" of the script, and changing the "version" causes the cache to be 
> cleared?

Ideally the user should not have to do that (to forgo user errors).

---rony



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Making non-Java binareis available to Tomcat, how about ...

2021-04-21 Thread Rony G. Flatscher (Apache)
Hi Chris,

On 20.04.2021 16:47, Christopher Schultz wrote:
... cut ...
When bringing non-Java binaries into the picture then they work in the process 
environment where
>> e.g. PATH defines which directories are looked up for finding executables 
>> (which might be important
>> for some natives) and on Windows DLLs, and in Linux and MacOS shared 
>> libraries need to be found by
>> the non-Java native code. Hence the desire to allow setting up the process 
>> environment before
>> starting up Tomcat in a simple, but effective way.
>
> You may want to do a Google search for "java.library.path".

have been aware of (and using) "java.library.path" for quite some time, it does 
not do for natives
what it does for the JVM. E.g. adding a path via something like

   -Djava.library.path="%PATH%;x:\some\path" | 
-Djava.library.path="${PATH}:/some/path"

does not change the process environment variable PATH accordingly (adding 
"x:\some\path" |
"/some/path" to the PATH environment variable) such that a native library can 
issue a command that
will be looked for in addition in "x:\some\path" | "/some/path" (just tested it 
again on Windows
with Java 8).

>> However, with CATALINA_OPTS you brought the startup/stop|shutdown/catalina 
>> scripts into the picture,
>> which might be a possible solution (though being very wary 
>> altering/tampering such fundamental
>> scripts).
>
> I didn't suggest that you modify those scripts. I only suggested that you use 
> an environment
> variable that those scripts are aware of.
>
> Typically, admins will create a bin/setenv.sh script which sets all 
> environment variables
> necessary for local operation. You could even change the PATH variable -- if 
> you really want to do
> that -- there.

Thank you very much for this pointer, seeing "setenv.{sh|bat}" being excercised 
in the Tomcat
supplied scripts, if it exists!

---rony



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Is there a way to know/infer that a JSP got freshly compiled from a taglib library ?

2021-04-20 Thread Rony G. Flatscher (Apache)
Hi Chris,

On 19.04.2021 17:32, Christopher Schultz wrote:
>
> On 4/18/21 08:06, Rony G. Flatscher (Apache) wrote:
>> On 11.03.2021 12:23, Rony G. Flatscher (Apache) wrote:
>>> On 11.03.2021 11:53, Mark Thomas wrote:
>>>> On 10/03/2021 15:14, Rony G. Flatscher (Apache) wrote:
>>>>> Is there a way to know/infer that a JSP got freshly compiled from e.g. a 
>>>>> taglib library?
>>>>>
>>>>> For caching purposes it would be necessary to learn whether a JSP got 
>>>>> recompiled as the cache
>>>>> should
>>>>> be purged in that case.
>>>>>
>>>>> Is there a way to find out whether a JSP run is the very first after 
>>>>> (re-)compilation?
>>>>>
>>>>> Or can one rely that if a JSP gets recompiled that a new PageContext gets 
>>>>> created for it (or if
>>>>> reused does not contain any custom attributes placed there earlier at the 
>>>>> PAGE_SCOPE)?
>>>> Page scope gets reset at the end of a request so that won't work.
>>>>
>>>> It might not be perfect (containers are allowed to unload unused 
>>>> servlets/JSPs) but in you are
>>>> using Tomcat and haven't configured maxLoadedJsps or jspIdleTimeout then 
>>>> you should be able to use
>>>> the jspInit() method. (See JSP spec for details).
>>
>> It seems that the implicit JSP "page" object can probably be used to 
>> determine whether a JSP got
>> recompiled as its hashCode() changes after recompilation.
>
> Something safer might be to keep a cache of datestamps keyed by JSP name (or 
> whatever). When the
> JSP's init() method is called, you could update the datestamp.
>
> Or do you need to know about the recompliation before the init() is called?

The BodyTag interface [1,2] does not define an init() method, you think 
probably of the Servlet
interface [3,4].

Ad 'page' implicit object: if the 'page' object gets referenced in the taglib, 
then a re-compiled
version of the same JSP page is guaranteed to have a different hashCode() value 
and as such suffices
to determine whether a page got compiled since the last time this got checked 
in the taglib. The
motivation for learning about a (re-)fresh(ed) page is to remove any cached 
compiled scripts of that
jsp (if it got recompiled then something got changed in the jsp, so also 
scripts might have changed)
and from then on build a new cache.

---rony

[1] javax-BodyTag with lifecycle description:
<https://docs.oracle.com/javaee/7/api/javax/servlet/jsp/tagext/BodyTag.html>
[2] jakarta-BodyTag:
<http://tomee.apache.org/jakartaee-9.0/javadoc/jakarta/servlet/jsp/tagext/BodyTag.html#doInitBody-->
[3] jakarta-Servlet:
<https://javadoc.io/static/jakarta.servlet/jakarta.servlet-api/5.0.0/jakarta/servlet/Servlet.html>
[4] Wikipedia "Jakarta Servlet": <https://en.wikipedia.org/wiki/Jakarta_Servlet>



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Making non-Java binareis available to Tomcat, how about ...

2021-04-20 Thread Rony G. Flatscher (Apache)
Hi Chris,

CATALINA_OPTS is about passing on Java options and System property definitions, 
if not mistaken.
When bringing non-Java binaries into the picture then they work in the process 
environment where
e.g. PATH defines which directories are looked up for finding executables 
(which might be important
for some natives) and on Windows DLLs, and in Linux and MacOS shared libraries 
need to be found by
the non-Java native code. Hence the desire to allow setting up the process 
environment before
starting up Tomcat in a simple, but effective way.

However, with CATALINA_OPTS you brought the startup/stop|shutdown/catalina 
scripts into the picture,
which might be a possible solution (though being very wary altering/tampering 
such fundamental scripts).

---rony


On 19.04.2021 17:37, Christopher Schultz wrote:

> Rony,
>
> On 4/19/21 08:54, Rony G. Flatscher (Apache) wrote:
>> Java based web servers are - of course - focused on the Java programming 
>> language and the Java
>> runtime environment.
>>
>> Nevertheless, there are situations where non-Java binaries may become 
>> resources that may prove
>> helpful in a Java environment.
>>
>> As Java allows interfacing with non-Java binaries via JNI (Java native 
>> interface) it may make sense
>> to support native binaries in Tomcat as well.
>>
>> Use case in question would be to make non-Java programming languages with 
>> JNI interfaces available
>> without having to install such programming languages globally on the server. 
>>  There may be other use
>> cases as well (e.g. non-public security libraries).
>>
>> In order to make this as simple as possible and yet allow for the Tomcat 
>> setup to be as secure as
>> setting up shared Java libraries, how about allowing for the following:
>>
>>    * allow optional "$CATALINA_HOME/natives/bin" and 
>> "$CATALINA_HOME/natives/lib" directories into
>>  which the (Tomcat shared) binaries can be placed,
>
> Is there anything wrong with using CATALINA_OPTS to set java.library.path to 
> some arbitrary value?
> I always have mine set to CATALINA_BASE/lib
>
>>    * if "$CATALINA_HOME/natives/bin" exists have the PATH environment 
>> variable prepended with
>>  "$CATALINA_HOME/natives/bin" before Tomcat gets started up,
>
> Note that java.library.path (a system property) would be better than changing 
> the PATH environment
> variable.
>
>>    * if "$CATALINA_HOME/natives/lib" exists do whatever is needed for Linux 
>> and MacOS systems for
>> the
>>  process to become able to recognize the shared native libraries there,
>
> Nothing further is needed after java.library.path is set.
>
>>    * if there are jar files (possibly with JNI interfaces) in 
>> "$CATALINA_HOME/natives/lib" then add
>>  them to Tomcat (like the jar files in "$CATALINA_HOME/lib").
>
> If you use CATALINA_BASE/lib, then this is already done for you.
>
> -chris
>


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Making non-Java binareis available to Tomcat, how about ...

2021-04-19 Thread Rony G. Flatscher (Apache)
Java based web servers are - of course - focused on the Java programming 
language and the Java
runtime environment.

Nevertheless, there are situations where non-Java binaries may become resources 
that may prove
helpful in a Java environment.

As Java allows interfacing with non-Java binaries via JNI (Java native 
interface) it may make sense
to support native binaries in Tomcat as well.

Use case in question would be to make non-Java programming languages with JNI 
interfaces available
without having to install such programming languages globally on the server.  
There may be other use
cases as well (e.g. non-public security libraries).

In order to make this as simple as possible and yet allow for the Tomcat setup 
to be as secure as
setting up shared Java libraries, how about allowing for the following:

  * allow optional "$CATALINA_HOME/natives/bin" and 
"$CATALINA_HOME/natives/lib" directories into
which the (Tomcat shared) binaries can be placed,
  * if "$CATALINA_HOME/natives/bin" exists have the PATH environment variable 
prepended with
"$CATALINA_HOME/natives/bin" before Tomcat gets started up,
  * if "$CATALINA_HOME/natives/lib" exists do whatever is needed for Linux and 
MacOS systems for the
process to become able to recognize the shared native libraries there,
  * if there are jar files (possibly with JNI interfaces) in 
"$CATALINA_HOME/natives/lib" then add
them to Tomcat (like the jar files in "$CATALINA_HOME/lib").

Would such an idea be seen as acceptable, helpful?

---rony




Re: Is there a way to know/infer that a JSP got freshly compiled from a taglib library ?

2021-04-18 Thread Rony G. Flatscher (Apache)
On 11.03.2021 12:23, Rony G. Flatscher (Apache) wrote:
> On 11.03.2021 11:53, Mark Thomas wrote:
>> On 10/03/2021 15:14, Rony G. Flatscher (Apache) wrote:
>>> Is there a way to know/infer that a JSP got freshly compiled from e.g. a 
>>> taglib library?
>>>
>>> For caching purposes it would be necessary to learn whether a JSP got 
>>> recompiled as the cache should
>>> be purged in that case.
>>>
>>> Is there a way to find out whether a JSP run is the very first after 
>>> (re-)compilation?
>>>
>>> Or can one rely that if a JSP gets recompiled that a new PageContext gets 
>>> created for it (or if
>>> reused does not contain any custom attributes placed there earlier at the 
>>> PAGE_SCOPE)?
>> Page scope gets reset at the end of a request so that won't work.
>>
>> It might not be perfect (containers are allowed to unload unused 
>> servlets/JSPs) but in you are
>> using Tomcat and haven't configured maxLoadedJsps or jspIdleTimeout then you 
>> should be able to use
>> the jspInit() method. (See JSP spec for details).

It seems that the implicit JSP "page" object can probably be used to determine 
whether a JSP got
recompiled as its hashCode() changes after recompilation.

---rony



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Defining environment variables for a webapp ?

2021-04-14 Thread Rony G. Flatscher (Apache)
Martynas,

On 14.04.2021 14:20, Martynas Jusevičius wrote:
> you might want to look into containerizing your webapps. We use an
> XSLT stylesheet (invoked by the entrypoint script) that transforms env
> params into context.xml params:
> https://github.com/AtomGraph/LinkedDataHub/blob/master/platform/context.xsl

Thank you very much!

If I understood Mark correctly, the environment variable values need to be set 
in the Tomcat process
before Tomcat starts.

The aim would be to change the environment for the webapps, i.e. in a running 
Tomcat instance. A JVM
AFAIK would not honor changes to the environment after it got started, but 
thought it possible that
through some magic :) by the Tomcat developers this could be achieved for 
webapps. The CGI solution
works with a new environment as a new (relative expensive) process gets created 
through Java for
which all these aspects could be set.

---rony

> On Wed, Apr 14, 2021 at 2:16 PM Rony G. Flatscher (Apache)
>  wrote:
>> On 14.04.2021 13:25, Mark Thomas wrote:
>>> On 14/04/2021 12:22, Rony G. Flatscher (Apache) wrote:
>>>> Not finding any pointers, asking here: is it possible to define 
>>>> environment variables for a webapp?
>>>> If so, how?
>>> You can only set them globally, for the Java process - not per web 
>>> application.
>>>
>>> CGI creates a new process so can have a completely different set of 
>>> environment variables.
>>>
>>> How about using the per web application JNDI context?
>> Well the idea was to adjust PATH to have it point to a webapp based 
>> directory containing the
>> binaries. :)
>>
>> ---rony
>>
>> P.S.: The aim would be to make it simple and easy for deploying webapps that 
>> also need to have
>> access to non-Java binaries (executables and/or shared libraries).
>>
>>
>>


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Defining environment variables for a webapp ?

2021-04-14 Thread Rony G. Flatscher (Apache)
On 14.04.2021 13:25, Mark Thomas wrote:
> On 14/04/2021 12:22, Rony G. Flatscher (Apache) wrote:
>> Not finding any pointers, asking here: is it possible to define environment 
>> variables for a webapp?
>> If so, how?
>
> You can only set them globally, for the Java process - not per web 
> application.
>
> CGI creates a new process so can have a completely different set of 
> environment variables.
>
> How about using the per web application JNDI context?

Well the idea was to adjust PATH to have it point to a webapp based directory 
containing the
binaries. :)

---rony

P.S.: The aim would be to make it simple and easy for deploying webapps that 
also need to have
access to non-Java binaries (executables and/or shared libraries).



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Defining environment variables for a webapp ?

2021-04-14 Thread Rony G. Flatscher (Apache)
Not finding any pointers, asking here: is it possible to define environment 
variables for a webapp?
If so, how?

---rony

P.S.: Tomcat can manipulate the process' environment, e.g. in the case of CGI 
execution. Here a
sample of the process' environment from some CGI-invocation on a Windows 
machine:

(debug) current cgi process environment:||

 1. |AUTH_TYPE=
 2. COMSPEC=C:\WINDOWS\SysWOW64\CMD.EXE
 3. CONTENT_LENGTH=7
 4. CONTENT_TYPE=application/x-www-form-urlencoded
 5. GATEWAY_INTERFACE=CGI/1.1
 6. 
HTTP_ACCEPT=text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
 7. HTTP_ACCEPT_ENCODING=gzip, deflate
 8. HTTP_ACCEPT_LANGUAGE=en-US,en;q=0.5
 9. HTTP_COOKIE=JSESSIONID=2137ECEC8CC5EE35AEFA475E5C5D8250
10. HTTP_HOST=localhost:8080
11. 
HTTP_REFERER=http://localhost:8080/demoSTL-Core-SQL_ooRexx/JSTL_CGI_05-GroupWorkDivider.jsp
12. HTTP_USER_AGENT=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) 
Gecko/20100101 Firefox/87.0
13. PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.JS;.WS;.MSC
14. PATH_INFO=
15. PROMPT=$P$G
16. 
QUERY_STRING=name=Andreas+Burgstaller=Max+Mustermann=Nadine+Berger=Klaus+Karter=Simon+Hauser=Michael+Nimmervoll
17. REMOTE_ADDR=127.0.0.1
18. REMOTE_HOST=127.0.0.1
19. REMOTE_IDENT=
20. REMOTE_USER=
21. REQUEST_METHOD=POST
22. REQUEST_URI=/demoSTL-Core-SQL_ooRexx/cgi-bin/groupStudents.rexx
23. RXQUEUESESSION=3B1C
24. SCRIPT_FILENAME=D:\Apache Software Foundation\Tomcat
9.0\webapps\demoSTL-Core-SQL_ooRexx\WEB-INF\cgi\groupStudents.rexx
25. SCRIPT_NAME=/demoSTL-Core-SQL_ooRexx/cgi-bin/groupStudents.rexx
26. SERVER_NAME=localhost
27. SERVER_PORT=8080
28. SERVER_PROTOCOL=HTTP/1.1
29. SERVER_SOFTWARE=TOMCAT
30. SystemRoot=C:\WINDOWS
31. X_TOMCAT_SCRIPT_PATH=D:\Apache Software Foundation\Tomcat
9.0\webapps\demoSTL-Core-SQL_ooRexx\WEB-INF\cgi\groupStudents.rexx
| 




Re: Question ad distributing non-Java-binaries with a webapp ...

2021-04-12 Thread Rony G. Flatscher (Apache)
Hi Konstantin,

thank you *very* much for your extremely helpful information, which gives me 
quite something to
digest and think about!

Your remark about the JVM and loading a native library through one classloader 
only makes me think
that it would not be possible at the moment to have two or more webapps with 
binary resources (that
may even be at different version levels over time). Although I would not pursue 
this therefore at
the moment, I still will put your valuable information on the table of 
"interesting things to
explore" and may come back later.

The motivation behind such thoughts is to exploit Tomcat as much as possible as 
it has turned out to
be really *great* boon for empowering business administration students to get 
to create web
applications with Tomcat in surprisingly short time (and if BA students can get 
empowered to exploit
Tomcat within a short time, then professionals can get empowered in a fraction 
of that time, even if
they do not speak Java). [In the context of this question the idea was to 
supply the ooRexx
interpreter together with the webapp, such that the webapp contains everything 
needed to run it.
OTOH the students have the interpreter already installed together with its Java 
bridge and as such
can become productive with Tomcat, right after having Tomcat installed on their 
machines (Windows,
Apple and Linux).]

Again, thank you very much!

---rony


On 11.04.2021 15:19, Konstantin Kolinko wrote:
> сб, 10 апр. 2021 г. в 21:50, Rony G. Flatscher (Apache) :
>> Is it possible to place and use binaries (including shared libraries) in a 
>> webapp? Very much like
>> supplying jars to the "lib"-directory?
>>
>> Use case: if possible, I would like to create a webapp that includes 
>> non-Java binaries (executable,
>> image and shared libraries) that get interfaced with via JNI.
>>
>> If this is possible then how so? Any pointers/hints would be highly 
>> appreciated!
> Hi, Rony!
>
> 1) You may look for an inspiration on how Tomcat Navive library is loaded
> https://tomcat.apache.org/tomcat-9.0-doc/apr.html
> https://tomcat.apache.org/native-doc/
>
> Note that "64-bit Windows zip" binary distribution includes the
> library (tcnative-1.dll).
> https://tomcat.apache.org/download-90.cgi
>
> In the source code, look at
> org.apache.tomcat.jni.Library
> org.apache.catalina.core.AprLifecycleListener
> and its message resources,
> java/org/apache/catalina/core/LocalStrings.properties
>
> You may find examples of System.load(), System.loadLibrary(),
> System.mapLibraryName() calls in the Library class.
>
> See also the system property "java.library.path".
>
>
> 2) JVM has a limitation that a library is allowed to be loaded by one
> classloader only.
>
> That is why using a web application classloader looks to be a poor
> place for loading a library, if you are ever going to use its full
> features (parallel deployment of several web applications, a reload /
> redeploy without stopping Tomcat, etc.) See
> https://tomcat.apache.org/tomcat-9.0-doc/class-loader-howto.html
>
> 3) It is possible to load any classes when Apache Tomcat starts:
>
> a) with a custom Listener,
>
> b) abusing a JreMemoryLeakPreventionListener
> https://tomcat.apache.org/tomcat-9.0-doc/config/listeners.html
>
> c) as a custom resource
> https://tomcat.apache.org/tomcat-9.0-doc/jndi-resources-howto.html#Generic_JavaBean_Resources
>
> HTH.
>
> Best regards,
> Konstantin Kolinko
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Question ad distributing non-Java-binaries with a webapp ...

2021-04-10 Thread Rony G. Flatscher (Apache)
Is it possible to place and use binaries (including shared libraries) in a 
webapp? Very much like
supplying jars to the "lib"-directory?

Use case: if possible, I would like to create a webapp that includes non-Java 
binaries (executable,
image and shared libraries) that get interfaced with via JNI.

If this is possible then how so? Any pointers/hints would be highly appreciated!

---rony



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Possible to refer to the contextPath in a Resource database url ?

2021-03-11 Thread Rony G. Flatscher (Apache)
On 11.03.2021 12:14, Mark Thomas wrote:
> On 10/03/2021 19:44, Rony G. Flatscher (Apache) wrote:
>> For a little nutshell example I would like to use SQLite as the JDBC driver 
>> includes the native code
>> for all the major operating systems already (this way a user does not really 
>> need to install SQLite
>> just place its JDBC driver in the lib directory).
>>
>> The SQLite database (with sample data) should reside in the webapp itself, 
>> maybe in a subdirectory
>> named "data". Is it possible to define a "Resource" of type 
>> "javax.sql.DataSource" and use some
>> variable that would resolve the contextPath and that can be used in the 
>> "url" attribute? (The
>> Resource definition should be contained placed in the webapps' 
>> "META-INF/context.xml" Content
>> element.)
>>
>> There are samples that show how to use "${catalina.home}" as part of such a 
>> path. Is there a
>> variable that represents the contextPath of the webapp such that one can use 
>> that in the "url"
>> attribute?
>
> Not currently, no. It would be a little tricky to implement given how ${...} 
> replacement currently
> works.

O.K., thank you very much!

---rony


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Is there a way to know/infer that a JSP got freshly compiled from a taglib library ?

2021-03-11 Thread Rony G. Flatscher (Apache)
On 11.03.2021 11:53, Mark Thomas wrote:
> On 10/03/2021 15:14, Rony G. Flatscher (Apache) wrote:
>> Is there a way to know/infer that a JSP got freshly compiled from e.g. a 
>> taglib library?
>>
>> For caching purposes it would be necessary to learn whether a JSP got 
>> recompiled as the cache should
>> be purged in that case.
>>
>> Is there a way to find out whether a JSP run is the very first after 
>> (re-)compilation?
>>
>> Or can one rely that if a JSP gets recompiled that a new PageContext gets 
>> created for it (or if
>> reused does not contain any custom attributes placed there earlier at the 
>> PAGE_SCOPE)?
>
> Page scope gets reset at the end of a request so that won't work.
>
> It might not be perfect (containers are allowed to unload unused 
> servlets/JSPs) but in you are
> using Tomcat and haven't configured maxLoadedJsps or jspIdleTimeout then you 
> should be able to use
> the jspInit() method. (See JSP spec for details).

Thank you very much!

---rony


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Possible to refer to the contextPath in a Resource database url ?

2021-03-10 Thread Rony G. Flatscher (Apache)
For a little nutshell example I would like to use SQLite as the JDBC driver 
includes the native code
for all the major operating systems already (this way a user does not really 
need to install SQLite
just place its JDBC driver in the lib directory).

The SQLite database (with sample data) should reside in the webapp itself, 
maybe in a subdirectory
named "data". Is it possible to define a "Resource" of type 
"javax.sql.DataSource" and use some
variable that would resolve the contextPath and that can be used in the "url" 
attribute? (The
Resource definition should be contained placed in the webapps' 
"META-INF/context.xml" Content element.)

There are samples that show how to use "${catalina.home}" as part of such a 
path. Is there a
variable that represents the contextPath of the webapp such that one can use 
that in the "url"
attribute?

---rony





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Is there a way to know/infer that a JSP got freshly compiled from a taglib library ?

2021-03-10 Thread Rony G. Flatscher (Apache)
Is there a way to know/infer that a JSP got freshly compiled from e.g. a taglib 
library?

For caching purposes it would be necessary to learn whether a JSP got 
recompiled as the cache should
be purged in that case.

Is there a way to find out whether a JSP run is the very first after 
(re-)compilation?

Or can one rely that if a JSP gets recompiled that a new PageContext gets 
created for it (or if
reused does not contain any custom attributes placed there earlier at the 
PAGE_SCOPE)?

---rony

P.S.: Currently the pageContext gets used already for storing an attribute with 
PAGE_SCOPE.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: JSP: question: how to make tld-files part of the taglib library like STL is able to do?

2021-03-10 Thread Rony G. Flatscher (Apache)
On 10.03.2021 14:44, Mark Thomas wrote:
> On 10/03/2021 13:19, Rony G. Flatscher (Apache) wrote:
>> The STL (standard tag library) jstl-1.2_1.jar is able to have its tags 
>> processed without requiring
>> the user to place its tld-files into the webapps WEB-INF directory. Rather 
>> jstl-1.2_1.jar stores the
>> tld files in its META-INF directory and yet they seem to be found by the JSP 
>> processor (not sure
>> whether this is the correct term).
>>
>> How can this be achieved for any taglib? What needs to be done to allow 
>> including the tld-files
>> within the taglib library such as to become able to remove the need to place 
>> the taglib library's
>> tld files into the webapps WEB-INF directory?
>
> 
> When deployed inside a JAR file, the tag library descriptor files must be in 
> the META-INF
> directory, or a subdirectory of it.
> 
>
> You also need to make sure that Tomcat isn't configured to skip your JAR file 
> when scanning for
> tag libraries (see CATALINA_BASE/conf/catalina.properties).

Thank you very much!

It turns out that I forgot to adjust the uri value in the JSP files to match 
the uri defined in the
tld files! :(

The reason why I thought that something was wrong with the jar file and the tld 
locations within
(despite having them in META-INF) was the following entry in the log file:

... cut ...
10-Mar-2021 15:13:14.264 INFO [main] 
org.apache.catalina.startup.HostConfig.deployDirectory
Deploying web application directory [D:\Apache Software Foundation\Tomcat 
9.0\*webapps\aa_rgf_test*]
10-Mar-2021 15:13:16.362 INFO [main] 
org.apache.jasper.servlet.TldScanner.scanJars /At least one
JAR was scanned for TLDs yet contained no TLDs/. Enable debug logging for 
this logger for a
complete list of JARs that were scanned but no TLDs were found in them. 
Skipping unneeded JARs
during scanning can improve startup time and JSP compilation time.
10-Mar-2021 15:13:16.362 INFO [main] 
org.apache.catalina.startup.HostConfig.deployDirectory
Deployment of web application directory [D:\Apache Software 
Foundation\Tomcat
9.0\webapps\aa_rgf_test] has finished in [2,098] ms
... cut ...

So actually the log message means what it states: there was at least one jar 
that did not contain a
TLD file (I read it: no TLD files were found in the scanned jars)! :)

Very sorry for the noise, typical user error. :(

Yet, now it is possible to forgo the current need to copy the tld files to the 
WEB-INF directory,
which is really great!

---rony




JSP: question: how to make tld-files part of the taglib library like STL is able to do?

2021-03-10 Thread Rony G. Flatscher (Apache)
The STL (standard tag library) jstl-1.2_1.jar is able to have its tags 
processed without requiring
the user to place its tld-files into the webapps WEB-INF directory. Rather 
jstl-1.2_1.jar stores the
tld files in its META-INF directory and yet they seem to be found by the JSP 
processor (not sure
whether this is the correct term).

How can this be achieved for any taglib? What needs to be done to allow 
including the tld-files
within the taglib library such as to become able to remove the need to place 
the taglib library's
tld files into the webapps WEB-INF directory?

---rony



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Run servlets on Nashorn written in server-side JavaScript

2021-03-04 Thread Rony G. Flatscher (Apache)
Hi Chris,

On 03.03.2021 22:33, Christopher Schultz wrote:
> Rony,
>
> On 3/3/21 06:42, Rony G. Flatscher (Apache) wrote:
>> Hi Chris,
>>
>> On 02.03.2021 17:48, Christopher Schultz wrote:
>>> Rony,
>>>
>>> On 2/28/21 11:33, Rony G. Flatscher (Apache) wrote:
>>>> Leo,
>>>>
>>>> On 26.02.2021 01:52, leo wrote:
>>>>> On 25 Feb 2021, at 2:47, Rony G. Flatscher (Apache) wrote:
>>>>>
>>>>>> P.S.: Have tested my implementation with Nashorn on Java 8 and it works 
>>>>>> out of the box!
>>>>>> Still, you
>>>>>> would need to test the implementation thoroughly yourself (stability, 
>>>>>> performance, resources)
>>>>>> and
>>>>>> would be asked to come back with feedback on each of these qualities. So 
>>>>>> stay tuned, will
>>>>>> publish a
>>>>>> link to the implementation with a proper Nashorn/JavaScript sample war 
>>>>>> in this mail thread in a
>>>>>> few
>>>>>> days.
>>>>>
>>>>> How cool is this! Let me know when you it ready, please. Thanks a lot!
>>>>
>>>> O.K., had a few things I could finalize. Created two war files, 
>>>> "demoJavaScript.war" and
>>>> "demoRhino.war". The first got tested against Nashorn, the second - you 
>>>> guessed it ;) - against
>>>> Rhino (7.1.13). They are meant as little proof-of-concepts that should 
>>>> help you to get up and
>>>> running with them.
>>>>
>>>> Please note that the libraries are beta, though appear to be stable. Yet, 
>>>> there may be
>>>> errors/problems in them or there may be changes coming up.
>>>>
>>>> If you have feedback of any sorts, please come forward (stability, 
>>>> usability, performance,
>>>> resources, etc.).
>>>>
>>>> Basically you just need to go to [1] and get the two war-files (copy to 
>>>> $CATALINA_HOME/webapps)
>>>> plus
>>>> either javax.ScriptTagLibs.jar (for Tomcat 9 or earlier) or 
>>>> jakarta.ScriptTagLibs.jar (for Tomcat
>>>> 10) which you should copy to the shared directory at $CATALINA_HOME/lib 
>>>> and restart Tomcat to get
>>>> them recognized. If you want to test with Rhino you should follow the 
>>>> directions at [1] and
>>>> copy the
>>>> mentioned two rhino jar files to the shared library directory as well.
>>>>
>>>> In general you should take the time and look over that page at [1], I 
>>>> tried to remain as brief as
>>>> possible. :)
>>>>
>>>> Also please do not forget that the target audience of [1] has been so far 
>>>> the Rexx community
>>>> and my
>>>> BA students who learned programming using ooRexx in a semester and with 
>>>> that knowledge should now
>>>> become able to create little web sites for their own purposes and maybe 
>>>> with some experience for
>>>> small businesses/organizations given the information at [1] as a starting 
>>>> point.
>>>>
>>>> Of course, if there are any questions please do not hesitate and please 
>>>> ask them!
>>>
>>> Any source available?
>>
>> Sure, sorry forgot to point that out explicitly!
>>
>> You can get at it either in the ScriptTagLibs jar files from [1] (yes, in 
>> this case I have the
>> source and also the tld files in the jar for completeness as well) or from 
>> [2] with the appropriate
>> checkout strings given in the upper half.
>>
>> Also, the license is AL 2.0, of course (dual licensed with the CPL 1.0 
>> license in addition which the
>> ooRexx project uses).
>>
>> Please note: currently the state is beta, it is functional and appears to be 
>> stable.
>
> This is a pretty awesome effort. 
Thank you!
> Since you work at a university, perhaps some of your students would be 
> interested in working on
> the library itself and not just in being an end-user. Maybe CS students at 
> the same uni though not
> in your program. They could probably get credit for working on it, too.

Currently there are only BA students available, some of them with an interest 
in CS and rarely some
that have already good programming skills in Java when coming to my "business 
programming" classes.
That situation h

Re: Run servlets on Nashorn written in server-side JavaScript

2021-03-03 Thread Rony G. Flatscher (Apache)
Hi Leo,

On 03.03.2021 00:40, leo wrote:
> Rony,
>
>> O.K., had a few things I could finalize. Created two war files, 
>> "demoJavaScript.war" and
>> "demoRhino.war". The first got tested against Nashorn, the second - you 
>> guessed it ;) - against
>> Rhino (7.1.13). They are meant as little proof-of-concepts that should help 
>> you to get up and
>> running with them.
>> […]
>
> Thank you very much. Will check it out!

Fine, please be so kind and give feedback of any sorts you have!

---rony


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Run servlets on Nashorn written in server-side JavaScript

2021-03-03 Thread Rony G. Flatscher (Apache)
Hi Chris,

On 02.03.2021 17:48, Christopher Schultz wrote:
> Rony,
>
> On 2/28/21 11:33, Rony G. Flatscher (Apache) wrote:
>> Leo,
>>
>> On 26.02.2021 01:52, leo wrote:
>>> On 25 Feb 2021, at 2:47, Rony G. Flatscher (Apache) wrote:
>>>
>>>> P.S.: Have tested my implementation with Nashorn on Java 8 and it works 
>>>> out of the box! Still, you
>>>> would need to test the implementation thoroughly yourself (stability, 
>>>> performance, resources) and
>>>> would be asked to come back with feedback on each of these qualities. So 
>>>> stay tuned, will
>>>> publish a
>>>> link to the implementation with a proper Nashorn/JavaScript sample war in 
>>>> this mail thread in a
>>>> few
>>>> days.
>>>
>>> How cool is this! Let me know when you it ready, please. Thanks a lot!
>>
>> O.K., had a few things I could finalize. Created two war files, 
>> "demoJavaScript.war" and
>> "demoRhino.war". The first got tested against Nashorn, the second - you 
>> guessed it ;) - against
>> Rhino (7.1.13). They are meant as little proof-of-concepts that should help 
>> you to get up and
>> running with them.
>>
>> Please note that the libraries are beta, though appear to be stable. Yet, 
>> there may be
>> errors/problems in them or there may be changes coming up.
>>
>> If you have feedback of any sorts, please come forward (stability, 
>> usability, performance,
>> resources, etc.).
>>
>> Basically you just need to go to [1] and get the two war-files (copy to 
>> $CATALINA_HOME/webapps) plus
>> either javax.ScriptTagLibs.jar (for Tomcat 9 or earlier) or 
>> jakarta.ScriptTagLibs.jar (for Tomcat
>> 10) which you should copy to the shared directory at $CATALINA_HOME/lib and 
>> restart Tomcat to get
>> them recognized. If you want to test with Rhino you should follow the 
>> directions at [1] and copy the
>> mentioned two rhino jar files to the shared library directory as well.
>>
>> In general you should take the time and look over that page at [1], I tried 
>> to remain as brief as
>> possible. :)
>>
>> Also please do not forget that the target audience of [1] has been so far 
>> the Rexx community and my
>> BA students who learned programming using ooRexx in a semester and with that 
>> knowledge should now
>> become able to create little web sites for their own purposes and maybe with 
>> some experience for
>> small businesses/organizations given the information at [1] as a starting 
>> point.
>>
>> Of course, if there are any questions please do not hesitate and please ask 
>> them!
>
> Any source available?

Sure, sorry forgot to point that out explicitly!

You can get at it either in the ScriptTagLibs jar files from [1] (yes, in this 
case I have the
source and also the tld files in the jar for completeness as well) or from [2] 
with the appropriate
checkout strings given in the upper half.

Also, the license is AL 2.0, of course (dual licensed with the CPL 1.0 license 
in addition which the
ooRexx project uses).

Please note: currently the state is beta, it is functional and appears to be 
stable.

A request: if you see something questionable, improvable or missing, please be 
so kind and let me know!

There is certainly room for improvements, especially through the eyes of an 
Tomcat/Servlet expert
like yourself! :) E.g., it would be nice to put the tld files into the jar and 
allow the JSPs to
refer to them without the need to copy them to WEB-INF as is possible with the 
STL ; if I knew how
to do that, I would do it as it improves usability (ran out of time to research 
that specific feature).

---rony

[1] Beta directory for the ScriptTagLibs and demo war files for ooRexx, 
Nashorn, Rhino, source
included in the jar files:
<https://sourceforge.net/projects/bsf4oorexx/files/Sandbox/rgf/taglibs/beta/>.
Please note: "demoRexx.war" demonstrates all attributes and in addition has two 
utility samples, one
injecting the implicit JSP objects and the current values of the getter 
methods, which might be
helpful when developing or debugging a webapp.

[2] dev directory for the ScriptTagLibs:
<https://sourceforge.net/p/bsf4oorexx/code/HEAD/tree/sandbox/rgf/taglibs/>
Please note: the dev subdirectories have Windows cmd-files for creating the jar 
files, if you create
Unix versions of them, please share (just did not have the time to create the 
appropriate shell
scripts, an item on the todo list)! :) In essence the bsf and jsr223 are 
identical except for the
compile attribute which is only available for the JSR-223.




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat Security Office Hours

2021-03-01 Thread Rony G. Flatscher (Apache)
On 24.02.2021 12:59, Mark Thomas wrote:
> All,
>
> Inspired by this post [1] I am going to try an experiment with running
> weekly office hours every Thursday.
>
> I'm going to start off by focussing on security. If there is anything
> you'd like to discuss and/or provide feedback on and/or ask questions
> about around Tomcat security then feel free to book a 20 min slot via:
>
> https://calendly.com/markt-asf
>
> Slots are available every Thursday. Booking a meeting should trigger a
> Zoom invite for the requested slot.
>
> This is an experiment so the number of slots, timing of slots etc are
> subject to change as the experiment progresses. If Tomcat security turns
> out to be too narrow a focus, I'll open it up to anything Tomcat related.
>
> Mark
>
>
> [1] https://simonwillison.net/2021/Feb/19/office-hours/

Just curious: how did it work out?

---rony


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Run servlets on Nashorn written in server-side JavaScript

2021-02-28 Thread Rony G. Flatscher (Apache)
Leo,

On 26.02.2021 01:52, leo wrote:
> On 25 Feb 2021, at 2:47, Rony G. Flatscher (Apache) wrote:
>
>> P.S.: Have tested my implementation with Nashorn on Java 8 and it works out 
>> of the box! Still, you
>> would need to test the implementation thoroughly yourself (stability, 
>> performance, resources) and
>> would be asked to come back with feedback on each of these qualities. So 
>> stay tuned, will publish a
>> link to the implementation with a proper Nashorn/JavaScript sample war in 
>> this mail thread in a few
>> days.
>
> How cool is this! Let me know when you it ready, please. Thanks a lot!

O.K., had a few things I could finalize. Created two war files, 
"demoJavaScript.war" and
"demoRhino.war". The first got tested against Nashorn, the second - you guessed 
it ;) - against
Rhino (7.1.13). They are meant as little proof-of-concepts that should help you 
to get up and
running with them.

Please note that the libraries are beta, though appear to be stable. Yet, there 
may be
errors/problems in them or there may be changes coming up.

If you have feedback of any sorts, please come forward (stability, usability, 
performance,
resources, etc.).

Basically you just need to go to [1] and get the two war-files (copy to 
$CATALINA_HOME/webapps) plus
either javax.ScriptTagLibs.jar (for Tomcat 9 or earlier) or 
jakarta.ScriptTagLibs.jar (for Tomcat
10) which you should copy to the shared directory at $CATALINA_HOME/lib and 
restart Tomcat to get
them recognized. If you want to test with Rhino you should follow the 
directions at [1] and copy the
mentioned two rhino jar files to the shared library directory as well.

In general you should take the time and look over that page at [1], I tried to 
remain as brief as
possible. :)

Also please do not forget that the target audience of [1] has been so far the 
Rexx community and my
BA students who learned programming using ooRexx in a semester and with that 
knowledge should now
become able to create little web sites for their own purposes and maybe with 
some experience for
small businesses/organizations given the information at [1] as a starting point.

Of course, if there are any questions please do not hesitate and please ask 
them!

HTH,

---rony

[1] Homepage of the ScriptTagLibs libraries:
<https://sourceforge.net/projects/bsf4oorexx/files/Sandbox/rgf/taglibs/beta/>



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Run servlets on Nashorn written in server-side JavaScript

2021-02-24 Thread Rony G. Flatscher (Apache)
On 23.02.2021 04:21, leo wrote:
> On 18 Feb 2021, at 3:15, André Warnier wrote:
>
>> On 17.02.2021 14:59, Christopher Schultz wrote:
>>
>> […] On the face of it, it looks much simpler to set up a local Nodejs 
>> server, and proxy the
>> corresponding requests from Tomcat to it.
>
>
> Regarding why a servlet _in_ Tomcat and not a proxy: The production 
> environment is very
> restricted. We can add wars and jars to Tomcat, but we can't install new 
> separate OS native
> applications.
>
> That’s why I thought Nashorn could be a way to deal with this restriction - 
> it even is built into
> Java 8!
Note, Nashorn got removed from the standard JDK 15, but got resurrected as its 
own proper OpenJDK
module such that one can continue to use Nashorn on JDK 15 or later. [1]

---rony

[1] 

P.S.: Have tested my implementation with Nashorn on Java 8 and it works out of 
the box! Still, you
would need to test the implementation thoroughly yourself (stability, 
performance, resources) and
would be asked to come back with feedback on each of these qualities. So stay 
tuned, will publish a
link to the implementation with a proper Nashorn/JavaScript sample war in this 
mail thread in a few
days.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Ad Apache Sling scripting (Re: Run servlets on Nashorn written in server-side JavaScript

2021-02-19 Thread Rony G. Flatscher (Apache)
Woonsan,

On 18.02.2021 18:02, Woonsan Ko wrote:

> You might want to take a look at this, too:
> - http://portals.apache.org/bridges/bridges-script/index.html
>
> Of course, there must be outdated dependencies, but the idea is the
> same and it has working code: integrate with JSR-223 for jruby,
> jython, bsh, js, etc.
> The portlet api (e.g, PortletRequest, PortletResponse, PortletContext,
> etc) should be converted to servlet-api though.

thank you very much for this pointer. The overview page [1] includes references 
to the Portlet
specifications [2,3] which allow to learn about the motivation and also about 
its devised features.
It was also interesting to skim over some bird-eye's-view comparisons between 
Portlets and Servlets
e.g. in [4, 5].

As I have an implementation already in place (with BA students trying it out 
who have been serving a
little bit as a very small subject group) that supports both BSF and JSR-223, I 
would make further
work dependent on my assessment of the student's work (and of course whatever 
feedback comes up
later). The goal was to keep it as simple as possible (KISS principle) such 
that it is easy to
understand/teach and easy to take advantage of, yet make it versatile for the 
script developers
(including demo script samples that will dump the request and response objects 
and query their
getter values such that the students get to see/learn what they convey to them 
at the point of
invocation; just skimming over this extensive information causes them to learn 
what is available and
over time get a "feeling" of what they can expect and do with each request).

---rony

[1] Apache Portals Bridges Homepage: 
<http://portals.apache.org/bridges/index.html>
[2] JSR-168, Portlet Specification: <http://www.jcp.org/en/jsr/detail?id=168>
[3] JRS-286, Portlet Specification 2.0: 
<http://www.jcp.org/en/jsr/detail?id=286>
[4] Nilang, Servlet vs Portlet: 
<https://www.opensource-techblog.com/2014/10/servlet-vs-portlet.html>
[5] Sarin A., Portlets vs. Servlets: Request Processing with Web Components:
<https://www.developer.com/java/web/article.php/3891786/Portlets-vs-Servlets-Request-Processing-with-Web-Components.htm>


> On Thu, Feb 18, 2021 at 11:09 AM Rony G. Flatscher (Apache)
>  wrote:
>> Chris,
>>
>> On 18.02.2021 15:56, Christopher Schultz wrote:
>> ... cut ...
>>> A BSF / JSR-233 environment that is available for any servlet container 
>>> would certainly be an
>>> accomplishment, and probably very useful for some shops (and students!).
>>>
>>> I wonder if there is anything we can learn / steal from Apache Sling.
>> hmm, at first sight Apache Sling defines its own Scripting classes [1] and 
>> seems to not use JSR-223
>> [2, 3] (or BSF [4] for that matter). As a result it seems that each 
>> scripting language that you wish
>> to use in the Sling environment needs to get a proper SlingScript 
>> implementation otherwise you are
>> out of luck.
>>
>> Personally I think one should adhere to the standard Java scripting 
>> framework [2] whenever possible
>> (and I would see no compelling reason at first sight why the Sling project 
>> created its own scripting
>> framework). The Java scripting framework allows non-Java programmers to 
>> create scripts that can be
>> deployed by the Java application and allow them to interact directly with 
>> explicitly supplied Java
>> objects of the Java application. Loading a scripting language for the Java 
>> application programmer is
>> as easy as using javax.script.ScriptEngineManager methods that start with 
>> getEngineBy...() supplying
>> the name of the scripting language (like "groovy", "javascript", "netrexx", 
>> "rexx" and the like),
>> one of its mime-types or one of its file-extensions and then (re-)using that 
>> engine to evaluate
>> script code.
>>
>> The JSR-223 [3] implementation of Java 6 makes it also quite easy to create 
>> new bindings for new
>> programming languages (one merely needs to extend 
>> javax.script.AbstractScriptEngine, which
>> implements already most of the javax.script.ScriptEngine interface, and 
>> implement the
>> javax.script.ScriptFactory interface).
>>
>> ---rony
>>
>> [1] Sling's Scripting Framework:
>> <https://sling.apache.org/apidocs/sling10/org/apache/sling/api/scripting/package-summary.html>
>> [2] Java's Scripting Framework (Since Java 6):
>> <https://docs.oracle.com/javase/8/docs/api/index.html?javax/script/package-summary.html>
>> [3] JCP JSR-223: <https://www.jcp.org/en/jsr/detail?id=223>
>> [4] Apache BSF: <https://commons.apache.org/proper/commons-bsf/>
>>
>>
>


Ad Apache Sling scripting (Re: Run servlets on Nashorn written in server-side JavaScript

2021-02-18 Thread Rony G. Flatscher (Apache)
Chris,

On 18.02.2021 15:56, Christopher Schultz wrote:
... cut ...
> A BSF / JSR-233 environment that is available for any servlet container would 
> certainly be an
> accomplishment, and probably very useful for some shops (and students!).
>
> I wonder if there is anything we can learn / steal from Apache Sling.

hmm, at first sight Apache Sling defines its own Scripting classes [1] and 
seems to not use JSR-223
[2, 3] (or BSF [4] for that matter). As a result it seems that each scripting 
language that you wish
to use in the Sling environment needs to get a proper SlingScript 
implementation otherwise you are
out of luck.

Personally I think one should adhere to the standard Java scripting framework 
[2] whenever possible
(and I would see no compelling reason at first sight why the Sling project 
created its own scripting
framework). The Java scripting framework allows non-Java programmers to create 
scripts that can be
deployed by the Java application and allow them to interact directly with 
explicitly supplied Java
objects of the Java application. Loading a scripting language for the Java 
application programmer is
as easy as using javax.script.ScriptEngineManager methods that start with 
getEngineBy...() supplying
the name of the scripting language (like "groovy", "javascript", "netrexx", 
"rexx" and the like),
one of its mime-types or one of its file-extensions and then (re-)using that 
engine to evaluate
script code.

The JSR-223 [3] implementation of Java 6 makes it also quite easy to create new 
bindings for new
programming languages (one merely needs to extend 
javax.script.AbstractScriptEngine, which
implements already most of the javax.script.ScriptEngine interface, and 
implement the
javax.script.ScriptFactory interface).

---rony

[1] Sling's Scripting Framework:

[2] Java's Scripting Framework (Since Java 6):

[3] JCP JSR-223: 
[4] Apache BSF: 



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Run servlets on Nashorn written in server-side JavaScript

2021-02-18 Thread Rony G. Flatscher (Apache)
Hi Chris,

On 17.02.2021 14:59, Christopher Schultz wrote:
> Rony and Leo,
>
> On 2/17/21 02:58, Rony G. Flatscher (Apache) wrote:
>> Hi Leo,
>>
>> why would you want to do that if you could do the same with Java? What is 
>> the motivation, the use
>> case for you?
>>
>> How urgent is this (I may have something for both, Java EE and Jakarta EE, 
>> but need a little bit of
>> time)?
>>
>> —-rony
>>
>>
>>
>> On 15.02.2021 07:29, leo wrote:
>>> Hi there
>>>
>>> I am trying to find out how to process servlets written in server-side 
>>> JavaScript through Tomcat.
>>>
>>> I looked through the Tomcat FAQ and How-To but couldn't find anything. By 
>>> googling I found a way
>>> to hook up Python through Jython's PyServlet class. I tried this and it 
>>> works great.
>>>
>>> But I am looking for server-side JavaScript in Tomcat. I am aware of the 
>>> JavaScript engine
>>> Nashorn. Is there a way to hook up Nashorn with a servlet class, so that 
>>> Tomcat serves JavaScript
>>> servlets? Something like a "JavaScript Server Page" for Tomcat would be 
>>> fine too.
>>>
>>> Many thanks for any pointers,
>>> Leo
>>>
>>> ps: I use Tomcat 8.5, but I could move to another Tomcat version for this.
>
> Weird; I never saw the OP on the list, only Rony's reply.

Yes, somehow it appeared later (Tuesday evening here, but the date and time in 
the post is Monday),
at least I recognized it Tuesday evening for the first time.


> Usually if you want to use server-side JavaScript, you use something like 
> Node.js instead of a
> servlet container. Why not use Node?

This may be an option if you desire to write in JavaScript.
(But it may be the case that creating web applications under e.g. Tomcat may be 
even easier than
with Node, one would have to check it out though. ;) )


> If you'd really like to use Tomcat, you will need to write a Servlet that 
> establishes a JavaScript
> environment (e.g. Nashhorn), provides all the plumbing for the 
> servlet-container provided
> resources (e.g. request, response, streams, session, etc.) as well as 
> error-handling, etc.
>
> It's a big job.
>
> I'd be surprised is nobody had built something like this before. Or maybe 
> everybody just uses
> Node.js.

Well, I had a need to let Business Administration (BA) students who just 
learned programming in an
easy to learn, yet powerful programming language (ooRexx, a message based, 
dynamically typed
language, originating at IBM, but in open-source for a long time) create little 
web applications
with Tomcat. This way they experience what is basically involved when creating 
a web app in person
(even if they never will create fully fledged web apps on their own it will 
help them get a basic
understanding, better estimates for web app projects and the like).

For these BA students - even if they "experienced" - Java or JavaScript would 
be outside of their
scope, short of having enough learning and training time needed for mastering 
Java and JavaScript to
the extent that is needed to create fully-fledged web applications in Java 
(like a web-shop with
cart, e-mail-newsletter, uploading files, etc.). This has to do with the BA 
curriculum in question
that does not provide enough resources/time (in this particular case a four 
hours lecture with
homework assignments for the duration of one semester, i.e. appr. for four 
months) for learning a
programming language like Java or JavaScript to a professional extent, which 
would be possible e.g.
at a technical university or in specific IS/CIS studies.

My BA students on the other hand have a working knowledge and expierence with 
ooRexx (which they
learned in a four hour class during a semester and learned to apply it to 
interact with Windows, MS
Office, but also with Java - camouflaged as ooRexx - in an operating-system 
independent manner, i.e.
creating GUI, socket programs, OpenOffice/LibreOffice, exploiting JavaFX in an 
operating system
platform independent manner) such that ooRexx would have become feasible for 
them for using it to
learn and to experiment with creating  web apps, if they so desire. If only 
Tomcat et.al. would
allow for that somehow.

As having authored Apache BSF and JSR-223 (package javax.script introduced in 
Java 6) bindings for
ooRexx (using a combination of JNI, C++, Java, ooRexx) it would be feasible and 
desirable to create
a solution that not only supports a single scripting/programming language like 
ooRexx in this case,
but supports in general also any other programming language for which there is 
a bindings either for
Apache BSF and/or JSR-223 out of the box. As there is a JSR-223 bindings for 
Nash

Re: Run servlets on Nashorn written in server-side JavaScript

2021-02-16 Thread Rony G. Flatscher (Apache)
Hi Leo,

why would you want to do that if you could do the same with Java? What is the 
motivation, the use
case for you?

How urgent is this (I may have something for both, Java EE and Jakarta EE, but 
need a little bit of
time)?

—-rony



On 15.02.2021 07:29, leo wrote:
> Hi there
>
> I am trying to find out how to process servlets written in server-side 
> JavaScript through Tomcat.
>
> I looked through the Tomcat FAQ and How-To but couldn't find anything. By 
> googling I found a way
> to hook up Python through Jython's PyServlet class. I tried this and it works 
> great.
>
> But I am looking for server-side JavaScript in Tomcat. I am aware of the 
> JavaScript engine
> Nashorn. Is there a way to hook up Nashorn with a servlet class, so that 
> Tomcat serves JavaScript
> servlets? Something like a "JavaScript Server Page" for Tomcat would be fine 
> too.
>
> Many thanks for any pointers,
> Leo
>
> ps: I use Tomcat 8.5, but I could move to another Tomcat version for this.
>
>


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: How to get the tag name from within a taglib class ?

2020-09-13 Thread Rony G. Flatscher (Apache)
Hi Chris,

On 11.09.2020 19:31, Christopher Schultz wrote:
> > P.S.: If possible I would like to write a single tagclass, but use
> > it for two or more different tags, as the implementation would
> > share quite a lot of code. Besides, it might be helpful for
> > debugging.
>
> It seems like this is the wrong approach, unless you just want to use
> this for something like logging.

Not logging, but support for scripting languages.

> I you want the tags to behave differently, then you should have
> separate tag implementations. 

In this case the only difference would be that in one case ("script", 
"scriptlet") a return value
gets ignored, in the other case ("expression") the return value is used to 
print its string value to
the JSPWriter ("out").

> Feel free to build a base class with the shared code and then implement the 
> differences in subclasses.
Yes, if there is no easy way to learn about the tag that the tagclass got 
invoked for, which seems
to be the case here.
> It's been a lng time since I wrote a custom tag library but I do
> remember that the whole process was very painful and despite the
> flexibility allowed by the API, lots of common things (like getting
> the tag name!) were either awkward or impossible.

Well, it is not really "painful", just a lot of power, many roads that could be 
chosen and
flexibility at hand which at times is overwhelming for a newbie in this corner, 
hence my brief
question. :)

> IMO, the JSP effort was a stepping-stone on a path to better
> technologies like Velocity, FreeMarker, and others. If I were king,
> JSP would just go away. Just my POV of course, you are welcome to fall
> in love with JSP. :)

This assumes that the JSPs get written in Java only and one is ready to take on 
the learning curves
for additional frameworks.

In this case the aim is to allow scripting languages either via Apache BSF [1] 
(like Groovy
implemented in Java, ooRexx implemented in C++) or via the Java scripting 
framework [2] ("JSR-223"
[3], "javax.script") to be used for writing JSPs. This may not be 
attractive/interesting for
Java-savvy programmers who would create their server pages in Java, but it is 
*very* attractive,
even important for non-Java programmers who know one of the supported scripting 
languages.

In the end it should be easy to use Tomcat as the (Java-implemented) web server 
for web applications
that get implemented in other programming languages. Very much like the Apache 
web server [4] which
is written in C and allows other programming languages to exploit it.

---rony

P.S.: Maybe I should come up with a brief posting that tries to explain why it 
is important to
support non-Java programming languages in JSPs by default (and if 
interestesting to the Tomcat
community I can offer the code under AL, once it is done). Not sure whether all 
in the Tomcat
community know that Apache BSF ("Bean Scripting Framework") was created 
originally to allow
scripting languages to be used in JSPs! Hence I was very surprised to learn 
that scripting languages
are not supported in Tomcat by default.

[1] "Apache Bean Scripting Framework (BSF)": 


[2] Java package "javax.script" ("JSR-223"):


[3] "JSR-223", the "Java specification request 223":
 or


[4] "Apache Web Server", "Apache HTTP Server Project": 








How to get the tag name from within a taglib class ?

2020-09-11 Thread Rony G. Flatscher (Apache)
While exploring, experimenting with creating a taglib (implementing the BodyTag 
interface) I would
have a need to find out the tag name that caused the tagclass to run.

Is this possible? If so, how would one be able to get at that tag name (any 
brief hints would suffice) ?

---rony

P.S.: If possible I would like to write a single tagclass, but use it for two 
or more different
tags, as the implementation would share quite a lot of code. Besides, it might 
be helpful for debugging.




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Any tutorials or hints about JSP using javax.script engines instead of Java?

2019-10-15 Thread Rony G. Flatscher (Apache)
Hi Chris,
> On 10/13/19 08:40, Rony G. Flatscher (Apache) wrote:
... cut ...
> > Or with other words, what is needed to allow "<%@page
> > language="rexx"%>" ("rexx" being a javax.script.Engine, could be
> > "javascript", "jython", "php", "jacl", "jlog", ...), which might
> > be the easiest for the script language programmers?
>
> I think your question *does* have an actual answer, but I'm going to
> put it off for one more post, because I think this is the better
> answer to your question: "It doesn't matter what is needed, because
> it's a bad idea and shouldn't be done, anyway."
>
> If you agree that better tag libraries are needed more than
> scripting-style code blocks, then why persist in trying to build-out
> technology to enable scripting-style code blocks?
>
> If I were king, I'd deprecate the "language" attribute in JSP and
> abolish scriptlets *entirely*, making this whole question moot.
>
> You can also resurrect the BSF-style tag library and allow any kind of
> scripting in there -- even mixed-language pages! -- that you want,
> which I also think is a bad idea.

Maybe an example makes clear what I would be after, using two JSP samples [1], 
[2] from the net that
serve as tutorials for JSPs being deployed via Tomcat:

  * [1] shows the following sample JSP page:
  o the code uses Java:

<%@ page language="java" contentType="text/html"%>
<%@ page import="java.text.*,java.util.*" %>


Date JSP

<% SimpleDateFormat sdf=new SimpleDateFormat("MM/dd/"); %>

Welcome to Tomcat! Today is <%= sdf.format(new Date()) %>



  o the above JSP should be replacable by e.g. using the RexxScriptEngine 
(implementing
javax.script.ScriptEngine) hence with the following Rexx code [3] 
replacing the Java code above:

<%@ page language="rexx" contentType="text/html"%>


Date JSP


Welcome to Tomcat! Today is <%= date("usa") %>




  * [2] shows the following sample JSP page:
  o the code uses Java:

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.util.Date" %>


Hello World


<% out.print("Hello World!"); %>
Today is: <% out.print(new Date().toString()); %>



  o the above JSP should be replacable by e.g. using the RexxScriptEngine 
(implementing
javax.script.ScriptEngine) hence with the following Rexx code [3] 
replacing the Java code above:

<%@ page contentType="text/html;charset=UTF-8" language="rexx" %>


Hello World


<% out~print("Hello World!") %>
Today is: <% out~print(date()) %>



If the JSP samples [1], [2] are good for Java, than the suggested alternatives 
above (using Rexx for
the sake of the example) would be good for any other (Java scripting) language 
as well?

Such a solution would allow non-Java-programmers to create and deploy JSPs 
written in their language
of choice [4] using Tomcat without a need to know Java.

---rony

[1] "How to Run a JSP Program in Apache Tomcat (Windows)", URL:
<https://www.webucator.com/how-to/how-run-jsp-program-apache-tomcat-windows.cfm>

[2] "HelloWorld from Java jsp with OpenJDK 11 packaged Maven war and deploy on 
Tomcat 9", URL:
<https://github.com/jbilander/HowTos/wiki/HelloWorld-from-Java-jsp-with-OpenJDK-11-packaged-Maven-war-and-deploy-on-Tomcat-9>

[3] Here ooRexx ("open object Rexx") is being employed which is an interpreted, 
dynamically typed
and (like Smalltalk) message based language with a very easy syntax, yet quite 
powerful. The message
operator is the tilde (~), left is the receiver, right the message name with 
optional arguments
(conceptually the receiver looks up the method that has the same name as the 
received message,
invokes it and returns the result, if any). Here the built-in-function date() 
gets used to get and
display the current day.

[4] The idea would be to create a generic support by using javax.script such 
that all languages for
which javax.script.ScriptEngine implementations exist could be deployed by 
merely changing the
language attribute from "java" to the registered name of the scripting language 
one wishes to use.
Such a javax.script support would allow for supplying e.g. the request and 
response objects as
arguments for each invocation in a standardized way by placing them in the
ScriptContext.ENGINE_SCOPE Bindings using e.g. ScriptEngine.ARGV as a key (a 
constant resolving to
"javax.script.argv") for the Java array that contains the arguments, optionally 
adding "out" and the
like into the ScriptContext.ENGINE_SCOPE Bindings etc. (like submitting the 
name of the JSP file for
debugging via ScriptContext.FILENAME, ...)




Re: Any tutorials or hints about JSP using javax.script engines instead of Java?

2019-10-13 Thread Rony G. Flatscher (Apache)
Chris:

thank you for your information and reflections!

> On 10/10/19 08:16, Rony G. Flatscher (Apache) wrote:
>
... cut ...
> > Maybe if some standard "script" taglib library for javax.script
> > languages existed like the proof-of-concept one in [1] then that
> > could be exploited/(re)used rather than coming up with non-standard
> > implementations of their own.
>
> I hesitate to say this due to your previous experience with tag
> libraries, but ... a tag library is basically a JSP thing which
> obviates the need to use any actual Java in the JSP file.
>
> (My statements here are basically already covered in the publication;
> I'm re-itterating them, here for emphasis and clarification.)
>
> There isn't anything inherently Java-esque about any of the existing
> tag libraries (e.g. JSTL), and once you have converted a page filled
> with spaghetti Java code in scriptlets (e.g. <% java goes here %>)
> into one that exclusively uses tag libraries, the implications of
> using <%@page language="java" instead of e.g. language="jython" or
> whatever kind of evaporate.
>
> That is, if you write a tag library, then:
>
> 1. Using the taglib in the JSP file isn't using Java
> 2. Using the taglib in the JSP isn't using the other language,
> either... instead, it's using ... taglib-lang or whatever you want to
> call that
>
> So if you want to do this:
>
> <%@page
>   language="c"
>   import=""
> %>
> <%
>   println("Hello, world!\n");
> %>
>
> Then you'd need to get a "language" binding in JSP.
>
> But instead, if you want to to this:
>
> <%@page language="doesntmatter"%>
> Hello, world!

How (where, what needs to be extended, what needs to be deployed how) would 
this have to be
implemented to allow it to work generically in all containers for all 
javax.script engines?


> Then you can implement the tag library using any programming language
> you want, as long as you are able to register it properly with the JSP
> servlet and have it respond to the calls targeted at the tag library
> interface(s) you have implemented.
>
> IMHO, the BSF taglib is a project that deserved to die. It took all of
> the horrible possibilities of Java scriptlets in JSPs and made the
> language pluggable so that you could have garbage spaghetti code in
> your language of choice packaged inside of a JSP. Good riddance.
>
> Resurrecting the capabilities of the BSF taglib is, again IMHO, a
> waste of effort. That effort would be better spent creating better (or
> more diverse) tag libraries that don't expose the concept of
> "scriptlets" to the programmer /at all/.

Concurring! :)

Actually in [1], p. 58, last paragraph ( almost ten years ago) the student 
concluded:

"While the Script Tag Library fills a gap in current Java web development 
technology, more work
could be done on the JSP specification
itself. The specification already includes the page directive facility for 
specifying the
language of a JSP page. Now that JSR-223 is part of the
core Java library, it is possible to mandate that implementing containers 
should support
languages other than Java by using the javax.script
API. While this would prevent the mixing of multiple scripting languages on 
one page, it is
unlikely that a JSP page would be worked on by multiple developers using 
different scripting
languages, making that ability something of an edge case."

What would be the starting point, how would you advise to implement this such 
that any javax.script
language could be used just by denoting its name?
(Short of such a possibility the "scriptlet"-concept can hardly be 
circumvented.)

Or with other words, what is needed to allow "<%@page language="rexx"%>" 
("rexx" being a
javax.script.Engine, could be "javascript", "jython", "php", "jacl", "jlog", 
...), which might be
the easiest for the script language programmers?

---rony

[1]  Ryabenkiy S.: "Java Web Scripting und Apache Tomcat",
<http://wi.wu.ac.at/rgf/diplomarbeiten/BakkStuff/2010/201007_Ryabenkiy/201007_Ryabenkiy_WebScripting_ApacheTomCat_TagLib.pdf>.





Re: Any tutorials or hints about JSP using javax.script engines instead of Java?

2019-10-13 Thread Rony G. Flatscher (Apache)
George:

On 12.10.2019 02:17, George S. wrote:
> I'm a little confused. What would one hope to gain by doing this?

This way you gain all non-Java-programmers to use Tomcat and create server 
applications in their
programming languages of choice. Targeting javax.script languages any such 
language could be then
used, cf. [1].

It seems that it is still the case that PHP is predominately used for server 
pages.

In the case of Microsoft developed software cf. ASP.NET [2] which allows for 
using any of the .NET
languages [3], like VB.NET, C#, JScript.NET et.al.

So with other words, the idea is to make Apache Tomcat a friendly host for all 
those programmers who
do not program in Java, but rather in one of the JVM/javax.script languages, 
putting it again on par
with Microsoft's solution if not allowing for surpassing it! :)

---rony

[1] "List of JVM languages" (incomplete list): 
<https://en.wikipedia.org/wiki/List_of_JVM_languages>

[2] "ASP.NET": <https://en.wikipedia.org/wiki/ASP.NET>

[3] "List of CLI languages": 
<https://en.wikipedia.org/wiki/List_of_CLI_languages>


> On 10/8/2019 9:11 AM, Rony G. Flatscher (Apache) wrote:
>> Does anyone know of any tutorials that would demonstrate how to use any 
>> javax.script language in
>> JSPs instead of Java (e.g. using Jython or JavaScript instead)?
>>
>> If not, any advice/hint how to realize/create such a functionality (for then 
>> creating such a
>> tutorial instead) would be highly appreciated!
>>
>> ---rony


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Any tutorials or hints about JSP using javax.script engines instead of Java?

2019-10-10 Thread Rony G. Flatscher (Apache)
Hi Chris,

> On 10/9/19 07:08, Rony G. Flatscher (Apache) wrote:
> > On 08.10.2019 21:16, André Warnier (tomcat) wrote:
> >> On 08.10.2019 17:11, Rony G. Flatscher (Apache) wrote:
> >>> Does anyone know of any tutorials that would demonstrate how to
> >>> use any javax.script language in JSPs instead of Java (e.g.
> >>> using Jython or JavaScript instead)?

... cut ...

> My own (particularly uninformed) opinion is that most scripting
> languages that have wanted to get into JVMs/app servers have simply
> built their own technologies to handle everything, so it doesn't run
> through JSP itself.
>
> For example, Lucee[1] is a CFML implementation in Java, but it doesn't
> (always) use JSP. They have a separate "interpreter" for it instead of
> building huge tag libraries to fit it into JSP. (I say "interpreted"
> because I don't know if they actually interpret the files each time on
> demand, or if there is a compilation step at some point. It doesn't
> really matter either way.)
>
> I haven't looked at it in depth, but I believe this is also what
> Apache JGroovy[2] does.
>
> -chris
>
> [1] https://lucee.org/
> [2] https://groovy-lang.org/

Maybe if some standard "script" taglib library for javax.script languages 
existed like the
proof-of-concept one in [1] then that could be exploited/(re)used rather than 
coming up with
non-standard implementations of their own.

---rony

[1]

with an example that instrumentaes PHP and Rexx.




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Any tutorials or hints about JSP using javax.script engines instead of Java?

2019-10-10 Thread Rony G. Flatscher (Apache)
Hi Konstantin,

On 09.10.2019 15:31, Konstantin Kolinko wrote:
> вт, 8 окт. 2019 г. в 18:11, Rony G. Flatscher (Apache) :
>> Does anyone know of any tutorials that would demonstrate how to use any 
>> javax.script language in
>> JSPs instead of Java (e.g. using Jython or JavaScript instead)?
>>
>> If not, any advice/hint how to realize/create such a functionality (for then 
>> creating such a
>> tutorial instead) would be highly appreciated!
> 1. There is no such feature in Apache Tomcat.
>
> Tomcat implements JSP specification and the specification [1] only
> supports language="java" in a JSP declaration.
>
> [1] 
> https://cwiki.apache.org/confluence/display/TOMCAT/Specifications#Specifications-JavaServerPagesandExpressionLanguageSpecifications
>
> Support for other language needs some specification document of such a
> feature, and I do not know about any such document.

Hmm, what steps would be necessary and where? One idea would be to extend the 
support for any of the
javax.script languages.

... cut ...

---rony



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Any tutorials or hints about JSP using javax.script engines instead of Java?

2019-10-09 Thread Rony G. Flatscher (Apache)
On 08.10.2019 21:16, André Warnier (tomcat) wrote:
> On 08.10.2019 17:11, Rony G. Flatscher (Apache) wrote:
>> Does anyone know of any tutorials that would demonstrate how to use any 
>> javax.script language in
>> JSPs instead of Java (e.g. using Jython or JavaScript instead)?
>>
>> If not, any advice/hint how to realize/create such a functionality (for then 
>> creating such a
>> tutorial instead) would be highly appreciated!
>>
>
> I know nothing about the subject matter, but was searching Google for 
> "javax.script language jsp"
> and found this :
> http://wi.wu.ac.at:8002/rgf/diplomarbeiten/BakkStuff/2010/201007_Ryabenkiy/201007_Ryabenkiy_WebScripting_ApacheTomCat_TagLib.pdf
>
> (look around page 50).
> Does this help ?

Yes and no! :)

This work has been created under my supervision almost ten years ago. :)

The student did an exceptional job and created proof-of-concept taglibs for BSF 
(Apache Bean
Scripting Framework) and JSR223 (Java scripting framework 'javax.script') (and 
even a
proof-of-concept javax.script implementation for ooRexx).

> On the side, even though (or maybe because) I did not previously know 
> anything about this, I found
> this document really impressive in terms of providing a terse but extremely 
> readable background of
> the whole thing, all the way to some practical examples, all in less than 100 
> pages. And this was
> a bachelor's thesis. So I don't know if it helps you, but I enjoyed it.
*Great!*
:)
> Looking up the author in Google, it doesn't seem that he really needs my 
> modest plaudits though.

:)

---

Maybe I should reformulate the request in form of open questions:

  * Is there any container that supports for the page directive the use of any 
javax.script language
such as Jython, ooRexx, et.al.?
  * Is there any official/supported taglib to allow javax.script languages to 
be deployed in JSPs
like demonstrated as a proof-of-concept in Stanislav Ryabenkiy's work? Are 
there any initiatives
for creating such a support?
  * Is there any interest in allowing Java scripting languages to be used in 
JSPs as demonstrated as
a proof-of-concept in Ryabenkiy's work with PHP/Quercus, Python/Jython and 
ooRexx?

---rony

P.S.: My request stems from the expectation that by now javax.script languages 
are fully supported
in JSPs, which may not be the case at all judging from the answers so far.

P.P.S.: <http://wi.wu.ac.at/rgf/diplomarbeiten/> would list all sorts of 
student's work that might
be interesting or of help for others (like the above mentioned Bachelor thesis).



Re: Any tutorials or hints about JSP using javax.script engines instead of Java?

2019-10-08 Thread Rony G. Flatscher (Apache)
On 08.10.2019 17:53, Zero wrote:
> On 10/8/19 5:11 PM, Rony G. Flatscher (Apache) wrote:
>> Does anyone know of any tutorials that would demonstrate how to use any 
>> javax.script language in
>> JSPs instead of Java (e.g. using Jython or JavaScript instead)?
>>
>> If not, any advice/hint how to realize/create such a functionality (for then 
>> creating such a
>> tutorial instead) would be highly appreciated!
>>
>> ---rony
>
>
> How about TutorialsPoint ?

Thank you, already went through that but did not find anything related to 
javax.script languages (it
documents the "language" attribute (giving "java" as a value) in the page 
directive
(https://www.tutorialspoint.com/jsp/page_directive.htm).

---rony


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Any tutorials or hints about JSP using javax.script engines instead of Java?

2019-10-08 Thread Rony G. Flatscher (Apache)
Does anyone know of any tutorials that would demonstrate how to use any 
javax.script language in
JSPs instead of Java (e.g. using Jython or JavaScript instead)?

If not, any advice/hint how to realize/create such a functionality (for then 
creating such a
tutorial instead) would be highly appreciated!

---rony




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Using existing pki certificates to enable SSL on tomcat 9

2018-12-16 Thread Sam G
Hi,
  I've installed Apache Tomcat 9 on windows 2016 64bit server. Our SA
has requested a PKI certificate for the windows server feom our CA and got
one.
I need help with steps involved in using that existing certificate to
enable SSL on Tomcat.

Thank you
Sam


Re: CVE-2018-11759 vulnerability checking

2018-11-22 Thread GNK G
Thanks Mark.. Got clarified

On Thu, Nov 22, 2018 at 10:50 PM Mark Thomas  wrote:

> On November 22, 2018 4:19:40 PM UTC, GNK G  wrote:
> >Hello Team,
> >
> >According to the below link, we can check the vulnerability using
> >"status"
> >worker
> >
> >
> https://www.immunit.ch/blog/2018/11/01/cve-2018-11759-apache-mod_jk-access-bypass/
> >
> >I am able to simulate the issue using the above method.
> >
> >But it is specific only to "status" worker.
> >
> >Does that mean, the issue is only specific to "status" worker, if we
> >don't
> >use it, is it not vulnerable.
>
> No. The vulnerability is not specific to the status worker.
>
> >I am trying the same method in other URL (by appending ;) in our
> >server, it
> >is always going for authentication. So can I assume, it does not affect
> >other part in our server.
>
> No. Whether or not you are vulnerable will depend on multiple factors.
>
> If you are applying access controls in httpd to a subset of the URLs
> served by Tomcat or if Tomcat serves only a subset of the URLs accessible
> through httpd then  you are probably vulnerable.
>
> Mark
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


CVE-2018-11759 vulnerability checking

2018-11-22 Thread GNK G
Hello Team,

According to the below link, we can check the vulnerability using "status"
worker

https://www.immunit.ch/blog/2018/11/01/cve-2018-11759-apache-mod_jk-access-bypass/

I am able to simulate the issue using the above method.

But it is specific only to "status" worker.

Does that mean, the issue is only specific to "status" worker, if we don't
use it, is it not vulnerable.

I am trying the same method in other URL (by appending ;) in our server, it
is always going for authentication. So can I assume, it does not affect
other part in our server.

Could some one please provide input on this?

Thanks,,
Navanee


Re: 21 second pause that randomly happens

2018-07-16 Thread Erik G. H. Meade
If all else fails you might want to enable Garbage Colletion (GC) logging to 
make sure it isn't Full GCs causing the delay.

David Cleary  wrote:
> We have a customer who is experiencing a random, 21 second pause when using 
> out Tomcat based application server. We believe this may be during a TCP 
> connect and timeout. Logging indicates the pause happens before the request 
> makes it to our back end. It mostly happens when we create an initial logical 
> connection, but we have also seen it elsewhere where we believe the TCP Keep 
> alive was expired and a new socket had to be established. However, I do not 
> know this and am hoping there is some logging I can turn on in the NIO 
> connector to collect more data. I tried turning on logging in the Endpoint 
> class, but that did not provide anything useful. There is a NAT firewall 
> between the client and server, so I'm looking for some TCP level logging that 
> could point me in the proper direction.
> 
> Thanks
> David Cleary
> Progress
> 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: AJP protocol with Apache Tomcat Version 7.0.52

2014-05-21 Thread Pradeep Kumar G M
We are using mod_jk

 CAUTION - Disclaimer *
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
for the use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further, you are 
not
to copy, disclose, or distribute this e-mail or its contents to any other 
person and
any such actions are unlawful. This e-mail may contain viruses. Infosys has 
taken
every reasonable precaution to minimize this risk, but is not liable for any 
damage
you may sustain as a result of any virus in this e-mail. You should carry out 
your
own virus checks before opening the e-mail or attachment. Infosys reserves the
right to monitor and review the content of all messages sent to or from this 
e-mail
address. Messages sent to or from this e-mail address may be stored on the
Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat 6.0.36: configure/make of jsvc on Solaris 10

2013-02-08 Thread G Kitagawa
Hi -

I'm new to Tomcat and Apache.

Hardware: Dual Proc, UltraSPARC-IIIi, 8GB memory, Sun-Blade-2500
Operating System: Solaris 10 10/09
Java:  JRE 1.5.0.0_20-b2
Downloaded/Installed:  Apache 2.0.63, Tomcat 6.0.36, Jetspeed 2.2.2,
Maven 2.2.1, gcc 3.3.2

Apache 2.0.63 runs fine (despite a very basic web page), I can get the
Tomcat page
that states I've set up Tomcat successfully, but I was unable to
create the jsvc daemon.

I've put the software_name/bin and software_lib in my path and library path.
Also, I've declared the following:
CATALINA_HOME=/opt/apache-tomcat-6.0.36
JAVA_HOME=/usr/java
CATALINA_TMPDIR=/opt/apache-tomcat-6.0.36/temp

Following the example from the Tomcat set up page, the configure
script appears to me
(please remember I'm new to Tomcat) to run well.  When I do the make (using
/usr/ccs/bin/make), I'm getting errors from jsvc-unix.c, which
reference multiple lines
in siginfo.h (18 lines), signal.h and wait.h.  Subsequently, this
fails to build jsvc.
These three files are from /usr/include/sys, and I don't believe that
the syntax is
incorrect (one of the errors is parse error before k_siginfo_t,
from siginfo.h,
signal.h and wait.h).

What am I missing in my configuration?  What other information can I
supply to you
for additional assistance?

-- 

Solaris Rules - WinBLOWS

I never wanted to be anything but an engineer -- Capt. Montgomery Scott

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 6.0.36: configure/make of jsvc on Solaris 10

2013-02-08 Thread G Kitagawa
On Fri, Feb 8, 2013 at 9:42 AM, Konstantin Kolinko
knst.koli...@gmail.com wrote:
 2013/2/8 G Kitagawa kitagawag...@gmail.com:
 Hi -

 I'm new to Tomcat and Apache.

 Hardware: Dual Proc, UltraSPARC-IIIi, 8GB memory, Sun-Blade-2500
 Operating System: Solaris 10 10/09
 Java:  JRE 1.5.0.0_20-b2
 Downloaded/Installed:  Apache 2.0.63, Tomcat 6.0.36, Jetspeed 2.2.2,
 Maven 2.2.1, gcc 3.3.2

 Apache 2.0.63 runs fine (despite a very basic web page), I can get the
 Tomcat page
 that states I've set up Tomcat successfully, but I was unable to
 create the jsvc daemon.

 I've put the software_name/bin and software_lib in my path and library 
 path.
 Also, I've declared the following:
 CATALINA_HOME=/opt/apache-tomcat-6.0.36
 JAVA_HOME=/usr/java
 CATALINA_TMPDIR=/opt/apache-tomcat-6.0.36/temp

 Following the example from the Tomcat set up page, the configure
 script appears to me
 (please remember I'm new to Tomcat) to run well.  When I do the make (using
 /usr/ccs/bin/make), I'm getting errors from jsvc-unix.c, which
 reference multiple lines
 in siginfo.h (18 lines), signal.h and wait.h.  Subsequently, this
 fails to build jsvc.
 These three files are from /usr/include/sys, and I don't believe that
 the syntax is
 incorrect (one of the errors is parse error before k_siginfo_t,
 from siginfo.h,
 signal.h and wait.h).

 What am I missing in my configuration?  What other information can I
 supply to you
 for additional assistance?


 1. jsvc is not part of Tomcat, but is used as is from the Apache
 Commons Daemon project.

 Their docs are more authoritative than Tomcat ones and there is a
 later release available for download (1.0.12 vs. 1.0.10 in your
 6.0.36).
 http://commons.apache.org/daemon/

 2. Once you are successful in building jsvc and will go on to configuring it,
 take bin/daemon.sh from a recent version of Tomcat 7.
 That will save you some time.

 3. I think /usr/java is a wrong choice for JAVA_HOME.  Do you have
 $JAVA_HOME/bin/java there?

 4. Java 1.5 has known issues with some code pages (As mentioned in
 Tomcat release notes).

 Best regards,
 Konstantin Kolinko

1) Thanks for pointing me to the Apache Commons Daemon. I'll read
it and try.

2) I'll download Tomcat 7.0

3) /usr/java is a symbolic link to /usr/jdk/instances/jdk1.5.0.  Should I
not have $JAVA_HOME set to /usr/java?

4) Thanks for this - I'll try and update the version.

-- 

Solaris Rules - WinBLOWS

I never wanted to be anything but an engineer -- Capt. Montgomery Scott

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 6.0.36: configure/make of jsvc on Solaris 10

2013-02-08 Thread G Kitagawa
On Fri, Feb 8, 2013 at 10:45 AM, Christopher Schultz
ch...@christopherschultz.net wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 G,

 On 2/8/13 2:26 PM, G Kitagawa wrote:
 Operating System: Solaris 10 10/09

 Following the example from the Tomcat set up page, the configure
 script appears to me (please remember I'm new to Tomcat) to run
 well.  When I do the make (using /usr/ccs/bin/make), I'm getting
 errors from jsvc-unix.c, which reference multiple lines in
 siginfo.h (18 lines), signal.h and wait.h.

 Can you post a transcript, starting with ./configure?

 I've never tried to use a different 'make', but does jsvc require GNU
 make by any chance? I've seen some packages over the years that
 require GNU make (though not necessarily GCC).

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
 Comment: GPGTools - http://gpgtools.org
 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

 iEYEAREIAAYFAlEVY9kACgkQ9CaO5/Lv0PCSSACghV/wyNV1ShTgaYoZvvAAYUOk
 n8IAn3dRFATWaVpEif+KKRcZdCGV7xEH
 =vTR5
 -END PGP SIGNATURE-

As requested:

webserver# pwd
/opt/apache-tomcat-6.0.36/bin/commons-daemon-1.0.10-native-src/unix

webserver# ./configure --with-java=/usr/java
*** Current host ***
checking build system type... sparc-sun-solaris2.10
checking host system type... sparc-sun-solaris2.10
checking cached host system type... ok
*** C-Language compilation tools ***
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for ranlib... :
checking for strip... :
*** Host support ***
checking C flags dependant on host system type... ok
*** Java compilation tools ***
checking JAVA_HOME... /usr/java
checking for JDK os include directory...  solaris
gcc flags added
*** Writing output files ***
configure: creating ./config.status
config.status: creating Makefile
config.status: creating Makedefs
config.status: creating native/Makefile
*** All done ***
Now you can issue make
webserver#
webserver# /usr/ccs/bin/make
(cd native; /usr/ccs/bin/make  all)
gcc -g -O2 -DOS_SOLARIS -DDSO_DLFCN -DCPU=\sparc\ -Wall
-Wstrict-prototypes -I/usr/java/include -I/usr/java/include/solaris -c
jsvc-unix.c -o jsvc-unix.o
In file included from /usr/include/sys/signal.h:34,
 from /usr/include/signal.h:26,
 from jsvc-unix.c:20:
/usr/include/sys/siginfo.h:259: error: parse error before ctid_t
/usr/include/sys/siginfo.h:292: error: parse error before '}' token
/usr/include/sys/siginfo.h:294: error: parse error before '}' token
/usr/include/sys/siginfo.h:390: error: parse error before ctid_t
/usr/include/sys/siginfo.h:392: error: conflicting types for `__proc'
/usr/include/sys/siginfo.h:261: error: previous declaration of `__proc'
/usr/include/sys/siginfo.h:398: error: conflicting types for `__fault'
/usr/include/sys/siginfo.h:267: error: previous declaration of `__fault'
/usr/include/sys/siginfo.h:404: error: conflicting types for `__file'
/usr/include/sys/siginfo.h:273: error: previous declaration of `__file'
/usr/include/sys/siginfo.h:420: error: conflicting types for `__prof'
/usr/include/sys/siginfo.h:287: error: previous declaration of `__prof'
/usr/include/sys/siginfo.h:424: error: conflicting types for `__rctl'
/usr/include/sys/siginfo.h:291: error: previous declaration of `__rctl'
/usr/include/sys/siginfo.h:426: error: parse error before '}' token
/usr/include/sys/siginfo.h:428: error: parse error before '}' token
/usr/include/sys/siginfo.h:432: error: parse error before k_siginfo_t
/usr/include/sys/siginfo.h:437: error: parse error before '}' token
In file included from /usr/include/signal.h:26,
 from jsvc-unix.c:20:
/usr/include/sys/signal.h:85: error: parse error before siginfo_t
In file included from jsvc-unix.c:20:
/usr/include/signal.h:111: error: parse error before siginfo_t
/usr/include/signal.h:113: error: parse error before siginfo_t
In file included from jsvc-unix.c:24:
/usr/include/sys/wait.h:86: error: parse error before siginfo_t
*** Error code 1
make: Fatal error: Command failed for target `jsvc-unix.o'
Current working directory
/opt/apache-tomcat-6.0.36/bin/commons-daemon-1.0.10-native-src/unix/native
*** Error code 1
make: Fatal error: Command failed for target `native/all'
webserver#

-- 

Solaris Rules - WinBLOWS

I never wanted to be anything but an engineer -- Capt. Montgomery Scott

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



malware found the tomcat 6.0.29

2012-11-26 Thread Mohan Kumar G


We have found the malware installed on the tomcat version
6.0.29 on two of the servers.The both servers have a war file
(Tomcatmanagxesaxsas.war) that installed several java script files to the
Tomcat webserver that allow for remote access over the web. OD-VA-W-AG-87 had
an additional war file (Jeroy.war) that appears to also be a java script remote
file browser. Even though , we followed all the security settings needed for
the tomcat container.

 

The below steps are followed to secure the tomcat container:

 

1) Removed the default examples under CATALINA_HOME/webapps
like jsp-examples, servlet-examples, tomcat-docs, webdav

2) Make sure the default servlet is configured not to server
index pages when a welcome file is not present. In CATALINA_HOME/conf/web.xml

init-param


param-namelistings/param-name


param-valuefalse/param-value  !-- make sure this is false --

   /init-param

 

3) Context.xml :

HttpOnly configuration : Tomcat versions support the
HttpOnly [1] cookie option.

This is configured in the conf/context.xml file: 

Context useHttpOnly=true

 

4) server.xml :

In the server.xml for all the connector , we have added
secure=true

 

5) Make sure all the 
sample user and role entries are commented out in the
CATALINA_HOME/conf/tomcat-users.xml file

 

 

Let us know if anything missing as part of security settings

 

Thanks,Mohan




Re: tomcat eclipse and too many connections

2012-10-16 Thread g. rgar
Thanks for the reply

On Tue, Oct 16, 2012 at 10:59 PM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 g. rgar,

 On 10/15/12 5:16 PM, g. rgar wrote:
  No I am not leaking connections - definitely. I don't use a single
  connection to the DB in the scenario posted. I just undeploy and
  deploy the application via Eclipse.

 That *may* cause connections to be used. Do you load anything from the
 db on startup?


The ds is lazy loaded - you can see my DB connector code in the first
post.The constructor for the pool is called when first the db is needed (as
it is called from a static nested class) - which is on loggin.
I never loggin or indeed display the login page. I have to test more to be
sure


  I do think it may be related to the thread issue - you know better
  of course. Tomcat kills the thread and this thread is responsible
  for cleaning abandoned connections. Does it make sense ? The
  threads name is : [Abandoned connection cleanup thread]

 Connector/J shouldn't have any cleanup thread running under normal
 circumstances. I do know that there is a MySQL Cancellation Timer
 thread that runs when a query is run with a time limit associated with
 it. It used to be that the library created one thread and left it
 running, which could lead to a ClassLoader leak in a webapp. That has
 been fixed though I can't reproduce the fix myself.


[Abandoned connection cleanup thread] sounds like a thread which cleans up
- they are working on it btw and having some problems with tomcat reporting
it as a leak - see linked bug : http://bugs.mysql.com/65909


  SEVERE: The web application [/ted2012] appears to have started a
  thread named [Abandoned connection cleanup thread] but has failed
  to stop it. This is very likely to create a memory leak.
 
  @Shultz ; what do yu mean by While it is possible, your connection
  pool should be complaining about that. 

 I'm not sure I know what you mean: did I say that? When?

In your first post in this thread


  Have you enabled removeAbandoned and logAbandoned for your
  connections see my first post : remove abandoned is true - I may
  add log abandoned

 Without logging them, you'll never know if you have any connection leaks.

Will do ASAP

Thanks for your time !



 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
 Comment: GPGTools - http://gpgtools.org
 Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

 iEYEARECAAYFAlB9vLQACgkQ9CaO5/Lv0PAFSQCgqoDwAo6X/b3kDL/ND05u2TeE
 H8UAoLxucfbAv3kp/EBrS9fAeF95jh31
 =GD+t
 -END PGP SIGNATURE-

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: tomcat eclipse and too many connections

2012-10-15 Thread g. rgar
Thanks for the attention

No I am not leaking connections - definitely. I don't use a single
connection to the DB in the scenario posted. I just undeploy and deploy the
application via Eclipse.

I do think it may be related to the thread issue - you know better of
course. Tomcat kills the thread and this thread is responsible for cleaning
abandoned connections. Does it make sense ? The threads name is :
[Abandoned connection cleanup thread]

SEVERE: The web application [/ted2012] appears to have started a thread
named [Abandoned connection cleanup thread] but has failed to stop it. This
is very likely to create a memory leak.

@Shultz ; what do yu mean by While it is possible, your connection pool
should be complaining about that. 

Have you enabled removeAbandoned and logAbandoned for your
connections see my first post : remove abandoned is true - I may add log
abandoned


On Mon, Oct 15, 2012 at 10:16 PM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 g rgar,

 On 10/14/12 6:00 PM, g. rgar wrote:
  maybe this is related also :
  http://bugs.mysql.com/bug.php?id=65909
 
  If true then a workaround must be made available

 I've looked at this bug and it has nothing to do with connections
 remaining open. That bug is about a thread with the webapp's context
 class loader causing the webapp's ClassLoader to be pinned in memory
 after a webapp stop.

 Unfortunately, this mailing list thread has been picked-up as a
 symptom of the threading bug which is entirely untrue.

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
 Comment: GPGTools - http://gpgtools.org
 Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

 iEYEARECAAYFAlB8YRUACgkQ9CaO5/Lv0PAGtQCgwI7YNgqVXaLpvYtrX3RrDLoZ
 BogAoI4wQez+y24tb8PdzTjD3n2lZI29
 =kkZt
 -END PGP SIGNATURE-

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




tomcat eclipse and too many connections

2012-10-14 Thread g. rgar
I am developing a small java ee app (java 1.7, eclipse juno, tomcat 7.0.30,
windows 7 professional, mysql-connector-java-5.1.22-bin.jar, vanilla
servlets/jsp MVC)

All works fine - while I change things and save .java files in eclipse it
apparently redeploys the app on Tomcat - after some redeployments I get :

com.mysql.jdbc.exceptions.
jdbc4.MySQLNonTransientConnectionException: Data source rejected
establishment of connection,  message from server: Too many connections

WARNING: Unexpected exception resolving reference
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Data
source rejected establishment of connection,  message from server: Too
many connections
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
at com.mysql.jdbc.Util.getInstance(Util.java:382)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1013)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1116)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2338)
at
com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2371)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2163)
at com.mysql.jdbc.ConnectionImpl.init(ConnectionImpl.java:794)
at com.mysql.jdbc.JDBC4Connection.init(JDBC4Connection.java:47)
at sun.reflect.GeneratedConstructorAccessor22.newInstance(Unknown
Source)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:378)
at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
at
org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:278)
at
org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:699)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:631)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:485)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:143)
at
org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:116)
at
org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:103)
at
org.apache.tomcat.jdbc.pool.DataSourceFactory.createDataSource(DataSourceFactory.java:539)
at
org.apache.tomcat.jdbc.pool.DataSourceFactory.getObjectInstance(DataSourceFactory.java:237)
at
org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:143)
at
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321)
at org.apache.naming.NamingContext.lookup(NamingContext.java:843)
at org.apache.naming.NamingContext.lookup(NamingContext.java:154)
at org.apache.naming.NamingContext.lookup(NamingContext.java:831)
at org.apache.naming.NamingContext.lookup(NamingContext.java:168)
at
org.apache.catalina.core.NamingContextListener.addResource(NamingContextListener.java:1061)
at
org.apache.catalina.core.NamingContextListener.createNamingContext(NamingContextListener.java:671)
at
org.apache.catalina.core.NamingContextListener.lifecycleEvent(NamingContextListener.java:270)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.StandardContext.reload(StandardContext.java:3920)
at
org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:426)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1345)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1530)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1519)
at 

Re: tomcat eclipse and too many connections

2012-10-14 Thread g. rgar
(NativeConstructorAccessorImpl.java:57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
at com.mysql.jdbc.Util.getInstance(Util.java:382)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1013)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1116)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2338)
at
com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2371)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2163)
at com.mysql.jdbc.ConnectionImpl.init(ConnectionImpl.java:794)
at com.mysql.jdbc.JDBC4Connection.init(JDBC4Connection.java:47)
at sun.reflect.GeneratedConstructorAccessor18.newInstance(Unknown
Source)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:378)
at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
at
org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:278)
at
org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:699)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:631)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:485)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:143)
at
org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:116)
at
org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:103)
at
org.apache.tomcat.jdbc.pool.DataSourceFactory.createDataSource(DataSourceFactory.java:539)
at
org.apache.tomcat.jdbc.pool.DataSourceFactory.getObjectInstance(DataSourceFactory.java:237)
at
org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:143)
at
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321)
at org.apache.naming.NamingContext.lookup(NamingContext.java:843)
at org.apache.naming.NamingContext.lookup(NamingContext.java:154)
at org.apache.naming.NamingContext.lookup(NamingContext.java:831)
at org.apache.naming.NamingContext.lookup(NamingContext.java:168)
at
org.apache.catalina.core.NamingContextListener.addResource(NamingContextListener.java:1061)
at
org.apache.catalina.core.NamingContextListener.createNamingContext(NamingContextListener.java:671)
at
org.apache.catalina.core.NamingContextListener.lifecycleEvent(NamingContextListener.java:270)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.StandardContext.reload(StandardContext.java:3920)
at
org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:426)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1345)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1530)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1519)
at java.lang.Thread.run(Thread.java:722)

Oct 15, 2012 12:34:54 AM org.apache.catalina.core.NamingContextListener
addResource
WARNING: Failed to register in JMX: javax.naming.NamingException: Data
source rejected establishment of connection,  message from server: Too
many connections
SessionListener - contextInitialized :
org.apache.catalina.core.ApplicationContextFacade@457605b1
Oct 15, 2012 12:34:54 AM org.apache.catalina.core.StandardContext reload
INFO: Reloading Context with name [/ted2012] is completed



Thanks for your time




On Sun, Oct 14, 2012 at 11:19 PM, Mark Eggers its_toas...@yahoo.com wrote:

 On 10/14/2012 12:14 PM, g. rgar wrote:

 I am developing a small java ee app (java 1.7, eclipse juno, tomcat
 7.0.30,
 windows 7 professional, mysql-connector-java-5.1.22-**bin.jar, vanilla
 servlets/jsp MVC)

 All works fine

Re: Tomcat 6 Context not created, deployment fails

2011-04-25 Thread John G .
Mark Thomas markt at apache.org writes:

 
 On 22/03/2011 21:53, Billy Bacon wrote:
  Awesome Mark, that worked perfectly!
  
  I'd like to actually run the app out of the war file without exploding it 
and I was able to accomplish this by
 setting unpackWARs=false in the server.xml. 
 
 It shouldn't be doing that if the WAR is outside the appBase. That loks
 like a bug. Tomcat 7 was doing this and I fixed that fairly recently.
 
  I know this isn't 'preferred' but how would I go about 'hot-patching' let's 
say a JSP for the webapp in this
 setup? Typically I do this within the exploded directory and the next time 
 the 
JSP is requested, it
 re-compiles and life is good.
 
 In that case you'll have to expand your WAR and set the docBase to the
 expanded directory.
 
  Regarding the documentation... I think it's great. I think a concrete 
example and mentioning (with an
 example) that the docBase needs to be outside of the 'webapps' directory 
 would 
have prevented me from
 mailing the alias. I think I was close with what I originally had using the 
docs alone but it wasn't clear to
 me that the docBase needed to be outside of the appBase. 
 
 The relevant docs are:
 http://tomcat.apache.org/tomcat-7.0-
doc/config/host.html#Automatic%20Application%20Deployment
 and
 http://tomcat.apache.org/tomcat-7.0-doc/config/context.html
 
 There is certainly scope in there for a sentence or two about deploying
 a WAR/directory under a context path not related to its name and/or
 deploying a WAR/directory it multiple times. Drafts welcome.
 
 Mark
 

Hi Mark,

In regards to your recommendations, the documentation and in line with multiple 
contexts sharing a single war file:

- the situation is like the one above
- there are no crushes, Tomcat works fine
- 'docBase' is insensitive to both relative and absolute paths
- The issue: only one context can be accessed. 

Specifics:
- Tomcat version: 7.0.12
- Context: multiple, different names (i.e. ACon.xml, BCon2.xml, etc.),path - 
different,  everything else - identical, deployed in the same directory (meta-
inf)
- the name 'context.xml' MUST be present 
- other context files accepted but ignored
- The Manager indicates only one application available, located at the path of 
the 'context.xml'
- Errors generated if there are more then 1 (one) context / file (i.e. 
context.xml)
- the war file: contains all contexts
- we are using NetBeans for development and we haven't had any problems with 
the 
two integrated platforms

We would appreciate if you can have a look at it when you have a minute and let 
us know. We assume we make some kind of mistake.

Best regards,
John


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



AccessLogValve pattern (timestamp, bytes sent and time taken)

2011-02-17 Thread ??G??S ???O???S
Tomcat 5.5 or 6.0
Win XP or Vista (32)

I've read the configuration 
(http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html) and the api 
(http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/valves/AccessLogValve.html)
 but there are some details that are not specified:

timestamp (%t in pattern)
In apache documentation it is stated that this is the time that the request was 
received. I'd like some simple confirmation that this also holds true for the 
tomcat (and is not, for example, the time that the response was sent).

bytes sent (either %b or %B in pattern)
Is this the number of bytes actually sent to the client, or simply the size in 
bytes of the HTTP response (which will differ, for instance, if the connection 
is aborted)? The apache httpd 2.0 provides the %O format as well to distinguish 
between these two cases, whereas in 1.3 it didn't. Since tomcat does not 
provide such an option, my guess is towards the number of bytes actually sent 
to the client, but I'd like some simple confirmation on this.

time taken (either %D or %T in pattern)
Is the network transmission time included in the processing time? To be more 
precise, is this the time the server used to process, prepare the HTTP response 
and deliver it to the underlying layer for transmission (i.e. non-blocking 
threads on tcp send)? Or does it also include the underlying layer sending time 
(e.g. blocking threads on tcp send)? Apache's documentation is also obscure on 
that point...

We're going to use tomcat on a faster than real time web server simulation 
experiment, and I need the above details to correctly build a satisfactory 
initial model for the web server.

Thank you,

Antonios Kogias

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Monitoring production tomcat

2011-02-03 Thread M . H . G . Emmerig

Hello

Maybe Tcat from mulesoft is something to look into

regards

Milko


   
 Adam Lipscombe
 adam.lipscombe@g 
 mail.com  To
   users@tomcat.apache.org 
 03-02-2011 10:57   cc
   
   Subject
 Please respond to Monitoring production tomcat
   Tomcat Users   
   List   
 us...@tomcat.apa 
 che.org  
   
   





Folks


We have a several production servers, each of which runs 1 instance of
tomcat. Within each instance of tomcat there are approximately 10
virtual websites. Each virtual website runs a copy of our web app.
Therefore each server hosts @ 10 instances of our web app

On a couple of the servers we are having problems with tomcat running
out of memory and sometimes dropping the JDBC link to the MYSQL database
etc.
We usually restart tomcat, which of course cures the issues. However
doing do affects every virtual site and therefore is not ideal from our
customer's perspective.

We have been looking at this problem for some time, however it is very
difficult to determine what is causing these problems. Very likely
something in out webapp.


What would help is some kind of management or monitoring facility
that allows us to see which virtual site is getting into trouble.
Ideally it should give enough information to help us track down what is
causing the issue. Memory usage per site, thread view etc.


Can anyone recommend anything that can do this? Commercial or free?


Many thanks - Adam



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




Please consider the environment before printing this email.

De informatie verzonden met dit e-mailbericht is vertrouwelijk en
uitsluitend bestemd voor de geadresseerde. Indien u als niet-geadresseerde
dit bericht ontvangt, wordt u verzocht direct de afzender hierover te
informeren en het bericht te vernietigen. Gebruik van informatie door
onbevoegden, openbaarmaking of vermenigvuldiging  is verboden en kan leiden
tot aansprakelijkheid. De afzender is niet aansprakelijk in geval van
onjuiste overbrenging van het e-mailbericht en/of bij ontijdige ontvangst
daarvan.

The information transmitted is confidential and intended only for the
person or entity to whom or which it is addressed. If you are not the
intended recipient of this communication, please inform us immediately and
destroy this communication. Unauthorised use, disclosure or copying of
information is strictly prohibited and may entail liability. The sender
accepts no liability for improper transmission of this communication nor
for any delay in its receipt.

Setup Advice Needed: dev vs. test vs. production

2011-01-21 Thread Susan G. Conger
I have some web services running on tomcat and I am trying to figure out the
best way to have 1 tomcat instance running all 3 environments.  So the
tomcat would run dev, test, and production on one tomcat instance.  I don't
want to install 3 instances of tomcat on the customers machine for running
the different environments.  

 

I guess the way I would like it to work is to have the web services have the
same name regardless of the environment.  The easy way to think about it is
to have each environment running on a different port.  Is this possible?  Or
would it be easier to have a virtual host?  For now I just need to be
pointed in the correct direction on what is the best way to handle this
situation with tomcat.  If you do have a suggestion and know how to set it
up then please pass it along.  

 

Thanks,

Susan

 

===

Susan G. Conger
Custom Windows  Macintosh Development

President
Web Site Design  Development

YOERIC Corporation
Database Design  Development

256 Windy Ridge Road

Chapel Hill, NC  27517

Phone/Fax: (919)542-0071

cong...@yoeric.com

www.yoeric.com

 



RE: Setup Advice Needed: dev vs. test vs. production

2011-01-21 Thread Susan G. Conger
I hear you.  But in our environment it just isn't feasible to install three
different tomcats on the customer's system.  So I was trying to come up with
a way to do this without having to rename a bunch of stuff.  If it was
running on a different virtual host for each environment or different ports.
Can Tomcat be setup so 3 VM instances are ran under one tomcat installation?
With the constraint that only one tomcat can be installed on the system what
is the best way to run 3 separate environments?

Thanks,
Susan

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Friday, January 21, 2011 1:15 PM
To: Tomcat Users List
Subject: RE: Setup Advice Needed: dev vs. test vs. production

 From: Susan G. Conger [mailto:cong...@yoeric.com] 
 Subject: Setup Advice Needed: dev vs. test vs. production

 I don't want to install 3 instances of tomcat on the 
 customers machine for running the different environments.  

I strongly suggest you rethink that, and use at least three separate Tomcat
instances.  Trying to run everything in one instance puts production at a
severe risk of failure should anything in the dev or test environment have a
problem (e.g., infinite loop, heap overflow).  Given the extremely low cost
of hardware (or VMs) these days, I'd have the test and prod systems on
different boxes or VMs, and let each developer run their own Tomcat instance
on their own workstation.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Setup Advice Needed: dev vs. test vs. production

2011-01-21 Thread Susan G. Conger
You are preaching to the choir here about the multiple installs.  But I
can't.  This is running on an AS400.  And the clients are very particular on
what you can install.  So I am stuck.  FYI:  The dev, test, and production
is for my software not Tomcat.  So I have 3 or more versions of the software
that I have to support.  I want to have 1 tomcat installation will all of
the versions on it at my customer site.  Actual development happens on my
laptop but sometimes I have versions that the customer has to play with and
give feedback on that aren't ready for testing.  This I would install under
dev, then others that are actually in the testing phase and then finally
production.

On my laptop I have multiple tomcat installations but I don't have that
luxury on the customer's as400.

So my thought process is I will have to change my software that communicates
with the web services so that it calls different web services depending on
dev, test, or production.  However I don't want to have to do this.  It
would be better if I could just change the port.  I don't know if a virtual
host would give me anything or not.

Thanks,
Susan

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Friday, January 21, 2011 2:06 PM
To: Tomcat Users List
Subject: RE: Setup Advice Needed: dev vs. test vs. production

 From: Susan G. Conger [mailto:cong...@yoeric.com] 
 Subject: RE: Setup Advice Needed: dev vs. test vs. production

 But in our environment it just isn't feasible to install 
 three different tomcats on the customer's system.

Why not?

 So I was trying to come up with a way to do this without 
 having to rename a bunch of stuff.

Trying to run three separate environments on one Tomcat will *require*
renaming a bunch of stuff.  Running separate Tomcats for each avoids that
issue.

 Can Tomcat be setup so 3 VM instances are ran under one 
 tomcat installation?

Assuming you mean JVM, not VM, you can read RUNNING.txt in the Tomcat home
directory to see how multiple Tomcat instances can be run with one copy of
the Tomcat jar files.  But I'm not sure what you think you're gaining by
doing so.  Having separate installations and running instances lets you test
on a new Tomcat version before committing it to production.

 With the constraint that only one tomcat can be installed on 
 the system what is the best way to run 3 separate environments?

Get rid of the constraint; it's nonsensical.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



tomcat shows intermittent error page and good page for jsp

2011-01-19 Thread M . H . G . Emmerig


Hello

We have the following situation on tomcat 6.0.29

First  we deploy a good jsp and tomcat shows it correctly.
Then we introduce an intentional error in the jsp to test the error page we
want to display.
What happens is the application shows the error page, but when we refresh
the page it shows the good jsp.
And does this a couple of times after which it shows a couple of times the
error page again and so on.
In the logfiles I can see that tomcat is not able to compile the defective
jsp as expected.

What is going on here?


greetz, Milko


Please consider the environment before printing this email.

De informatie verzonden met dit e-mailbericht is vertrouwelijk en
uitsluitend bestemd voor de geadresseerde. Indien u als niet-geadresseerde
dit bericht ontvangt, wordt u verzocht direct de afzender hierover te
informeren en het bericht te vernietigen. Gebruik van informatie door
onbevoegden, openbaarmaking of vermenigvuldiging  is verboden en kan leiden
tot aansprakelijkheid. De afzender is niet aansprakelijk in geval van
onjuiste overbrenging van het e-mailbericht en/of bij ontijdige ontvangst
daarvan.

The information transmitted is confidential and intended only for the
person or entity to whom or which it is addressed. If you are not the
intended recipient of this communication, please inform us immediately and
destroy this communication. Unauthorised use, disclosure or copying of
information is strictly prohibited and may entail liability. The sender
accepts no liability for improper transmission of this communication nor
for any delay in its receipt.

Re: tomcat shows intermittent error page and good page for jsp

2011-01-19 Thread M . H . G . Emmerig

But if it is caching why does it first show the error page as it should?
And then the previous version of the jsp again.

Could it be that the original jsp is still in memory and gets replaced only
when the new version is compiled correctly?


Milko

   
 Mark Thomas   
 ma...@apache.org 
   To
   Tomcat Users List   
 19-01-2011 14:58  users@tomcat.apache.org   
cc
   
 Please respond to Subject
   Tomcat Users   Re: tomcat shows intermittent error
   List   page and good page for jsp  
 us...@tomcat.apa 
 che.org  
   
   
   
   




On 19/01/2011 13:56, m.h.g.emme...@dnb.nl wrote:


 Hello

 We have the following situation on tomcat 6.0.29

 First  we deploy a good jsp and tomcat shows it correctly.
 Then we introduce an intentional error in the jsp to test the error page
we
 want to display.
 What happens is the application shows the error page, but when we refresh
 the page it shows the good jsp.
 And does this a couple of times after which it shows a couple of times
the
 error page again and so on.
 In the logfiles I can see that tomcat is not able to compile the
defective
 jsp as expected.

 What is going on here?

Caching.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




Please consider the environment before printing this email.

De informatie verzonden met dit e-mailbericht is vertrouwelijk en
uitsluitend bestemd voor de geadresseerde. Indien u als niet-geadresseerde
dit bericht ontvangt, wordt u verzocht direct de afzender hierover te
informeren en het bericht te vernietigen. Gebruik van informatie door
onbevoegden, openbaarmaking of vermenigvuldiging  is verboden en kan leiden
tot aansprakelijkheid. De afzender is niet aansprakelijk in geval van
onjuiste overbrenging van het e-mailbericht en/of bij ontijdige ontvangst
daarvan.

The information transmitted is confidential and intended only for the
person or entity to whom or which it is addressed. If you are not the
intended recipient of this communication, please inform us immediately and
destroy this communication. Unauthorised use, disclosure or copying of
information is strictly prohibited and may entail liability. The sender
accepts no liability for improper transmission of this communication nor
for any delay in its receipt.

problem with dynamic code in jsp

2011-01-19 Thread M . H . G . Emmerig


Hello

We are running tomcat 6.0.29 with tridion broker

We have a jsp with code inside that dynamically fetches data from a
database.
When we put a changed jsp in place it gets compiled and shows the fetched
data from the database.
When we change the data in the database and refresh the page, the changed
data is not displayed.
Only a republish of the jsp or a restart of tomcat will display the changed
data from the database.

Could this be a caching problem with tomcat?
if so; how do we prevent this caching from happening?
if not, what could be the source of the problem then?



greetz, Milko


Please consider the environment before printing this email.

De informatie verzonden met dit e-mailbericht is vertrouwelijk en
uitsluitend bestemd voor de geadresseerde. Indien u als niet-geadresseerde
dit bericht ontvangt, wordt u verzocht direct de afzender hierover te
informeren en het bericht te vernietigen. Gebruik van informatie door
onbevoegden, openbaarmaking of vermenigvuldiging  is verboden en kan leiden
tot aansprakelijkheid. De afzender is niet aansprakelijk in geval van
onjuiste overbrenging van het e-mailbericht en/of bij ontijdige ontvangst
daarvan.

The information transmitted is confidential and intended only for the
person or entity to whom or which it is addressed. If you are not the
intended recipient of this communication, please inform us immediately and
destroy this communication. Unauthorised use, disclosure or copying of
information is strictly prohibited and may entail liability. The sender
accepts no liability for improper transmission of this communication nor
for any delay in its receipt.

Re: sslHandshakeException

2011-01-17 Thread g f
Thanks for the reply PID.
I will have to post the full stack tomorrow.
No error messages about the connector during startup.
I think you are right though , with regard to the outbound, the applications
do make requests to other servers and/or apps.
The odd thing is, apache does not throw any errors even in debug mode. If
apache is handling all things authentication I dont understand why tomcat
would be complaining about certs. Would the response from the outbound
connection be the issue? Also If I do not force common access cards it
works fine.
I will post the full stack tomorrow.
Cheers!

On Fri, Jan 14, 2011 at 5:12 PM, Pid p...@pidster.com wrote:

 On 1/14/11 10:31 PM, g f wrote:
  Hello all,
  Not sure if this is the proper area to post but here goes.
  I have a debian os running Apache 2.2.16(debian) along with tomcat
 6.0.29. I
  use mod_jk as well as mod_auth_kerb module for apache.
 
  I use common access cards and allow apache kerb module to handle all auth
  and it works just fine except when I access some of my apps that have
 ajax
  calls back to the same server. Now if I force common access card in
 apache I
  get errors in catalina.out as follows:
 
  javax.net.ssl.SSLHandshakeException: Received fatal alert:
  handshake_failure.
 
  Now as I said I dont do any auth at the tomcat level its all done at the
  apache level. It seems like tomcat is trying to validate the client certs
  that mod_jk is passing along. The question is, how do I tell tomcat to
  ignore the client certs?
 
  I only have the AJP connector active in tomcat and it looks like the
  following:
 
  Connector port=8009 protocol=AJP/1.3 redirectPort=8443
  tomcatAuthentication=false clientAuth=false SSLVerifyClient=false
 /
 
  Any ideas?

 Umm, that sounds odd.

 Do you get any messages about the connector during server startup?

 Do you get a stacktrace or just a log message?  What is the full log
 line or stack?

  If there is an easy way to accept the client certs (even though I do
 nothing
  with them) then I could do that as well.



 Are you sure it's not due to an outbound connection attempt from some
 part of your app?


 p

  Thanks for any advice and sorry if this is not the correct forum for
 this.





sslHandshakeException

2011-01-14 Thread g f
Hello all,
Not sure if this is the proper area to post but here goes.
I have a debian os running Apache 2.2.16(debian) along with tomcat 6.0.29. I
use mod_jk as well as mod_auth_kerb module for apache.

I use common access cards and allow apache kerb module to handle all auth
and it works just fine except when I access some of my apps that have ajax
calls back to the same server. Now if I force common access card in apache I
get errors in catalina.out as follows:

javax.net.ssl.SSLHandshakeException: Received fatal alert:
handshake_failure.

Now as I said I dont do any auth at the tomcat level its all done at the
apache level. It seems like tomcat is trying to validate the client certs
that mod_jk is passing along. The question is, how do I tell tomcat to
ignore the client certs?

I only have the AJP connector active in tomcat and it looks like the
following:

Connector port=8009 protocol=AJP/1.3 redirectPort=8443
tomcatAuthentication=false clientAuth=false SSLVerifyClient=false /

Any ideas?

If there is an easy way to accept the client certs (even though I do nothing
with them) then I could do that as well.
Thanks for any advice and sorry if this is not the correct forum for this.

Cheers!


Re: what ist $CATALINA_HOME/server ? (debian)

2010-12-08 Thread g f
Not sure of your distro and your requirements but for squeeze there is:
http://packages.debian.org/squeeze/tomcat6

lenny:
http://packages.debian.org/lenny/tomcat5.5

Now the script modification is a different story.
Cheers,
GF



On Wed, Dec 8, 2010 at 3:02 AM, Christoph Kukulies k...@kukulies.orgwrote:

 Am 07.12.2010 22:19, schrieb g f:

  Did you aptitude install tomcat6?
 If so why not modify the init.d script that came with that.
 If not perhaps you want to try to use the debs.
 apt-get install tomcat6
 G

  AFAIK there isn't such a thing like a tomcat6 package under the debian
 distribution.
 And I would have to tackle the debianisms in that script. (jsvc e.g.)

 --
 Christoph P.U. Kukulies



 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: what ist $CATALINA_HOME/server ? (debian)

2010-12-07 Thread g f
Did you aptitude install tomcat6?
If so why not modify the init.d script that came with that.
If not perhaps you want to try to use the debs.
apt-get install tomcat6
G

On Tue, Dec 7, 2010 at 1:45 PM, Juha Laiho juha.la...@iki.fi wrote:

 On 7.12.2010 18:45, Christoph Kukulies wrote:
  Can be found any instructions to build your own
  /etc/init.d/tomcat_startup script.
  catalina.sh seems to have provisions for it but I don't see a hook where
 to
  put in the user (e.g. tomcat55 or tomcat6) catalina runs under.

 No need to have a hook there: catalina.sh should be run using the
 account you wish to use to run your Tomcat.
 --
 ..Juha

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: [OT] re : spam

2010-11-18 Thread M . H . G . Emmerig

It is not just you. I received some emails from ed as well.


Milko

   
 André Warnier   
 a...@ice-sa.com   
To
 18-11-2010 12:04  Tomcat Users List   
   users@tomcat.apache.org   
cc
 Please respond to 
   Tomcat Users   Subject
   List   [OT] re : spam  
 us...@tomcat.apa 
 che.org  
   
   
   
   




Guys,
I am starting to receive quite a bit of spam from a guy named Ed about
career moves etc..
Somehow it seems to originate from (or maybe simply mention) the tomcat
users list as a
reply-to.  I have also seen at least one message like that in the list
itself.
Anything that should/can be done about this ?  Does it mean that someone
harvested the
list of subscribers to the list, or worse ?

Or is it just me ?

Among the headers in the messages themselves are :
Received: from mail.apache.org (hermes.apache.org [140.211.11.3])
...
Received-SPF: pass (athena.apache.org: domain of ed_b...@hotmail.com
designates
65.55.90.152 as permitted sender)
..

(full headers available on request)



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




Please consider the environment before printing this email.

De informatie verzonden met dit e-mailbericht is vertrouwelijk en
uitsluitend bestemd voor de geadresseerde. Indien u als niet-geadresseerde
dit bericht ontvangt, wordt u verzocht direct de afzender hierover te
informeren en het bericht te vernietigen. Gebruik van informatie door
onbevoegden, openbaarmaking of vermenigvuldiging  is verboden en kan leiden
tot aansprakelijkheid. De afzender is niet aansprakelijk in geval van
onjuiste overbrenging van het e-mailbericht en/of bij ontijdige ontvangst
daarvan.

The information transmitted is confidential and intended only for the
person or entity to whom or which it is addressed. If you are not the
intended recipient of this communication, please inform us immediately and
destroy this communication. Unauthorised use, disclosure or copying of
information is strictly prohibited and may entail liability. The sender
accepts no liability for improper transmission of this communication nor
for any delay in its receipt.

RE: Connector Setting Problem in tomcat 6.0.29

2010-11-02 Thread Richard G Curry
The following link points to something similar to what you have here, perhaps 
it can guide you to a solution: 


http://mail-archives.apache.org/mod_mbox/tomcat-users/200705.mbox/%3c4656d0d8.4010...@pidster.com%3e

___
«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»
___
Rick Curry
Common Services -  Software Development
E2 - 066, MS 5210
972-431-9178 (Voice)
972-585-7585 (Pager)
To send a (short) Text Message to my Pager:
9725857...@page.metrocall.com

-Original Message-
From: rujin raj [mailto:rujin...@gmail.com] 
Sent: Tuesday, November 02, 2010 6:51 AM
To: Tomcat Users List
Subject: Connector Setting Problem in tomcat 6.0.29

I am using tomcat 6.0.29 64 bit and java 64 1.6.0 64 bit edition.I configured 
the http connector minSpareThreads and MaxSpareThreads. While starting the 
tomcat it is giving the error as follows.

2 Nov, 2010 4:55:24 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.20.
2 Nov, 2010 4:55:24 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], 
ra ndom [true].
2 Nov, 2010 4:55:24 PM org.apache.catalina.startup.SetAllPropertiesRule
begin
*WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property
'minS*
*pareThreads' to '500' did not find a matching property.*
2 Nov, 2010 4:55:24 PM org.apache.catalina.startup.SetAllPropertiesRule
begin
WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 
'maxS pareThreads' to '750' did not find a matching property.
2 Nov, 2010 4:55:25 PM org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
2 Nov, 2010 4:55:25 PM org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
2 Nov, 2010 4:55:25 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 880 ms
2 Nov, 2010 4:55:25 PM
org.apache.catalina.mbeans.GlobalResourcesLifecycleListen
er createMBeans
SEVERE: Exception processing Global JNDI Resources
javax.naming.NamingException: Could not load resource factory class [Root 
except ion is java.lang.ClassNotFoundException:
oracle.jdbc.pool.OracleDataSourceFactor
y]


Herewith i attached my server.xml file.

!-- A Connector represents an endpoint by which requests are received
 and responses are returned. Documentation at :
 Java HTTP Connector: /docs/config/http.html (blocking 
non-blocking)
 Java AJP  Connector: /docs/config/ajp.html
 APR (HTTP/AJP) Connector: /docs/apr.html
 Define a non-SSL HTTP/1.1 Connector on port 8080
*--*
*Connector port=8080 protocol=HTTP/1.1 *
*   connectionTimeout=2 *
*   maxThreads=1000 minSpareThreads=500  *
*   maxSpareThreads=750*
*   enableLookups=false disableUploadTimeout=true*
*   redirectPort=8443 /*
!-- A Connector using the shared thread pool--
!--
Connector executor=tomcatThreadPool
   port=8080 protocol=HTTP/1.1
   connectionTimeout=2
   redirectPort=8443 /
--
!-- Define a SSL HTTP/1.1 Connector on port 8443
 This connector uses the JSSE configuration, when using APR, the
 connector should be using the OpenSSL style configuration
 described in the APR documentation --
!--
Connector port=8443 protocol=HTTP/1.1 SSLEnabled=true
   maxThreads=1000 minSpareThreads=500
   maxSpareThreads=750
   enableLookups=false disableUploadTimeout=true
   scheme=https secure=true
   clientAuth=false sslProtocol=TLS /
--

!-- Define an AJP 1.3 Connector on port 8009 --
Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /


!-- An Engine represents the entry point (within Catalina) that processes
 every request.  The Engine implementation for Tomcat stand alone
 analyzes the HTTP headers included with the request, and passes them
 on to the appropriate Host (virtual host).
 Documentation at /docs/config/engine.html --

Please guide me to resolve this issue.

Regards
Rujinraj
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged 
material.  If the reader of this message is not the intended recipient,
you are hereby notified that your access is unauthorized, and any review,
dissemination, distribution or copying of this message including any 
attachments is strictly prohibited.  If you are not the intended
recipient, please contact the sender and delete the material from any
computer.


-
To unsubscribe, e-mail: 

RE: ISAPI Redirector Work-Flow

2010-11-02 Thread Richard G Curry
Another question, in particular about this:

It's not a redirect.
The request data is converted to the AJP13 binary protocol which is received by 
an AJP connector in Tomcat.

How is the request data passed? It is a Remore Procedure Call, an IP port 
connection, or something else?

___
«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»
___
Rick Curry
Common Services -  Software Development
E2 - 066, MS 5210
972-431-9178 (Voice)
972-585-7585 (Pager)
To send a (short) Text Message to my Pager:
9725857...@page.metrocall.com

-Original Message-
From: Pid [mailto:p...@pidster.com] 
Sent: Monday, November 01, 2010 5:40 PM
To: Tomcat Users List
Subject: Re: ISAPI Redirector Work-Flow

On 01/11/2010 21:48, Richard G Curry wrote:
 I am trying to understand how the ISAPI Redirector functions at an 
 overview level but deeper than this: The request comes into IIS where 
 the ISAPI Redirector filter sends the servlet and JSP requests to the 
 Tomcat server. I know the redirector works with AJP13 to redirect 
 requests to the Tomcat container. What I want to know is HOW that is 
 done. Is it a redirected HTTP request, a 301 redirect or is it a 
 port-to-port connection between the AJP13 processor and the defined 
 instance in the workers.properties file?

It's not a redirect.
The request data is converted to the AJP13 binary protocol which is received by 
an AJP connector in Tomcat.

 As this properties file defines
 the host name of the server holding the Tomcat instance, this can be 
 on a different server than the IIS server, correct?

Yes.

 Then does AJP13
 'connect' directly to the defined server (localhost in all the 
 examples I have seen) and the defined port (8009 in the same 
 examples)?

The connector opens multiple connections to the Tomcat server.

 If you know of a diagram that shows how this works, please share the 
 link to that resouce.

I don't sorry.


p
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged 
material.  If the reader of this message is not the intended recipient,
you are hereby notified that your access is unauthorized, and any review,
dissemination, distribution or copying of this message including any 
attachments is strictly prohibited.  If you are not the intended
recipient, please contact the sender and delete the material from any
computer.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: ISAPI Redirector Work-Flow

2010-11-02 Thread Richard G Curry
That is what I thought and I thank you for your confirmation of this. I 
appreciate your time and support.

___
«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»
___
Rick Curry
Common Services -  Software Development
E2 - 066, MS 5210
972-431-9178 (Voice)
972-585-7585 (Pager)
To send a (short) Text Message to my Pager:
9725857...@page.metrocall.com

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Tuesday, November 02, 2010 8:47 AM
To: Tomcat Users List
Subject: RE: ISAPI Redirector Work-Flow

 From: Richard G Curry [mailto:rgcu...@jcpenney.com]
 Subject: RE: ISAPI Redirector Work-Flow

 How is the request data passed? It is a Remore Procedure Call, an IP 
 port connection, or something else?

AJP is analogous to HTTP, in that it passes requests and responses over a 
TCP/IP connection, but in a much more compact form than HTTP.  That's why the 
Connector element for an AJP connection has address and port attributes.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged 
material.  If the reader of this message is not the intended recipient,
you are hereby notified that your access is unauthorized, and any review,
dissemination, distribution or copying of this message including any 
attachments is strictly prohibited.  If you are not the intended
recipient, please contact the sender and delete the material from any
computer.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Protecting static resources in IIS

2010-11-02 Thread Richard G Curry
What if you put your images into a sub-directory of your app directory -- 
something like images -- and set the access rights on that directory to be 
only accessible by the SYSTEM account.

___
«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»
___
Rick Curry
Common Services -  Software Development
E2 - 066, MS 5210
972-431-9178 (Voice)
972-585-7585 (Pager)
To send a (short) Text Message to my Pager:
9725857...@page.metrocall.com

-Original Message-
From: Pid * [mailto:p...@pidster.com] 
Sent: Tuesday, November 02, 2010 11:42 AM
To: Tomcat Users List
Subject: Re: Protecting static resources in IIS

On 2 Nov 2010, at 15:48, Siva prakash I V sivaprakash...@gmail.com wrote:

 Hi Rob,

 My app contains a sequence of images like for eg. A/11.gif, A/12.gif, 
 A/19.gif, B/21.gif... etc.
 These images are used to identify a valid user of my app.
 As these images are easily guessable, it may be easy for anyone to 
 download all possible images and may lead to phishing attack.
 Having said that I can't place my images in Tomcat and get it served 
 by a servlet( a performance penalty )

You've presumably conducted some performance tests which led you to this 
conclusion?

In this case a Servlet Filter which checks the request against the current 
user's credentials and returns a 403 for unauthorised access would be a low 
cost option.

p

 and neither I can change my image names to ones which are not easily 
 guessable.
 My tomcat app jsps should continue using the existing images.



 On Tue, Nov 2, 2010 at 8:22 PM, Rob Gregory 
 rob.greg...@ibsolutions.comwrote:

 Hi Siva,

 The only way I know of protecting an 'actual' request for a specific 
 resource is to remove the resource from the web server. I Can't see 
 why you would want to stop access to something when it is actually 
 requested otherwise what would be the point of deploying it (if 
 nothing can access it). Sorry if I misunderstand the question.


 -Original Message-
 From: Siva prakash I V [mailto:sivaprakash...@gmail.com]
 Sent: 02 November 2010 14:44
 To: Tomcat Users List
 Subject: Re: Protecting static resources in IIS

 Firstly, Thanks for the info.

 I've done what you've said.

 Consider my directory structure as below in IIS.

 IISROOT/images/TestDir/A.gif
 IISROOT/images/TestDir/index.html  (newly introduced one)

 If  I hit the following url, it shows the index.html 
 https://hostname/images/TestDir/
 https://%3chostname%3e/images/TestDir/

 but if I hit the following url, it shows the image A.gif which needs
 to be
 restricted its access.


 https://hostname/images/TestDir/A.gifhttps://%3chostname%3e/images
 /Te
 stDir/
 A.gif

 Please let me know if this can be resolved.


 Thanks,
 Siva Prakash


 On Tue, Nov 2, 2010 at 7:49 PM, Rob Gregory
 rob.greg...@ibsolutions.comwrote:

 While this is not a forum nor is the mailing list about IIS a quick 
 suggestion and one we implement is to place a blank (or custom) 
 index.html file into every directory within the site. This will 
 then
 be
 served up when requests for resources are received.

 Hope that helps
 Rob

 -Original Message-
 From: Siva prakash I V [mailto:sivaprakash...@gmail.com]
 Sent: 02 November 2010 14:08
 To: users@tomcat.apache.org
 Subject: Protecting static resources in IIS

 Hi,

 Though I know that this forum is not for IIS related questions, It
 will be
 great if someone can help me out with the following problem.

 I need to protect the end user's access (thru a url) to the static
 resources
 like images directory in IIS but still allowing my app jsps in
 Tomcat
 ROOT.


 Thanks,
 Siva Prakash


 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org



 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged 
material.  If the reader of this message is not the intended recipient,
you are hereby notified that your access is unauthorized, and any review,
dissemination, distribution or copying of this message including any 
attachments is strictly prohibited.  If you are not the intended
recipient, please contact the sender and delete the material from any
computer.


-
To unsubscribe, 

RE: Protecting static resources in IIS

2010-11-02 Thread Richard G Curry
Yes. 


___
«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»
___
Rick Curry
Common Services -  Software Development
E2 - 066, MS 5210
972-431-9178 (Voice)
972-585-7585 (Pager)
To send a (short) Text Message to my Pager:
9725857...@page.metrocall.com

-Original Message-
From: Rob Gregory [mailto:rob.greg...@ibsolutions.com] 
Sent: Tuesday, November 02, 2010 12:45 PM
To: Tomcat Users List
Subject: RE: Protecting static resources in IIS

Would that then result in having to run Tomcat/Apache/IIS as root/system rather 
than a restricted user?


 -Original Message-
 From: Richard G Curry [mailto:rgcu...@jcpenney.com]
 Sent: 02 November 2010 17:43
 To: Tomcat Users List
 Subject: RE: Protecting static resources in IIS
 
 What if you put your images into a sub-directory of your app directory 
 -- something like images -- and set the access rights on that 
 directory to be only accessible by the SYSTEM account.
 
 __
 
 _
 «¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤
 » 
 __
 
 _
 Rick Curry
 Common Services -  Software Development
 E2 - 066, MS 5210
 972-431-9178 (Voice)
 972-585-7585 (Pager)
 To send a (short) Text Message to my Pager:
 9725857...@page.metrocall.com
 
 -Original Message-
 From: Pid * [mailto:p...@pidster.com]
 Sent: Tuesday, November 02, 2010 11:42 AM
 To: Tomcat Users List
 Subject: Re: Protecting static resources in IIS
 
 On 2 Nov 2010, at 15:48, Siva prakash I V sivaprakash...@gmail.com wrote:
 
  Hi Rob,
 
  My app contains a sequence of images like for eg. A/11.gif, A/12.gif, 
  A/19.gif, B/21.gif... etc.
  These images are used to identify a valid user of my app.
  As these images are easily guessable, it may be easy for anyone to 
  download all possible images and may lead to phishing attack.
  Having said that I can't place my images in Tomcat and get it served 
  by a servlet( a performance penalty )
 
 You've presumably conducted some performance tests which led you to 
 this conclusion?
 
 In this case a Servlet Filter which checks the request against the 
 current user's credentials and returns a 403 for unauthorised access 
 would be a low cost option.
 
 p
 
  and neither I can change my image names to ones which are not easily 
  guessable.
  My tomcat app jsps should continue using the existing images.
 
 
 
  On Tue, Nov 2, 2010 at 8:22 PM, Rob Gregory
 rob.greg...@ibsolutions.comwrote:
 
  Hi Siva,
 
  The only way I know of protecting an 'actual' request for a 
  specific resource is to remove the resource from the web server. I 
  Can't see why you would want to stop access to something when it is 
  actually requested otherwise what would be the point of deploying 
  it (if nothing can access it). Sorry if I misunderstand the question.
 
 
  -Original Message-
  From: Siva prakash I V [mailto:sivaprakash...@gmail.com]
  Sent: 02 November 2010 14:44
  To: Tomcat Users List
  Subject: Re: Protecting static resources in IIS
 
  Firstly, Thanks for the info.
 
  I've done what you've said.
 
  Consider my directory structure as below in IIS.
 
  IISROOT/images/TestDir/A.gif
  IISROOT/images/TestDir/index.html  (newly introduced one)
 
  If  I hit the following url, it shows the index.html 
  https://hostname/images/TestDir/
  https://%3chostname%3e/images/TestDir/
 
  but if I hit the following url, it shows the image A.gif which 
  needs
  to be
  restricted its access.
 
 
  https://hostname/images/TestDir/A.gifhttps://%3chostname%3e/imag
  es
  /Te
  stDir/
  A.gif
 
  Please let me know if this can be resolved.
 
 
  Thanks,
  Siva Prakash
 
 
  On Tue, Nov 2, 2010 at 7:49 PM, Rob Gregory
  rob.greg...@ibsolutions.comwrote:
 
  While this is not a forum nor is the mailing list about IIS a 
  quick suggestion and one we implement is to place a blank (or 
  custom) index.html file into every directory within the site. 
  This will then
  be
  served up when requests for resources are received.
 
  Hope that helps
  Rob
 
  -Original Message-
  From: Siva prakash I V [mailto:sivaprakash...@gmail.com]
  Sent: 02 November 2010 14:08
  To: users@tomcat.apache.org
  Subject: Protecting static resources in IIS
 
  Hi,
 
  Though I know that this forum is not for IIS related questions, 
  It
  will be
  great if someone can help me out with the following problem.
 
  I need to protect the end user's access (thru a url) to the 
  static
  resources
  like images directory in IIS but still allowing my app jsps in
  Tomcat
  ROOT.
 
 
  Thanks,
  Siva Prakash
 
 
  ---
  --
  To unsubscribe, e-mail

RE: Protecting static resources in IIS

2010-11-02 Thread Richard G Curry
How so? What am I missing?


___
«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»
___
Rick Curry
Common Services -  Software Development
E2 - 066, MS 5210
972-431-9178 (Voice)
972-585-7585 (Pager)
To send a (short) Text Message to my Pager:
9725857...@page.metrocall.com

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Tuesday, November 02, 2010 1:33 PM
To: Tomcat Users List
Subject: RE: Protecting static resources in IIS

 From: Richard G Curry [mailto:rgcu...@jcpenney.com]
 Subject: RE: Protecting static resources in IIS

  From: Rob Gregory [mailto:rob.greg...@ibsolutions.com]
  Subject: RE: Protecting static resources in IIS

  Would that then result in having to run Tomcat/Apache/IIS as 
  root/system rather than a restricted user?

 Yes. 

That sounds like a really bad idea.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged 
material.  If the reader of this message is not the intended recipient,
you are hereby notified that your access is unauthorized, and any review,
dissemination, distribution or copying of this message including any 
attachments is strictly prohibited.  If you are not the intended
recipient, please contact the sender and delete the material from any
computer.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Protecting static resources in IIS

2010-11-02 Thread Richard G Curry
Good point -- one I did not consider as in my realm of reference I am in a 
secured zone -- no outside access. Makes a big difference.

___
«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»
___
Rick Curry
Common Services -  Software Development
E2 - 066, MS 5210
972-431-9178 (Voice)
972-585-7585 (Pager)
To send a (short) Text Message to my Pager:
9725857...@page.metrocall.com

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Tuesday, November 02, 2010 1:48 PM
To: Tomcat Users List
Subject: RE: Protecting static resources in IIS

 From: Richard G Curry [mailto:rgcu...@jcpenney.com]
 Subject: RE: Protecting static resources in IIS

From: Rob Gregory [mailto:rob.greg...@ibsolutions.com]
Subject: RE: Protecting static resources in IIS

Would that then result in having to run Tomcat/Apache/IIS as 
root/system rather than a restricted user?

   Yes. 

  That sounds like a really bad idea.

 How so? What am I missing?

Basic security philosophy, known as the principle of least privilege.  Running 
as root/system is like walking around with a kick me sign; just wait till the 
hackers break into your IIS box running that way...

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged 
material.  If the reader of this message is not the intended recipient,
you are hereby notified that your access is unauthorized, and any review,
dissemination, distribution or copying of this message including any 
attachments is strictly prohibited.  If you are not the intended
recipient, please contact the sender and delete the material from any
computer.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



ISAPI Redirector Work-Flow

2010-11-01 Thread Richard G Curry
I am trying to understand how the ISAPI Redirector functions at an
overview level but deeper than this: The request comes into IIS where
the ISAPI Redirector filter sends the servlet and JSP requests to the
Tomcat server. I know the redirector works with AJP13 to redirect
requests to the Tomcat container. What I want to know is HOW that is
done. Is it a redirected HTTP request, a 301 redirect or is it a
port-to-port connection between the AJP13 processor and the defined
instance in the workers.properties file? As this properties file defines
the host name of the server holding the Tomcat instance, this can be on
a different server than the IIS server, correct? Then does AJP13
'connect' directly to the defined server (localhost in all the
examples I have seen) and the defined port (8009 in the same
examples)?
 
If you know of a diagram that shows how this works, please share the
link to that resouce.
 
/prefont face=monospacesize=-3brThe information transmitted is 
intended only for the person or entity to which it is addressed and brmay 
contain confidential and/or privileged material.  If the reader of this message 
is not the intendedbrrecipient, you are hereby notified that your access is 
unauthorized, and any review, dissemination,brdistribution or copying of this 
message including any attachments is strictly prohibited.   If you are 
notbrthe intended recipient, please contact the sender and delete the 
material from any computer.brpre


RE: Java update from Apple broke Tomcat

2010-11-01 Thread Richard G Curry
Did you check you classpath?

___
«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»
___
Rick Curry
Common Services -  Software Development
E2 - 066, MS 5210
972-431-9178 (Voice)
972-585-7585 (Pager)
To send a (short) Text Message to my Pager:
9725857...@page.metrocall.com

-Original Message-
From: Pid [mailto:p...@pidster.com] 
Sent: Monday, November 01, 2010 5:28 PM
To: Tomcat Users List
Subject: Re: Java update from Apple broke Tomcat

On 01/11/2010 17:55, Rob Tanner wrote:
 Hi,
 
 While I run production on Linux servers, I do my development on my iMac.
 Last week, I ran the most recent Apple Java upgrade , and now Tomcat 
 (which is a critical part of my development environment) won't start 
 up.  I get the
 error:
 
 Nov 1, 2010 8:58:54 AM org.apache.catalina.startup.Bootstrap
 initClassLoaders
 SEVERE: Class loader creation threw exception
 java.lang.NoSuchFieldError: IS_DIR
  at
 org.apache.catalina.startup.Bootstrap.createClassLoader(Bootstrap.java:167)
  at
 org.apache.catalina.startup.Bootstrap.initClassLoaders(Bootstrap.java:92)
  at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:207)
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:391)
 
 Other details:
 
 java version 1.6.0_22
 Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261) Java 
 HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)
 
 Tomcat version:  6.0.18 and 6.0.29  both fail to start, throwing the 
 same exception
 
 From the error, it appears that things are missing from the update (or 
 at least one field is).  Has anyone else seen this?  Is there a known 
 work-around?

I updated too.  Works just fine for me, on various 6.0.x and 7.0 trunk.


p

The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged 
material.  If the reader of this message is not the intended recipient,
you are hereby notified that your access is unauthorized, and any review,
dissemination, distribution or copying of this message including any 
attachments is strictly prohibited.  If you are not the intended
recipient, please contact the sender and delete the material from any
computer.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: ISAPI Redirector Work-Flow

2010-11-01 Thread Richard G Curry
Thank you for this, I appreciate your time.

___
«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»
___
Rick Curry
Common Services -  Software Development
E2 - 066, MS 5210
972-431-9178 (Voice)
972-585-7585 (Pager)
To send a (short) Text Message to my Pager:
9725857...@page.metrocall.com

-Original Message-
From: Pid [mailto:p...@pidster.com] 
Sent: Monday, November 01, 2010 5:40 PM
To: Tomcat Users List
Subject: Re: ISAPI Redirector Work-Flow

On 01/11/2010 21:48, Richard G Curry wrote:
 I am trying to understand how the ISAPI Redirector functions at an 
 overview level but deeper than this: The request comes into IIS where 
 the ISAPI Redirector filter sends the servlet and JSP requests to the 
 Tomcat server. I know the redirector works with AJP13 to redirect 
 requests to the Tomcat container. What I want to know is HOW that is 
 done. Is it a redirected HTTP request, a 301 redirect or is it a 
 port-to-port connection between the AJP13 processor and the defined 
 instance in the workers.properties file?

It's not a redirect.
The request data is converted to the AJP13 binary protocol which is received by 
an AJP connector in Tomcat.

 As this properties file defines
 the host name of the server holding the Tomcat instance, this can be 
 on a different server than the IIS server, correct?

Yes.

 Then does AJP13
 'connect' directly to the defined server (localhost in all the 
 examples I have seen) and the defined port (8009 in the same 
 examples)?

The connector opens multiple connections to the Tomcat server.

 If you know of a diagram that shows how this works, please share the 
 link to that resouce.

I don't sorry.


p
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged 
material.  If the reader of this message is not the intended recipient,
you are hereby notified that your access is unauthorized, and any review,
dissemination, distribution or copying of this message including any 
attachments is strictly prohibited.  If you are not the intended
recipient, please contact the sender and delete the material from any
computer.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Error 503 ocurring when server under load

2010-10-13 Thread Rob G
On 12 October 2010 19:47, Christopher Schultz
ch...@christopherschultz.net wrote:
 I would.

 I believe that is true.

 On the other hand, there is another case where you might have problems.
 If you have, say, 512 worker threads in Apache httpd but you only have,
 say, 200 request processor threads configured in Tomcat, then you will
 get mod_jk connection failures on the httpd side.

 I would recommend that you have enough request processors configured in
 Tomcat to handle the expected load.

 - -chris
Thanks Chris (and everyone else for their comments).

As an update: I updated Tomcat from 6.0.24 to 6.0.29 and commented out
the cachesize directive from workers.properties. The server ran for a
full day yesterday and not a single 503 error. :) So with a bit of
luck it will continue to work as expected. Of course I'll monitor for
any other issues for the next few days.

Rob

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Error 503 ocurring when server under load

2010-10-11 Thread Rob G
Christopher Schultz wrote This directive has been deprecated since 1.2.16.
 Cachesize defines the number of connections made to the AJP backend that
 are maintained as a connection pool. It will limit the number of those
 connection that each web server child process can make.

 Cachesize property is used only for multi threaded web servers such as
 Apache 2.0 (worker), IIS and Netscape. The cachesize property should
 reflect the number of threads per child process. JK will discover the
 number of threads per child process on Apache 2 web server with
 worker-mpm and set its default value to match the ThreadsPerChild
 Apache directive. [...]
 

 Since mpm_winnt (like mpm_worker) uses ThreadsPerChild to set the number
 of worker threads (and therefore simultaneous requests that can be
 accepted), you'll have to know what ThreadsPerChild is set to. That's
 easy: just search for that directive in httpd.conf. If it's not there,
 or commented-out, the default is 64 on mpm_winnt
 (http://httpd.apache.org/docs/2.0/mod/mpm_common.html#threadsperchild).

 If you've left it as the default (64) and you've set worker.cachesize
 (really worker.connection_pool_size) to 10, then you can accept 64
 connections from clients but only call-out to Tomcat over 10 of those
 connections: the others will have to wait. I'm not sure what the
 scheduling algorithm is for choosing which thread gets the next
 available connection from the pool (FIFO?), but it's very possible to
 starve your clients even after 10 simultaneous connections.

 - -chris
So if I'm reading your email and the docs correctly. I should just
comment out the cachesize=10 from the workers.properties. And since
for connection_pool_size (that replaced it)  JK  will discover this
number for the Apache web server automatically and set the pool size
to this value, I don't need to add anything to the workers.properties
file?

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Error 503 ocurring when server under load

2010-10-07 Thread Rob G
Hey all,

Recently migrated a production site (mixture of Servlets and JSPs)
from Oracle Application Server to Apache/Tomcat. Since then we have
seen numerous HTTP Error 503 - Service unavailable errors at peak
times when site is under load. mod_jk.log has the following error
message(s):

[2184:1952] [error] jk_lb_worker.c (1473): All tomcat instances
failed, no more workers left

I'm looking for help in trying to tweak settings to prevent this, or
confirmation that I've configured the setup correctly.

Many thanks
Rob

Platform:
Windows Server 2003 SP2

Setup:
Two tomcat instances with a single Apache front end, all on the same server

Versions
Tomcat: 6.0.24
Apache: 2.2.16
mod SSL: 2.2.16
Open SSL: 0.9.8
mod_JK:1.2.30

Conf:
httpd.conf:

IfModule mod_jk.c

JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkLogLevel error
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat %w %V %T

   Location /*/WEB-INF/*
AllowOverride None
deny from all
   /Location

JkMount /examples balancer
JkMount /examples/* balancer
JkMount /App1/* balancer
JkMount /App2/* balancer
 /IfModule

Workers.properties:
workers.tomcat_home=C:\tomcat1
workers.java_home=C:\Program Files\Java\jdk1.6.0_18
ps=\

# Define workers
#worker.list=worker1,worker2
worker.list=balancer

# Set properties for worker worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
worker.worker1.lbfactor=1

worker.worker1.cachesize=10
worker.worker1.connection_pool_timeout=300
worker.worker1.socket_keepalive=FALSE
#worker.worker1.recycle_timeout=300

# Set properties for worker worker2 (ajp13)
worker.worker2.type=ajp13
worker.worker2.host=localhost
worker.worker2.port=8019
worker.worker2.lbfactor=1

worker.worker2.cachesize=10
worker.worker2.connection_pool_timeout=300
worker.worker2.socket_keepalive=FALSE
#worker.worker2.recycle_timeout=300

worker.balancer.type=lb
worker.balancer.balance_workers=worker1,worker2
worker.balancer.method=R
worker.balancer.sticky_session=True

Server.xml (same for both tomcat instances apart from jvmRoute):
?xml version='1.0' encoding='utf-8'?
Server port=8005 shutdown=SHUTDOWN

  Listener className=org.apache.catalina.core.AprLifecycleListener
SSLEngine=on /
  Listener className=org.apache.catalina.core.JasperListener /
  Listener className=org.apache.catalina.core.JreMemoryLeakPreventionListener
/
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener /
  Listener 
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
/


  GlobalNamingResources

Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
  description=User database that can be updated and saved
  factory=org.apache.catalina.users.MemoryUserDatabaseFactory
  pathname=conf/tomcat-users.xml /
  /GlobalNamingResources

  Service name=Catalina

Connector port=8080 protocol=HTTP/1.1
   connectionTimeout=4
   redirectPort=8443 /

Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /

Engine name=Catalina defaultHost=localhost jvmRoute=worker1

  Realm className=org.apache.catalina.realm.UserDatabaseRealm
 resourceName=UserDatabase/

  Host name=localhost  appBase=webapps
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false

  /Host
/Engine
  /Service
/Server

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Error 503 ocurring when server under load

2010-10-07 Thread Rob G
Thanks to all for their replies to date. Much appreciated, I'll
respond to some of the points raised. Apologies if I'm asking basic
stuff but still getting my ahead around Tomcat and Apache integration.

On 7 October 2010 18:31, André Warnier wrote:

 Your configuration looks very clean to me (no unnecessary settings etc.),
 which in this case is a plus (a good base to start tuning).
Thank you

 You may want to upgrade Tomcat to the latest version (6.0.29).
Noted

 For example, at the moment these errors happen, what are these Tomcats
 really doing ?
 Are they really busy each processing 200 requests, with 200 threads running
 and actually doing something ? (200 is the default for the maxThreads
 attribute of the AJP Connector).
Unfortunately I'm not in a position to conduct realtime monitoring of
the server and Tomcat. Is there a way to log this thread data?

 If yes, then you may just need a leaner application, or a bigger system
 (more RAM, faster CPU), or more systems.  What does the Task Manager tell
 you about the total system load ?
Again, unfortunately not in a position to monitor  in real time.

 If not, and many of these threads are waiting, then you may have an issue
 with a keepAlive that is too long.
 See http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html, for the
 connectionTimeout and keepAliveTimeout attributes.
Will do

 Whatever you do, first get an idea of the starting situation.  Then modify
 one setting at a time, and observe (and note) the effects.
Sensible advice

Pid wrote:
 OK.  Is there anything else different apart from the Servlet container?
I'm not sure what you mean?

 Why do you have two Tomcat instances?  (It's not a trick question, I'm 
 interested in your reasoning.)
Load balancing. I thought/guessed that two instances would be
sufficent. Perhaps this was incorrect and I need more?

 Was there an attachment I didn't see?
No, all details for .conf files and server.xml was posted inline.

 How many threads  server instances did you have before?
What were your Java -Xmx etc settings before, and now?
 Are you using an Executor?
I'll have to check, but I think it's safe to say that they are set to
the default values as I don't recall changing anything relating to
them.

 Thread dumps from a maxed out Tomcat will tell you what each Thread is 
 waiting for.  Collect a series of these during high load periods to find
out what's happening.
I'll have to figure out how to do this, but sounds a good idea.

Christopher Schultz wrote
 I think you might want to compare the request processor counts you have for 
 Tomcat versus mod_jk: the default maxThreads for a Tomcat Connector is 200, 
 while your MaxClients settings might be different on your Apache httpd 
 configuration.
Excuse my ignorance, but can you clarify where I check these settings?

 I believe that only the Worker MPM is available on Microsoft Windows. Have 
 you explicitly configured an MPM?
Since I don't know what an MPM is I'm going to say no.

 Since you're using Apache 2.x, mod_jk should be able to auto-configure this 
 value for you.
Do I need to set anything to allow this auto config to happen?

 From my reading, you may be limiting yourself to 10 simultaneous connections 
 from Apache httpd to Tomcat, and others will get a 503.
What lead you to that conclusion?

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



catalina.log getting bigger causing fillup file system on unix

2010-09-23 Thread Patel, Biren G
Hi,

I am using Tomcat 5.5.7 on AIX 5.3.  The log file catalina.log is getting fill 
up quick causing file system to be 100 %, I am using default logging 
configuration.  I see the following lines being dump into the log file. Can you 
please tell me what these log means ?

Sep 16, 2010 12:55:54 PM org.apache.catalina.core.ApplicationContext log
INFO: cgi: runCGI: write(dd  ADD:00
09/16/2010 10:13:02  0600912345  0505266A9153   9153  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9203   9203  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9313   9313  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9253   9253  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9243   9243  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9323   9323  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9343   9343  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9263   9263  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9353   9353  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9373   9373  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9333   9333  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9363   9363  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9393   9393  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9293   9293  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9223   9223  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9283   9283  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9273   9273  add   A)

Sep 16, 2010 12:55:54 PM org.apache.catalina.core.ApplicationContext log
INFO: cgi: runCGI: write(/16/2010 10:13:02  0600912345  0505266A9423   9423  
del   DEL:00
09/16/2010 10:13:02  0600912345  0505266A9653   9653  del   DEL:00
09/16/2010 10:13:02  0600912345  0505266A9663   9663  del   DEL:00
09/16/2010 10:13:02  0600912345  0505266A9713   9713  del   DEL:00
09/16/2010 10:13:02  0600912345  0505266A9493   9493  del   DEL:00
09/16/2010 10:13:02  0600912345  0505266A9583   9583  del   DEL:00
09/16/2010 10:13:02  0600912345  0505266A9673   9673  del   DEL:00
09/16/2010 10:13:02  0600912345  0505266A9703   9703  del   DEL:00
09/16/2010 10:13:02  0600912345  0505266A9683   9683  del   DEL:00
09/16/2010 10:13:02  0600912345  0505266A9833   9833  del   DEL:00
09/16/2010 10:13:02  0600912345  0505266A9723   9723  del   DEL:00
09/16/2010 10:13:02  0600912345  0505266A9503   9503  del   DEL:00
09/16/2010 10:13:02  0600912345  0505266A9733   9733  del   DEL:00
09/16/2010 10:13:03  0600912345  0505266A9823   9823  del   DEL:00
09/16/2010 10:13:03  0600912345  0505266A9863   9863  del   DEL:00
09/16/2010 10:13:03  0600912345  0505266A9873   9873  del   DEL:00
09/16/2010 10:13:03  0600912345  0505266A9913   9913  del   DEL:00





  1   2   3   >