simpleweb-support Mailing List for Simple (Page 36)
Brought to you by:
niallg
You can subscribe to this list here.
2004 |
Jan
(1) |
Feb
(4) |
Mar
(2) |
Apr
(14) |
May
(22) |
Jun
(15) |
Jul
(9) |
Aug
(2) |
Sep
(7) |
Oct
(4) |
Nov
(2) |
Dec
(12) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(7) |
Feb
(16) |
Mar
(17) |
Apr
|
May
(12) |
Jun
(4) |
Jul
(22) |
Aug
(50) |
Sep
(8) |
Oct
(23) |
Nov
(9) |
Dec
(50) |
2006 |
Jan
(6) |
Feb
(7) |
Mar
(8) |
Apr
(3) |
May
(13) |
Jun
(4) |
Jul
(2) |
Aug
|
Sep
(1) |
Oct
|
Nov
(6) |
Dec
(7) |
2007 |
Jan
(11) |
Feb
(3) |
Mar
(17) |
Apr
(21) |
May
(9) |
Jun
(4) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(8) |
Nov
(14) |
Dec
(3) |
2008 |
Jan
(3) |
Feb
|
Mar
|
Apr
(5) |
May
|
Jun
|
Jul
(4) |
Aug
(4) |
Sep
(15) |
Oct
(9) |
Nov
(6) |
Dec
(2) |
2009 |
Jan
(29) |
Feb
(2) |
Mar
(8) |
Apr
(14) |
May
(4) |
Jun
(13) |
Jul
(5) |
Aug
|
Sep
|
Oct
(4) |
Nov
(3) |
Dec
(7) |
2010 |
Jan
|
Feb
(2) |
Mar
(61) |
Apr
(9) |
May
(10) |
Jun
(9) |
Jul
(10) |
Aug
(7) |
Sep
(15) |
Oct
(5) |
Nov
(2) |
Dec
(3) |
2011 |
Jan
(11) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
(4) |
Oct
|
Nov
(6) |
Dec
(9) |
2012 |
Jan
|
Feb
(1) |
Mar
(2) |
Apr
(3) |
May
(2) |
Jun
|
Jul
(17) |
Aug
|
Sep
|
Oct
|
Nov
(10) |
Dec
(5) |
2013 |
Jan
(2) |
Feb
(4) |
Mar
|
Apr
(12) |
May
|
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
(1) |
2014 |
Jan
|
Feb
(2) |
Mar
(6) |
Apr
|
May
|
Jun
(20) |
Jul
(12) |
Aug
(4) |
Sep
(3) |
Oct
(5) |
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2017 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: bagas <ba...@in...> - 2004-04-23 06:50:44
|
Hi, I have followed SIMPLE instruction making a HttpServer but how com it doent work . Look at what I have done .. package demo; import simple.http.load.MapperEngine; import simple.http.serve.HandlerFactory; import simple.http.connect.Connection; import simple.http.connect.ConnectionFactory; import java.io.IOException; import java.net.ServerSocket; public class DemoServer { public static void main(String[] list) throws IOException { MapperEngine engine = new MapperEngine(); DemoHandler handler = (DemoHandler)HandlerFactory.getInstance(engine); Connection connection = ConnectionFactory.getConnection(handler); connection.connect(new ServerSocket(80)); } } package demo; import simple.http.ProtocolHandler; import simple.http.Response; import simple.http.Request; public class DemoHandler implements ProtocolHandler { private ProtocolHandler handler; public DemoHandler(ProtocolHandler handler) { this.handler = handler; } public void handle(Request req, Response resp) { resp.set("Server", "DemoServer/1.0 (Simple)"); resp.setDate("Date", System.currentTimeMillis()); resp.setDate("Last-Modified", System.currentTimeMillis()); handler.handle(req, resp); } } Then I run it ... javaw.exe -classpath C:\j2sdk1.4.2_01\jre\lib\charsets.jar;C:\j2sdk1.4.2_01\jre\lib\jce.jar;C :\j2sdk1.4.2_01\jre\lib\jsse.jar;C:\j2sdk1.4.2_01\jre\lib\plugin.jar;C:\ j2sdk1.4.2_01\jre\lib\rt.jar;C:\j2sdk1.4.2_01\jre\lib\sunrsasign.jar;C:\ j2sdk1.4.2_01\jre\lib\ext\dnsns.jar;C:\j2sdk1.4.2_01\jre\lib\ext\ldapsec .jar;C:\j2sdk1.4.2_01\jre\lib\ext\localedata.jar;C:\j2sdk1.4.2_01\jre\li b\ext\sunjce_provider.jar;C:\gateway\simple-2.4\classes;C:\gateway\simpl e-2.4\jar\simple-2.4.jar;C:\gateway\simple-2.4\lib\velocity-1.3.1.jar demo.DemoServer java.lang.NullPointerException at simple.http.load.MapperEngine.<init>(Unknown Source) at simple.http.load.MapperEngine.<init>(Unknown Source) at simple.http.load.MapperEngine.<init>(Unknown Source) at simple.http.load.MapperEngine.<init>(Unknown Source) at demo.DemoServer.main(DemoServer.java:14) How come I get this message do I have to set Context or Path .. I am going to use Simple to make HTTPtoSMPP gateway. so I just use ProtocolHandler.handle() to receive a HTTP request and pass a SMPP Msg .. I do not need any Directory or Files to for this web server to work on ... Thank you. Rahmat Bagas Santoso |
From: berni <be...@t0...> - 2004-04-21 17:28:48
|
Hi Niall, it does not work. My Thread just continues forever... Here is my updated code: resp.set("Content-Type", "text/html"); resp.set("Connection", "close"); // resp.commit(); final PrintStream out = resp.getPrintStream(); final OutputStream out2 = resp.getOutputStream(); out.println("<html><body><h1>Hello Service</h1>"); // fill the browser cache for (int i = 0; i < 3000; i++) out.print(" "); out.print("\n"); out.flush(); new Thread(new Runnable(){ int counter = 0; public void run() { try { while (true) { out.println("Hello World #" + (++counter) + "<br>"); out.flush(); System.out.println("PRINTING.."); Thread.sleep(1000); /*if (counter == 10) { out.close(); break; }*/ } }catch(Exception e){ // .... e.printStackTrace(System.err); } } }).start(); Regards Bernhard ----- Original Message ----- From: "Niall Gallagher" <nia...@an...> To: <sim...@li...> Sent: Wednesday, April 21, 2004 12:28 PM Subject: Re: [Simpleweb-Support] Chat > Hi, > > > > Is it (technically) possible to get an exception or something if the client > > stops loading the page? > > You should be getting an exception from the OutputStream when the client > stops loading, you should be getting an IOException from the > OutputStream.write or the OutputStream.flush. Let me know if this does > not work. > > Niall > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support |
From: Niall G. <nia...@an...> - 2004-04-21 10:28:43
|
Hi, > Is it (technically) possible to get an exception or something if the client > stops loading the page? You should be getting an exception from the OutputStream when the client stops loading, you should be getting an IOException from the OutputStream.write or the OutputStream.flush. Let me know if this does not work. Niall |
From: berni <be...@t0...> - 2004-04-21 09:47:11
|
Hi Niall, thank you very much for your help. It does work now. I just had to remove the commit because that caused a NullPointerException on the next println. One more thing: Is it (technically) possible to get an exception or something if the client stops loading the page? Because I need to stop my thread then. Would also make sense for lengthy database operations - if the client is gone it does not make much sense to continue working and hogging the CPU. If I am not wrong PHP supports something like that... Thank you Bernhard ----- Original Message ----- From: "Niall Gallagher" <nia...@an...> To: <sim...@li...> Sent: Wednesday, April 21, 2004 11:25 AM Subject: Re: [Simpleweb-Support] Chat > Hi, > > This is a bug. I spotted this only a few days ago with the > MonitoredOutputStream, one workaround that will work is to set the > connection to close. For instance set your headers like so: > > resp.set("Content-Type", "text/html"); > resp.set("Connection", "close"); > resp.commit(); > > This should enable streaming to work properly. The next release of > simple (2.4.1) which I will release shortly, will address this bug. > > Niall > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support |
From: Niall G. <nia...@an...> - 2004-04-21 09:26:47
|
Hi, This is a bug. I spotted this only a few days ago with the MonitoredOutputStream, one workaround that will work is to set the connection to close. For instance set your headers like so: resp.set("Content-Type", "text/html"); resp.set("Connection", "close"); resp.commit(); This should enable streaming to work properly. The next release of simple (2.4.1) which I will release shortly, will address this bug. Niall |
From: berni <be...@t0...> - 2004-04-21 07:15:09
|
Hi! I looked at Simple and thought it would be a perfect solution to create a streaming HTML chat with it - because it does not use Servlets and because I can create a thread in the process method. I modified the HelloService, but the output appears only *after* the close has been issued, i.e. no streaming. Here is my experimental code in the process method: resp.set("Content-Type", "text/html"); out.println("<html><body><h1>Hello Service</h1>"); resp.commit(); //out.println("Hello World</body></html>"); //out.close(); new Thread(new Runnable(){ int counter = 0; public void run() { try { //service.forward(req, resp); while (true) { //final PrintStream out2 = resp.getPrintStream(); out.println("Hello World #" + (++counter) + "<br>"); out.flush(); //out.close(); resp.getOutputStream().flush(); resp.commit(); System.out.println("PRINTING.."); Thread.sleep(1000); if (counter == 10) { out.close(); break; } } }catch(Exception e){ // .... e.printStackTrace(System.err); } } }).start(); Is there any easy way to do streaming with Simple? TIA & Regards Bernhard |
From: Niall G. <nia...@an...> - 2004-03-01 09:36:13
|
Hi, Simple does support HTTP pipelines, and in fact is particularly effective with pipelines. It supporting PHTTP for both dynamic and static content. Niall |
From: Takumi F. <tru...@ya...> - 2004-03-01 05:35:30
|
Hi, Does Simple web support HTTP persistent connection? How about HTTP pipeline? Thanks. __________________________________ Do you Yahoo!? Get better spam protection with Yahoo! Mail. http://antispam.yahoo.com/tools |
From: Niall G. <nia...@an...> - 2004-02-27 10:30:13
|
Hi, >When I set the classpath in the ant junit target - I am hit with "class not found" errors. But when I export CLASSPATH I am able to get past this? What is the difference? I would like to not have to set the CLASSPATH environment variable. > The classes are loaded from a URLClassLoader which inherits the classpath of the system ClassLoader. You can specify to the LoaderEngine where to load the clases from, however the system ClassLoader should be able to cope. If you can could you provide more details as to how junit is specifying the classpath. > >When I do set the CLASSPATH - I get this error: >: simple.http.load.LoadingException: java.lang.NoSuchMethodException: com.etrade.gatewaytest.SimpleHttp.<init>(simple.http.serve.Context) > You should recompile everything and try this again, this seems to be a Java Reflection error, could you possibly attach some line numbers so I can have a look. > >As an aside - I was not able to run the example java classes with 3.2.3 - had rmi stub class not found errors. I don't know if anyone else has seen this. Also - the archive does not seem to be working. > Try the attacted ANT build file to build Simple, beware though it creates and deletes a build/ directory so if you have such a directory you sould edit this. Niall <?xml version="1.0"?> <project name="Simple" default="core" basedir="."> <target name="init"> <property name="source" value="source"/> <property name="build" value="build"/> <property name="lib" value="lib"/> <property name="jar" value="jar"/> </target> <target name="clean" depends="init"> <delete dir="${build}"/> </target> <target name="prepare" depends="clean"> <mkdir dir="${build}"/> <mkdir dir="${jar}"/> </target> <target name="core" depends="prepare"> <property name="version" value="2.3.3"/> <javac srcdir="${source}" destdir="${build}"> <classpath> <fileset dir="${lib}"> <include name="**/*.jar"/> </fileset> </classpath> </javac> <rmic classname="simple.http.load.LoaderStub" base="${build}"/> <delete includeemptydirs="true"> <fileset dir="${build}"> <exclude name="simple/http/*"/> <exclude name="simple/util/*"/> </fileset> </delete> <jar jarfile="${jar}/simple-${version}.jar" basedir="${build}"/> <delete dir="${build}"/> </target> </project> |
From: Stohrer, H. <hst...@et...> - 2004-02-26 19:31:22
|
Hi, I would like to use simpleweb as a http front end to my app so that I = can do anteater tests, or expose a simple web page for tests to be = performed. I would like to start the server from ant but am confused = about a few things. I'm using 3.2.2 (I'll explain why below). When I set the classpath in the ant junit target - I am hit with "class = not found" errors. But when I export CLASSPATH I am able to get past = this? What is the difference? I would like to not have to set the = CLASSPATH environment variable. When I do set the CLASSPATH - I get this error:=20 : simple.http.load.LoadingException: java.lang.NoSuchMethodException: = com.etrade.gatewaytest.SimpleHttp.<init>(simple.http.serve.Context) Yet I am using the same code as the Hello.java example class, with the = same constructor. public class SimpleHttp extends BasicService { public SimpleHttp (Context context) { super(context); } =20 public void process(Request req, Response resp) throws Exception { PrintStream out =3D resp.getPrintStream(); resp.set("Content-Type", "text/plain"); resp.setDate("Date", System.currentTimeMillis()); /* * Write the content body =20 */ out.println("HELLO"); out.close(); } } As an aside - I was not able to run the example java classes with 3.2.3 = - had rmi stub class not found errors. I don't know if anyone else has = seen this. Also - the archive does not seem to be working. Thanks, Horst=20 |
From: Luis N. <ln...@ne...> - 2004-02-02 21:24:38
|
On Monday 02 February 2004 15:45, Niall Gallagher wrote: >[snip] > This should work. Yes it does... thanks!! Best regards, Luis Neves |
From: Niall G. <nia...@an...> - 2004-02-02 15:44:58
|
Hi, What youll have to do is complie the remote stub for the simple.http.load.LoaderStub object. The following should work. 1) Unpack the simple.jar archive 2) Use the following command "rmic -d . simple.http.load.LoaderStub" 3) Repackage the class files with "jar -cvf simple.jar simple" This should work. Niall Luis Neves wrote: >Hi all, > >I'm trying to use the Mamba server with the latest release of Simple(2.3.2) >and I get an error: > >java.lang.ClassNotFoundException: simple.http.load.LoaderStub_Stub > >Any ideas on how to fix this? > >Regards, >Luis Neves > > >------------------------------------------------------- >The SF.Net email is sponsored by EclipseCon 2004 >Premiere Conference on Open Tools Development and Integration >See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. >http://www.eclipsecon.org/osdn >_______________________________________________ >Simpleweb-Support mailing list >Sim...@li... >https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > > > |
From: Luis N. <ln...@ne...> - 2004-01-30 18:39:11
|
Hi all, I'm trying to use the Mamba server with the latest release of Simple(2.3.2) and I get an error: java.lang.ClassNotFoundException: simple.http.load.LoaderStub_Stub Any ideas on how to fix this? Regards, Luis Neves |