Re: [uportal-dev] Thoughts on Tomcat setting development mode to false in web.xml

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [uportal-dev] Thoughts on Tomcat setting development mode to false in web.xml

Jackson, Allan

That seems like it would severely hamper development with standard hot-reloading type technologies. What if it was added as development=true and then documented as an optional performance tweak when deploying to production?

 

Allan

 

From: <[hidden email]> on behalf of Aaron Grant <[hidden email]>
Date: Friday, June 21, 2019 at 12:45 PM
To: uPortal Developers <[hidden email]>
Subject: [uportal-dev] Thoughts on Tomcat setting development mode to false in web.xml

 

I we just had a course on Tomcat at OU one of the things the instructor saw in uPortal that suggested against was having development mode on. This allows for Jasper to look for live updates to JSP every 4 seconds and then if it finds one recompile the JSP file to a class file in the work directory. This is nice for development, however for production use shouldn't really be done, especially on a code base as large as ours. 

 

From an implementor point of view OU uses it on occasion (maybe 2 or 3 times at year) for quick hot patches before we do a formal release and take the uPortal service down. However I could see the benefits of reducing scanning over hot patching for performance improvements.

 

To add this we'd need to add the Tomcat default web.xml into https://github.com/Jasig/uPortal-start/tree/master/etc/tomcat/conf/web.xml

 

This is an example of what use in MySAIL (I'd suggest also we adopt xpoweredBy in uPortal proper also to suppress what version of Tomcat we are using on error pages, etc.)

 

    <servlet>
        <servlet-name>jsp</servlet-name>
        <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>

        <init-param>
            <param-name>development</param-name>
            <param-value>false</param-value>
        </init-param>
        <init-param>
            <param-name>fork</param-name>
            <param-value>false</param-value>
        </init-param>
        <init-param>
            <param-name>xpoweredBy</param-name>
            <param-value>false</param-value>
        </init-param>
        <load-on-startup>3</load-on-startup>
    </servlet>

 

  • development - Is Jasper used in development mode? If true, the frequency at which JSPs are checked for modification may be specified via the modificationTestInterval parameter.true or false, default true.

If everyone think this is okay, I can pull together a PR to add these changes to uportal-start and upgrade to Tomcat 8.5.42 while I'm at it.

 

Thanks,

Aaron

--

Aaron Grant
Associate Director Emerging Technology
Oakland University - UTS

 

--
You received this message because you are subscribed to the Google Groups "uPortal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/uportal-dev/CAOsfLuT4m%3D-6976HibETBhJgksRqK5YYMsEZYwN_mahMaJ_LnA%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "uPortal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/uportal-dev/8223CAC5-F3D0-4220-90EA-9627D44B09F0%40ku.edu.
Reply | Threaded
Open this post in threaded view
|

Re: [uportal-dev] Thoughts on Tomcat setting development mode to false in web.xml

Benito J. Gonzalez-2
Hmm, we are running into cases where we want to configure Tomcat differently between dev, test, and prod. We should at least add a doc on "Tuning Tomcat for uPortal".

We are currently suggesting a shell script to run that defines system properties. Then, in setenv.sh/.bat, those properties are picked up and passed to Tomcat for substitution in the config files.

I might want to extend this to using setenv to load different "cluster" files (e.g. dev.sh, test.sh) based on a system value, like UP_CLUSTER ...?

Best,
--bjagg


From: "Aaron Grant" <[hidden email]>
To: "uPortal Developers" <[hidden email]>
Sent: Friday, June 21, 2019 10:45:24 AM
Subject: [uportal-dev] Thoughts on Tomcat setting development mode to false in web.xml

I we just had a course on Tomcat at OU one of the things the instructor saw in uPortal that suggested against was having development mode on. This allows for Jasper to look for live updates to JSP every 4 seconds and then if it finds one recompile the JSP file to a class file in the work directory. This is nice for development, however for production use shouldn't really be done, especially on a code base as large as ours. 
From an implementor point of view OU uses it on occasion (maybe 2 or 3 times at year) for quick hot patches before we do a formal release and take the uPortal service down. However I could see the benefits of reducing scanning over hot patching for performance improvements.

To add this we'd need to add the Tomcat default web.xml into https://github.com/Jasig/uPortal-start/tree/master/etc/tomcat/conf/web.xml

This is an example of what use in MySAIL (I'd suggest also we adopt xpoweredBy in uPortal proper also to suppress what version of Tomcat we are using on error pages, etc.)

    <servlet>
        <servlet-name>jsp</servlet-name>
        <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
        <init-param>
            <param-name>development</param-name>
            <param-value>false</param-value>
        </init-param>
        <init-param>
            <param-name>fork</param-name>
            <param-value>false</param-value>
        </init-param>
        <init-param>
            <param-name>xpoweredBy</param-name>
            <param-value>false</param-value>
        </init-param>
        <load-on-startup>3</load-on-startup>
    </servlet>

  • development - Is Jasper used in development mode? If true, the frequency at which JSPs are checked for modification may be specified via the modificationTestInterval parameter.true or false, default true.
If everyone think this is okay, I can pull together a PR to add these changes to uportal-start and upgrade to Tomcat 8.5.42 while I'm at it.

Thanks,
Aaron
--
Aaron Grant
Associate Director Emerging Technology
Oakland University - UTS

--
You received this message because you are subscribed to the Google Groups "uPortal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/uportal-dev/CAOsfLuT4m%3D-6976HibETBhJgksRqK5YYMsEZYwN_mahMaJ_LnA%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "uPortal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/uportal-dev/1420986909.3664870.1561140670299.JavaMail.zimbra%40unicon.net.
Reply | Threaded
Open this post in threaded view
|

Re: [uportal-dev] Thoughts on Tomcat setting development mode to false in web.xml

Aaron Grant
What we end up doing is putting our production configs into master. When we develop locally we have overlays that we place onto the repo to allow us to developer faster on uPortal. I like the idea of different system properties and bringing those in. Also we are working on a tuning doc internally for all Tomcat applications (Spring Boot and regular Tomcat monoliths), might be something we can share. uPortal sort of has one, although it could use some updates: https://github.com/Jasig/uPortal-start/blob/master/docs/en/tomcat/README.md I think maybe two new docs would be helpful, security hardening and performance tuning.

On Fri, Jun 21, 2019 at 2:11 PM Benito Gonzalez <[hidden email]> wrote:
Hmm, we are running into cases where we want to configure Tomcat differently between dev, test, and prod. We should at least add a doc on "Tuning Tomcat for uPortal".

We are currently suggesting a shell script to run that defines system properties. Then, in setenv.sh/.bat, those properties are picked up and passed to Tomcat for substitution in the config files.

I might want to extend this to using setenv to load different "cluster" files (e.g. dev.sh, test.sh) based on a system value, like UP_CLUSTER ...?

Best,
--bjagg


From: "Aaron Grant" <[hidden email]>
To: "uPortal Developers" <[hidden email]>
Sent: Friday, June 21, 2019 10:45:24 AM
Subject: [uportal-dev] Thoughts on Tomcat setting development mode to false in web.xml

I we just had a course on Tomcat at OU one of the things the instructor saw in uPortal that suggested against was having development mode on. This allows for Jasper to look for live updates to JSP every 4 seconds and then if it finds one recompile the JSP file to a class file in the work directory. This is nice for development, however for production use shouldn't really be done, especially on a code base as large as ours. 
From an implementor point of view OU uses it on occasion (maybe 2 or 3 times at year) for quick hot patches before we do a formal release and take the uPortal service down. However I could see the benefits of reducing scanning over hot patching for performance improvements.

To add this we'd need to add the Tomcat default web.xml into https://github.com/Jasig/uPortal-start/tree/master/etc/tomcat/conf/web.xml

This is an example of what use in MySAIL (I'd suggest also we adopt xpoweredBy in uPortal proper also to suppress what version of Tomcat we are using on error pages, etc.)

    <servlet>
        <servlet-name>jsp</servlet-name>
        <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
        <init-param>
            <param-name>development</param-name>
            <param-value>false</param-value>
        </init-param>
        <init-param>
            <param-name>fork</param-name>
            <param-value>false</param-value>
        </init-param>
        <init-param>
            <param-name>xpoweredBy</param-name>
            <param-value>false</param-value>
        </init-param>
        <load-on-startup>3</load-on-startup>
    </servlet>

  • development - Is Jasper used in development mode? If true, the frequency at which JSPs are checked for modification may be specified via the modificationTestInterval parameter.true or false, default true.
If everyone think this is okay, I can pull together a PR to add these changes to uportal-start and upgrade to Tomcat 8.5.42 while I'm at it.

Thanks,
Aaron
--
Aaron Grant
Associate Director Emerging Technology
Oakland University - UTS

--
You received this message because you are subscribed to the Google Groups "uPortal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/uportal-dev/CAOsfLuT4m%3D-6976HibETBhJgksRqK5YYMsEZYwN_mahMaJ_LnA%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "uPortal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/uportal-dev/1420986909.3664870.1561140670299.JavaMail.zimbra%40unicon.net.


--
Aaron Grant
Associate Director Emerging Technology
Oakland University - UTS

--
You received this message because you are subscribed to the Google Groups "uPortal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/uportal-dev/CAOsfLuTMfbeYSS-x64QO%3DfJkV%2B7OGYhfB6xw%2Bbig-c4UspWmAg%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: [uportal-dev] Thoughts on Tomcat setting development mode to false in web.xml

Benito J. Gonzalez-2
++1


From: "Aaron Grant" <[hidden email]>
To: "Benito Gonzalez" <[hidden email]>
Cc: "uPortal Developers" <[hidden email]>
Sent: Friday, June 21, 2019 11:17:45 AM
Subject: Re: [uportal-dev] Thoughts on Tomcat setting development mode to false in web.xml

What we end up doing is putting our production configs into master. When we develop locally we have overlays that we place onto the repo to allow us to developer faster on uPortal. I like the idea of different system properties and bringing those in. Also we are working on a tuning doc internally for all Tomcat applications (Spring Boot and regular Tomcat monoliths), might be something we can share. uPortal sort of has one, although it could use some updates: https://github.com/Jasig/uPortal-start/blob/master/docs/en/tomcat/README.md I think maybe two new docs would be helpful, security hardening and performance tuning.

On Fri, Jun 21, 2019 at 2:11 PM Benito Gonzalez <[hidden email]> wrote:
Hmm, we are running into cases where we want to configure Tomcat differently between dev, test, and prod. We should at least add a doc on "Tuning Tomcat for uPortal".

We are currently suggesting a shell script to run that defines system properties. Then, in setenv.sh/.bat, those properties are picked up and passed to Tomcat for substitution in the config files.

I might want to extend this to using setenv to load different "cluster" files (e.g. dev.sh, test.sh) based on a system value, like UP_CLUSTER ...?

Best,
--bjagg


From: "Aaron Grant" <[hidden email]>
To: "uPortal Developers" <[hidden email]>
Sent: Friday, June 21, 2019 10:45:24 AM
Subject: [uportal-dev] Thoughts on Tomcat setting development mode to false in web.xml

I we just had a course on Tomcat at OU one of the things the instructor saw in uPortal that suggested against was having development mode on. This allows for Jasper to look for live updates to JSP every 4 seconds and then if it finds one recompile the JSP file to a class file in the work directory. This is nice for development, however for production use shouldn't really be done, especially on a code base as large as ours. 
From an implementor point of view OU uses it on occasion (maybe 2 or 3 times at year) for quick hot patches before we do a formal release and take the uPortal service down. However I could see the benefits of reducing scanning over hot patching for performance improvements.

To add this we'd need to add the Tomcat default web.xml into https://github.com/Jasig/uPortal-start/tree/master/etc/tomcat/conf/web.xml

This is an example of what use in MySAIL (I'd suggest also we adopt xpoweredBy in uPortal proper also to suppress what version of Tomcat we are using on error pages, etc.)

    <servlet>
        <servlet-name>jsp</servlet-name>
        <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
        <init-param>
            <param-name>development</param-name>
            <param-value>false</param-value>
        </init-param>
        <init-param>
            <param-name>fork</param-name>
            <param-value>false</param-value>
        </init-param>
        <init-param>
            <param-name>xpoweredBy</param-name>
            <param-value>false</param-value>
        </init-param>
        <load-on-startup>3</load-on-startup>
    </servlet>

  • development - Is Jasper used in development mode? If true, the frequency at which JSPs are checked for modification may be specified via the modificationTestInterval parameter.true or false, default true.
If everyone think this is okay, I can pull together a PR to add these changes to uportal-start and upgrade to Tomcat 8.5.42 while I'm at it.

Thanks,
Aaron
--
Aaron Grant
Associate Director Emerging Technology
Oakland University - UTS

--
You received this message because you are subscribed to the Google Groups "uPortal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/uportal-dev/CAOsfLuT4m%3D-6976HibETBhJgksRqK5YYMsEZYwN_mahMaJ_LnA%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "uPortal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/uportal-dev/1420986909.3664870.1561140670299.JavaMail.zimbra%40unicon.net.


--
Aaron Grant
Associate Director Emerging Technology
Oakland University - UTS

--
You received this message because you are subscribed to the Google Groups "uPortal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/uportal-dev/CAOsfLuTMfbeYSS-x64QO%3DfJkV%2B7OGYhfB6xw%2Bbig-c4UspWmAg%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "uPortal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/uportal-dev/741196719.3675020.1561147948605.JavaMail.zimbra%40unicon.net.
Reply | Threaded
Open this post in threaded view
|

Re: [uportal-dev] Thoughts on Tomcat setting development mode to false in web.xml

Christian Cousquer
++1

Le ven. 21 juin 2019 à 22:12, Benito Gonzalez <[hidden email]> a écrit :
++1


From: "Aaron Grant" <[hidden email]>
To: "Benito Gonzalez" <[hidden email]>
Cc: "uPortal Developers" <[hidden email]>
Sent: Friday, June 21, 2019 11:17:45 AM
Subject: Re: [uportal-dev] Thoughts on Tomcat setting development mode to false in web.xml

What we end up doing is putting our production configs into master. When we develop locally we have overlays that we place onto the repo to allow us to developer faster on uPortal. I like the idea of different system properties and bringing those in. Also we are working on a tuning doc internally for all Tomcat applications (Spring Boot and regular Tomcat monoliths), might be something we can share. uPortal sort of has one, although it could use some updates: https://github.com/Jasig/uPortal-start/blob/master/docs/en/tomcat/README.md I think maybe two new docs would be helpful, security hardening and performance tuning.

On Fri, Jun 21, 2019 at 2:11 PM Benito Gonzalez <[hidden email]> wrote:
Hmm, we are running into cases where we want to configure Tomcat differently between dev, test, and prod. We should at least add a doc on "Tuning Tomcat for uPortal".

We are currently suggesting a shell script to run that defines system properties. Then, in setenv.sh/.bat, those properties are picked up and passed to Tomcat for substitution in the config files.

I might want to extend this to using setenv to load different "cluster" files (e.g. dev.sh, test.sh) based on a system value, like UP_CLUSTER ...?

Best,
--bjagg


From: "Aaron Grant" <[hidden email]>
To: "uPortal Developers" <[hidden email]>
Sent: Friday, June 21, 2019 10:45:24 AM
Subject: [uportal-dev] Thoughts on Tomcat setting development mode to false in web.xml

I we just had a course on Tomcat at OU one of the things the instructor saw in uPortal that suggested against was having development mode on. This allows for Jasper to look for live updates to JSP every 4 seconds and then if it finds one recompile the JSP file to a class file in the work directory. This is nice for development, however for production use shouldn't really be done, especially on a code base as large as ours. 
From an implementor point of view OU uses it on occasion (maybe 2 or 3 times at year) for quick hot patches before we do a formal release and take the uPortal service down. However I could see the benefits of reducing scanning over hot patching for performance improvements.

To add this we'd need to add the Tomcat default web.xml into https://github.com/Jasig/uPortal-start/tree/master/etc/tomcat/conf/web.xml

This is an example of what use in MySAIL (I'd suggest also we adopt xpoweredBy in uPortal proper also to suppress what version of Tomcat we are using on error pages, etc.)

    <servlet>
        <servlet-name>jsp</servlet-name>
        <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
        <init-param>
            <param-name>development</param-name>
            <param-value>false</param-value>
        </init-param>
        <init-param>
            <param-name>fork</param-name>
            <param-value>false</param-value>
        </init-param>
        <init-param>
            <param-name>xpoweredBy</param-name>
            <param-value>false</param-value>
        </init-param>
        <load-on-startup>3</load-on-startup>
    </servlet>

  • development - Is Jasper used in development mode? If true, the frequency at which JSPs are checked for modification may be specified via the modificationTestInterval parameter.true or false, default true.
If everyone think this is okay, I can pull together a PR to add these changes to uportal-start and upgrade to Tomcat 8.5.42 while I'm at it.

Thanks,
Aaron
--
Aaron Grant
Associate Director Emerging Technology
Oakland University - UTS

--
You received this message because you are subscribed to the Google Groups "uPortal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/uportal-dev/CAOsfLuT4m%3D-6976HibETBhJgksRqK5YYMsEZYwN_mahMaJ_LnA%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "uPortal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/uportal-dev/1420986909.3664870.1561140670299.JavaMail.zimbra%40unicon.net.


--
Aaron Grant
Associate Director Emerging Technology
Oakland University - UTS

--
You received this message because you are subscribed to the Google Groups "uPortal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/uportal-dev/CAOsfLuTMfbeYSS-x64QO%3DfJkV%2B7OGYhfB6xw%2Bbig-c4UspWmAg%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "uPortal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/uportal-dev/741196719.3675020.1561147948605.JavaMail.zimbra%40unicon.net.

--
You received this message because you are subscribed to the Google Groups "uPortal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/uportal-dev/CABXcw2UB-HLheqy2-pcOOtx0Dj0u6EfBz11FYPq0ezLMhm9Y9w%40mail.gmail.com.