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

2021-02-19 Thread Woonsan Ko
On Fri, Feb 19, 2021 at 7:37 AM Rony G. Flatscher (Apache)
 wrote:
>
> 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).

That makes sense. Thanks for sharing your views!

Cheers, woonsan

>
> ---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 ex

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

2021-02-18 Thread Woonsan Ko
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.

Regards,

Woonsan

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:
> 
> [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
>

-
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-17 Thread Woonsan Ko
On Wed, Feb 17, 2021 at 8:59 AM 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.
>
> Usually if you want to use server-side JavaScript, you use something
> like Node.js instead of a servlet container. Why not use Node?
>
> 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.

I found one example:
- 
https://stackoverflow.com/questions/27710407/reuse-nashorn-scriptengine-in-servlet

As a servlet implementation may embed a Jython engine to execute a
python script, it will end up embedding a JS engine in a servlet to
execute a .js like the example.
I guess JS engine in Java vs. Node.js depends on whether or not you
need to allow the .js scripts to use any existing Java libraries in
the same JVM.

Regards, Woonsan

>
> -chris
>
> -
> 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: java.lang.ClassNotFoundException: javax.servlet.Filter

2021-02-15 Thread Woonsan Ko
On Mon, Feb 15, 2021 at 7:19 AM Jason Wee  wrote:
>
> okay, currently there is no custom application code, I just build two
> of the libs and place into tomcat lib using the tomcat documentation.
>
> Do you mean I have to change the reference? Example
> https://github.com/apache/openwebbeans/blob/master/webbeans-web/src/main/java/org/apache/webbeans/servlet/WebBeansConfigurationListener.java#L36
> ?

It should be your decision. ;-)
Please see the linked page from the download page:
- https://tomcat.apache.org/whichversion.html

For example, I think you may stick with Tomcat 9, or you may ask or
help the libraries to be compatible with Jakarta EE in their own
communities.
It is up to you.

Regards,
Woonsan

>
> Jason
>
> On Mon, Feb 15, 2021 at 6:19 PM Mark Thomas  wrote:
> >
> > On 15/02/2021 08:26, Jason Wee wrote:
> > > Using Apache Tomcat 10.0.2, build owb and cxf and placed into lib 
> > > directory
> > >
> > > tomcat-cxf-3.4.1.jar
> > > tomcat-owb-2.0.20.jar
> > >
> > > reading reference,  https://tomcat.apache.org/tomcat-10.0-doc/cdi.html
> > >
> > > and when i start tomcat, I get the following exception
> >
> > Quoting from the top of the Tomcat 10 download page:
> >
> > "Users of Tomcat 10 onwards should be aware that, as a result of the
> > move from Java EE to Jakarta EE as part of the transfer of Java EE to
> > the Eclipse Foundation, the primary package for all implemented APIs has
> > changed from javax.* to jakarta.*. This will almost certainly require
> > code changes to enable applications to migrate from Tomcat 9 and earlier
> > to Tomcat 10 and later. A migration tool is under development to aid
> > this process."
> >
> > https://tomcat.apache.org/download-10.cgi
> >
> > Mark
> >
> >
> > >
> > > ==> localhost.2021-02-15.log <==
> > > 15-Feb-2021 16:19:04.700 INFO [main]
> > > org.apache.catalina.core.ApplicationContext.log Marking servlet
> > > [ApacheTomcatCXFServlet] as unavailable
> > > 15-Feb-2021 16:19:04.700 SEVERE [main]
> > > org.apache.catalina.core.StandardContext.loadOnStartup Servlet
> > > [ApacheTomcatCXFServlet] in web application [/rest] threw load()
> > > exception
> > > java.lang.ClassNotFoundException: javax.servlet.Filter
> > > at 
> > > org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1364)
> > > at 
> > > org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
> > > at java.base/java.lang.ClassLoader.defineClass1(Native Method)
> > > at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
> > > at 
> > > java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
> > > at 
> > > org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2433)
> > > at 
> > > org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:864)
> > > at 
> > > org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
> > > at 
> > > org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
> > > at java.base/java.lang.ClassLoader.defineClass1(Native Method)
> > > at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
> > > at 
> > > java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
> > > at 
> > > org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2433)
> > > at 
> > > org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:864)
> > > at 
> > > org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
> > > at 
> > > org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
> > > at java.base/java.lang.ClassLoader.defineClass1(Native Method)
> > > at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
> > > at 
> > > java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
> > > at 
> > > org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2433)
> > > at 
> > > org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:864)
> > > at 
> > > org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
> > > at 
> > > org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
> > > at 
> > > org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:540)
> > > at 
> > > org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:521)
> > > at 
> > > org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:151)
> > > at 
> > > org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1043)
> > > at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:984)
> > > at 
> > > 

Re: Updates to POEditor.com

2020-12-09 Thread Woonsan Ko
Nice! So we can edit in POEditor without worrying about any escaping
issue then. That's great.

Cheers,

Woonsan

On Tue, Dec 8, 2020 at 4:49 AM Mark Thomas  wrote:
>
> All,
>
> As you are probably aware, the Apache Tomcat project uses POEditor.com
> to manage the i18n translations used by the project.
>
> The POEditor team have implemented a change that means it is no longer
> necessary for us to escape single quotes when using them in translated
> strings. The appropriate escaping is now added automatically when the
> strings are exported. The current translations have been updated to
> reflect this.
>
> We have seen an immediate benefit of this change. I am currently in the
> middle of re-exporting the translations from POEditor.coma and importing
> them into the Tomcat source code to confirm that POEDitor's automatic
> update didn't break anything. So far I have found no errors and a
> handful of instances where we were not escaping correctly that have been
> automatically corrected.
>
> Remember, anyone can create a POEditor.com account and start helping
> with the translations.
>
> https://poeditor.com/projects/view?id=221603
>
> Thanks,
>
> Mark
>
> -
> 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: ApacheCon NA Tomcat track videos

2019-09-19 Thread Woonsan Ko
Hi Rémy,

I just watched the first one: ApacheCon NA 2019: State of the Cat, New !
The sound quality is not bad! Feel like being there.
Thank you so much for uploading all!

Cheers,

Woonsan

On Thu, Sep 19, 2019 at 5:12 AM Rémy Maucherat  wrote:
>
> Hi,
>
> I finished uploading the videos of the twelve sessions from the Apache
> Tomcat track at  ApacheCon NA 2019 in Las Vegas to the Apache Tomcat
> YouTube channel:
> https://www.youtube.com/playlist?list=PLI91YOalv6p9bivF8eb_MR9bVQcVfLkH9
>
> The sound recording quality is rather bad, apologies for that. I'll buy
> basic movie-recording-with-smartphone equipment in case I have to do it
> again, but the whole thing was improvised this time.
>
> Enjoy ! [hopefully ;) ]
>
> Rémy

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



Re: unable to serve static files with embedded Tomcat

2019-04-19 Thread Woonsan Ko
On Fri, Apr 19, 2019 at 1:24 PM Garret Wilson  wrote:
>
> Embedding Tomcat 9 (with OpenJDK 11 on Windows 10) I want to serve
> static files from `/foo/bar`. From scouring the web (primarily
> https://stackoverflow.com/a/15235711/421049 ), the documentation, and
> some books (primarily _Apache Tomcat 7_), I have this:
>
>  Tomcat tomcat = new Tomcat();
>  tomcat.setPort(8080);
>  tomcat.setBaseDir("/foo");

I found this before from
https://stackoverflow.com/questions/48998387/code-works-with-embedded-apache-tomcat-8-but-not-with-9-whats-changed/49011424

// Note: make sure that tomcat creates the default connector...
tomcat.getConnector();

Worth trying...

Woonsan

>  Context ctx = tomcat.addContext("", "/foo/bar");
>  final Wrapper defaultServlet = ctx.createWrapper();
>  defaultServlet.setName("default");
> defaultServlet.setServletClass("org.apache.catalina.servlets.DefaultServlet");
>  defaultServlet.addInitParameter("debug", "1");
>  defaultServlet.addInitParameter("listings", "false");
>  defaultServlet.setLoadOnStartup(1);
>  ctx.addChild(defaultServlet);
>  ctx.addServletMappingDecoded("/", "default");
>  ctx.addWelcomeFile("index.html");
>  tomcat.start();
>  tomcat.getServer().await();
>
> Everything looks like it starts up:
>
>  Apr 19, 2019 2:18:09 PM org.apache.catalina.core.StandardService
> startInternal
>  INFO: Starting service [Tomcat]
>  Apr 19, 2019 2:18:09 PM org.apache.catalina.core.StandardEngine
> startInternal
>  INFO: Starting Servlet engine: [Apache Tomcat/9.0.19]
>  Apr 19, 2019 2:18:10 PM
> org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
>  WARNING: Creation of SecureRandom instance for session ID
> generation using [SHA1PRNG] took [281] milliseconds.
>  Apr 19, 2019 2:18:10 PM org.apache.catalina.core.ApplicationContext log
>  INFO: default: DefaultServlet.init:  input buffer size=2048, output
> buffer size=2048
>
> But connections to http://localhost:8080/ time out. (I'm pretty sure but
> not positive that I don't have anything blocking this in the firewall.)
>
> Is there some simple thing I'm missing to connect things together?
>
> Thanks,
>
> Garret
>
> P.S. The documentation on the web for the details of this is
> surprisingly sparse.
>
>
> -
> 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: [ANN] New committer: Woonsan Ko

2018-12-19 Thread Woonsan Ko
Thank you very much for the warm welcomes!
I have watched many volunteering hearts here, helping each other in
this community, for years. This community has been my biggest input
source from which I have learned how to grow ourselves together, in
positive, collaborative, collective, inclusive, sustainable ways.
I will do my best where I can help to keep the health of our heartbeats.

Kind regards,

Woonsan Ko

On Wed, Dec 19, 2018 at 6:56 PM Mark Thomas  wrote:
>
> On behalf of the Tomcat committers I am pleased to announce that
> Woonsan Ko (woonsan) has been voted in as a new Tomcat committer.
>
> Please join me in welcoming him.
>
> Kind regards,
>
> Mark
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>

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



Re: Translations update

2018-12-14 Thread Woonsan Ko
On Fri, Dec 14, 2018 at 5:39 PM Mark Thomas  wrote:
>
> On 14/12/2018 04:46, Woonsan Ko wrote:
> > Hi all,
> >
> > Korean translation has just got to 100% line! Congrats to all the 
> > contributors!
>
> +1
>
> And apologies in advance that it is probably going to drop a few
> percentage points when I import the latest set of new strings.

No worries. ;-) Keep it coming!

Cheers,

Woonsan

>
> Mark
>
>
> > I also see Japanese fellows making a breakthrough, approaching the
> > finish line. Congrats in advance!
> > I will proofread Korean translations next week one more or two.
> > Perhaps I can write something about how each term, phrase and sentence
> > were to be translated for other (Korean) translators.
> >
> > Cheers,
> >
> > Woonsan
> >
> > On Wed, Nov 21, 2018 at 6:58 PM Mark Thomas  wrote:
> >>
> >> Hi all,
> >>
> >> I wanted to let you know about the amazing progress that is being made
> >> on the Tomcat translations at
> >> https://poeditor.com/join/project/NUTIjDWzrl
> >>
> >> In the short time since this effort has started the community has
> >> achieved the following:
> >>
> >> - French has increased from 18% to 64% coverage
> >> - Simplified Chinese has been added and has already reached 32% coverage
> >> - Korean has been added and has reached 10% coverage
> >> - German has increased from 2% to 7% coverage
> >> - Brazilian Portuguese has been added and has reached 4% coverage
> >> - Spanish has increased from 42% to 44% coverage
> >>
> >> as well as a smaller number of additions and corrections to another 6
> >> languages.
> >>
> >> A big thank you to everyone who has contributed.
> >>
> >> There is still lots to do so if you would like to help out please join
> >> us at:
> >> https://poeditor.com/join/project/NUTIjDWzrl
> >>
> >> Thanks,
> >>
> >> Mark
> >>
> >> -
> >> 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
>

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



Re: Translations update

2018-12-14 Thread Woonsan Ko
On Fri, Dec 14, 2018 at 5:38 PM Keiichi Fujino  wrote:
>
> 2018年12月14日(金) 13:46 Woonsan Ko :
>
> > Hi all,
> >
> > Korean translation has just got to 100% line! Congrats to all the
> > contributors!
> > I also see Japanese fellows making a breakthrough, approaching the
> > finish line. Congrats in advance!
> > I will proofread Korean translations next week one more or two.
> > Perhaps I can write something about how each term, phrase and sentence
> > were to be translated for other (Korean) translators.
> >
> > Hi.
> Congrats Woonsan.
> Great work!

Same to you! :-)

> The goal of Japanese translation is coming soon,
> I’m going to keep translating.

Awesome!

Cheers,

Woonsan

>
>
> > Cheers,
> >
> > Woonsan
> >
> > On Wed, Nov 21, 2018 at 6:58 PM Mark Thomas  wrote:
> > >
> > > Hi all,
> > >
> > > I wanted to let you know about the amazing progress that is being made
> > > on the Tomcat translations at
> > > https://poeditor.com/join/project/NUTIjDWzrl
> > >
> > > In the short time since this effort has started the community has
> > > achieved the following:
> > >
> > > - French has increased from 18% to 64% coverage
> > > - Simplified Chinese has been added and has already reached 32% coverage
> > > - Korean has been added and has reached 10% coverage
> > > - German has increased from 2% to 7% coverage
> > > - Brazilian Portuguese has been added and has reached 4% coverage
> > > - Spanish has increased from 42% to 44% coverage
> > >
> > > as well as a smaller number of additions and corrections to another 6
> > > languages.
> > >
> > > A big thank you to everyone who has contributed.
> > >
> > > There is still lots to do so if you would like to help out please join
> > > us at:
> > > https://poeditor.com/join/project/NUTIjDWzrl
> > >
> > > Thanks,
> > >
> > > Mark
> > >
> > > -
> > > 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
> >
> >
>
> --
> Keiichi.Fujino

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



Re: Translations update

2018-12-13 Thread Woonsan Ko
Hi all,

Korean translation has just got to 100% line! Congrats to all the contributors!
I also see Japanese fellows making a breakthrough, approaching the
finish line. Congrats in advance!
I will proofread Korean translations next week one more or two.
Perhaps I can write something about how each term, phrase and sentence
were to be translated for other (Korean) translators.

Cheers,

Woonsan

On Wed, Nov 21, 2018 at 6:58 PM Mark Thomas  wrote:
>
> Hi all,
>
> I wanted to let you know about the amazing progress that is being made
> on the Tomcat translations at
> https://poeditor.com/join/project/NUTIjDWzrl
>
> In the short time since this effort has started the community has
> achieved the following:
>
> - French has increased from 18% to 64% coverage
> - Simplified Chinese has been added and has already reached 32% coverage
> - Korean has been added and has reached 10% coverage
> - German has increased from 2% to 7% coverage
> - Brazilian Portuguese has been added and has reached 4% coverage
> - Spanish has increased from 42% to 44% coverage
>
> as well as a smaller number of additions and corrections to another 6
> languages.
>
> A big thank you to everyone who has contributed.
>
> There is still lots to do so if you would like to help out please join
> us at:
> https://poeditor.com/join/project/NUTIjDWzrl
>
> Thanks,
>
> Mark
>
> -
> 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: Translations update

2018-12-05 Thread Woonsan Ko
On Tue, Nov 27, 2018 at 11:21 PM Mark Thomas  wrote:
>
> On 27/11/2018 13:19, Rémy Maucherat wrote:
>
> > Yes, I agree: it's not possible for non english speakers to use Tomcat, so
> > it did seem pointless. Mark still wanted to do the experiment, and since
> > the tool was easy and I had some time I did that French stuff. Anyway it's
> > done now, and people are sometimes happy to get i18n, so...
>
> Congrats to everyone involved in completing the French translations and
> in expanding the language coverage generally. And a special
> congratulations / thank you to Rémy who contributed over 1700 (no, that
> is not a typo!) translations.

Congrats! I personally celebrated myself for passing the 25% point of
the course in Korean translation today. :-)
Indeed I feel like running a marathon. Some finished; some ahead; some
behind. Well, we will get there anyway! :-D

>
> I do think this experiment has been worthwhile. Yes, there are some
> users who prefer English to their native language but there are also
> some users who find the translations helpful. The good thing is that it
> is easy to set Tomcat up to work either way.
>
> I wonder. Is there any value in any of the following:
>
> - The ability to change the language Tomcat uses while Tomcat is
> running? I'm thinking an option exposed via JMX and the Manager app.

Sounds interesting. If feasible with minimal effort, why not?

>
> - The ability to 'translate' messages. I'm thinking something that takes
> a message in one language, searches through the l10n strings to find a
> match and then provides the same message in an alternative language.
> Finding an efficient way to do this could be interesting.

Yes. Suppose someone reports a problem with some translated message.
We will need to easily figure out what's the corresponding default
local message from it.
It would be great if POEditor supports that.

Woonsan

>
> Mark
>
> -
> 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: Translations update

2018-11-26 Thread Woonsan Ko
On Mon, Nov 26, 2018 at 10:05 AM Rémy Maucherat  wrote:
>
> On Mon, Nov 26, 2018 at 3:46 PM Christopher Schultz <
> ch...@christopherschultz.net> wrote:
>
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA256
> >
> > André,
> >
> > On 11/26/18 08:35, André Warnier (tomcat) wrote:
> > > On 26.11.2018 13:29, Rémy Maucherat wrote:
> > >> On Sat, Nov 24, 2018 at 9:48 AM Ludovic Pénet 
> > >> wrote:
> > >>
> > >>> Le vendredi 23 novembre 2018 à 23:51 +0100, Rémy Maucherat a
> > >>> écrit :
> >  On Wed, Nov 21, 2018 at 10:58 AM Mark Thomas
> >   wrote:
> > 
> > > - French has increased from 18% to 64% coverage
> > >
> > 
> >  Done (well, close enough, a few tribes/ha remain) !
> > >>> A single translation remains to be performed.
> > >>>
> > >>> Jump to https://poeditor.com/join/project/NUTIjDWzrl and be the
> > >>> one to complete the French translation. ;-)
> > >>>
> > >>
> > >> Ok, you could have finished it, I was busy.
> > >>
> > >> Now we can try to harmonize terms, fixes are then easy to do with
> > >> the search feature
> > >>
> > >> Common ones we have right now: - "socket" (usually untranslated
> > >> or cleverly omitted): ? - "endpoint" (for websockets, and for the
> > >> Tomcat connectors, so possibly two different terms): "point
> > >> d'entrée" ?
> > >
> > > That sounds like exactly the opposite of "endpoint" to me. Although
> > > I must say that even in English, the vocabulary used in some
> > > reference documents (in particular everything to do with XML-based
> > > protocols, such as SOAP, SAML, OASIS and the like) is sometimes
> > > mysterious and counter-intuitive. What about "cible" here ? Or more
> > > literally, "point final" ?
> >
> > I disagree.
> >
> > An "endpoint" is a thing to which clients connect... an "entry point",
> > as Rémy suggests.
> >
>
> French and English constructs are the opposite in a lot of cases so that's
> why I though that "point d'entrée" was pretty good, as you stay the
> endpoint for the client is the "startingpoint" for the server (but there it
> sounds really bad).
>
>
> >
> > > For "socket", "soquet" (like the piece in which you insert a plug,
> > > or a lightbulb) sounds ok to me.
> >
> > This sounds okay to me, thought I don't know French at all. :)
> >
> > >> - "thread" (often it is untranslated elsewhere): "fil
> > >> d'exécution" ? - "membership" (that's the clustering object):
> > >> "gestionnaire de membres" ?
> > >
> > > "Membership" refers to "le fait d'être membre", no ? "adhésion" ?
> > > (like "cluster members" -> "adhérents au cluster" (with the
> > > appropriate French pronounciation for "cleustère") :-)
> >
> > What would you call a list of people who belong to a certain fancy
> > club or society? That's the word that should be used, here.
> >
>
> So ... In that case it would simply be "liste de membres". Which after a
> quick check actually looks quite good in the context of the Tribes strings.
>
> I have another difficult one for Tribes: that "replicated map" which should
> be ?? "structure répliquée" ?
> I used various terms for that annoying one ...
>
>
> >
> > >> - "dispatch"/"dispatcher" (for the Servlet request dispatcher):
> > >> ?
> > >>
> > >
> > > dépêcher / dépêcheur ?
> > >
> > >> And I just saw it is really "connexion" and not "connection".
> > >> Oooops, I thought both were ok. I guess it's the same kind of
> > >> mistake with English-UK vs English-US, where I usually hate the
> > >> UK style (except in HarryP and Discworld, it's part of the charm
> > >> I suppose).
> > >>
> > >
> > > Maybe a note : the target audience of most of these messages is not
> > > the members of the Académie or the jury of the Prix Goncourt. Its
> > > is programmers, sysadmins and qualified tomcat/webservers users.
> > > The translations should be helpful to them, to get a first idea of
> > > the issue and be able to search later in the on-line documentation.
> > > Which happens to be only available/up-to-date/searchable in
> > > English, no ?
> > >
> > > So I believe that a translation such as "La requête PTHT recue sur
> > > le soquet du connecteur de toile a été dépêchée au conducteur du
> > > groupe d'adhérents" may be stylistically correct, but ultimately
> > > quite counter-productive.
> > >
> > > (Sorry for the missing c cédille, can't type it here) (PTHT =
> > > Protocol de Transport Hyper-Texte)
> >
> > HTTP should always be spelled HTTP and never PTHT, just like UTC is
> > always spelled UTC, even in English (where the acronym makes no sense
> > to Englist speakers).
> >
> > I think maybe you were kidding, but ... just in case :)
> >
>
> We were super serious, like for Apache Matou :)

:-)
I found this sentence from google and used their translation service,
just out of curiosity and out of context:
"Le matou n'est probablement pas devenu plus exigeant en termes
gustatifs." [Le Monde, 2002]
The matou won't be too demanding in The World! ;-)

Woonsan

>
> Rémy


Re: Translations update

2018-11-21 Thread Woonsan Ko
It is truly amazing. I'm proud of ourselves. Let's keep improving it together!

Cheers,

Woonsan

On Wed, Nov 21, 2018 at 4:58 AM Mark Thomas  wrote:
>
> Hi all,
>
> I wanted to let you know about the amazing progress that is being made
> on the Tomcat translations at
> https://poeditor.com/join/project/NUTIjDWzrl
>
> In the short time since this effort has started the community has
> achieved the following:
>
> - French has increased from 18% to 64% coverage
> - Simplified Chinese has been added and has already reached 32% coverage
> - Korean has been added and has reached 10% coverage
> - German has increased from 2% to 7% coverage
> - Brazilian Portuguese has been added and has reached 4% coverage
> - Spanish has increased from 42% to 44% coverage
>
> as well as a smaller number of additions and corrections to another 6
> languages.
>
> A big thank you to everyone who has contributed.
>
> There is still lots to do so if you would like to help out please join
> us at:
> https://poeditor.com/join/project/NUTIjDWzrl
>
> Thanks,
>
> Mark
>
> -
> 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: Translation help wanted

2018-11-13 Thread Woonsan Ko
On Tue, Nov 13, 2018 at 7:02 PM André Warnier (tomcat)  wrote:
>
> Ok, I take it back. I don't think there's an AI smart enough to translate 
> this one :

+1. ;-)

While translating only 3% for Korean, I already met some challenging
items and it was not easy to find right words.
In my case, it was helpful to look up the source code as well in that case.

For example,

Unable to replicate out data for a AbstractReplicatedMap.get operation
java.org.apache.catalina.tribes.tipis.zzz.abstractReplicatedMap.unable.get

The first line is the English message, and the second is a hint for
the message key. Just remove before "zzz." and find
"abstractReplicatedMap.unable.get" in the .java files from [1]. Then
the message can be better understood, or we could get a better
translation than the default one.

AI is cheap at the moment. Cheap word is cheap to readers.

Regards,

Woonsan

[1] https://github.com/apache/tomcat.git

>
> "The attribute directive (declared in line [{1}] and whose name attribute is 
> [{0}], the
> value of this name-from-attribute attribute) must be of type 
> java.lang.String, is
> "required" and not a "rtexprvalue"."
>
> On 13.11.2018 18:54, André Warnier (tomcat) wrote:
> > On 13.11.2018 18:12, Mark Thomas wrote:
> >> Removing the [OT] marker as I think this is very much on topic.
> >>
> >> On 13/11/2018 15:33, André Warnier (tomcat) wrote:
> >>> Holy Smoke (Fumée Sacrée | Sagrado Humo | Heilige Rauch) !
> >>> How many messages are in that code ?
> >>
> >> Currently there are 2747 unique terms.
> >>
> >>> Seems time to add some AI-translate add-on to the code.
> >>
> >> That is supported but it has to be paid for. That was something I was
> >> thinking about. I have 10k characters of free translation (POEditor uses
> >> either Google translate or Microsoft Automatic Translation) with my
> >> POEditor account. The Tomcat messages average ~67.5 characters per
> >> message so those free credits should be able to translate just under 150
> >> messages.
> >>
> >> To put it another way, automatic translation of the 2000 untranslated
> >> French messages would cost less than $10 USD.
> >>
> >> Hmm. The Tomcat project has a little over GBP 800 in the bank to cover
> >> the up front costs of the next Tomca,t conference.
> >>
> >> Here is a thought. I try automatic translation of as many French
> >> messages as I can with the 10k free characters. You review them (you can
> >> filter by automatic translation and then mark them as proof read). If
> >> you think the automatic translations are worthwhile, I get the PMC to
> >> vote on spending some of that money on automatic translation. For
> >> example, if we spent ~$55 we could do automatic translation for just
> >> over 10 complete languages.
> >>
> >> Are you up for that?
> >>
> >
> > I was half-kidding, but what I was really thinking of, was a Valve which 
> > would use some AI
> > to translate the messages going out, on-the-fly.
> >
> > The vast majority of the messages which I've seen so far (and attempted to 
> > translate to
> > French), are error messages, which either go to the logs (in majority I 
> > presume), or to
> > the user as some kind of error response (of which the status codes should 
> > be identifiable).
> > A good number of terms in them (50% ?) are either untranslatable, or should 
> > not be
> > translated because they point to Classnames and the like (so, "reserved 
> > words").
> > The rest looks like a limited vocabulary and "filler" words, such as "can", 
> > "cannot",
> > "disallowed", "parameter", "directory", "request", "response", "committed" 
> > ..
> > The majority of the messages also look like they would make sense only to a 
> > public of
> > programmers, which are used to deal with english-speaking-only programming 
> > languages (only
> > Java in this case), and (I believe) are not so picky about the finer points 
> > of style or
> > syntax (well, at least not the ones I know) ;-).
> > The thing is also that one really needs such a translation only when things 
> > go wrong or
> > during development/testing, so it could be turned off (default) and on only 
> > when needed,
> > using some dynamic parameter e.g. (the Manager, anyone ?).
> >
> > That all looks to me like it may make sense, and it should not be so 
> > difficult, to apply
> > some automated (and optional) translation to them on-the-fly.  And such a 
> > thing may save
> > *a lot* of maintenance and contributed time over the years, don't you think 
> > ?
> >
> > Note that this is not in any way meant to denigrate the enthousiasm and 
> > literary talent of
> > the people having contributed so far. But let's face it : due to the very 
> > nature of the
> > beast itself, to the length limit etc., most of what comes out looks like 
> > Denglish or
> > Frenglish or Spanglish anyway (and has to be so, to be really helpful). So 
> > maybe we might
> > as well bite the bullet..
> > Also, AI sounds hot again nowadays, and having the first Apache software 

Re: Translation help wanted

2018-11-12 Thread Woonsan Ko
I've just started Korean as well this morning. :-)
It's only 0.87% now, but it will be done together collectively.

Cheers,

Woonsan

-
[Korean translation]
저도 방금 막 한국어 번역을 오늘 아침에 시작했습니다. ^^
아직 0.87%밖에 안되지만, 함께 완성할 수 있으리라 생각합니다.

그럼,

고운산 드림.

On Mon, Nov 12, 2018 at 8:58 AM Mark Thomas  wrote:
>
> On 12/11/2018 13:44, Geraldo Netto wrote:
> > Hi Mark/Friends,
> >
> > Anyone from Brazil/Portugal to help with translation?
> > I just started :)
>
> I am truly amazed. I sent this email out ~ two hours ago and we already
> have over 130 new and/or improved translations and the count is
> increasing as I type this. I've updated my query a few times to get some
> different views and every time I do that, the total translation count is up.
>
> Please do spread the word about this opportunity to contribute to Apache
> Tomcat.
>
> Thanks all,
>
> Mark
>
> >
> >
> > Kind Regards,
> >
> > Geraldo Netto
> > Sapere Aude => Non dvcor, dvco
> > http://exdev.sf.net/
> >
> > On Mon, 12 Nov 2018 at 12:49, Mark Thomas  wrote:
> >
> >> All,
> >>
> >> Apache Tomcat includes some translations for error messages and parts of
> >> the user interface - primarily the Manager web application. We would
> >> like to improve the coverage and quality of these translations.
> >> Accordingly, the Tomcat project has been set up on POEditor, a web-based
> >> service for managing the translation of resource files.
> >>
> >> The aim is that anyone who wants to contribute to the translations (it
> >> could be anything from fixing a typo in an existing translation to
> >> adding support for a new language) can create an account and contribute.
> >>
> >> If you would like to contribute in this way then the
> >> The Tomcat project can be found here:
> >>
> >> https://poeditor.com/join/project/NUTIjDWzrl
> >>
> >> Anyone should be able to join up as a contributor. If you are
> >> interested, please sign up and start contributing.
> >>
> >> Note: All contributions will be taken as being made under the terms of
> >> the Apache License version 2.
> >>
> >> I'm aiming to export the translations on a regular basis to the Tomcat
> >> source code. How regularly will depend on the rate of new/updated
> >> translations but as a minimum, I'm aiming to get any updates into the
> >> next Tomcat 9 release.
> >>
> >> If you have any difficulties or questions, please ask here.
> >>
> >> Thanks,
> >>
> >> Mark
> >>
> >> -
> >> 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



Re: Tomcat embedded with Apache Solr

2018-10-29 Thread Woonsan Ko
On Sat, Oct 27, 2018 at 1:29 AM Igal Sapir  wrote:
>
> Woonsan,
>
> On Fri, Oct 26, 2018 at 2:54 PM Woonsan Ko  wrote:
>
> > Not sure if it helps, but I've spent some hours to test it out for my
> > curiosity. Embedding tomcat v9 with an example servlet is simple
> > enough, but it's not working yet with fully initialized Solr:
> > - https://github.com/woonsan/solr-tomcat
> >
>
> I noticed that you extend Tomcat [1] in order to avoid initializing the
> default servlets.  You may have already seen that, but I wanted to point
> out that in the next version of Tomcat it can be done by passing false
> to setAddDefaultWebXmlToWebapp()
> [2].

That's a nice improvement. Thanks for the info. I added a TODO comment
above the line.

Best,

Woonsan

>
> Best,
>
> Igal
>
> [1]
> https://github.com/woonsan/solr-tomcat/blob/master/server/src/main/java/com/github/woonsan/solr/server/tomcat/launch/Main.java#L103
> [2] https://github.com/apache/tomcat/commit/0222ce9
>
>
>
>
> > I'm not there yet to understand the reasons and have fixes.
> > Let me know if you have any suggestions.
> >
> > Cheers,
> >
> > Woonsan
> >
> > On Fri, Oct 19, 2018 at 9:09 AM Shawn Heisey  wrote:
> > >
> > > On 10/18/2018 8:55 AM, Christopher Schultz wrote:
> > > > Actually, my goal was to convince the Solr team that switching from
> > > > Jetty to Tomcat was (a) possible and (b) possibly attractive.
> > >
> > > Over on lucene-dev, I had said that I removed jetty from solr's ivy
> > > config and found only two classes with errors in eclipse.
> > >
> > > Turns out this was because I hadn't removed jetty from the *lucene* ivy
> > > config, so most of the jetty jars were actually still referenced in the
> > > eclipse build path.
> > >
> > > When I remove jetty from ALL ivy configs, there are 335 compile errors,
> > > across many more classes.  Some of those are on the Lucene side, where I
> > > have less concern.  The part of Lucene that utilizes Jetty is not used
> > > in Solr.
> > >
> > > As I expected, a lot of the errors are in test code, but some of them
> > > are in code that's not for tests.
> > >
> > > If you really want to see us switch to Tomcat, we'll need help fixing
> > > those errors ... switching the code over to generic APIs (servlet and
> > > native Java) where possible, and to Tomcat where necessary.  I would not
> > > expect the Tomcat community to actually do the work -- just provide
> > > expert guidance.  Although if anyone was interested in volunteering, I
> > > wouldn't turn away the help!
> > >
> > > Thanks,
> > > Shawn
> > >
> > >
> > > -
> > > 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



Re: Tomcat embedded with Apache Solr

2018-10-26 Thread Woonsan Ko
Not sure if it helps, but I've spent some hours to test it out for my
curiosity. Embedding tomcat v9 with an example servlet is simple
enough, but it's not working yet with fully initialized Solr:
- https://github.com/woonsan/solr-tomcat

I'm not there yet to understand the reasons and have fixes.
Let me know if you have any suggestions.

Cheers,

Woonsan

On Fri, Oct 19, 2018 at 9:09 AM Shawn Heisey  wrote:
>
> On 10/18/2018 8:55 AM, Christopher Schultz wrote:
> > Actually, my goal was to convince the Solr team that switching from
> > Jetty to Tomcat was (a) possible and (b) possibly attractive.
>
> Over on lucene-dev, I had said that I removed jetty from solr's ivy
> config and found only two classes with errors in eclipse.
>
> Turns out this was because I hadn't removed jetty from the *lucene* ivy
> config, so most of the jetty jars were actually still referenced in the
> eclipse build path.
>
> When I remove jetty from ALL ivy configs, there are 335 compile errors,
> across many more classes.  Some of those are on the Lucene side, where I
> have less concern.  The part of Lucene that utilizes Jetty is not used
> in Solr.
>
> As I expected, a lot of the errors are in test code, but some of them
> are in code that's not for tests.
>
> If you really want to see us switch to Tomcat, we'll need help fixing
> those errors ... switching the code over to generic APIs (servlet and
> native Java) where possible, and to Tomcat where necessary.  I would not
> expect the Tomcat community to actually do the work -- just provide
> expert guidance.  Although if anyone was interested in volunteering, I
> wouldn't turn away the help!
>
> Thanks,
> Shawn
>
>
> -
> 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: ApacheCon NA is in just under 3 weeks

2018-09-12 Thread Woonsan Ko
On Tue, Sep 11, 2018 at 7:54 PM Igal Sapir  wrote:
>
> On 9/11/2018 2:30 PM, Mark Thomas wrote:
> > On 05/09/18 20:52, Igal Sapir wrote:
> >> On 9/5/2018 8:22 AM, Christopher Schultz wrote:
> >>> On 9/5/18 06:40, Mark Thomas wrote:
>  All,
> 
>  ApacheCon North America starts in Montréal in just under three
>  weeks. There are 2 days of Tomcat content starting on the Monday.
>  If you haven't registered, now would be a good time to do so ;)
> 
>  The evening schedule is already looking pretty packed but Monday
>  evening has been set aside for project gatherings and there are
>  still rooms available.
> 
>  Thoughts on booking a room for a Tomcat related session?
> >>> +1
> >> +1
> > Booked. Monday evening 19.00 local time. Viger B.
> >
> > Mark
>
> Awesome!  I'm looking forward to it.
Me, too!

Woonsan

>
> Igal
>
>
> -
> 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: how to prevent user access to JSP pages?

2018-08-22 Thread Woonsan Ko
On Wed, Aug 22, 2018 at 11:44 AM, Berneburg, Cris J. - US
 wrote:
> Hi Woonsan
>
> cjb> I'd like to prevent users from requesting JSP pages directly
>
> cjb> a. [...] adding a  for each folder.
>
> cjb> b. [...] JSP files under the WEB-INF folder.
>
> wk> c. Implement a servlet filter which is mapped to /* with
> wk> dispatcher options: REQUEST, INCLUDE, FORWARD. The filter may
> wk> check the request URI or include/forward URI (through request
> wk> attributes).
>
> wk> The chapter 6 of the servlet spec [1] describes what Filter is,
> wk> when/how it can be used, its lifecycle, etc. Dispatcher options
> wk> are explained in 6.2.5.  Your servlet filter implementation may
> wk> be invoked as pre-processing component before other resources
> wk> or servlets.  When .jsp is accessed directly, your filter may
> wk> be invoked as REQUEST dispatcher option (the default unless
> wk> configured manually), you can check the resource path info
> wk> through HttpRequestServlet#getRequestURI(). e.g,
> wk> /examples/hello.jsp. If you want to check the cases where the
> wk> JSP is included or forwarded through RequestDispatcher, you may
> wk> check servlet request attributes described in the section 9.3.1
> wk> (for inclusion) or 9.4.2 (for forwarding). So, you might want to
> wk> check include/forward path first and find requestURI afterward
> wk> to check everything and modify the response as a result. For
> wk> example, you can choose to send a 4xx response if the condition
> wk> doesn't meet your requirement.  All of those are based on
> wk> servlet standards.
>
> I'm afraid this is a bit more advanced than where I currently am ATM and 
> possibly what my project requires.
It was just an option. ;-) Feel free to ignore. It's you to judge your
case best.

Woonsan

>
> Also, I am reminded of the textbook phrase, "the rest is left as an exercise 
> to the reader".  :-)  Or a presenter...
>
> --
> Cris Berneburg
> CACI Lead Software Engineer
>

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



Re: how to prevent user access to JSP pages?

2018-08-20 Thread Woonsan Ko
On Mon, Aug 20, 2018 at 1:19 PM, Berneburg, Cris J. - US
 wrote:
> Hi Woonsan
>
> Thanks for providing an "option C".  :-)  There is still much for me to learn.
You're welcome. :-)

>
> cjb> Due to security concerns and general fussiness on my part, I'd like
> cjb> to prevent users from requesting JSP pages directly [...].  That
> cjb> way I can legitimately claim that all requests are being validated,
> cjb> input scrubbed, JSP's cannot be taken advantage of w/o their
> cjb> servlet chaperones being present, etc.
>
> cjb> a. [...] adding a  for each folder.
>
> cjb> b. [...] JSP files under the WEB-INF folder.
>
> wk> c. Implement a servlet filter which is mapped to /* with dispatcher
> wk> options: REQUEST, INCLUDE, FORWARD. The filter may check the request
> wk> URI or include/forward URI (through request attributes).
>
> While I have a general idea of what you mean, I don't know how to implement 
> that.  Is that a standard practice?
I think the option uses standards and doesn't depart from standard practices.
The chapter 6 of the servlet spec [1] describes what Filter is,
when/how it can be used, its lifecycle, etc. Dispatcher options are
explained in 6.2.5.
Your servlet filter implementation may be invoked as pre-processing
component before other resources or servlets.
When .jsp is accessed directly, your filter may be invoked as REQUEST
dispatcher option (the default unless configured manually), you can
check the resource path info through
HttpRequestServlet#getRequestURI(). e.g, /examples/hello.jsp. If you
want to check the cases where the JSP is included or forwarded through
RequestDispatcher, you may check servlet request attributes described
in the section 9.3.1 (for inclusion) or 9.4.2 (for forwarding). So,
you might want to check include/forward path first and find requestURI
afterward to check everything and modify the response as a result. For
example, you can choose to send a 4xx response if the condition
doesn't meet your requirement.
All of those are based on servlet standards.

HTH,

Woonsan

[1] 
https://javaee.github.io/servlet-spec/downloads/servlet-3.1/Final/servlet-3_1-final.pdf

>
> --
> Cris Berneburg
> CACI Lead Software Engineer
>

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



Re: how to prevent user access to JSP pages?

2018-08-16 Thread Woonsan Ko
There's another considerable option:

c. Implement a servlet filter which is mapped to /* with dispatcher
options: REQUEST, INCLUDE, FORWARD. The filter may check the request
URI or include/forward URI (through request attributes).

Regards,

Woonsan

On Thu, Aug 16, 2018 at 1:19 PM, Berneburg, Cris J. - US
 wrote:
> Due to security concerns and general fussiness on my part, I'd like to 
> prevent users from requesting JSP pages directly, except for the login page.  
> I want all requests to be handled by servlets.  That way I can legitimately 
> claim that all requests are being validated, input scrubbed, JSP's cannot be 
> taken advantage of w/o their servlet chaperones being present, etc.
>
> a. One way I read is by adding a  for each folder.  One 
> use case is for JSP include files.  That looks possible but makes it seem 
> like these are exceptions and not the rule.  I want "deny, deny, deny" to be 
> the default and the one or 2 allowable JSP pages to be the exception.
>
> b. Another way mentioned is by having most of the JSP files under the WEB-INF 
> folder.  That way the users don't have access to the JSP's but the servlets 
> do.  My understanding is a little wobbly here, because I can't conceptualize 
> the virtual path for files under WEB-INF when sending a response.  (See line 
> of code below.)  Also, that would require moving most of the JSP files.
>
>> request.getRequestDispatcher("folder/file.jsp"); // what about WEB-INF?
>
> Is there a "smart" way of doing this?  Perhaps it would have been prudent to 
> organize the JSP folders "properly" in the first place, but we're way beyond 
> that now.
>
> Got any comments, suggestions, advice?
>
> Thanks.  :-)
>
> --
> Cris Berneburg
> CACI Lead Software Engineer
>

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



Re: Training material is now on-line

2018-04-13 Thread Woonsan Ko
Enjoyable and beautiful!

Woonsan

On Wed, Apr 11, 2018 at 6:32 PM, Mark Thomas  wrote:
> Hi all,
>
> Thanks to the magic of GitHub pages, the Tomcat training material that
> was used for the recent training session is now available on-line here:
>
> https://apache.github.io/tomcat-training/
>
> The source code is here:
>
> https://github.com/apache/tomcat-training
>
>
> We plan to add more modules and courses over time. All contributions
> large and small welcome.
>
> Enjoy.
>
> Mark
>
> -
> 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: Virtual directories, PostResources, and DefaultServlet

2018-04-10 Thread Woonsan Ko
On Tue, Apr 10, 2018 at 9:53 AM, Christopher Schultz
 wrote:
> All,
>
> I've been asked to take some static files we already have on our
> (reverse-proxied) web servers and require authentication before allowing
> the resources to be fetched by a client.
>
> One way to do that would be to physically (electronically?) move the
> files from the web servers to the application servers, either as a part
> of the web application itself (tricky due to licensing issues of these
> documents) or as a separate set of files in an arbitrary place on the
> disk e.g. using .
>
> Before I do that, I was thinking that maybe I could point
>  at a (private) URL that points back to the location
> where these files were already available. I was kind of hoping that
> simply doing http://static/files/here/;
> webAppMount="/static" /> or something like that.
>
> It looks like the existing WebResourceSet implementations are all
> disk-based resource providers.
>
> It also seems like writing a simple, read-only, "non-listable"
> implementation of an HTTPResourceSet might work for me.
>
> So I'm looking for opinions on what I should do, here. I might be able
> to hack-together an HttpResourceSet, but it probably won't benefit from
> e.g. range-requests (the files I am serving are PDFs, which often
> benefit from being able to perform range-requests) and might be fragile.
>
> I could move the files to the application servers, but then I need to
> make that a part of my app-server build process and I'd like that to
> remain as simple as possible.
>
> Finally, the files cannot go into revision-control due to licensing
> restrictions, so we basically have to keep them ... "safe" until they
> are deployed.
>
> Any ideas or suggestions?

How about Reverse Proxy Servlet Filter?
- http://portals.apache.org/applications/webcontent2/reverse-proxy-module.html

Regards,

Woonsan

>
> Thanks,
> -chris
>
> -
> 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: One more servlet reverse proxy solution to the wiki

2017-01-30 Thread Woonsan Ko
On Mon, Jan 30, 2017 at 6:09 AM, Mark Thomas <ma...@apache.org> wrote:
> On 27/01/2017 21:59, Woonsan Ko wrote:
>> On Fri, Jan 27, 2017 at 2:57 PM, Mark Thomas <ma...@apache.org> wrote:
>>> On 27/01/2017 18:29, Woonsan Ko wrote:
>>>> Hi,
>>>>
>>>> Recently I've noticed from another thread that the following wiki page
>>>> has a list of servlet based reverse proxy solutions:
>>>> - https://wiki.apache.org/tomcat/ServletProxy
>>>>
>>>> I know of another solution:
>>>> - 
>>>> http://portals.apache.org/applications/webcontent2/reverse-proxy-module.html
>>>>
>>>> Could someone add that info into the wiki page?
>>>
>>> Sure. You can. :)
>>>
>>> Create yourself and account, let us know your user name and we'll grant
>>> you edit karma.
>>
>> Thanks, Mark!
>> My username is 'WoonsanKo'.
>>
>> Woonsan
>
> Added.
>
> Happy editing.

Thanks again! Just added that very happily! :-)

Cheers, Woonsan

>
> Mark
>
>
>>
>>>
>>> Mark
>>>
>>>
>>>> Here's my summary about the solution:
>>>>
>>>>  4) Apache Portals WebContent-2 Reverse Proxy Module : The Reverse
>>>> Proxy Module provides the features of Reverse Proxy, and it consists
>>>> of HTTP Client builder components (using HttpClient 4), Reverse Proxy
>>>> Command/Chain components (using Apache Commons Chain), and Reverse
>>>> Proxy Servlets and Filters.
>>>> With this Reverse Proxy Module, you can configure proxy mappings
>>>> with YAML configuration, you can rewrite content using built-in
>>>> content rewriting components, and you can even customize the
>>>> processing commands in the chain easily.
>>>> This module is part of WebContent-2 portlet web application
>>>> project, but the reverse proxy jar module has been designed and
>>>> working in normal servlet (non-portlet) environments independently as
>>>> well. See 
>>>> http://portals.apache.org/applications/webcontent2/modules-overview.html
>>>> for detail.
>>>>
>>>> Link: 
>>>> http://portals.apache.org/applications/webcontent2/reverse-proxy-module.html
>>>>
>>>>
>>>> Thanks in advance,
>>>>
>>>> Woonsan
>>>>
>>>> -
>>>> 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
>>
>
>
> -
> 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: One more servlet reverse proxy solution to the wiki

2017-01-27 Thread Woonsan Ko
On Fri, Jan 27, 2017 at 2:57 PM, Mark Thomas <ma...@apache.org> wrote:
> On 27/01/2017 18:29, Woonsan Ko wrote:
>> Hi,
>>
>> Recently I've noticed from another thread that the following wiki page
>> has a list of servlet based reverse proxy solutions:
>> - https://wiki.apache.org/tomcat/ServletProxy
>>
>> I know of another solution:
>> - 
>> http://portals.apache.org/applications/webcontent2/reverse-proxy-module.html
>>
>> Could someone add that info into the wiki page?
>
> Sure. You can. :)
>
> Create yourself and account, let us know your user name and we'll grant
> you edit karma.

Thanks, Mark!
My username is 'WoonsanKo'.

Woonsan

>
> Mark
>
>
>> Here's my summary about the solution:
>>
>>  4) Apache Portals WebContent-2 Reverse Proxy Module : The Reverse
>> Proxy Module provides the features of Reverse Proxy, and it consists
>> of HTTP Client builder components (using HttpClient 4), Reverse Proxy
>> Command/Chain components (using Apache Commons Chain), and Reverse
>> Proxy Servlets and Filters.
>> With this Reverse Proxy Module, you can configure proxy mappings
>> with YAML configuration, you can rewrite content using built-in
>> content rewriting components, and you can even customize the
>> processing commands in the chain easily.
>> This module is part of WebContent-2 portlet web application
>> project, but the reverse proxy jar module has been designed and
>> working in normal servlet (non-portlet) environments independently as
>> well. See 
>> http://portals.apache.org/applications/webcontent2/modules-overview.html
>> for detail.
>>
>> Link: 
>> http://portals.apache.org/applications/webcontent2/reverse-proxy-module.html
>>
>>
>> Thanks in advance,
>>
>> Woonsan
>>
>> -
>> 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



One more servlet reverse proxy solution to the wiki

2017-01-27 Thread Woonsan Ko
Hi,

Recently I've noticed from another thread that the following wiki page
has a list of servlet based reverse proxy solutions:
- https://wiki.apache.org/tomcat/ServletProxy

I know of another solution:
- http://portals.apache.org/applications/webcontent2/reverse-proxy-module.html

Could someone add that info into the wiki page?
Here's my summary about the solution:

 4) Apache Portals WebContent-2 Reverse Proxy Module : The Reverse
Proxy Module provides the features of Reverse Proxy, and it consists
of HTTP Client builder components (using HttpClient 4), Reverse Proxy
Command/Chain components (using Apache Commons Chain), and Reverse
Proxy Servlets and Filters.
With this Reverse Proxy Module, you can configure proxy mappings
with YAML configuration, you can rewrite content using built-in
content rewriting components, and you can even customize the
processing commands in the chain easily.
This module is part of WebContent-2 portlet web application
project, but the reverse proxy jar module has been designed and
working in normal servlet (non-portlet) environments independently as
well. See 
http://portals.apache.org/applications/webcontent2/modules-overview.html
for detail.

Link: 
http://portals.apache.org/applications/webcontent2/reverse-proxy-module.html


Thanks in advance,

Woonsan

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



Re: TomcatCon @ ApacheCon

2017-01-09 Thread Woonsan Ko
On Mon, Jan 9, 2017 at 2:14 PM, Terence M. Bandoian  wrote:
> On 1/9/2017 8:00 AM, jean-frederic clere wrote:
>>
>> On 01/09/2017 12:57 PM, Mark Thomas wrote:
>>>
>>> All,
>>>
>>> There is the opportunity (if we can pull it together as a community) to
>>> run a dedicated Tomcat conference alongside ApacheCon NA 2017. The dates
>>> are May 16 to 18.
>>>
>>> The call for papers closes on Feb 11 so we have around a month to get
>>> organised. We'll also need to convince the conference organisers that a)
>>> there is a demand for this and b) we have a plan.
>>>
>>> Getting the right content is going to be critical to success. I've been
>>> thinking about this for a while and I think we can identify the right
>>> content if as many folks as possible on this list answer the following
>>> question:
>>>
>>> "What topic(s) need to be covered in a Tomcat conference to make it as
>>> easy as possible to get your employer to pay for you to attend?"
>>>
>>> We have up to three days and potentially multiple tracks so even if you
>>> think you have a niche requirement, please speak up. We typically have a
>>> number of Tomcat committers speaking at ApacheCon so finding someone to
>>> cover a particular topic shouldn't be too tricky. Equally, if you have a
>>> topic you could present on that you think others would find useful,
>>> speak up.
>>>
>>> Do feel free to add your +1 if someone else mentions a topic your are
>>> interested first. Having an idea of how popular the topics are would
>>> also be helpful.
>>>
>>> Also, we don't have to stick to the standard "Sit and listen to someone
>>> present for 40 mins" format. Discussions, workshops, hackathons are all
>>> possible.
>>>
>>> Some topic ideas to get the ball rolling.
>>>
>>> Hands-on workshop: Configuring TLS with Apache Tomcat
>>> Reverse Proxying to Apache Tomcat
>>> Load-balancing with Apache Tomcat
>>> Clustering  with Apache Tomcat
>>> Tomcat Clinic (like the users list but with everyone in the same room)
>>>
>>> I look forward to hearing your topic ideas.
>>
>> The classical tomcat-next (presenting 8.5 and 9 + migration + openssl)
>> easily fill a room and an afternoon of workshop.
>> Proxy and Load-balancing are also often asked...
>>
>> What about tomcat in cloud?
>>
>> Cheers
>>
>> Jean-Frederic
>>
>>> Mark
>>>
>
>
> Embedded Tomcat and microservices?  With and as an alternative to Spring
> Boot?

+1
I happened to implement a custom TomcatEmbeddedServletContainerFactory
to support multiple wars deployment with spring-boot for some reasons
(e.g, some requires multiple wars together anyway even in micro
service env) before.
It would be nice if we can discuss/share alternatives to create
cloud-friendly single executable artifacts.

Woonsan

>
> -Terence Bandoian
>  http://www.tmbsw.com/
>
>
>
> -
> 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: [SECURITY] Java Deserialization, JMX and CVE-2016-3427

2016-05-25 Thread Woonsan Ko
On Wed, May 25, 2016 at 11:12 AM, Christopher Schultz
 wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Mark,
>
> On 5/24/16 10:06 AM, Mark Thomas wrote:
>> TL;DR If you use remote JMX, you need to update your JVM to address
>> CVE-2016-3427
>>
>> For the longer version, see the blog post I just published on
>> this: http://engineering.pivotal.io/post/java-deserialization-jmx/
>
> Okay, I give up: what version of Java 8 actually has this patch?
> Oracle's site gives me the runaround and tells me that it's been patched
> in April, but I have no idea what version of Java was published in
> April, and Oracle's site seems very reticent to tell me :(
>
> The CVEs have virtuall no information other than "something bad exists
> in some versions of some stuff, and you should upgrade". Upgrade to what
> ?

When I clicked on the CVE link and the link to oracle page onward in
the Reference section
(CONFIRM:http://www.oracle.com/technetwork/security-advisory/cpuapr2016v3-2985753.html),
I could see the Java version ("Supported Versions Affected" column) in
the table when I look up "CVE-2016-3427".

>
> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iEYEARECAAYFAldFwPAACgkQ9CaO5/Lv0PBRjQCeOkzoLqUv6DMHkLWkEbfySe74
> tvgAnRnNMavAA9M7Y2FxoTOQ1mo8eIW9
> =g9B3
> -END PGP SIGNATURE-
>
> -
> 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: Prepared statements are not cached with XA in tomcat jdbc connection pool implementation

2016-05-25 Thread Woonsan Ko
I don't know if it is a bug or not, but I learned today that
org.apache.tomcat.jdbc.** is a different tomcat implementation from
the default dbcp based implementation (org.apache.tomcat.dbcp.**).
And, you seem to use the former one.
Therefore, I think you should file a bug in tomcat, not in commons-dbcp, IMHO:
- http://tomcat.apache.org/bugreport.html

Regards,

Woonsan

On Wed, May 18, 2016 at 12:51 AM, Sailaja Ravipati
 wrote:
> Thank you. Will do that.
>
> Regards,
> Sailaja.
>
> -Original Message-
> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
> Sent: 18 May 2016 01:24
> To: Tomcat Users List
> Subject: Re: Prepared statements are not cached with XA in tomcat jdbc 
> connection pool implementation
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Sailaja,
>
> On 5/17/16 6:58 AM, Sailaja Ravipati wrote:
>> I am using TomEE version Apache Tomcat Version 7.0.63. I have the
>> following test program.
>>
>> public static void main(String[] args) throws Exception { final
>> TransactionManager transactionManager = TransactionManagerFactory
>> .getTransactionManager(); final PoolProperties poolProperties = new
>> PoolProperties();  SQLServerDataSource dataSource = new
>> com.microsoft.sqlserver.jdbc.SQLServerDataSource();
>> dataSource.setUser("sa"); dataSource.setPassword("$9Lserver");
>> dataSource.setURL("jdbc:sqlserver://sdwivedi63ks022:1433;sendStringPar
> ametersAsUnicode=false");
>>
>>
> dataSource.setDatabaseName("himalaya");
>> poolProperties.setDataSource(dataSource);  final String
>> jdbcInterceptors =
>> "org.apache.tomcat.jdbc.pool.interceptor.StatementCache(prepared=true,
> callable=true)";
>>
>>
> poolProperties.setJdbcInterceptors(jdbcInterceptors);
>> final org.apache.tomcat.jdbc.pool.DataSource pooledOracleDatasource =
>> new org.apache.tomcat.jdbc.pool.XADataSource( poolProperties); final
>> javax.sql.DataSource oracleDataSource = new
>> org.apache.openejb.resource.jdbc.managed.xa.ManagedXADataSource(
>> pooledOracleDatasource, transactionManager,
>> TransactionProvider.getTransactionSynchronizationRegistry());
>> Connection connection = oracleDataSource.getConnection(); for(int i=0;
>> i<50; i++) { PreparedStatement preparedStatement =
>> connection.prepareStatement("insert into MyTableNew values (" + i +
>> ")"); System.out.println(preparedStatement.getClass().getName());
>> preparedStatement.execute(); preparedStatement.close(); }
>> connection.close(); }
>>
>> If I run the above program, the output I see is:
>> com.sun.proxy.$Proxy11
>>
>> If I just change the above program to use XA datasource, i.e.
>> Change the following line SQLServerDataSource dataSource = new
>> com.microsoft.sqlserver.jdbc.SQLServerDataSource(); To
>> SQLServerXADataSource dataSource = new
>> com.microsoft.sqlserver.jdbc.SQLServerXADataSource(); The output is
>> : com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement
>>
>> So, if I use XA datasource, prepared statements are not cached. How do
>> I log a defect ?
>
> The problem would be in commons-dbcp, so you should file a bug report in JIRA 
> here:
>
> http://commons.apache.org/proper/commons-dbcp/issue-tracking.html
>
> Bug reports with complete information (or even a patch!) will get more 
> attention than those without.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJXO3bFAAoJEBzwKT+lPKRY1oAP/iy4c6LQNx/Gcg+24MJry0/t
> l30JkJsgeCa6uXgs7JUjCLxmaPjhCF3Fw4FtzwzqUgEY13yTF7jlFhvuq1elOoQx
> w0eHpcW39iQ0DJvGvbz6cEpsR902mSSXyt6Ar7AAeZoAs7AlYKhLmp9wKBdqq1pq
> PSJcBhrwxA0OcIgDscCj667diUYmmi914LRSUXNwiCCH3ymAMsoXFi63FD1/VxEf
> W3vqKxJvmKwhlP1Jia0T9mCusqmwQfct2lJXuU+W9dDyCogkBdv4anDBivdRVJA8
> VYRzHPjQQQOg7dwmXkulRLp1vToqFFaAFDhUVL+RSTX+R+Ee9fg+vqssUD4U6ba/
> GCTXMTMck2/n06dDcNcpfF5M20nFDQ8eBUDqsmbP+NBMrTZfdyUTihCaoRW1x1rv
> +YVJuD5TA6bNC6n70bWMLT2ybs3cxplB7lwPueO0t88nBehDqsz+XRSS64Si6hXn
> wjKaW+CO7tVMhRmf8g9yKFKppklIUCpWX12iyJ4SRWtAVRIBcZ47HFgXfukPo03A
> DcUwpjsSHgvyOUpwWe31mVeQMyY5VDu8lFSjqmaHthqQGvRnGaYUPD3VJd71mobV
> AqkNTk3xcySN/sirUx6KVm6rwYClIvN2xQswn5cvFeRjRFO6BCGemjsW7+aF40Mu
> +Q3ahYmlTYBownFshBV2
> =Vau+
> -END PGP SIGNATURE-
>
> -
> 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



Re: JNDI DataSource in Tomcat 8: maxTotal and maxWaitMillis

2016-05-25 Thread Woonsan Ko
Hi Mark,

On Wed, May 25, 2016 at 4:56 AM, Mark Thomas <ma...@apache.org> wrote:
> On 24/05/2016 23:23, Woonsan Ko wrote:
>> Hi,
>>
>> Since 8.0, I think we should use maxTotal instead of maxActive and
>> maxWaitMillis instead of maxWait. [1,2]
>> However, if I use maxTotal for instance, the jmx console doesn't show
>> it but show the old maxActive value (100, probably the default
>> value?).
>> Browsing the source, o.a.t.jdbc.pool.PoolConfiguration doesn't seem to
>> consider both. 
>> o.a.t.jdbc.pool.DataSourceFactory#parsePoolProperties(Properties)
>> seems even unaware of those new properties.
>> Would this be a bug in either code or documentation?
>>
>> Another question is, why does it ignore 'poolPreparedStatements'
>> parameter even though it's supported by the underlying dbcp?
>
> You are mixing up the two connection pooling options. The default DBCP
> based one (org.apache.tomcat.dbcp.dbcp2) and the Tomcat implementation
> (org.apache.tomcat.jdbc).
>
> Which one are you actually using?

Thank you very much for asking the right question! :-)
Indeed, I overlooked the factory attribute in the existing
configuration. The DataSource configuration contained the following:

factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"

My bad. I should have taken a closer look at it. After removing the
attribute to use the default factory
(org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory), it works like a
charm!

Cheers,

Woonsan

>
> Matk
>
>
>>
>> Regards,
>>
>> Woonsan
>>
>> [1] https://tomcat.apache.org/migration-8.html#Database_Connection_Pooling
>> [2] 
>> http://tomcat.apache.org/tomcat-8.0-doc/jndi-datasource-examples-howto.html
>>
>> -
>> 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



JNDI DataSource in Tomcat 8: maxTotal and maxWaitMillis

2016-05-24 Thread Woonsan Ko
Hi,

Since 8.0, I think we should use maxTotal instead of maxActive and
maxWaitMillis instead of maxWait. [1,2]
However, if I use maxTotal for instance, the jmx console doesn't show
it but show the old maxActive value (100, probably the default
value?).
Browsing the source, o.a.t.jdbc.pool.PoolConfiguration doesn't seem to
consider both. o.a.t.jdbc.pool.DataSourceFactory#parsePoolProperties(Properties)
seems even unaware of those new properties.
Would this be a bug in either code or documentation?

Another question is, why does it ignore 'poolPreparedStatements'
parameter even though it's supported by the underlying dbcp?

Regards,

Woonsan

[1] https://tomcat.apache.org/migration-8.html#Database_Connection_Pooling
[2] http://tomcat.apache.org/tomcat-8.0-doc/jndi-datasource-examples-howto.html

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



Re: Tomcat DS question

2016-05-18 Thread Woonsan Ko
Could you give an answer on my question first? Maybe you can create a jsp page 
printing out the sys prop like this.

<%
out.println("javax.sql.DataSource.Factory: " + 
System.getProperty("javax.sql.DataSource.Factory"));
%>

Let me know what you get there.

Regards,

Woonsan

> On May 17, 2016, at 10:40 PM, pradeep reddy <pradeep@gmail.com> wrote:
> 
> Also, how to determine if the application is using ojdbc6.jar or
> tomcat-dbcp.jar for connection pool. Apologies I am not a developer and
> want to understand the concept of connection pool.
> 
> Thanks
> Pradeep
> 
>> On Tue, May 17, 2016 at 2:32 PM, Woonsan Ko <woon...@apache.org> wrote:
>> 
>> I don't know much about that for Oracle. What I was trying to mention
>> was simply that you can check if you have a system property
>> (-Djavax.sql.DataSource.Factory=...) to use a custom one. (Even though
>> it's not that common, but it's still possible to override it by system
>> property.) Your configuration doesn't have the factory attribute, so
>> if you don't have the specific system property, then you can rule out
>> my suspicion and focus on some other possibilities.
>> 
>> Regards,
>> 
>> Woonsan
>> 
>> 
>> On Tue, May 17, 2016 at 2:51 PM, pradeep reddy <pradeep@gmail.com>
>> wrote:
>>> Thanks for response, would you know if there is any recommended dbcp jar
>>> that we need to use for Oracle 12 and Tomcat 6 ?
>>> 
>>> Thanks
>>> Pradeep
>>> 
>>>> On Tue, May 17, 2016 at 11:07 AM, Woonsan Ko <woon...@apache.org> wrote:
>>>> 
>>>> Hi Pradeep,
>>>> 
>>>> I saw you had Oracle specific settings such as
>>>> connectionCachingEnabled. So, maybe you're using Oracle specific
>>>> DataSourceFactory instead of the default dbcp one.
>>>> As far as I know, the default factory
>>>> (org.apache...BasicDataSourceFactory) can be overridden by either
>>>> factory attribute in the  element or
>>>> javax.sql.DataSource.Factory system property.
>>>> In that case, it might be an issue around the custom factory
>>>> implementation, not tomcat.
>>>> 
>>>> Regards,
>>>> 
>>>> Woonsan
>>>> 
>>>> 
>>>> On Mon, May 16, 2016 at 6:54 PM, pradeep reddy <pradeep@gmail.com>
>>>> wrote:
>>>>> Hello Woonsan,
>>>>>   Via Jconsole I had validated all my changes that were made in
>>>>> context.xml. But for some reason the logs doesn't show anything about
>>>>> abandoned connections in catalina.out. I am not sure at this time if
>> its
>>>> a
>>>>> bug in tomcat 6 or tomcat-dbcp.jar, but threaddumps clearly show that
>>>>> threads are waiting on connections from connection pool.
>>>>> 
>>>>> Thanks
>>>>> Pradeep
>>>>> 
>>>>> On Mon, May 16, 2016 at 4:38 PM, Woonsan Ko <woon...@apache.org>
>> wrote:
>>>>> 
>>>>>> Hi Pradeep,
>>>>>> 
>>>>>> Just in case, you might want to make sure your changes were really
>>>>>> applied. For example, an effective context.xml could be in
>>>>>> conf/Catalina/localhost/...
>>>>>> If it was applied properly, the stack trace should have shown
>>>>>> o.a.c.dbcp.AbandonedObjectPool#borrowObject() as well.
>>>>>> 
>>>>>> Regards,
>>>>>> 
>>>>>> Woonsan
>>>>>> 
>>>>>> 
>>>>>> On Mon, May 16, 2016 at 5:54 PM, pradeep reddy <
>> pradeep@gmail.com>
>>>>>> wrote:
>>>>>>> unfortunately it is not writing anything catalina.out :-(
>>>>>>> 
>>>>>>> Thanks
>>>>>>> Pradeep
>>>>>>> 
>>>>>>> On Mon, May 16, 2016 at 3:47 PM, Christopher Schultz <
>>>>>>> ch...@christopherschultz.net> wrote:
>>>>>>> 
>>>>>>>> -BEGIN PGP SIGNED MESSAGE-
>>>>>>>> Hash: SHA256
>>>>>>>> 
>>>>>>>> Pradeep,
>>>>>>>> 
>>>>>>>>> On 5/16/16 5:13 PM, pradeep reddy wrote:
>>>>>>>>> Hello Christopher,
>>>>>>>>> 
>>>>>>>>>

Re: Tomcat DS question

2016-05-17 Thread Woonsan Ko
I don't know much about that for Oracle. What I was trying to mention
was simply that you can check if you have a system property
(-Djavax.sql.DataSource.Factory=...) to use a custom one. (Even though
it's not that common, but it's still possible to override it by system
property.) Your configuration doesn't have the factory attribute, so
if you don't have the specific system property, then you can rule out
my suspicion and focus on some other possibilities.

Regards,

Woonsan


On Tue, May 17, 2016 at 2:51 PM, pradeep reddy <pradeep@gmail.com> wrote:
> Thanks for response, would you know if there is any recommended dbcp jar
> that we need to use for Oracle 12 and Tomcat 6 ?
>
> Thanks
> Pradeep
>
> On Tue, May 17, 2016 at 11:07 AM, Woonsan Ko <woon...@apache.org> wrote:
>
>> Hi Pradeep,
>>
>> I saw you had Oracle specific settings such as
>> connectionCachingEnabled. So, maybe you're using Oracle specific
>> DataSourceFactory instead of the default dbcp one.
>> As far as I know, the default factory
>> (org.apache...BasicDataSourceFactory) can be overridden by either
>> factory attribute in the  element or
>> javax.sql.DataSource.Factory system property.
>> In that case, it might be an issue around the custom factory
>> implementation, not tomcat.
>>
>> Regards,
>>
>> Woonsan
>>
>>
>> On Mon, May 16, 2016 at 6:54 PM, pradeep reddy <pradeep@gmail.com>
>> wrote:
>> > Hello Woonsan,
>> >Via Jconsole I had validated all my changes that were made in
>> > context.xml. But for some reason the logs doesn't show anything about
>> > abandoned connections in catalina.out. I am not sure at this time if its
>> a
>> > bug in tomcat 6 or tomcat-dbcp.jar, but threaddumps clearly show that
>> > threads are waiting on connections from connection pool.
>> >
>> > Thanks
>> > Pradeep
>> >
>> > On Mon, May 16, 2016 at 4:38 PM, Woonsan Ko <woon...@apache.org> wrote:
>> >
>> >> Hi Pradeep,
>> >>
>> >> Just in case, you might want to make sure your changes were really
>> >> applied. For example, an effective context.xml could be in
>> >> conf/Catalina/localhost/...
>> >> If it was applied properly, the stack trace should have shown
>> >> o.a.c.dbcp.AbandonedObjectPool#borrowObject() as well.
>> >>
>> >> Regards,
>> >>
>> >> Woonsan
>> >>
>> >>
>> >> On Mon, May 16, 2016 at 5:54 PM, pradeep reddy <pradeep@gmail.com>
>> >> wrote:
>> >> > unfortunately it is not writing anything catalina.out :-(
>> >> >
>> >> > Thanks
>> >> > Pradeep
>> >> >
>> >> > On Mon, May 16, 2016 at 3:47 PM, Christopher Schultz <
>> >> > ch...@christopherschultz.net> wrote:
>> >> >
>> >> >> -BEGIN PGP SIGNED MESSAGE-
>> >> >> Hash: SHA256
>> >> >>
>> >> >> Pradeep,
>> >> >>
>> >> >> On 5/16/16 5:13 PM, pradeep reddy wrote:
>> >> >> > Hello Christopher,
>> >> >> >
>> >> >> > Let me post my thread dump here.
>> >> >> >
>> >> >> > All  HTTP threads are in WAITING state.
>> >> >> >
>> >> >> > "http-12453-346" daemon prio=10 tid=0x7fbd3061f800 nid=0x59d0
>> >> >> > in Object.wait() [0x7fbbe124f000] java.lang.Thread.State:
>> >> >> > WAITING (on object monitor) at java.lang.Object.wait(Native
>> >> >> > Method) at java.lang.Object.wait(Object.java:485) at
>> >> >> >
>> org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(Generi
>> >> >> cObjectPool.java:1104)
>> >> >> >
>> >> >> >
>> >> >> - - locked <0x00072b18f320> (a
>> >> >> > org.apache.tomcat.dbcp.pool.impl.GenericObjectPool$Latch) at
>> >> >> >
>> org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDat
>> >> >> aSource.java:106)
>> >> >> >
>> >> >> >
>> >> >> at
>> >> >>
>> org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSourc
>> >> >> e.java:1044)
>> >> >> > at
>> >> >> >
>> org.springframework.orm.hibern

Re: Tomcat DS question

2016-05-17 Thread Woonsan Ko
Hi Pradeep,

I saw you had Oracle specific settings such as
connectionCachingEnabled. So, maybe you're using Oracle specific
DataSourceFactory instead of the default dbcp one.
As far as I know, the default factory
(org.apache...BasicDataSourceFactory) can be overridden by either
factory attribute in the  element or
javax.sql.DataSource.Factory system property.
In that case, it might be an issue around the custom factory
implementation, not tomcat.

Regards,

Woonsan


On Mon, May 16, 2016 at 6:54 PM, pradeep reddy <pradeep@gmail.com> wrote:
> Hello Woonsan,
>Via Jconsole I had validated all my changes that were made in
> context.xml. But for some reason the logs doesn't show anything about
> abandoned connections in catalina.out. I am not sure at this time if its a
> bug in tomcat 6 or tomcat-dbcp.jar, but threaddumps clearly show that
> threads are waiting on connections from connection pool.
>
> Thanks
> Pradeep
>
> On Mon, May 16, 2016 at 4:38 PM, Woonsan Ko <woon...@apache.org> wrote:
>
>> Hi Pradeep,
>>
>> Just in case, you might want to make sure your changes were really
>> applied. For example, an effective context.xml could be in
>> conf/Catalina/localhost/...
>> If it was applied properly, the stack trace should have shown
>> o.a.c.dbcp.AbandonedObjectPool#borrowObject() as well.
>>
>> Regards,
>>
>> Woonsan
>>
>>
>> On Mon, May 16, 2016 at 5:54 PM, pradeep reddy <pradeep@gmail.com>
>> wrote:
>> > unfortunately it is not writing anything catalina.out :-(
>> >
>> > Thanks
>> > Pradeep
>> >
>> > On Mon, May 16, 2016 at 3:47 PM, Christopher Schultz <
>> > ch...@christopherschultz.net> wrote:
>> >
>> >> -BEGIN PGP SIGNED MESSAGE-
>> >> Hash: SHA256
>> >>
>> >> Pradeep,
>> >>
>> >> On 5/16/16 5:13 PM, pradeep reddy wrote:
>> >> > Hello Christopher,
>> >> >
>> >> > Let me post my thread dump here.
>> >> >
>> >> > All  HTTP threads are in WAITING state.
>> >> >
>> >> > "http-12453-346" daemon prio=10 tid=0x7fbd3061f800 nid=0x59d0
>> >> > in Object.wait() [0x7fbbe124f000] java.lang.Thread.State:
>> >> > WAITING (on object monitor) at java.lang.Object.wait(Native
>> >> > Method) at java.lang.Object.wait(Object.java:485) at
>> >> > org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(Generi
>> >> cObjectPool.java:1104)
>> >> >
>> >> >
>> >> - - locked <0x00072b18f320> (a
>> >> > org.apache.tomcat.dbcp.pool.impl.GenericObjectPool$Latch) at
>> >> > org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDat
>> >> aSource.java:106)
>> >> >
>> >> >
>> >> at
>> >> org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSourc
>> >> e.java:1044)
>> >> > at
>> >> > org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.g
>> >> etConnection(LocalDataSourceConnectionProvider.java:82)
>> >>
>> >> Yep,
>> >> >
>> >> that certainly looks like you are waiting for connections from
>> >> Tomcat's DBCP-based pool.
>> >>
>> >> > > >> > type="javax.sql.DataSource"
>> >> > driverClassName="oracle.jdbc.OracleDriver" url="XXX"
>> >> > username="XX" password="XX" initialSize="1" maxActive="10"
>> >> > minIdle="1" maxIdle="1" connectionCachingEnabled="true"
>> >> > fastConnectionFailoverEnabled="true"
>> >> > connectionCacheProperties="{MinLimit=1, MaxLimit=20,
>> >> > InitialLimit=1, oracle.net.ns.SQLnetDef.TCP_CONNTIMEOUT_STR=3000}"
>> >> > ONSConfiguration="nodes=X" validationQuery="SELECT 1 from
>> >> > DUAL" removeAbandoned="true" removeAbandonedTimeout="30"
>> >> > logAbandoned="true" maxWait="-1"/>
>> >>
>> >> That configuration looks okay to me.
>> >>
>> >> The "abandoned" logs are logged to stdout, so they should show up in
>> >> your catalina.out file (or stdout.log if you are using a Windows Service
>> >> ).
>> >>
>> >> Are you getting 

Re: Tomcat DS question

2016-05-16 Thread Woonsan Ko
Hi Pradeep,

Just in case, you might want to make sure your changes were really
applied. For example, an effective context.xml could be in
conf/Catalina/localhost/...
If it was applied properly, the stack trace should have shown
o.a.c.dbcp.AbandonedObjectPool#borrowObject() as well.

Regards,

Woonsan


On Mon, May 16, 2016 at 5:54 PM, pradeep reddy  wrote:
> unfortunately it is not writing anything catalina.out :-(
>
> Thanks
> Pradeep
>
> On Mon, May 16, 2016 at 3:47 PM, Christopher Schultz <
> ch...@christopherschultz.net> wrote:
>
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA256
>>
>> Pradeep,
>>
>> On 5/16/16 5:13 PM, pradeep reddy wrote:
>> > Hello Christopher,
>> >
>> > Let me post my thread dump here.
>> >
>> > All  HTTP threads are in WAITING state.
>> >
>> > "http-12453-346" daemon prio=10 tid=0x7fbd3061f800 nid=0x59d0
>> > in Object.wait() [0x7fbbe124f000] java.lang.Thread.State:
>> > WAITING (on object monitor) at java.lang.Object.wait(Native
>> > Method) at java.lang.Object.wait(Object.java:485) at
>> > org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(Generi
>> cObjectPool.java:1104)
>> >
>> >
>> - - locked <0x00072b18f320> (a
>> > org.apache.tomcat.dbcp.pool.impl.GenericObjectPool$Latch) at
>> > org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDat
>> aSource.java:106)
>> >
>> >
>> at
>> org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSourc
>> e.java:1044)
>> > at
>> > org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.g
>> etConnection(LocalDataSourceConnectionProvider.java:82)
>>
>> Yep,
>> >
>> that certainly looks like you are waiting for connections from
>> Tomcat's DBCP-based pool.
>>
>> > > > type="javax.sql.DataSource"
>> > driverClassName="oracle.jdbc.OracleDriver" url="XXX"
>> > username="XX" password="XX" initialSize="1" maxActive="10"
>> > minIdle="1" maxIdle="1" connectionCachingEnabled="true"
>> > fastConnectionFailoverEnabled="true"
>> > connectionCacheProperties="{MinLimit=1, MaxLimit=20,
>> > InitialLimit=1, oracle.net.ns.SQLnetDef.TCP_CONNTIMEOUT_STR=3000}"
>> > ONSConfiguration="nodes=X" validationQuery="SELECT 1 from
>> > DUAL" removeAbandoned="true" removeAbandonedTimeout="30"
>> > logAbandoned="true" maxWait="-1"/>
>>
>> That configuration looks okay to me.
>>
>> The "abandoned" logs are logged to stdout, so they should show up in
>> your catalina.out file (or stdout.log if you are using a Windows Service
>> ).
>>
>> Are you getting no messages about the abandoned connections?
>>
>> - -chris
>> -BEGIN PGP SIGNATURE-
>> Comment: GPGTools - http://gpgtools.org
>> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>>
>> iQIcBAEBCAAGBQJXOj/gAAoJEBzwKT+lPKRYFVQP/RJKOl0QoU8/qcgMBtdrqwbr
>> gddAEbqeDVT4nb8Bp/MWpWEoICBr75IGMgSir+qKASwTKXNsORceyxcSn+YxRJnK
>> POZgIZfwti4vLYMBr9jU1kdUsxCGriettcBZ8pkwJAAtyVX9O0lZiwEZuCp7WwA5
>> sbatkYHNtJQsjxQli1XA6NPNjQBS6y+WuQZQ0e/mf3CJUq9Rqa0uvsgAOK9XQTDB
>> HBNfhF1sjIFy2ro5Vb6OagRHB+9CBxc01gM8V2d37hrbqmUVpiE4pKqO2sWZ6cz5
>> yCwSBEcxyNKvDoeP2kz/1HGIhSwB7ifV1zkbhgZaB5eQZVZZubXVcdwgmRMswUgl
>> RtzqCPF6rOHkgccoe5IqZLb89pQITibz6G3xTAoHhcvh2m7bADAkoN9Jq88DxUqT
>> CqXEc/01A0AdC5zzqdGPToReLPEcaifLuAK0seGQsHIHAtOytYEY2E9rmoPtCrGp
>> J4AshEzNtmVT+WUc40FS1+KeabolYBk0biXZiZG/mkVEmKf1DpzPtsBGFfYvo3/i
>> 0IAOS4zBvluQT1xaqNO6bFJ4fyfIwyWE26FBEPWRpsju2CEg/9+uXw6YM3xYxdkc
>> TmTTXqp4wvfE82fb2NMGQT3Av/q2fD4Yvzt7DiyHmWL0i0BlsnWBRdJD0dogKFRK
>> oVun2+a1tFD7lvJnVoiu
>> =AHDK
>> -END PGP SIGNATURE-
>>
>> -
>> 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: Stuck threads reading socket

2016-03-04 Thread Woonsan Ko
Thank you so much, Mark!
It helped a lot! Appreciate much for sharing the slides, too.

Cheers,

Woonsan


On Fri, Mar 4, 2016 at 3:28 AM, Mark Thomas <ma...@apache.org> wrote:
> On 04/03/2016 00:51, Woonsan Ko wrote:
>> I have tomcat instances (6.0.44) which are proxied by Apache 2.4.18
>> (+mod_proxy). SSL enabled on Apache side.
>> One day it was not responding and observed that all the catalina-exec
>> threads (25 maxthreads at the moment) were stuck in reading socket in
>> the thread dumps like the following (increasing maxthreads to 128
>> circumvented the issue for now, btw):
>
> 
>
>> What would you recommend to find the root cause in this case?
>
> That looks like a common configuration error.
>
> Take a look at this:
> http://home.apache.org/~markt/presentations/2015-04-15-Tomcat-clustering-part-1-reverse-proxies.pdf
>
> Particularly slides 29 to 34.
>
> Mark
>
>
> -
> 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



Stuck threads reading socket

2016-03-03 Thread Woonsan Ko
Hi,

I have tomcat instances (6.0.44) which are proxied by Apache 2.4.18
(+mod_proxy). SSL enabled on Apache side.
One day it was not responding and observed that all the catalina-exec
threads (25 maxthreads at the moment) were stuck in reading socket in
the thread dumps like the following (increasing maxthreads to 128
circumvented the issue for now, btw):

"catalina-exec-26537" daemon prio=10 tid=0x7f3787ff6000 nid=0x51bc
runnable [0x7f3776a4a000]
   java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:152)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at 
org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:733)
at 
org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:364)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:814)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:620)
at 
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:396)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

I want to find a way to determine the root cause(s). Maybe some bad
requests are coming in or something else.. No DDoS was reported.
So, I thought about turning on tomcat AccessLogValve with %I in format
(to print out thread name) to associate the request info with the
stuck thread. I can also get more info from apache2 access logs based
on that. However, AccessLogValve probably leaves a log only after
completing the other valves, so I'm doubtful if it can help in my
case.
What would you recommend to find the root cause in this case?

Thanks in advance,

Woonsan

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



Release schedule for 7.0.55?

2014-07-01 Thread Woonsan Ko
Hi,

Is there any schedule to release 7.0.55?
I hope to have a fix for 56529 in my project deployment.

Thanks in advance,

Woonsan

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



Re: redirection error due to context path after JAAS authentication with mod_proxy

2011-10-14 Thread Woonsan Ko






From: André Warnier a...@ice-sa.com
To: Tomcat Users List users@tomcat.apache.org
Sent: Wednesday, October 12, 2011 11:52 AM
Subject: Re: redirection error due to context path after JAAS authentication 
with mod_proxy

Woonsan Ko wrote:
 Hi,
 
 I have a reverse proxy configuration like this:
 
 VirtualHost *:80   ServerName localhost   ProxyPreserveHost On   ProxyPass 
 / http://localhost:8080/app1/   ProxyPassReverse / 
 http://localhost:8080/app1/   ProxyPassReverseCookiePath /app1 / 
 /VirtualHost

If it is really like above, then why are you using an Apache httpd front-end 
at all?
Would it not be easier (+ simpler, + more efficient) to just get Tomcat to 
listen on port 80 and whatever IP address Apache httpd is listening to right 
now ?

(To get exactly the same behaviour as above, you would also have to make 
app1 be the Tomcat ROOT application.)

Note: I also use a lot of setups with Apache httpd as front-end, and Tomcat as 
a back-end, and sometimes this is very practical.  At least, when the Apache 
httpd front-end is actually doing something other than forwarding the 
requests to Tomcat.
But here, it does not seem to be doing anything at all.

Yeah, actually I gave a simplified example configuration in order to show proxy 
mappings.
We have many other reasons to keep apache httpd as front-end here.
I've suggested a system administrator about deploying app to ROOT as a 
workaround, but they are not willing to do that for some reasons.

Anyway, if there's no way to customize redirection behavior after JAAS login, 
then I probably need to find a more controllable solution instead of using 
Tomcat's JAAS login feature. (Spring Security seems a good alternative which is 
filter based.)

Thanks anyway,

Woonsan








-
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



redirection error due to context path after JAAS authentication with mod_proxy

2011-10-12 Thread Woonsan Ko
Hi,

I have a reverse proxy configuration like this:

VirtualHost *:80 
  ServerName localhost 
  ProxyPreserveHost On 
  ProxyPass / http://localhost:8080/app1/ 
  ProxyPassReverse / http://localhost:8080/app1/ 
  ProxyPassReverseCookiePath /app1 / 
/VirtualHost

And, I have a form-based login configuration for JAAS authentication.
When I try log on, the redirect location (the secured resource path) after 
/j_security_check seems to be prepended by the context path, '/app1'. (e.g. 
Location: http://localhost/app1/login/resource, instead of 
http://localhost/login/resource)
I guess there will be other solutions with more sophisticated configuration for 
mod_proxy by adding more external server addresses. 
However, I'd like to avoid that if possible because the external addresses can 
be changed/added at any time.

Is there any way to customize the redirection after authentication (e.g. by 
using absolute url generation with a custom component) ?

Regards,

Woonsan

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



Re: redirection error due to context path after JAAS authentication with mod_proxy

2011-10-12 Thread Woonsan Ko




- Original Message -
 From: André Warnier a...@ice-sa.com
 To: Tomcat Users List users@tomcat.apache.org
 Cc: 
 Sent: Wednesday, October 12, 2011 11:52 AM
 Subject: Re: redirection error due to context path after JAAS authentication 
 with mod_proxy
 
 Woonsan Ko wrote:
  Hi,
 
  I have a reverse proxy configuration like this:
 
  VirtualHost *:80   ServerName localhost   ProxyPreserveHost On  
 ProxyPass / http://localhost:8080/app1/   ProxyPassReverse / 
 http://localhost:8080/app1/   ProxyPassReverseCookiePath /app1 / 
 /VirtualHost
 
 If it is really like above, then why are you using an Apache httpd front-end 
 at 
 all?
 Would it not be easier (+ simpler, + more efficient) to just get Tomcat to 
 listen on port 80 and whatever IP address Apache httpd is listening to right 
 now 
 ?

One simple strong reason is that I don't want to run tomcat by root.

Thanks,

Woonsan

 
 (To get exactly the same behaviour as above, you would also have to make 
 app1 be the Tomcat ROOT application.)
 
 Note: I also use a lot of setups with Apache httpd as front-end, and Tomcat 
 as a 
 back-end, and sometimes this is very practical.  At least, when the Apache 
 httpd 
 front-end is actually doing something other than forwarding the 
 requests to Tomcat.
 But here, it does not seem to be doing anything at all.
 
 
 -
 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: Global JNDI resource loaded from a webapp

2010-01-27 Thread Woonsan Ko
Hi Mark,

Thanks for your comments.
Please see my comments below.



- Original Message 
 From: Mark Thomas ma...@apache.org
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Tue, January 26, 2010 11:19:33 PM
 Subject: Re: Global JNDI resource loaded from a webapp
 
 On 26/01/2010 07:59, Woonsan Ko wrote:
  Does *global JNDI resource* mean that all implementation jars must be in 
 shared lib path together with the sharable interfaces?
 
 Yes.
 
  If sharable interfaces are in the shared lib path like javax.sql.DataSource 
  or 
 javax.jcr.Repository, but the real implementation of those are loaded from a 
 web 
 application, then isn't it possible to call it a global JNDI resource of 
 javax.sql.DataSource or javax.jcr.Repository?
 
 This is unlikely to work and if by some fluke it did work you will have
 a memory leak.

IMHO, if Tomcat *optionally* allows a web application context descriptor to 
define a global JNDI naming resource, then it would be very useful.
In this case, I think it's doable to manage the lifecycle of the resource to 
keep from memory leak.
This feature could give resource reloading feature in a separate classloader.


Kind regards,

Woonsan


 
 Mark
 
 -
 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



Global JNDI resource loaded from a webapp

2010-01-26 Thread Woonsan Ko
Hi All,

Is it possible to configure a global JNDI resource which is loaded from a 
webapp?
I want to keep all related libraries for the resource in a web application, not 
in shared library path, but I want the resource to be shared by other web 
applications.
The primary reason is because there are two many related jar files for the 
resource object and those can conflict other web applications if they are 
deployed onto shared library path.
Also, I could make use of reloading feature by deploying onto a web app.

Here's an example scenario:
  - In shared lib folder, minimized api jars files only are deployed. The api 
jars contains shareable interfaces or factory classes.
  - /repository webapp contains all related jar files, initializes a repository 
instance and register it into global JNDI resource by some way.
  - /cms webapp accesses the repository by JNDI to author and manage contents.
  - /site webapp accesses the repository by JNDI to provide preview websites.
  - ...

Could you please recommend me a possible solution/alternative on Tomcat?

Thanks in advance,

Woonsan



  

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



Re: Global JNDI resource loaded from a webapp

2010-01-26 Thread Woonsan Ko




- Original Message 
 From: Pid p...@pidster.com
 To: users@tomcat.apache.org
 Sent: Tue, January 26, 2010 12:21:20 PM
 Subject: Re: Global JNDI resource loaded from a webapp
 
 On 26/01/2010 10:02, Woonsan Ko wrote:
  Hi All,
 
  Is it possible to configure a global JNDI resource which is loaded from a 
 webapp?
 
 If it is defined in a webapp, it's not a global JNDI resource.
 So, no.

Does *global JNDI resource* mean that all implementation jars must be in shared 
lib path together with the sharable interfaces?
If sharable interfaces are in the shared lib path like javax.sql.DataSource or 
javax.jcr.Repository, but the real implementation of those are loaded from a 
web application, then isn't it possible to call it a global JNDI resource of 
javax.sql.DataSource or javax.jcr.Repository?

Kind regards,

Woonsan


 
 
 p
 
  I want to keep all related libraries for the resource in a web application, 
 not in shared library path, but I want the resource to be shared by other web 
 applications.
  The primary reason is because there are two many related jar files for the 
 resource object and those can conflict other web applications if they are 
 deployed onto shared library path.
  Also, I could make use of reloading feature by deploying onto a web app.
 
  Here's an example scenario:
 - In shared lib folder, minimized api jars files only are deployed. The 
  api 
 jars contains shareable interfaces or factory classes.
 - /repository webapp contains all related jar files, initializes a 
 repository instance and register it into global JNDI resource by some way.
 - /cms webapp accesses the repository by JNDI to author and manage 
 contents.
 - /site webapp accesses the repository by JNDI to provide preview 
  websites.
 - ...
 
  Could you please recommend me a possible solution/alternative on Tomcat?
 
  Thanks in advance,
 
  Woonsan
 
 
 
 
 
  -
  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