Announcement Announcement Module
Collapse
No announcement yet.
where to put Properties file and problem about war file Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • where to put Properties file and problem about war file

    Where can I put the properties file?In tomcat, we can put them in /shared/classes.But in the new platform, where can I put them?
    Secondly, I hava put a model.war file in the pickup directory, it deployed successfully, but I hava to input:
    http://localhost:8080/model in the browser to get the page, how can I config so that I just input http://localhost:8080 to get the page?

  • #2
    where to put Properties file and problem about war file

    Please hava a look.

    Comment


    • #3
      where to put Properties file and problem about war file

      > Where can I put the properties file? In tomcat, we can put them in /shared/classes.

      OSGi is based on explicit exporting and importing of packages. Thus there is no notion of a "/shared/classes" folder on the Platform.

      > But in the new platform, where can I put them?

      As I mentioned in your previous thread...

      http://www.springsource.com/beta/applicationplatform/comments.php?DiscussionID=278&page=1#Item_2

      ... "if you wish to share properties files across multiple bundles (e.g., in the case of a Shared Services WAR or Web Module), you will then need to place the properties files in a valid Java package (e.g., /com/example/config/mail.properties) and explicitly export that package from the bundle while importing it from other bundles which need the properties files in that package."

      Although this approach works, it is perhaps not the best approach. Depending on your use case, you might be better off using ConfigAdmin or exposing your own custom configuration object as a service in the OSGi Service Registry.

      > Secondly, I hava put a model.war file in the pickup directory, it deployed successfully,
      > but I hava to input: http://localhost:8080/model in the browser to get the page,
      > how can I config so that I just input http://localhost:8080 to get the page?

      This is the expected behavior and is explained in the Programmer Guide here:

      http://static.springsource.com/projects/applicationplatform/1.0.x/programmer-guide/html/ch05s02.html#developing-applications-packaging-war

      In addition, the Programmer Guide explicitly explains how to deploy a web application as the root context (i.e., "/") here:

      http://static.springsource.com/projects/applicationplatform/1.0.x/programmer-guide/html/ch05s02.html#developing-applications-packaging-web-module-headers

      Regards,

      Sam

      Comment

      Working...
      X