On Tue, Feb 23, 2010 at 2:49 PM, petr kobalicek <kobalicek.p...@gmail.com>wrote:
> Hi devs,
> When I started to trying Induction I read all tutorials on website.
> Then I noticed that all classloader paths are absolute. I'm running on
> Linux and I'm currently deploying using tomcat.
> <java-class-path>
> <compiled-directory>
> <directory>absolute_path</directory>
> </compiled-directory>
> </java-class-path>
> I just removed this when I started experimenting with Induction, but
> it didn't worked. Then I added the path where netbeans deploys
> the .war archive and it started working.
You only need to use the <java-class-path> if you need Induction to
dynamically reload the classes in absolute_path. I only use the
<java-class-path> section during development. For production deployment I
omit it and Induction directly uses what ever classloader servlet container
provides.
Your question about relative paths is great one, Induction will let you put
relative paths, but I have not determined what it will be relative to! Since
it is servlet container and OS dependent. So if it not too much trouble I
would use absolute path for development, since you can remove it for
deployment.
> I also needed to change the
> URL from helloworld1 to helloworld. I'm wondering why there is such
> number '1'.
So the '1' is from the '1' in the classname for HelloWorld1Controller. If
the class is named HelloWorldController then it would be just helloworld
So question is, is there a way how to make these paths relative to
> current context? How this is solved in production?
Yes so in production, as above, just make a .war file and in the
induction-<yourapp>.xml just omit the <java-class-path> section. Other paths
in Induction such as the template file can be made relative, for example as
shown in the sample config XML <template-path> section.
Regards,
Adi
--
Acciente, LLC
Systems Architecture and Software Design
www.acciente.com
www.inductionframework.org
|
|
induction-complete-sample-config.xml
17K
Download
|