4 Replies Latest reply on May 29, 2008 6:14 PM by antoine_h

    Images not loading inside jsp

    daedalus_hammer

      I know this has been talked about before, but:

      I modified the HelloWorldJspExample, and I want to display an image like this:

      In the war I have the resources dir and the inside it the 2.jpg file, but the image never gets displayed.

      When I acces any jsp I get this error in the console:

      16:09:22,859 ERROR [STDERR] May 25, 2008 4:09:22 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/jboss-portal-2.6.4/server/default/./deploy/jboss-portal.sar/portal-identity.sar/portal-iden
      tity.war/WEB-INF/lib2/jsf-facelets.jar!/META-INF/jsf-core.taglib.xml
      16:09:22,906 ERROR [STDERR] May 25, 2008 4:09:22 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/jboss-portal-2.6.4/server/default/./deploy/jboss-portal.sar/portal-identity.sar/portal-iden
      tity.war/WEB-INF/lib2/jsf-facelets.jar!/META-INF/jstl-core.taglib.xml
      16:09:22,906 ERROR [STDERR] May 25, 2008 4:09:22 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/jboss-portal-2.6.4/server/default/./deploy/jboss-portal.sar/portal-identity.sar/portal-iden
      tity.war/WEB-INF/lib2/jsf-facelets.jar!/META-INF/jstl-fn.taglib.xml
      16:09:22,953 ERROR [STDERR] May 25, 2008 4:09:22 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/jboss-portal-2.6.4/server/default/./deploy/jboss-portal.sar/portal-identity.sar/portal-iden
      tity.war/WEB-INF/lib2/jsf-facelets.jar!/META-INF/jsf-ui.taglib.xml
      16:09:22,968 ERROR [STDERR] May 25, 2008 4:09:22 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/jboss-portal-2.6.4/server/default/./deploy/jboss-portal.sar/portal-identity.sar/portal-iden
      tity.war/WEB-INF/lib2/jsf-facelets.jar!/META-INF/jsf-html.taglib.xml
      16:09:22,968 ERROR [STDERR] May 25, 2008 4:09:22 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/jboss-portal-2.6.4/server/default/./deploy/jboss-portal.sar/portal-identity.sar/portal-iden
      tity.war/WEB-INF/lib2/portal-faces-lib.jar!/META-INF/portal.taglib.xml
      16:09:23,531 INFO [MyfacesConfig] No context init parameter 'org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS' found, using de
      fault value true
      16:09:23,531 INFO [MyfacesConfig] Tomahawk jar not available. Autoscrolling, DetectJavascript, AddResourceClass and CheckExtensio
      nsFilter are disabled now.
      16:09:23,531 INFO [MyfacesConfig] Starting up Tomahawk on the RI-JSF-Implementation.
      16:09:23,531 INFO [MyfacesConfig] Starting up Tomahawk on the MyFaces-JSF-Implementation
      16:09:23,531 ERROR [MyfacesConfig] Both MyFaces and the RI are on your classpath. Please make sure to use only one of the two JSF-
      implementations.

      I don't need JSF at all, what jars should I delete???
      Thanks!

        • 1. Re: Images not loading inside jsp
          daedalus_hammer

          Ok, I solved the first part.... welll Micros@#it (mspaint) saves Jpeg files as JPG instead of jpg.... damn I spent hours on this....

          • 2. Re: Images not loading inside jsp
            antoine_h

            About JSF : I am quite sure that the jsf part if for the features provided for by JBoss Portal : Admin of the portal, User Admin, CMS Admin, Demo, etc...

            what is strange is that it loads the Sun-RI implementation of JSF.

            16:09:23,531 ERROR [MyfacesConfig] Both MyFaces and the RI are on your classpath. Please make sure to use only one of the two JSF-
            implementations.

            which, afaik, should not be there....

            so, you must keep at least one JSF implementation.
            but two is sure too much.

            *****
            if you want to get rid of all the JSF, you must suppress the user interface thing that are provided by JBoss Portal.
            This is possible (of course)...
            All is done in the portal so this is isolated and removable.
            but you really need to do this when you put your portal in prod.
            when in dev, those feature are sometimes usefull...

            hope it helps...

            • 3. Re: Images not loading inside jsp
              daedalus_hammer

              Well, I get 3 el-ri.jar in
              jboss-portal.sar\portal-admin.sar\portal-admin.war\WEB-INF\lib2

              jboss-portal.sar\portal-identity.sar\portal-identity.war\WEB-INF\lib2

              and
              \jboss-portal.sar\portal-wsrp.sar\portal-wsrp-admin.war\WEB-INF\lib2

              Should they be there?
              I'm clueless

              • 4. Re: Images not loading inside jsp
                antoine_h

                I would say yes :
                - they are provided by the portal, for the portal features
                - should not make any problem, as they are in the war.

                may be there is a collision with your one.... but I don't see why.

                what you may check : open these jar, look in the manifest file the version.
                check also their size.

                and with your.

                would be better they are the same version. (so the same size).