ICEmobile
  1. ICEmobile
  2. MOBI-307

JSP Resource Loading and Consolidation Strategy

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1 Final
    • Fix Version/s: 1.2 Beta
    • Component/s: Spring
    • Labels:
      None
    • Environment:
      jsp

      Description

      The resource loading strategy for JSP tags could be improved. Currently, if not using Spring MVC resource mapping the developer must manually include the needed CSS, JavaScript and image resources in the application project structure.

      The location of the various tag resources also currently lacks a standard structure. For instance, the iscroll.js resource is located under the JSF component resources, and in the ICEmobile Spring MVC demo. It would be better if there were only one location for this resource.

      We may also consider a resource loading utility servlet that could be used in straight JSP (non-Spring MVC) environments, so that users are not forced to manually include the resources in their project structure.

      It's also a bit odd that the folder name for the skins is 'org.icefaces.component.skins'. We may want to remove the ICEfaces reference here. I think 'skins' would suffice.

        Issue Links

          Activity

          Philip Breau created issue -
          Philip Breau made changes -
          Field Original Value New Value
          Assignee Steve Maryka [ steve.maryka ] Philip.breau [ philip.breau ]
          Philip Breau made changes -
          Fix Version/s 1.2 Beta [ 10344 ]
          Philip Breau made changes -
          Summary JSP Resource Loading Strategy JSP Resource Loading and Consolidation Strategy
          Philip Breau made changes -
          Link This issue blocks MOBI-260 [ MOBI-260 ]
          Philip Breau made changes -
          Comment [ In relation to MOBI-260, we should find a way to consolidate all shared resources between JSF and JSP.

          Currently, we have some duplication and overlap with the CSS resources.

          Source location
          *****************
          jsp\src\main\resources\META-INF\web-resources\org.icefaces.component.skins
          jsp\src\main\resources\META-INF\web-resources\icemobile.js
          resources\themes
          jsf\components\component\resources\org.icefaces.component.util

          Built
          *****
          CSS resources:
          icemobile-jsp.jar\META-INF\web-resources\org.icefaces.component.skins\

          icefaces-mobi.jar\META-INF\resources\org.icefaces.component.skins\

          JS resources:
          icefaces-mobi.jar\META-INF\resources\org.icefaces.component.util\
              combined.js
              component.js
              iscroll.js

          [context root]\resources\org.icefaces.component.util\
              iscroll.js

          ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #30524 Thu Aug 16 10:59:24 MDT 2012 philip.breau MOBI-307 JSP Resource Loading and Consolidation Strategy
          - add new resource servlet for jsp resource loading
          Files Changed
          Commit graph ADD /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/util
          Commit graph ADD /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/util/Constants.java
          Commit graph ADD /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/servlet
          Commit graph MODIFY /icemobile/trunk/icemobile/samples/icemobilespring/src/main/webapp/WEB-INF/web.xml
          Commit graph ADD /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/util/Util.java
          Commit graph ADD /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/servlet/ResourceServlet.java
          Commit graph MODIFY /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/tags/DeviceResourceTag.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #30525 Thu Aug 16 11:04:55 MDT 2012 philip.breau MOBI-307 JSP Resource Loading and Consolidation Strategy
          - forgot to remove some sysouts
          Files Changed
          Commit graph MODIFY /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/servlet/ResourceServlet.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #30528 Thu Aug 16 11:40:50 MDT 2012 philip.breau MOBI-307 JSP Resource Loading and Consolidation Strategy
          - for spring mvc, fetch jar resources through the default /icemobile-resources path
          Files Changed
          Commit graph MODIFY /icemobile/trunk/icemobile/samples/icemobilespring/src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml
          Hide
          Philip Breau added a comment -

          Revision: 30524
          Author: philip.breau
          Date: August-16-12 1:59:24 PM
          Message:
          MOBI-307 JSP Resource Loading and Consolidation Strategy

          • add new resource servlet for jsp resource loading

            Added : /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/servlet
            Added : /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/servlet/ResourceServlet.java
            Modified : /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/tags/DeviceResourceTag.java
            Added : /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/util
            Added : /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/util/Constants.java
            Added : /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/util/Util.java
            Modified : /icemobile/trunk/icemobile/samples/icemobilespring/src/main/webapp/WEB-INF/web.xml

          Show
          Philip Breau added a comment - Revision: 30524 Author: philip.breau Date: August-16-12 1:59:24 PM Message: MOBI-307 JSP Resource Loading and Consolidation Strategy add new resource servlet for jsp resource loading Added : /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/servlet Added : /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/servlet/ResourceServlet.java Modified : /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/tags/DeviceResourceTag.java Added : /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/util Added : /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/util/Constants.java Added : /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/util/Util.java Modified : /icemobile/trunk/icemobile/samples/icemobilespring/src/main/webapp/WEB-INF/web.xml
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #30532 Thu Aug 16 13:11:18 MDT 2012 philip.breau MOBI-307 JSP Resource Loading and Consolidation Strategy
          - fix jsp jar build to include all javascript resources
          - remove org.icemobile.resource.root paramter
          - clean up DeviceResourceTag link output
          - fix CarouselTag using a non-absolute path link (wouldn't work anywhere but the root folder)
          - remove iscroll from icemobilespring application resources
          - move icemobile.js under javascript folder
          Files Changed
          Commit graph MODIFY /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/tags/CarouselTag.java
          Commit graph ADD /icemobile/trunk/icemobile/resources/javascript
          Commit graph MODIFY /icemobile/trunk/icemobile/samples/icemobilespring/src/main/webapp/WEB-INF/web.xml
          Commit graph ADD /icemobile/trunk/icemobile/jsp/src/main/resources/META-INF/web-resources/javascript/iscroll.js
          Commit graph ADD /icemobile/trunk/icemobile/jsp/src/main/resources/META-INF/web-resources/javascript
          Commit graph DEL /icemobile/trunk/icemobile/samples/icemobilespring/src/main/webapp/resources/org.icefaces.component.util
          Commit graph ADD /icemobile/trunk/icemobile/jsp/src/main/resources/META-INF/web-resources/javascript/icemobile.js
          Commit graph MODIFY /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/util/Constants.java
          Commit graph MODIFY /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/util/Util.java
          Commit graph MODIFY /icemobile/trunk/icemobile/jsp/build.xml
          Commit graph DEL /icemobile/trunk/icemobile/jsp/src/main/resources/META-INF/web-resources/icemobile.js
          Commit graph ADD /icemobile/trunk/icemobile/resources/javascript/iscroll.js
          Commit graph MODIFY /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/servlet/ResourceServlet.java
          Commit graph MODIFY /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/tags/DeviceResourceTag.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #30533 Thu Aug 16 13:55:27 MDT 2012 philip.breau MOBI-307 JSP Resource Loading and Consolidation Strategy
          - have jsf build use the shared iscroll.js file
          Files Changed
          Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/component/build.xml
          Commit graph DEL /icemobile/trunk/icemobile/jsf/components/component/resources/org.icefaces.component.util/iscroll.js
          Commit graph DEL /icemobile/trunk/icemobile/jsf/components/component/resources/org.icefaces.component.util/iscroll-lite.js
          Hide
          Philip Breau added a comment -

          Revision: 30532
          Author: philip.breau
          Date: August-16-12 4:11:18 PM
          Message:
          MOBI-307 JSP Resource Loading and Consolidation Strategy

          • fix jsp jar build to include all javascript resources
          • remove org.icemobile.resource.root paramter
          • clean up DeviceResourceTag link output
          • fix CarouselTag using a non-absolute path link (wouldn't work anywhere but the root folder)
          • remove iscroll from icemobilespring application resources
          • move icemobile.js under javascript folder

            Modified : /icemobile/trunk/icemobile/jsp/build.xml
            Modified : /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/servlet/ResourceServlet.java
            Modified : /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/tags/CarouselTag.java
            Modified : /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/tags/DeviceResourceTag.java
            Modified : /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/util/Constants.java
            Modified : /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/util/Util.java
            Deleted : /icemobile/trunk/icemobile/jsp/src/main/resources/META-INF/web-resources/icemobile.js
            Added : /icemobile/trunk/icemobile/jsp/src/main/resources/META-INF/web-resources/javascript
            Added : /icemobile/trunk/icemobile/jsp/src/main/resources/META-INF/web-resources/javascript/icemobile.js
            Added : /icemobile/trunk/icemobile/jsp/src/main/resources/META-INF/web-resources/javascript/iscroll.js
            Added : /icemobile/trunk/icemobile/resources/javascript
            Added : /icemobile/trunk/icemobile/resources/javascript/iscroll.js
            Modified : /icemobile/trunk/icemobile/samples/icemobilespring/src/main/webapp/WEB-INF/web.xml
            Deleted : /icemobile/trunk/icemobile/samples/icemobilespring/src/main/webapp/resources/org.icefaces.component.util

          Show
          Philip Breau added a comment - Revision: 30532 Author: philip.breau Date: August-16-12 4:11:18 PM Message: MOBI-307 JSP Resource Loading and Consolidation Strategy fix jsp jar build to include all javascript resources remove org.icemobile.resource.root paramter clean up DeviceResourceTag link output fix CarouselTag using a non-absolute path link (wouldn't work anywhere but the root folder) remove iscroll from icemobilespring application resources move icemobile.js under javascript folder Modified : /icemobile/trunk/icemobile/jsp/build.xml Modified : /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/servlet/ResourceServlet.java Modified : /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/tags/CarouselTag.java Modified : /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/tags/DeviceResourceTag.java Modified : /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/util/Constants.java Modified : /icemobile/trunk/icemobile/jsp/src/main/java/org/icemobile/jsp/util/Util.java Deleted : /icemobile/trunk/icemobile/jsp/src/main/resources/META-INF/web-resources/icemobile.js Added : /icemobile/trunk/icemobile/jsp/src/main/resources/META-INF/web-resources/javascript Added : /icemobile/trunk/icemobile/jsp/src/main/resources/META-INF/web-resources/javascript/icemobile.js Added : /icemobile/trunk/icemobile/jsp/src/main/resources/META-INF/web-resources/javascript/iscroll.js Added : /icemobile/trunk/icemobile/resources/javascript Added : /icemobile/trunk/icemobile/resources/javascript/iscroll.js Modified : /icemobile/trunk/icemobile/samples/icemobilespring/src/main/webapp/WEB-INF/web.xml Deleted : /icemobile/trunk/icemobile/samples/icemobilespring/src/main/webapp/resources/org.icefaces.component.util
          Hide
          Philip Breau added a comment -

          Revision: 30533
          Author: philip.breau
          Date: August-16-12 4:55:27 PM
          Message:
          MOBI-307 JSP Resource Loading and Consolidation Strategy

          • have jsf build use the shared iscroll.js file

            Modified : /icemobile/trunk/icemobile/jsf/components/component/build.xml
            Deleted : /icemobile/trunk/icemobile/jsf/components/component/resources/org.icefaces.component.util/iscroll-lite.js
            Deleted : /icemobile/trunk/icemobile/jsf/components/component/resources/org.icefaces.component.util/iscroll.js

          Show
          Philip Breau added a comment - Revision: 30533 Author: philip.breau Date: August-16-12 4:55:27 PM Message: MOBI-307 JSP Resource Loading and Consolidation Strategy have jsf build use the shared iscroll.js file Modified : /icemobile/trunk/icemobile/jsf/components/component/build.xml Deleted : /icemobile/trunk/icemobile/jsf/components/component/resources/org.icefaces.component.util/iscroll-lite.js Deleted : /icemobile/trunk/icemobile/jsf/components/component/resources/org.icefaces.component.util/iscroll.js
          Philip Breau made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              Philip Breau
              Reporter:
              Philip Breau
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: