RE: [Simpleweb-Support] Howto use PatternMapper?
Brought to you by:
niallg
From: Henry V. <hen...@ge...> - 2005-03-18 14:20:40
|
Hi andy i had the same problem a while ago. the solution is to implement a custom mapper and then configure it. Or extends it and when the custom files then redirect to the good class ex. MyCustomMapper implements mapper override or implement the getClass(String target) Then System.setProperty("simple.http.load.mapper", "com.MyCustomMapper"); MapperEngine engine = new MapperEngine(); Connection connection = ConnectionFactory.getConnection(engine); connection.connect(new ServerSocket(8080)); A+ -----Original Message----- From: sim...@li... [mailto:sim...@li...]On Behalf Of Andy Madigan Sent: Thursday, March 17, 2005 10:04 PM To: simpleweb Subject: [Simpleweb-Support] Howto use PatternMapper? I am currently using the following code to run a simple test server: import simple.http.connect.*; import simple.http.serve.*; import simple.http.load.*; import java.net.*; public class TestServer { public static void main(String[] list) throws Exception { MapperEngine engine = new MapperEngine(); Connection connection = ConnectionFactory.getConnection(engine); connection.connect(new ServerSocket(8080)); } } I am wondering how I can tell the MapperEngine to associate *.ssjs with a particular service. I think I would use a PatternMapper for this, but how? I would prefer to do this w/o the use of exernal files (such as a properties file). Mozilla Firefox - Fast, Secure, Powerful Web Browser Get it at www.mozilla.org for Free! Firefox Users - Put Firefox in your tagline/signature! ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Simpleweb-Support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simpleweb-support |