Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
5 replies Latest Post - ‏2012-12-13T16:48:57Z by Sunit
SystemAdmin
SystemAdmin
3908 Posts
ACCEPTED ANSWER

Pinned topic Apache 2.0.64 and WebSphere 6.1 integration

‏2012-12-05T16:21:56Z |
hello Everybody,

In my application we have put all jsp,servlets,images,css,js inside the WAR file and running the application
now for better performance we want to migrate all the static content like images,CSS,Java Script to Apache server keeping Dynamic content inside the WebSphere App Server
I have integrated Apache 2.0.64 and Websphere 6.1 successfully
and i have copied all the static content to Apache web Server.
currently in my JSP i am using absolute path to refer an image like below

img class=vehicle title="Vehicle" src="htttp://localho00st:XXXX/myApp/images/truck.gif"></img

any pointers will be really helpful

thanks in Advance
Updated on 2012-12-13T16:48:57Z at 2012-12-13T16:48:57Z by Sunit
  • SystemAdmin
    SystemAdmin
    3908 Posts
    ACCEPTED ANSWER

    Re: Apache 2.0.64 and WebSphere 6.1 integration

    ‏2012-12-05T16:26:17Z  in response to SystemAdmin
    hello Everybody,

    In my application we have put all jsp,servlets,images,css,js inside the WAR file and running the application
    now for better performance we want to migrate all the static content like images,CSS,Java Script to Apache server keeping Dynamic content inside the WebSphere App Server
    I have integrated Apache 2.0.64 and Websphere 6.1 successfully
    and i have copied all the static content to Apache web Server.
    currently in my JSP i am using absolute path to refer an image like below

    img class=vehicle title="Vehicle" src="htttp://localho00st:XXXX/myApp/images/truck.gif"></img

    can you guys please guide, which file/configuration should i change to make that happen

    any pointers will be really helpful

    thanks in Advance
    • Sunit
      Sunit
      194 Posts
      ACCEPTED ANSWER

      Re: Apache 2.0.64 and WebSphere 6.1 integration

      ‏2012-12-06T14:02:19Z  in response to SystemAdmin
      Referring to images, etc using absolute path is a bad idea. You should always use relative path.

      In your case you will have to edit every JSP to point to the new path used by Apache. it will have to start with something other than /myApp

      Also, when you make that change and move the images, js, etc to web server and delete them from your ear file, the application when accessed over the WAS internal ports will show those artifacts as broken links.

      • Sunit
      • SystemAdmin
        SystemAdmin
        3908 Posts
        ACCEPTED ANSWER

        Re: Apache 2.0.64 and WebSphere 6.1 integration

        ‏2012-12-11T08:59:04Z  in response to Sunit
        Thank you Sunit, that helps
        • SystemAdmin
          SystemAdmin
          3908 Posts
          ACCEPTED ANSWER

          Re: Apache 2.0.64 and WebSphere 6.1 integration

          ‏2012-12-13T13:55:47Z  in response to SystemAdmin
          Thanks for valuable info Sunit,

          but in my application i have around 400 JSP pages. editing all the JSP pages will become a new project,
          could you please tell me are there are any alternate ways? such that if the request is for image or JS or CSS
          that will be served by web Server with out changing my JSP page?
          • Sunit
            Sunit
            194 Posts
            ACCEPTED ANSWER

            Re: Apache 2.0.64 and WebSphere 6.1 integration

            ‏2012-12-13T16:48:57Z  in response to SystemAdmin
            If the decision was to NOT server images etc from the app server then that decision has to be made before the application is written.

            What is the problem with serving these artifacts from the app server? If you think this is performance issue, have you benchmarked the application to evaluate what resources (if any) you will save by moving these artifacts to the web server and compare it with the efforts to execute this project?

            • Sunit