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.
4 replies Latest Post - ‏2012-05-10T09:35:02Z by Emily Jiang
Miljenko
Miljenko
16 Posts
ACCEPTED ANSWER

Pinned topic OSGi web application JSP reloading does not work properly?

‏2012-04-27T13:31:14Z |
Hi all,

I don't know if this is the right place to ask, but considering that it is related to OSGi container in WAS I'll post my question here.
We have a major problem with development of a OSGi web application (WAB) on WebSphere 8, because it seems that JSP reloading does not work if JSP's are inside WEB-INF. If JSP is placed in Web Content everything works OK.

Please see attached example that contains two servlets: one forwarding to index.jsp (http://<host>:<port>/test.web/ok) and one forwarding to WEB-INF/home.jsp (http://<host>:<port>/test.web/notok).

Steps to reproduce:
1. install EBA application into RAD and run it on WAS 8 (control WAS from workspace)
2. try to change index.jsp and go to http://<host>:<port>/test.web/ok-> you'll see that the change is processed immediately by WAS as JSP change and servlet for that JSP is reloaded
3. try to change WEB-INF/home.jsp and run http://<host>:<port>/test.web/notok -> change is not applied!!!

Development environment is RAD 8.0.4 and WAS 8.0.0.3.
I did not find any similar PMR for that so please check it, but I might have missed something...

Thanks,
Miljenko
Updated on 2012-05-10T09:35:02Z at 2012-05-10T09:35:02Z by Emily Jiang
  • Miljenko
    Miljenko
    16 Posts
    ACCEPTED ANSWER

    Re: OSGi web application JSP reloading does not work properly?

    ‏2012-05-09T09:52:54Z  in response to Miljenko
    Hello everyone,

    could someone from IBM be so kind to answer my question? This question is maybe related with Rational Application Developer 8.0.4 I'm currently using, therefore I might need to post my question on RAD forum...

    You have the application that can reproduce the issue and I can raise a PMR, I just need an information is this really a bug or I'm missing something...

    Thanks,
    Miljenko
    • Emily Jiang
      Emily Jiang
      73 Posts
      ACCEPTED ANSWER

      Re: OSGi web application JSP reloading does not work properly?

      ‏2012-05-09T16:00:40Z  in response to Miljenko
      Hi Miljenko,

      Sorry for the late response. The jsp files under WEB-INF or META-INF folders will not be dynamically updated. You have to restart your app to get the jsp files reloaded. Unfortunately, this is a restrication. Can you try to package your jsp files under WEB-INF/classes or WEB-INF/lib, as these folders will be dynamically loadded?

      Thanks
      Emily
      • Miljenko
        Miljenko
        16 Posts
        ACCEPTED ANSWER

        Re: OSGi web application JSP reloading does not work properly?

        ‏2012-05-10T07:30:32Z  in response to Emily Jiang
        Hi Emily,

        as I said, JSPs work properly under "Web Content" directory, and that's what we have done as a workaround (but not a pretty one).
        Can you be more specific about restrictions here, because if this restriction applies to WAB projects only, then they are not as usable as classic WAR projects?
        I'll try to put JSPs into suggested directories, but this implies that my JSPs mess up with classes or JAR's...

        Thanks,
        Miljenko
        • Emily Jiang
          Emily Jiang
          73 Posts
          ACCEPTED ANSWER

          Re: OSGi web application JSP reloading does not work properly?

          ‏2012-05-10T09:35:02Z  in response to Miljenko
          Hi Miljenko,

          Unfortunately, this is a restriction on WAB. I have noted down your feedback and see whether we can improve it in the future releases.

          Thanks
          Emily