[rules-users] how to provide a relative path using file: in change-set and FileResource

Esteban Aliverti esteban.aliverti at gmail.com
Mon Jan 18 13:12:50 EST 2010


HTTP access is an option?

On Mon, Jan 18, 2010 at 1:21 PM, Pritam <infinity2heaven at gmail.com> wrote:

>
> classpath works only if the files are under WEB-INF/classes. In my case,
> the
> files are directly under the WebRoot.
>
> Any suggestions?
>
>
> SteveR685 wrote:
> >
> > Pritam,
> >
> > Try using "classpath:" instead of "file:".  I've only used this when
> > specifying the entire relative path to the file, I'm not sure about
> > referencing a directory.
> >
> > <change-set xmlns='http://drools.org/drools-5.0/change-set'
> >              xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
> >  xs:schemaLocation='http://drools.org/drools-5.0/change-set.xsd'
> >    <add>
> >        <resource source='classpath:rules/...' type='DRL' />
> >    </add>
> > </change-set>
> >
> > Steve Ronderos
> >
> > rules-users-bounces at lists.jboss.org wrote on 01/15/2010 09:27:05 AM:
> >
> >> [image removed]
> >>
> >> [rules-users] how to provide a relative path using file: in change-
> >> set and FileResource
> >>
> >> Pritam
> >>
> >> to:
> >>
> >> rules-users
> >>
> >> 01/15/2010 09:35 AM
> >>
> >> Sent by:
> >>
> >> rules-users-bounces at lists.jboss.org
> >>
> >> Please respond to Rules Users List
> >>
> >>
> >> Consider a change-set.xml,
> >>
> >> <change-set xmlns='http://drools.org/drools-5.0/change-set'
> >>              xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
> >> xs:schemaLocation='http://drools.org/drools-5.0/change-set.xsd'
> >> >
> >>    <add>
> >>        <resource source='file:rules/' type='DRL' />
> >>    </add>
> >> </change-set>
> >>
> >> I have a rules folder under WebRoot in my web application but the above
> >> source url doesn't work as I get a
> >>  java.net.UnknownHostException: rules
> >>
> >> The same is true while providing a file path resource using
> >> ResourceFactory.newFileResource("path");
> >>
> >> In Spring, one can provide ant-path style regular expressions and it
> > looks
> >> on a relative path. Is there something similar for drools?
> >> --
> >> View this message in context: http://n3.nabble.com/how-to-provide-a-
> >>
> >
> relative-path-using-file-in-change-set-and-FileResource-tp122036p122036.html
> >> Sent from the Drools - User mailing list archive at Nabble.com.
> >> _______________________________________________
> >> rules-users mailing list
> >> rules-users at lists.jboss.org
> >> https://lists.jboss.org/mailman/listinfo/rules-users
> >
> > _______________________________________________
> > rules-users mailing list
> > rules-users at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
> >
>
> --
> View this message in context:
> http://n3.nabble.com/how-to-provide-a-relative-path-using-file-in-change-set-and-FileResource-tp122036p126125.html
> Sent from the Drools - User mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



-- 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Esteban Aliverti
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100118/61987b1b/attachment.html 


More information about the rules-users mailing list