IC5Notice: We have upgraded developerWorks Community to the latest version of IBM Connections. For more information, read our upgrade FAQ.
Topic
  • 5 replies
  • Latest Post - ‏2004-10-15T14:55:16Z by SystemAdmin
SystemAdmin
SystemAdmin
269 Posts

Pinned topic Common CONTENT in WSAD / WAS

‏2002-07-23T20:14:22Z |
I know how to share code among Web Apps (WARS) within and EAR and between EARs,
but how do you share content. Common JSP's, common HTML, JPEGs, etc. How do
you set this up within WSAD?
Updated on 2004-10-15T14:55:16Z at 2004-10-15T14:55:16Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    269 Posts

    RE: Common CONTENT in WSAD / WAS

    ‏2002-07-23T23:35:22Z  
    Hi
    I am not sure about the JSP's, but HTML, images and other static files can be
    shared among different web applications. In the current releases of WSAD, there
    is no Web Server built-in. That would have made our lives easy 'cus we can
    deploy all our static content on the webserver and all other web applications
    running on appserver can share these resources.

    Alternatively we can create a web application with the context root and deploy
    all the static content in there. We call this as resource-only web project.
    This web project will have the context root same as the context root used for
    refering the static content. For example if all the image files are referenced
    as /web/images/xxx.jpg, we can have web as context root for the resource only
    web project and have images directory under webApplication.

    This way all the static content will be served by the resource-only web project.
    Alternatively, if you are using any other web server, you can deploy the static
    content in there and reconfigure the plugin so that it knows where to get the
    content from.
    In our organization, we are using iPlanet Web Server and we reconfigured
    obj.conf file. This file refers to plugin-cfg.xml file which will have context
    roots defined.

    If you need more information on how to configure obj.conf, I can share the
    information...

    sorry for the long reply...

    thanks
    Karun
    Updated on 2002-07-23T23:35:22Z at 2002-07-23T23:35:22Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    269 Posts

    RE: Common CONTENT in WSAD / WAS

    ‏2002-07-24T01:05:52Z  
    Russ,

    For common Java code and resources, utility jars is the normal way to share
    code between modules. WebSphere Developer Domain
    (http://www7b.boulder.ibm.com/wsdd/) has articles on what utility jars are and
    how to use them inside WebSphere Studio.
    Updated on 2002-07-24T01:05:52Z at 2002-07-24T01:05:52Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    269 Posts

    RE: Common CONTENT in WSAD / WAS

    ‏2002-07-25T19:31:58Z  
    Hi
    I am not sure about the JSP's, but HTML, images and other static files can be
    shared among different web applications. In the current releases of WSAD, there
    is no Web Server built-in. That would have made our lives easy 'cus we can
    deploy all our static content on the webserver and all other web applications
    running on appserver can share these resources.

    Alternatively we can create a web application with the context root and deploy
    all the static content in there. We call this as resource-only web project.
    This web project will have the context root same as the context root used for
    refering the static content. For example if all the image files are referenced
    as /web/images/xxx.jpg, we can have web as context root for the resource only
    web project and have images directory under webApplication.

    This way all the static content will be served by the resource-only web project.
    Alternatively, if you are using any other web server, you can deploy the static
    content in there and reconfigure the plugin so that it knows where to get the
    content from.
    In our organization, we are using iPlanet Web Server and we reconfigured
    obj.conf file. This file refers to plugin-cfg.xml file which will have context
    roots defined.

    If you need more information on how to configure obj.conf, I can share the
    information...

    sorry for the long reply...

    thanks
    Karun
    Karun, thanks for the info... When we put common content in a separate, static
    content only, Web Application project, how do we get the HTML validator to stop
    giving us broken link errors on the referencing project? I know I can turn off
    validation but I still want the validation to occur... should I just ignore
    broken link errors? Is there a way to filter them?
    Updated on 2002-07-25T19:31:58Z at 2002-07-25T19:31:58Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    269 Posts

    RE: Common CONTENT in WSAD / WAS

    ‏2002-07-25T19:31:58Z  
    Russ,

    For common Java code and resources, utility jars is the normal way to share
    code between modules. WebSphere Developer Domain
    (http://www7b.boulder.ibm.com/wsdd/) has articles on what utility jars are and
    how to use them inside WebSphere Studio.
    Tim, I mentioned in my post that I know how to do utilites / code / jars, I am
    wondering about content / HTML / images. Stuff that cannot be resolved with a
    class loader. And beyond static content, what about common JSP's?
    Updated on 2002-07-25T19:31:58Z at 2002-07-25T19:31:58Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    269 Posts

    Re: RE: Common CONTENT in WSAD / WAS

    ‏2004-10-15T14:55:16Z  
    Tim, I mentioned in my post that I know how to do utilites / code / jars, I am
    wondering about content / HTML / images. Stuff that cannot be resolved with a
    class loader. And beyond static content, what about common JSP's?
    Has anyone figured out how to do this?

    It seems like such a simple question, and it seems like it should have such a simple answer. And yet I've searched far and wide on the Web and it's always the same story. Someone asks, "How can several EARs/WARs share common JSPs?" Someone else answers, "Use utility jars." The first guy responds, "I know how to share classes, but I specifically asked about sharing JSPs." And then there's silence.

    If it's not possible to do so, I wish someone would just say so, and put the matter to rest.

    As it is, our team has 5 EARs, each of which has a WAR, and those WARs have a large number of common JSPs between them. But instead of being able to place those common JSPs in 1 common project and being able to maintain them in one place, we're forced to duplicate them in all 5 projects, and maintain all changes in all 5 different places.

    Seems pretty ridiculous, doesn't it?