4 Replies Latest reply on Feb 13, 2004 2:36 PM by unngh

    Theme creation and images in that theme

    stallion

      I have an Eclipse project that is creating a new theme.

      That theme has some images.

      When i bundle the images /com/test/images/a.gif with the /come/test/testtheme.java in a .sar jar, i cant find the images in the html.

      I noticed that the nukes-lib.jar has all the images of the themes currently.
      Do i have to add my images to that jar or am i doing something wrong in the creation of that .sar jar?

        • 1. Re: Theme creation and images in that theme
          cnwalter

          No,you no neet to add your images to that .jar.
          You can add these files in your jar files for it use the module name to support the web path.

          "stallion" wrote:
          I have an Eclipse project that is creating a new theme.

          That theme has some images.

          When i bundle the images /com/test/images/a.gif with the /come/test/testtheme.java in a .sar jar, i cant find the images in the html.

          I noticed that the nukes-lib.jar has all the images of the themes currently.
          Do i have to add my images to that jar or am i doing something wrong in the creation of that .sar jar?


          • 2. Re: Theme creation and images in that theme
            mcscottmc

            stallion:
            You can just drop your images directly into the sar, you do not have to have a jar within the sar. If you do put them in a jar, you probably need to add that jar as a classpath in the META-INF/Manifest.mf of the sar. For example:

            Class-Path: ./image-lib.jar

            would be the last line of the Manifest.mf in your sar file.

            Also, in your html make sure you are referencing your resources correctly. The url for an image should be:

            themes/yourtheme/images/yourimage.gif

            -Scott

            • 3. Re: Theme creation and images in that theme
              unngh

              Hello,

              I am having trouble with my image paths and I am not sure how to trouble shoot it. I am finding that when I place an image for my theme in org/jboss/nukes/core/themes/seabreeze/images/ (in nuke-lib.jar in nukes.ear) I can access the image by its url, but if I put the same image in org/jboss/nukes/core/themes/mytheme/images/ it will not display.

              I noticed that a runtime error "javax.management.InstanceNotFoundException: nukes.themes:name=mytheme is not registered." is generated if my theme has not been deployed. However when the theme is deployed, no errors are generated.

              I have tried placing the image files in my theme.sar under the org/jboss/nukes/core/themes/mytheme/images/ path, as well as the com/myCo/nukes/themes/mytheme/images/ and the themes/mytheme/images/

              I have also tried placing the images in a .jar and making the changes to the Manifest.mf as in the post above.

              I am running jboss-3.2.3 with nukes-1.0.0RC1, the only custom code I have is in my com/myCo/nukes/MyTheme.java

              Any help appreciated.

              Thanks,

              • 4. Re: Theme creation and images in that theme
                unngh

                Hello,

                I fixed my own problem with this.

                I manually deleted all of the files in the tmp/deploy folder. I also found and deleted a copy of nukes-lib.jar from default/deploy folder, then placed all of the images in the com/myco/nukes/images folder.

                My troubleshooting led me to discovering what might be a security flaw. I posted a sepeate message for it.

                http://www.jboss.org/index.html?module=bb&op=viewtopic&t=45501