Topic
4 replies Latest Post - ‏2012-05-03T13:33:30Z by djmerhar
djmerhar
djmerhar
3 Posts
ACCEPTED ANSWER

Pinned topic How do I define a virtual directory in WASCE?

‏2012-05-01T19:27:41Z |
I am face lifting an already built web application .war from WAS 6.1 to WASCE 3.0.0.1. The previous deployment relied on a virtual or symbolically linked directory in the web_app_home pointing to a directory outside the web application. So inside the app.war directory was a symlink called tagdocs that pointed to another directory on the server. This worked well and for reasons out of my control we would like to keep the data model the same. However, on WASCE out of the box this doesn't seem work. I have searched and found that you should be able to update the Tomcat deployment to look for external directories. However, WASCE isn't like a normal tomcat install and I am unclear what would need to be updated.

As an aside, this works on Tomcat 7.0.27 with symlink (locally in dev env using plain tomcat). However I have tried several instances of WASCE and none will recognize a symlinked directory. I don't know if this is a bug in the embedded Tomcat of WASCE or simply because they work differently. Any help appreciated!
-Doug
Updated on 2012-05-03T13:33:30Z at 2012-05-03T13:33:30Z by djmerhar
  • ShawnJiang
    ShawnJiang
    1 Post
    ACCEPTED ANSWER

    Re: How do I define a virtual directory in WASCE?

    ‏2012-05-02T05:04:01Z  in response to djmerhar
    In Geronimo side, a latest change[1] added the expanded war deployment support for Geronimo 3.0-beta, I guess it can solve your problem, Hope it helps.

    You can ask for a latest geronimo-beta snapshot link to try in geronimo mailing list. This change might be integrated into next CE release.

    [1]https://issues.apache.org/jira/browse/GERONIMO-6313
    • djmerhar
      djmerhar
      3 Posts
      ACCEPTED ANSWER

      Re: How do I define a virtual directory in WASCE?

      ‏2012-05-02T13:27:48Z  in response to ShawnJiang
      Thanks for the feedback. I may try that route.

      However, I did try to define the directories within the webapp itself and dynamically reference created directories. Specifically, in the Web Content folder I create a folder called tags. As the user interacts w/ the site, a new directory and file under the dir tags will get created. For simplicity it would create web_app_home/tags/dir1/tag1.tagFile. I then dynmaiclly create an anchor tag link (nothing fancy, just build the url) to link to the newly created tag file so it can be read. ie, link will be http:server:port/context_root/tags/dir1/tag1. I always get a 404.

      In summation, I can't seem to link to the directory via symlink nor within the web app. I suppose it could be a bug, but seems like something that is somewhat common?
      -Doug
      • Shawn_Jiang
        Shawn_Jiang
        154 Posts
        ACCEPTED ANSWER

        Re: How do I define a virtual directory in WASCE?

        ‏2012-05-03T10:14:45Z  in response to djmerhar
        In WASCE 3.0.0.0 or 3.0.0.1, there's no expanded app deployment, that means the application will be a packaged bundle after being deployed.

        One way to plugin your dynamical content is to add things to related runtime data location for the deployed application. (I can't remember exactly which one is.) The location is WASCE_HOME/var/catalina/work or WASCE_HOME/var/catalina/resources

        You can put your links there to have a try.
        • djmerhar
          djmerhar
          3 Posts
          ACCEPTED ANSWER

          Re: How do I define a virtual directory in WASCE?

          ‏2012-05-03T13:33:30Z  in response to Shawn_Jiang
          Thanks for further info. I didn't end up needing to try that as I was able to resolve the problem by adding the following config options in the <wasce_install_home>/etc/system.properties file:

          org.apache.geronimo.tomcat.GeronimoStandardContext.allowLinking=true
          org.apache.geronimo.webapplication.stage=development

          Not everyone can run w/ the development option but for our purposes it was fine as we are running public data and simply keep it for tracking records.