Re: [Simpleweb-Support] Problem of trying simple
Brought to you by:
niallg
From: Niall G. <gal...@ya...> - 2005-10-04 11:14:21
|
Hi Carfield, --- Carfield Yim <car...@ca...> wrote: > So... how about this one? possible? > > > Anywhere within the context root the current > working > > directory or anywhere the Locator can reach. Look > at > > simple.http.serve.FileLocator. > > > > > System.setProperty("simple.http.load.mapper","simple.http.load.PatternMapper"); > > > > > > To set the mapper using, but how can I change > the > > > resolve properties > > > that mapper.xml tell the system? > > > > Edit the mapper.xml file, its loaded once on > startup. > > > I would like to package the software as a java web > start application, > in order to make the process easier, I will like to > prevent config > file as much as possible. In fact, there is only one > ActionService so > I would like to tell simple to that ActionService at > code but not in > XML file, is it possible? You can create your own Mapper object to return the name of your ActionService implementation. For example: public class MyMapper implements Mapper { public MyMapper(Context context){} public String getClass(String name) { return "mypackage.MyActionService"; } public String getPath(String target) { return target; } public String getName(String target) { return "myName"; } } This should work if you only need one service. Niall Niall Gallagher __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com |