avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Defoort <fi...@cirquedigital.com>
Subject [merlin] embedding servlet questions..
Date Fri, 07 Nov 2003 18:22:39 GMT
Hi gang,

I'm embedding merlin into a servlet -- all seems to work well, but 
there's a couple of
remaining issues before everything is completely cleaned up:

1/ How do I get to the merlin application repository directory ? Right 
now, I'm
using a parameter in the web.xml that basically hardcodes the 
repository.. Not
very elegant, e.g. if I would distribute/commit the example into the 
sandbox,
anybody checking it out would have to manually update that link.

    <init-param>
      <param-name>merlin.repository.dir</param-name>
      <param-value>F:/home/filipdef/maven</param-value>
    </init-param>
    <init-param>
      <param-name>maven.repo.local</param-name>
      <param-value>F:/home/filipdef/maven</param-value>
    </init-param>

2/ The merlin servlet is simply a wrapper that loads a component jar -- 
should
I package that jar in the .war file or connect to a local/remote 
repository to get
to the actual component.. Currently I'm doign the equally unelegant:
     <!-- ... web.xml .... -->
    <init-param>
      <param-name>block</param-name>
      
<param-value>/WEB-INF/lib/merlin-service-tutorial-1.0.jar</param-value>
    </init-param>

     // .... MerlinServlet.java...
    String blockPath = getInitParameter( "block", "BLOCK-INF/block.xml" );
    URL block = new File( home, blockPath ).toURL();
    ContainmentModel root = m_kernel.getContainmentModel();
     root.addContainmentModel( block, conf );

Anybody any thoughts/suggestions ?

Thanks,
- Filip

PS: 30, born in Belgium, but living in Los Angeles since the last couple 
of years..


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Mime
View raw message