Giter Site home page Giter Site logo

Comments (4)

alexo avatar alexo commented on September 28, 2024

Being able to set configuration using servletContextListener is reasonable request. However, I don't understand why would you need to read the configuration anywhere else than during group processing? Can you elaborate on your use-case?

from wro4j.

julienw avatar julienw commented on September 28, 2024

In the taglib I'd like to contribute ;), I have two modes: one "production" mode and one "debug" mode. In the debug mode, you can get the unoptimized versions of your JS/CSS files. To get the unoptimized versions from the group name, we need the configuration :)

Basically, now, my taglib and also the one in wro4j-tag, we reimplement a version of the wro configuration file parser. Which is always inferior than the 'real' one, lacking many features, etc.

I think that's what the bug alf239/wro4j-tag#4 in wro4j-tag is about.

from wro4j.

alexo avatar alexo commented on September 28, 2024

Fixed in branch 1.4.x

from wro4j.

alexo avatar alexo commented on September 28, 2024

Usage:

  1. Add listener in web.xml:
<listener>
  <listener-class>ro.isdc.wro.http.WroServletContextListener</listener-class>
</listener>
  1. Access WroConfiguration or WroManagerFactory objects in any servlet:
ServletContextAttributeHelper helper = new ServletContextAttributeHelper(servletContext);
WroConfiguration config = helper.getWroConfiguration();
WroManagerFactory managerFactory = helper.getManagerFactory();

from wro4j.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.