Using JSTL, taglibs and custom tags in JSP-alternative projects based on Thymeleaf, Apache Velocity, Apache...












0















I know two facts:



1) EL (later Unified EL) and taglibs (custom tag libraries, including JSTL) are used within JSP and designed specifically for use within JSP.



2) Alternatives to JSP are: Thymeleaf, Apache Velocity, Apache Freemarker, Facelets (within bigger JSF framework). Plus Struts (it is very old, but still is an "alternative").



My question is: a) is it possible and b) is it good practice to use EL and custom tags / taglibs (including JSTL) within projects using JSP alternatives, or they are JSP-specific and cannot be used outside of JSP?



I think that all those can be used in Facelets/JSF, because before Facelets JSF was JSP-based and I still can mix JSP and Facelets. But what about projects with Thymeleaf, Apache Velocity, Apache Freemarker? And Struts2?










share|improve this question























  • You can use multiple template Resolvers see stackoverflow.com/questions/28480223/…

    – user7294900
    Nov 25 '18 at 13:43
















0















I know two facts:



1) EL (later Unified EL) and taglibs (custom tag libraries, including JSTL) are used within JSP and designed specifically for use within JSP.



2) Alternatives to JSP are: Thymeleaf, Apache Velocity, Apache Freemarker, Facelets (within bigger JSF framework). Plus Struts (it is very old, but still is an "alternative").



My question is: a) is it possible and b) is it good practice to use EL and custom tags / taglibs (including JSTL) within projects using JSP alternatives, or they are JSP-specific and cannot be used outside of JSP?



I think that all those can be used in Facelets/JSF, because before Facelets JSF was JSP-based and I still can mix JSP and Facelets. But what about projects with Thymeleaf, Apache Velocity, Apache Freemarker? And Struts2?










share|improve this question























  • You can use multiple template Resolvers see stackoverflow.com/questions/28480223/…

    – user7294900
    Nov 25 '18 at 13:43














0












0








0








I know two facts:



1) EL (later Unified EL) and taglibs (custom tag libraries, including JSTL) are used within JSP and designed specifically for use within JSP.



2) Alternatives to JSP are: Thymeleaf, Apache Velocity, Apache Freemarker, Facelets (within bigger JSF framework). Plus Struts (it is very old, but still is an "alternative").



My question is: a) is it possible and b) is it good practice to use EL and custom tags / taglibs (including JSTL) within projects using JSP alternatives, or they are JSP-specific and cannot be used outside of JSP?



I think that all those can be used in Facelets/JSF, because before Facelets JSF was JSP-based and I still can mix JSP and Facelets. But what about projects with Thymeleaf, Apache Velocity, Apache Freemarker? And Struts2?










share|improve this question














I know two facts:



1) EL (later Unified EL) and taglibs (custom tag libraries, including JSTL) are used within JSP and designed specifically for use within JSP.



2) Alternatives to JSP are: Thymeleaf, Apache Velocity, Apache Freemarker, Facelets (within bigger JSF framework). Plus Struts (it is very old, but still is an "alternative").



My question is: a) is it possible and b) is it good practice to use EL and custom tags / taglibs (including JSTL) within projects using JSP alternatives, or they are JSP-specific and cannot be used outside of JSP?



I think that all those can be used in Facelets/JSF, because before Facelets JSF was JSP-based and I still can mix JSP and Facelets. But what about projects with Thymeleaf, Apache Velocity, Apache Freemarker? And Struts2?







jsp java-ee thymeleaf jsp-tags taglib






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 25 '18 at 13:39









caasdadscaasdads

1347




1347













  • You can use multiple template Resolvers see stackoverflow.com/questions/28480223/…

    – user7294900
    Nov 25 '18 at 13:43



















  • You can use multiple template Resolvers see stackoverflow.com/questions/28480223/…

    – user7294900
    Nov 25 '18 at 13:43

















You can use multiple template Resolvers see stackoverflow.com/questions/28480223/…

– user7294900
Nov 25 '18 at 13:43





You can use multiple template Resolvers see stackoverflow.com/questions/28480223/…

– user7294900
Nov 25 '18 at 13:43












1 Answer
1






active

oldest

votes


















0














Freemarker supports EL and custom tags / taglibs:




Using JSP custom tags in FTL
FreemarkerServlet puts the JspTaglibs hash into the data-model, which you can use to access JSP taglibs. The JSP custom tags will be accessible as plain user-defined directives, and the custom EL functions (since FreeMarker 2.3.22) as methods.




Also Spring moved from Velocity to FreeMarker as default template engine




Velocity Templating support was being phased out in favor of FreeMarker.




Notice also FreeMarker is no longer in incubation status in Apache projects




The FreeMarker project graduated on 2018-03-21







share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53468038%2fusing-jstl-taglibs-and-custom-tags-in-jsp-alternative-projects-based-on-thymele%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Freemarker supports EL and custom tags / taglibs:




    Using JSP custom tags in FTL
    FreemarkerServlet puts the JspTaglibs hash into the data-model, which you can use to access JSP taglibs. The JSP custom tags will be accessible as plain user-defined directives, and the custom EL functions (since FreeMarker 2.3.22) as methods.




    Also Spring moved from Velocity to FreeMarker as default template engine




    Velocity Templating support was being phased out in favor of FreeMarker.




    Notice also FreeMarker is no longer in incubation status in Apache projects




    The FreeMarker project graduated on 2018-03-21







    share|improve this answer




























      0














      Freemarker supports EL and custom tags / taglibs:




      Using JSP custom tags in FTL
      FreemarkerServlet puts the JspTaglibs hash into the data-model, which you can use to access JSP taglibs. The JSP custom tags will be accessible as plain user-defined directives, and the custom EL functions (since FreeMarker 2.3.22) as methods.




      Also Spring moved from Velocity to FreeMarker as default template engine




      Velocity Templating support was being phased out in favor of FreeMarker.




      Notice also FreeMarker is no longer in incubation status in Apache projects




      The FreeMarker project graduated on 2018-03-21







      share|improve this answer


























        0












        0








        0







        Freemarker supports EL and custom tags / taglibs:




        Using JSP custom tags in FTL
        FreemarkerServlet puts the JspTaglibs hash into the data-model, which you can use to access JSP taglibs. The JSP custom tags will be accessible as plain user-defined directives, and the custom EL functions (since FreeMarker 2.3.22) as methods.




        Also Spring moved from Velocity to FreeMarker as default template engine




        Velocity Templating support was being phased out in favor of FreeMarker.




        Notice also FreeMarker is no longer in incubation status in Apache projects




        The FreeMarker project graduated on 2018-03-21







        share|improve this answer













        Freemarker supports EL and custom tags / taglibs:




        Using JSP custom tags in FTL
        FreemarkerServlet puts the JspTaglibs hash into the data-model, which you can use to access JSP taglibs. The JSP custom tags will be accessible as plain user-defined directives, and the custom EL functions (since FreeMarker 2.3.22) as methods.




        Also Spring moved from Velocity to FreeMarker as default template engine




        Velocity Templating support was being phased out in favor of FreeMarker.




        Notice also FreeMarker is no longer in incubation status in Apache projects




        The FreeMarker project graduated on 2018-03-21








        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 25 '18 at 14:57









        user7294900user7294900

        22.8k113361




        22.8k113361
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53468038%2fusing-jstl-taglibs-and-custom-tags-in-jsp-alternative-projects-based-on-thymele%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            404 Error Contact Form 7 ajax form submitting

            How to know if a Active Directory user can login interactively

            TypeError: fit_transform() missing 1 required positional argument: 'X'