Re: Tomcat 9.0.0-M4 seems not to start digest algorithm on JDBC Realm as did tomcat 8.0.25

2016-04-24 Thread Fabio Ricci
appreciate the sunday answer (thank you).

To say the truth: I did read the documentation and the migration guide.
But since there are no examples in 
http://tomcat.apache.org/tomcat-8.0-doc/config/credentialhandler.html, I did 
not manage to create my own implementation concreteness. That’s why I deared to 
ask the community.

Thanks
F.


> On 24 Apr 2016, at 17:31, Mark Thomas  wrote:
> 
> On 22/04/2016 23:35, Fabio Ricci wrote:
>> Dear tomcat Community
>> 
>> I am using cross context (which seems to be easy to configure but in in
>> tomcat 8 hard to run) … so today I downloaded tomcat 9 and I migrated my
>> apps to it.
>> In tomcat 9 cross context is running smoothly (thank you!)
>> 
>> To authenticate my config is using JDBCRealm with a mysql database. The
>> config below ran very well with tomcat 8 but on tomcat 9 accepted only
>> the password digests (which are stored in the table tomcat_users)
>> directly instead of the usual passwords. It seems that the digest
>> algorithm MD5 be here not executed.
> 
> Given that the digest attribute doesn't exist on the Realm in 9.0.x,
> that behaviour is as expected.
> 
> You should read the migration guide:
> 
> http://tomcat.apache.org/migration-9.html#Migrating_from_8.0.x_to_9.0.x/Internal_APIs
> 
> If you had read the 8.0.x docs, you wouldn't have been using a
> deprecated configuration option...
> 
> http://tomcat.apache.org/tomcat-8.0-doc/config/realm.html#Common_Attributes
> 
> ... you would have been using the replacement configuration option.
> 
> http://tomcat.apache.org/tomcat-8.0-doc/config/credentialhandler.html
> 
> 
> Mark
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Tomcat 9.0.0-M4 seems not to start digest algorithm on JDBC Realm as did tomcat 8.0.25

2016-04-22 Thread Fabio Ricci
Dear tomcat Community

I am using cross context (which seems to be easy to configure but in in tomcat 
8 hard to run) … so today I downloaded tomcat 9 and I migrated my apps to it.
In tomcat 9 cross context is running smoothly (thank you!)

To authenticate my config is using JDBCRealm with a mysql database. The config 
below ran very well with tomcat 8 but on tomcat 9 accepted only the password 
digests (which are stored in the table tomcat_users) directly instead of the 
usual passwords. It seems that the digest algorithm MD5 be here not executed.

The config in server.xml is

  

The authentication method is FORM for an application and DIGEST for the 
corresponding API. Both apps sees each other in a cross context.
web.xml of the application contains:


FORM
NAME

/WEB-INF/security/protected/login.jsp
/WEB-INF/security/protected/error.jsp



What shell I do in order to have with the FORM authentication again a digest 
password input? Do I have any possibility to debug it (although I should not…) ?

Thank you in advance
Regards
Fabio


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Initialise application once

2014-12-21 Thread Fabio Ricci
Yes that made it

THANK YOU very much!!!
Grazie mille!

Cheers
Fabio


Am 21.12.14 um 14:10 schrieb Alessandro Manzoni:
> Il 21.12.2014 13.38, Fabio Ricci ha scritto:
>> Dear community
>>
>> I developed a tomcat JSP servlet which - say - instantiates a class,
>> work with that class and gives some output back to the calling user
>> in the browser.
>>
>> My point is instantiating the class ***once*** for every requests
>> coming after this instantiation. The reason is: the class loads
>> several components into memory and I would like not to do this at
>> every call of this JSP servlet but just once.
>>
>> Where shell I put the initializing code for the "heavy" components?
>> Is this possible?
>>
>> Thank you very much in advance!
>> Fabio
>>
> Try putting an attribute inside the servlet contex in a lazy way, that
> will be in the scope of the whole application inside the same VM.E.g.:
> Object grosso = getServletContext().getAttribute("GROSSO");
> if (grosso == null) {
>grosso = new Grosso();
>getServletContext().setAttribute("GROSSO", grosso);
> }
> If you want to limit the scope to a single session, put the same as a
> session attribute.
>

-- 
Kind regards / Meilleures salutations / Freundliche Grüsse
/Fabio Ricci/
semweb  

Semantic Web Technologies · Records Management
Software systems · ICT coaching · ICT Projects leading  



*www.semweb.ch* <http://semweb.ch>





Weinmanngasse 26
CH-8700 Küsnacht ZH (Switzerland)





/Tel./



+41 (076) 5281961
+39 (389) 0681334

/Skype:/



*semweb-llc* <http://myskype.info/semweb-llc>

*Confidentiality Warning*: This message and any attachments are intended
only for the use of the intended recipients, are confidential and maybe
privileged. If you are not the intended recipient, you are hereby
notified that any review, retransmission, conversion to hard copy,
copying, circulation or other use of this message and any attachments is
strictly prohibited. If you are not the intended recipient, please
notify the sender immediately by return email, and delete this message
and any attachments from your system. Thank you.



signature.asc
Description: OpenPGP digital signature


Initialise application once

2014-12-21 Thread Fabio Ricci
Dear community

I developed a tomcat JSP servlet which - say - instantiates a class,
work with that class and gives some output back to the calling user in
the browser.

My point is instantiating the class ***once*** for every requests coming
after this instantiation. The reason is: the class loads several
components into memory and I would like not to do this at every call of
this JSP servlet but just once.

Where shell I put the initializing code for the "heavy" components? Is
this possible?

Thank you very much in advance!
Fabio



signature.asc
Description: OpenPGP digital signature


Re: question

2014-11-24 Thread Fabio Ricci
Hi Joe

Yes. You do not need to run apache for html and php (although it seems to me 
more practical).
For PHP you might want to have a look at 
http://php-java-bridge.sourceforge.net/pjb/

Kind regards / Meilleures salutations / Freundliche Grüsse  
Fabio Ricci
semweb  
Semantic Web Technologies · Records Management
Software systems · ICT coaching · ICT Projects leading  
www.semweb.ch

Weinmanngasse 26  
CH-8700 Küsnacht ZH (Switzerland)

Tel.

+41 (076) 5281961  
+39 (389) 0681334

Skype:

semweb-llc

Confidentiality Warning: This message and any attachments are intended only for 
the use of the intended recipients, are confidential and maybe privileged. If 
you are not the intended recipient, you are hereby notified that any review, 
retransmission, conversion to hard copy, copying, circulation or other use of 
this message and any attachments is strictly prohibited. If you are not the 
intended recipient, please notify the sender immediately by return email, and 
delete this message and any attachments from your system. Thank you.


From: Balderrama, Jose A CTR (US) 
Reply: Tomcat Users List >
Date: 24 November 2014 at 22:17:49
To: users@tomcat.apache.org >
Subject:  question  



Can tomcat run php apps and static html pages well?  
Or should I run apache as well?  


Thanks, Joe  


Re: Tomcat 8 does not start with java 8 on YOSEMITE

2014-11-24 Thread Fabio Ricci
Hi Ameer

thank you again for the link to the JDK - But I had it already installed on my 
yosemite. This JDK 8.25 has also the spoken peculiarity.
I switched to Linux - there there seem to be less peculiarities as on osx. 

:)



Kind regards / Meilleures salutations / Freundliche Grüsse  
Fabio Ricci
semweb  
Semantic Web Technologies · Records Management
Software systems · ICT coaching · ICT Projects leading  
www.semweb.ch

Weinmanngasse 26  
CH-8700 Küsnacht ZH (Switzerland)

Tel.

+41 (076) 5281961  
+39 (389) 0681334

Skype:

semweb-llc

Confidentiality Warning: This message and any attachments are intended only for 
the use of the intended recipients, are confidential and maybe privileged. If 
you are not the intended recipient, you are hereby notified that any review, 
retransmission, conversion to hard copy, copying, circulation or other use of 
this message and any attachments is strictly prohibited. If you are not the 
intended recipient, please notify the sender immediately by return email, and 
delete this message and any attachments from your system. Thank you.


From: Ameer Mawia 
Reply: Tomcat Users List >
Date: 24 November 2014 at 00:44:45
To: Tomcat Users List >
Subject:  Re: Tomcat 8 does not start with java 8 on YOSEMITE  

Hi Fabio,

There seems to be an issue with update 40 Early Access release of 
jre/jdk8(1.8.0_40). Compared with update 20 of jre/jdk8 release, you will see 
following lines of code has been added to getPlatfromMBeanServer:

            for (final PlatformManagedObject o :
                                       ExtendedPlatformComponent.getMXBeans()) {
                if (!platformMBeanServer.isRegistered(o.getObjectName())) {
                    addMXBean(platformMBeanServer, o);
                }

But if you look into the accompanied rt.jar of the jre, this newly introduced 
class(ExtendedPlatformComponent) can NO-WHERE be found.

This issue, seems to be there across all the JAVA_VERSION="1.8.0_40" EA 
release, irrespective of platform.

Your remedy is to move back to a stable release. Latest stable release seems to 
be Java SE 8u25. 

Regards,
Ameer Mawia

On Sun, Nov 23, 2014 at 4:09 AM, Fabio Ricci  wrote:
Dear tomcat community

Maybe someone did have this before (and possibly solved it)

On a mac book pro/JOSEMITE I installed Java 8 "1.8.0_40-ea" with JDK.
My $JAVA_HOME is /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home

Then I downloaded a tomcat 8 core from http://tomcat.apache.org/download-80.cgi
When I start this tomcat 8 I get the following Java exceptio - see below.

With this Java 8 also my older tomcat 7 throws the same exception.
The official oracle java test page 
(https://www.java.com/en/download/installed.jsp) says, I have already java 
uptodate.

The exception:
It seems that "sun/management/ExtendedPlatformComponent" be not part of tomcat 
8 nor java 8 ...

Does anyone have some hints for me? I cannot figure our what is wrong ...
Thank you very much in advance!

Kind regards
Fabio


PS: The exception on start (/bin/startup.sh):
22-Nov-2014 18:43:02.218 SEVERE [main] 
org.apache.tomcat.util.digester.Digester.startElement Begin event threw error
 java.lang.NoClassDefFoundError: sun/management/ExtendedPlatformComponent
    at 
java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:494)
    at 
org.apache.tomcat.util.modeler.Registry.getMBeanServer(Registry.java:443)
    at 
org.apache.catalina.mbeans.MBeanUtils.createServer(MBeanUtils.java:580)
    at org.apache.catalina.mbeans.MBeanUtils.(MBeanUtils.java:77)
    at 
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.(GlobalResourcesLifecycleListener.java:66)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    at java.lang.Class.newInstance(Class.java:442)
    at 
org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:117)
    at 
org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1184)
    at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
    at 
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
    at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343)
    at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2786)
    at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.

Re: Tomcat 8 does not start with java 8 on YOSEMITE

2014-11-23 Thread Fabio Ricci
Hi Ameer

thank you very much!

Indeed this seems to be an issue in for OS X. They just forgot to check-in the 
code ;)
I will follow your suggestion.

Linux is working fine with Java 8, tomcat 8.

Regards
Fabio


Kind regards / Meilleures salutations / Freundliche Grüsse  
Fabio Ricci
semweb  
Semantic Web Technologies · Records Management
Software systems · ICT coaching · ICT Projects leading  
www.semweb.ch

Weinmanngasse 26  
CH-8700 Küsnacht ZH (Switzerland)

Tel.

+41 (076) 5281961  
+39 (389) 0681334

Skype:

semweb-llc

Confidentiality Warning: This message and any attachments are intended only for 
the use of the intended recipients, are confidential and maybe privileged. If 
you are not the intended recipient, you are hereby notified that any review, 
retransmission, conversion to hard copy, copying, circulation or other use of 
this message and any attachments is strictly prohibited. If you are not the 
intended recipient, please notify the sender immediately by return email, and 
delete this message and any attachments from your system. Thank you.


From: Ameer Mawia 
Reply: Tomcat Users List >
Date: 24 November 2014 at 00:44:45
To: Tomcat Users List >
Subject:  Re: Tomcat 8 does not start with java 8 on YOSEMITE  

Hi Fabio,

There seems to be an issue with update 40 Early Access release of 
jre/jdk8(1.8.0_40). Compared with update 20 of jre/jdk8 release, you will see 
following lines of code has been added to getPlatfromMBeanServer:

            for (final PlatformManagedObject o :
                                       ExtendedPlatformComponent.getMXBeans()) {
                if (!platformMBeanServer.isRegistered(o.getObjectName())) {
                    addMXBean(platformMBeanServer, o);
                }

But if you look into the accompanied rt.jar of the jre, this newly introduced 
class(ExtendedPlatformComponent) can NO-WHERE be found.

This issue, seems to be there across all the JAVA_VERSION="1.8.0_40" EA 
release, irrespective of platform.

Your remedy is to move back to a stable release. Latest stable release seems to 
be Java SE 8u25. 

Regards,
Ameer Mawia

On Sun, Nov 23, 2014 at 4:09 AM, Fabio Ricci  wrote:
Dear tomcat community

Maybe someone did have this before (and possibly solved it)

On a mac book pro/JOSEMITE I installed Java 8 "1.8.0_40-ea" with JDK.
My $JAVA_HOME is /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home

Then I downloaded a tomcat 8 core from http://tomcat.apache.org/download-80.cgi
When I start this tomcat 8 I get the following Java exceptio - see below.

With this Java 8 also my older tomcat 7 throws the same exception.
The official oracle java test page 
(https://www.java.com/en/download/installed.jsp) says, I have already java 
uptodate.

The exception:
It seems that "sun/management/ExtendedPlatformComponent" be not part of tomcat 
8 nor java 8 ...

Does anyone have some hints for me? I cannot figure our what is wrong ...
Thank you very much in advance!

Kind regards
Fabio


PS: The exception on start (/bin/startup.sh):
22-Nov-2014 18:43:02.218 SEVERE [main] 
org.apache.tomcat.util.digester.Digester.startElement Begin event threw error
 java.lang.NoClassDefFoundError: sun/management/ExtendedPlatformComponent
    at 
java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:494)
    at 
org.apache.tomcat.util.modeler.Registry.getMBeanServer(Registry.java:443)
    at 
org.apache.catalina.mbeans.MBeanUtils.createServer(MBeanUtils.java:580)
    at org.apache.catalina.mbeans.MBeanUtils.(MBeanUtils.java:77)
    at 
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.(GlobalResourcesLifecycleListener.java:66)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    at java.lang.Class.newInstance(Class.java:442)
    at 
org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:117)
    at 
org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1184)
    at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
    at 
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
    at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343)
    at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2786)
    at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocu

Tomcat 8 does not start with java 8 on YOSEMITE

2014-11-22 Thread Fabio Ricci
Dear tomcat community

Maybe someone did have this before (and possibly solved it)

On a mac book pro/JOSEMITE I installed Java 8 "1.8.0_40-ea" with JDK.
My $JAVA_HOME is
/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home

Then I downloaded a tomcat 8 core from
http://tomcat.apache.org/download-80.cgi
When I start this tomcat 8 I get the following Java exceptio - see below.

With this Java 8 also my older tomcat 7 throws the same exception.
The official oracle java test page
(https://www.java.com/en/download/installed.jsp) says, I have already
java uptodate.

The exception:
It seems that "sun/management/ExtendedPlatformComponent" be not part of
tomcat 8 nor java 8 ...

Does anyone have some hints for me? I cannot figure our what is wrong ...
Thank you very much in advance!

Kind regards
Fabio


PS: The exception on start (/bin/startup.sh):
22-Nov-2014 18:43:02.218 SEVERE [main]
org.apache.tomcat.util.digester.Digester.startElement Begin event threw
error
* java.lang.NoClassDefFoundError: sun/management/ExtendedPlatformComponent*
at
java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:494)
at
org.apache.tomcat.util.modeler.Registry.getMBeanServer(Registry.java:443)
at
org.apache.catalina.mbeans.MBeanUtils.createServer(MBeanUtils.java:580)
at
org.apache.catalina.mbeans.MBeanUtils.(MBeanUtils.java:77)
at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.(GlobalResourcesLifecycleListener.java:66)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at java.lang.Class.newInstance(Class.java:442)
at
org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:117)
at
org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1184)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
at
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2786)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
at
org.apache.tomcat.util.digester.Digester.parse(Digester.java:1457)
at org.apache.catalina.startup.Catalina.load(Catalina.java:551)
at org.apache.catalina.startup.Catalina.load(Catalina.java:599)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:310)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:484)



-- 
Kind regards / Meilleures salutations / Freundliche Grüsse
/Fabio Ricci/
semweb  

Semantic Web Technologies · Records Management
Software systems · ICT coaching · ICT Projects leading  



*www.semweb.ch* <http://semweb.ch>





Weinmanngasse 26
CH-8700 Küsnacht ZH (Switzerland)





/Tel./



+41 (076) 5281961
+39 (389) 0681334

/Skype:/



*semweb-llc* <http://myskype.info/semweb-llc>

*Confidentiality Warning*: This message and any attachments are intended
only for the use of the intended recipients, are confidential and maybe
privileged. If you are not the intended recipient, you are hereby
notified that any review, retransmission, conversion to hard copy,
copying, circulation or other use of this message and any attachments is
strictly prohibited. If you are no