simpleweb-support Mailing List for Simple (Page 23)
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: Niall G. <gal...@ya...> - 2006-05-09 16:22:31
|
Hi Brian, If you are talking about the MapperEngine then your best bet is to download the demo. It has a configured MapperEngine running. The Mapper.xml configuration has two blocks, one is for loading Services and another is for mapping those services to a path pattern. So for example <lookup> <service name="instance-name" type="class-name"> <property key="some-key">some-value</property> <!-- etc.. as many properties as needed --> </service> </lookup> <resolve> <match path="/some/path/*" name="instance-name"/> </resolve> Now when the mapper engine is asked for /some/path/index.html it will load an initialize the service named instance-name of type class-name. To see this in action, its best to download the demo package at: http://www.simpleframework.org/download/ Hope this helps, Niall --- Brian McCallister <br...@ap...> wrote: > Are there any docs for the mapping stuff? All I can > find is embedding > information (and osmehting I wrote a few years ago)! > > -Brian > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support > web services, security? > Get stuff done quickly with pre-integrated > technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 > based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > Niall Gallagher __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
From: Brian M. <br...@ap...> - 2006-05-09 16:15:45
|
Are there any docs for the mapping stuff? All I can find is embedding information (and osmehting I wrote a few years ago)! -Brian |
From: Dennis W. <de...@gu...> - 2006-04-10 23:10:20
|
Hi Niall, I downloaded release 3.1 and release 2.7 and followed your advice about putting the insert(String, String) method back in. I created a patch file enclosed. Hopefully it's helpfull. The new class compiles and seems to work for basic cases. I guess I have to access the list of values via Parameters String[] getParameters(String) method? I have been using the convenience method Request String getParameter(String), so I will have to rewrite some to prove it works %100. Thanks, Dennis On Thursday 23 March 2006 09:14, Niall Gallagher wrote: > Hi Dennis, > > The Parameters object used to have a getParameters() > method that returned multiple values for a single > name. I removed it some time ago. I had been meaning > to add it back, however I have not got around to it. > Take a look at release 2.6 and you'll see the code for > it in ParameterParser.insert. You can just plug this > in, ill try to add this feature back. > > Niall > > --- Dennis Watson <de...@gu...> wrote: > > Hi Carfield, > > > > On Wednesday 22 March 2006 19:57, Carfield Yim > > > > wrote: > > > May be use Request.getParameters() that return > > > > Parameters ?? > > > > That will return a Parameters object with all of the > > CGI variables, but I > > don't think it helps in this case. I need to handle > > CGI variables with > > multiple values, not just multiple CGI variables. > > > > Consider what happens when you are receiving data > > from a form with check boxes > > on it. You will have a single CGI variable with > > multiple values (one for > > each box checked). The servlet spec has the method > > String[] > > getParameterValues() to deal with such cases, but I > > don't see this for > > Simple. > > > > > > Dennis > > > > > On 3/23/06, Dennis Watson <de...@gu...> wrote: > > > > Hi, > > > > > > > > I need to handle URLs with multiple values for > > > > the same CGI variable such > > > > > > as: > > > > > > > > http://simple.server.com?a=1&a=2&a=3 > > > > > > > > According to the Simple documentation the > > > > Parameters interface "follows > > > > > > the parameter methods found in the Java Servlet > > > > API Specification." This > > > > > > means I should be able to get multiple values > > > > out using the > > > > > > getParameterValues like so: > > > > > > > > String[] a = req.getParameterValues("a"); > > > > > > > > But I don't see this method in the Simple > > > > javadoc and it breaks when I > > > > > > try and complie my program with this method. > > > > > > > > How can I get multiple values for a single named > > > > variable? > > > > > > TIA, > > > > > > > > > > > > Dennis > > ------------------------------------------------------- > > > > > This SF.Net email is sponsored by xPML, a > > > > groundbreaking scripting > > > > > > language that extends applications into web and > > > > mobile media. Attend the > > > > > > live webcast and join the prime developer group > > > > breaking into this new > > > > > > coding territory! > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > > > > > _______________________________________________ > > > > Simpleweb-Support mailing list > > > > Sim...@li... > > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > > > ------------------------------------------------------- > > > > This SF.Net email is sponsored by xPML, a > > > > groundbreaking scripting language > > > > > that extends applications into web and mobile > > > > media. Attend the live > > > > > webcast and join the prime developer group > > > > breaking into this new coding > > > > > territory! > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 > > > > _______________________________________________ > > > Simpleweb-Support mailing list > > > Sim...@li... > > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by xPML, a > > groundbreaking scripting language > > that extends applications into web and mobile media. > > Attend the live webcast > > and join the prime developer group breaking into > > this new coding territory! > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > > > _______________________________________________ > > Simpleweb-Support mailing list > > Sim...@li... > > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > > Niall Gallagher > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live > webcast and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support |
From: Niall G. <gal...@ya...> - 2006-04-10 12:29:35
|
Hi, Currently you only option is to add in your own signalling implementation. Something like public interface Receiver { public void handle(Signal signal); } And have the following objects receive events to stop the threads they use: PipelineProcessor Connection TimeCache So something like Signaler.send(new MyStopSignal()) can terminate the server. I have been meaning to implement this, just have not had the time. Niall --- R Pat <pat...@gm...> wrote: > Hello, > > Can somebody tell me how to shutdown a "simple" > server ? > Obviously I don't want to talk about killing the job > with a <CTRL>C. > > Thank you. > Niall Gallagher __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
From: R P. <pat...@gm...> - 2006-04-09 13:46:05
|
Hello, Can somebody tell me how to shutdown a "simple" server ? Obviously I don't want to talk about killing the job with a <CTRL>C. Thank you. |
From: Niall G. <gal...@ya...> - 2006-03-31 16:43:43
|
Hi Vincent, I would recommend you download the demo package from simpleweb.sf.net/download. The problem you mention is due to an error in the LoaderEngine.load method. on line 283 the source shows load(name, className) it should show load(name, className, new Object[]{}) The demonstration should be a little simpler to use, than the tutorial, which is slightly out of date. Niall --- Vincent Etter <vin...@gm...> wrote: > Hello ! > > I'm trying to have the DemoServer and the > HelloService from the tutorial > working, but I'm lost. If I copy/paste the code from > the tutorial, the > server runs, but I always get a 404 error, whatever > url I try. > > I tried to load and link manually the HelloService > to a specific URL, but > doing this the DemoServer doesn't even run : it > crashs and throws this : > > Exception in thread "main" > java.lang.StackOverflowError > at simple.http.load.LoaderEngine.load(Unknown > Source) > at simple.http.load.LoaderEngine.load(Unknown > Source) > .... > > What does it mean ? > > Does anybody have a basic example of a server and a > service that works ? > Thanks a lot for any help ! And sorry for my > english... > > Vincent Etter > Niall Gallagher __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
From: Vincent E. <vin...@gm...> - 2006-03-31 14:15:41
|
Hello ! I'm trying to have the DemoServer and the HelloService from the tutorial working, but I'm lost. If I copy/paste the code from the tutorial, the server runs, but I always get a 404 error, whatever url I try. I tried to load and link manually the HelloService to a specific URL, but doing this the DemoServer doesn't even run : it crashs and throws this : Exception in thread "main" java.lang.StackOverflowError at simple.http.load.LoaderEngine.load(Unknown Source) at simple.http.load.LoaderEngine.load(Unknown Source) .... What does it mean ? Does anybody have a basic example of a server and a service that works ? Thanks a lot for any help ! And sorry for my english... Vincent Etter |
From: Niall G. <gal...@ya...> - 2006-03-23 17:15:09
|
Hi Dennis, The Parameters object used to have a getParameters() method that returned multiple values for a single name. I removed it some time ago. I had been meaning to add it back, however I have not got around to it. Take a look at release 2.6 and you'll see the code for it in ParameterParser.insert. You can just plug this in, ill try to add this feature back. Niall --- Dennis Watson <de...@gu...> wrote: > Hi Carfield, > > On Wednesday 22 March 2006 19:57, Carfield Yim > wrote: > > May be use Request.getParameters() that return > Parameters ?? > > That will return a Parameters object with all of the > CGI variables, but I > don't think it helps in this case. I need to handle > CGI variables with > multiple values, not just multiple CGI variables. > > Consider what happens when you are receiving data > from a form with check boxes > on it. You will have a single CGI variable with > multiple values (one for > each box checked). The servlet spec has the method > String[] > getParameterValues() to deal with such cases, but I > don't see this for > Simple. > > > Dennis > > > > On 3/23/06, Dennis Watson <de...@gu...> wrote: > > > Hi, > > > > > > I need to handle URLs with multiple values for > the same CGI variable such > > > as: > > > > > > http://simple.server.com?a=1&a=2&a=3 > > > > > > According to the Simple documentation the > Parameters interface "follows > > > the parameter methods found in the Java Servlet > API Specification." This > > > means I should be able to get multiple values > out using the > > > getParameterValues like so: > > > > > > String[] a = req.getParameterValues("a"); > > > > > > But I don't see this method in the Simple > javadoc and it breaks when I > > > try and complie my program with this method. > > > > > > How can I get multiple values for a single named > variable? > > > > > > TIA, > > > > > > > > > Dennis > > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by xPML, a > groundbreaking scripting > > > language that extends applications into web and > mobile media. Attend the > > > live webcast and join the prime developer group > breaking into this new > > > coding territory! > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > > > _______________________________________________ > > > Simpleweb-Support mailing list > > > Sim...@li... > > > > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by xPML, a > groundbreaking scripting language > > that extends applications into web and mobile > media. Attend the live > > webcast and join the prime developer group > breaking into this new coding > > territory! > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 > > _______________________________________________ > > Simpleweb-Support mailing list > > Sim...@li... > > > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a > groundbreaking scripting language > that extends applications into web and mobile media. > Attend the live webcast > and join the prime developer group breaking into > this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > Niall Gallagher __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
From: Dennis W. <de...@gu...> - 2006-03-23 16:20:41
|
Hi Carfield, On Wednesday 22 March 2006 19:57, Carfield Yim wrote: > May be use Request.getParameters() that return Parameters ?? That will return a Parameters object with all of the CGI variables, but I don't think it helps in this case. I need to handle CGI variables with multiple values, not just multiple CGI variables. Consider what happens when you are receiving data from a form with check boxes on it. You will have a single CGI variable with multiple values (one for each box checked). The servlet spec has the method String[] getParameterValues() to deal with such cases, but I don't see this for Simple. Dennis > On 3/23/06, Dennis Watson <de...@gu...> wrote: > > Hi, > > > > I need to handle URLs with multiple values for the same CGI variable such > > as: > > > > http://simple.server.com?a=1&a=2&a=3 > > > > According to the Simple documentation the Parameters interface "follows > > the parameter methods found in the Java Servlet API Specification." This > > means I should be able to get multiple values out using the > > getParameterValues like so: > > > > String[] a = req.getParameterValues("a"); > > > > But I don't see this method in the Simple javadoc and it breaks when I > > try and complie my program with this method. > > > > How can I get multiple values for a single named variable? > > > > TIA, > > > > > > Dennis > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by xPML, a groundbreaking scripting > > language that extends applications into web and mobile media. Attend the > > live webcast and join the prime developer group breaking into this new > > coding territory! > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > > _______________________________________________ > > Simpleweb-Support mailing list > > Sim...@li... > > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live > webcast and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support |
From: Carfield Y. <car...@gm...> - 2006-03-23 03:57:47
|
May be use Request.getParameters() that return Parameters ?? On 3/23/06, Dennis Watson <de...@gu...> wrote: > Hi, > > I need to handle URLs with multiple values for the same CGI variable such= as: > > http://simple.server.com?a=3D1&a=3D2&a=3D3 > > According to the Simple documentation the Parameters interface "follows t= he > parameter methods found in the Java Servlet API Specification." This mea= ns I > should be able to get multiple values out using the getParameterValues li= ke > so: > > String[] a =3D req.getParameterValues("a"); > > But I don't see this method in the Simple javadoc and it breaks when I tr= y and > complie my program with this method. > > How can I get multiple values for a single named variable? > > TIA, > > > Dennis > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting langua= ge > that extends applications into web and mobile media. Attend the live webc= ast > and join the prime developer group breaking into this new coding territor= y! > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D110944&bid=3D241720&dat= =3D121642 > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > |
From: Dennis W. <de...@gu...> - 2006-03-23 01:22:41
|
Hi, I need to handle URLs with multiple values for the same CGI variable such as: http://simple.server.com?a=1&a=2&a=3 According to the Simple documentation the Parameters interface "follows the parameter methods found in the Java Servlet API Specification." This means I should be able to get multiple values out using the getParameterValues like so: String[] a = req.getParameterValues("a"); But I don't see this method in the Simple javadoc and it breaks when I try and complie my program with this method. How can I get multiple values for a single named variable? TIA, Dennis |
From: Niall G. <gal...@ya...> - 2006-03-21 16:10:45
|
Hi Luke, Just create a PipelineFactory and check the socket type. For example, public class MyPipelineFactory implements PipelineFactory { public Pipeline getInstance(Socket sock) { Pipeline pipe = new Pipeline(sock); if(sock instanceof SSLSocket) { pipe.put("SSLSession", ((SSLSocket)sock).getSession()); } return pipe; } } And then from the ProtocolHandler.handle you will be able to do the following. SSLSession session = Request.getAttribute("SSLSession"); if(session == null) { // not an ssl connection. } Of course, you can implement a more suitable scheme. The point here is that the Pipeline attributes are available throught the Request object. Via both Request.getAttribute and Request.getAttributes. Have a look at BufferedPipelineFactory for an example, and also simple.http.connect.ConnectionFactory to see how a pipeline factory can be added into the conncection procedure. Niall --- Luke Miller <lu...@so...> wrote: > Is there a way to determine if a connection is using > SSL or not > (either by scheme, port, or a direct convenience > method) in the > handle method of the ProtocolHandler? > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a > groundbreaking scripting language > that extends applications into web and mobile media. > Attend the live webcast > and join the prime developer group breaking into > this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > Niall Gallagher __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
From: Luke M. <lu...@so...> - 2006-03-21 14:38:51
|
Is there a way to determine if a connection is using SSL or not (either by scheme, port, or a direct convenience method) in the handle method of the ProtocolHandler? |
From: Heikki U. <hu...@al...> - 2006-02-09 12:23:01
|
> > > This will show your fd soft limit, which I expect is > 1024. My guess is that if you expect to serve more > than 3000 requests per/sec you will need to increase > you fd soft limit. > > Also there is a caching bug in Simple 2.8.1. This > causes files to be open of each request. So for your > test of 1000 files, 2000 files will be required. How? > well 1000 sockets and 1000 fds for index.html. To fix > the caching bug modify > simple.http.serve.BufferedConent and replace the > following > > bug: > > public void write(OutputStream out) throws > IOException { > if(count > 0) { > out.write(cache); > } > int size = getLength(); > > if(size > 0) { > write(out,size); > } > } > > fix: > > public void write(OutputStream out) throws > IOException{ > if(cache == null) { > int size = getLength(); > > if(size > 0) { > write(out,size); > } > } else { > out.write(cache); > } > } > > Hope this helps! > Niall > The bugfix did the trick, thx! The file descriptors weren't the problem here since I was testing with *only one* client (one thread). After the fix I succesfully completed the same simple test also with 100 continuos clients. |
From: Heikki U. <hu...@al...> - 2006-02-08 18:04:12
|
One more thing, discussion about the possible culprit: http://groups.google.fi/group/comp.lang.java.programmer/browse_frm/thread/e3c716d481e734bc/ec89d883ef755348?tvc=1&q=bug+6215050#ec89d883ef755348 |
From: Niall G. <gal...@ya...> - 2006-02-08 17:48:27
|
Hi Again, The bug you mentioned also seems to exist in 1.5 according to some of the follow ups. However, this bug will/should not affect Simple. Niall --- Niall Gallagher <gal...@ya...> wrote: > Hi Hekki, > > This bug seems to relate to Java 1.4 on Linux, so if > you use 1.5 it should not be the case. I think if > you > repair, the BufferedContent object, you will see an > instant improvement on serving static content. Also, > it is certainly the case that ServerSocket.accept > will > fail when the fd soft limit is reached on Linux, as > it > cannot create a new fd for the > socket....Alternatively > you can wait until later on tonight or tomorrow to > download 2.8.2, which will contain the > BufferedContent > cache fix. > > Niall > > --- Heikki Uusitalo <hu...@al...> wrote: > > > Relating to my previous post, could this be the > > reason? > > > > > http://bugs.sun.com/bugdatabase/view_bug.do;:YfiG?bug_id=6215050 > > > > I can probably test with mustang on tomorrow, or > > later this week. > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. Do > > you grep through log files > > for problems? Stop! Download the new AJAX search > > engine that makes > > searching your log files as easy as surfing the > > web. DOWNLOAD SPLUNK! > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 > > _______________________________________________ > > Simpleweb-Support mailing list > > Sim...@li... > > > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > > > > Niall Gallagher > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam > protection around > http://mail.yahoo.com > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do > you grep through log files > for problems? Stop! Download the new AJAX search > engine that makes > searching your log files as easy as surfing the > web. DOWNLOAD SPLUNK! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > Niall Gallagher __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
From: Niall G. <gal...@ya...> - 2006-02-08 17:43:18
|
Hi Hekki, This bug seems to relate to Java 1.4 on Linux, so if you use 1.5 it should not be the case. I think if you repair, the BufferedContent object, you will see an instant improvement on serving static content. Also, it is certainly the case that ServerSocket.accept will fail when the fd soft limit is reached on Linux, as it cannot create a new fd for the socket....Alternatively you can wait until later on tonight or tomorrow to download 2.8.2, which will contain the BufferedContent cache fix. Niall --- Heikki Uusitalo <hu...@al...> wrote: > Relating to my previous post, could this be the > reason? > > http://bugs.sun.com/bugdatabase/view_bug.do;:YfiG?bug_id=6215050 > > I can probably test with mustang on tomorrow, or > later this week. > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do > you grep through log files > for problems? Stop! Download the new AJAX search > engine that makes > searching your log files as easy as surfing the > web. DOWNLOAD SPLUNK! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > Niall Gallagher __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
From: Heikki U. <hu...@al...> - 2006-02-08 17:30:35
|
Relating to my previous post, could this be the reason? http://bugs.sun.com/bugdatabase/view_bug.do;:YfiG?bug_id=6215050 I can probably test with mustang on tomorrow, or later this week. |
From: Niall G. <gal...@ya...> - 2006-02-08 17:14:49
|
Hi Heikki, What is your soft limit on file descriptors. Just to remind you, ServerSocket.accept will fail when the soft limit is reached. This may give JMeter the impression of deadlock, when in fact it is Linux limiting performance here. Try the following ulimit -aS This will show your fd soft limit, which I expect is 1024. My guess is that if you expect to serve more than 3000 requests per/sec you will need to increase you fd soft limit. Also there is a caching bug in Simple 2.8.1. This causes files to be open of each request. So for your test of 1000 files, 2000 files will be required. How? well 1000 sockets and 1000 fds for index.html. To fix the caching bug modify simple.http.serve.BufferedConent and replace the following bug: public void write(OutputStream out) throws IOException { if(count > 0) { out.write(cache); } int size = getLength(); if(size > 0) { write(out,size); } } fix: public void write(OutputStream out) throws IOException{ if(cache == null) { int size = getLength(); if(size > 0) { write(out,size); } } else { out.write(cache); } } Hope this helps! Niall --- Heikki Uusitalo <hu...@al...> wrote: > Simple version 2.8.1 > Linux 2.6.8-2-k7 > Java 1.5.0_06 > > I'm using Jakarta JMeter to benchmark simple > performance. I've tried to > follow the examples given in simple-demo 1.2.5 > (including the usage of > LinuxConfigurator). > > Just by creating a test which loads very basic > index.html page 1000 > times (one client) the simple halts after ~30...200 > requests. > > This phenomenom doesn't occur on WinXP (with same > java version). > > This phenomenom also doesn't occur on Linux if I set > a 1 millisecond > delay between each request on JMeter. > > Any ideas? > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do > you grep through log files > for problems? Stop! Download the new AJAX search > engine that makes > searching your log files as easy as surfing the > web. DOWNLOAD SPLUNK! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > Niall Gallagher __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
From: Heikki U. <hu...@al...> - 2006-02-08 16:29:45
|
Simple version 2.8.1 Linux 2.6.8-2-k7 Java 1.5.0_06 I'm using Jakarta JMeter to benchmark simple performance. I've tried to follow the examples given in simple-demo 1.2.5 (including the usage of LinuxConfigurator). Just by creating a test which loads very basic index.html page 1000 times (one client) the simple halts after ~30...200 requests. This phenomenom doesn't occur on WinXP (with same java version). This phenomenom also doesn't occur on Linux if I set a 1 millisecond delay between each request on JMeter. Any ideas? |
From: Carfield Y. <car...@ca...> - 2006-01-15 17:51:35
|
I see, however, once I put the change and compile... I get a very strangle problem: clean: [delete] Deleting directory /Users/carfield/Desktop/simple-2.8.1/build [delete] Deleting directory /Users/carfield/Desktop/simple-2.8.1/jar prepare: [mkdir] Created dir: /Users/carfield/Desktop/simple-2.8.1/build [mkdir] Created dir: /Users/carfield/Desktop/simple-2.8.1/jar build: [javac] Compiling 258 source files to /Users/carfield/Desktop/simple-2.8.1/build [javac] /Users/carfield/Desktop/simple-2.8.1/src/simple/http/MonitoredOu= tputStream.java:1: 'class' or 'interface' expected [javac] /* [javac] ^ [javac] /Users/carfield/Desktop/simple-2.8.1/src/simple/http/MonitoredOu= tputStream.java:23: 'class' or 'interface' expected [javac] import java.io.OutputStream; [javac] ^ [javac] /Users/carfield/Desktop/simple-2.8.1/src/simple/http/MonitoredOu= tputStream.java:24: 'class' or 'interface' expected [javac] import java.io.IOException; [javac] ^ [javac] 3 errors The class is simple and I have totally no idea about this... BTW, I just double check with my old servlet version of implementation, there is similar problem, but I just ignore all that time. However, when I writing application at work, I never experience this... - Sho |
From: Carfield Y. <car...@gm...> - 2006-01-15 17:49:39
|
SSBzZWUsIGhvd2V2ZXIsIG9uY2UgSSBwdXQgdGhlIGNoYW5nZSBhbmQgY29tcGlsZS4uLiBJIGdl dCBhIHZlcnkKc3RyYW5nbGUgcHJvYmxlbToKCmNsZWFuOgogICBbZGVsZXRlXSBEZWxldGluZyBk aXJlY3RvcnkgL1VzZXJzL2NhcmZpZWxkL0Rlc2t0b3Avc2ltcGxlLTIu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TmFtZSgpKTsKPiA+ICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIHJlcy5zZXQoIkNvbnRlbnQtVHlwZSIsIG1pbWUpOwo+ID4gICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgSU9VdGlscy5jb3B5KGlzLCBnb3MpOwo+ID4gICAgICAgICAgICAgICAgICAg ICAgIH0gZmluYWxseSB7Cj4gPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpcy5jbG9z ZSgpOwo+ID4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoZ29zICE9IG51bGwpCj4g PiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdvcy5jbG9zZSgpOwo+ID4g ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZQo+ID4gICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBvcy5jbG9zZSgpOwo+ID4gICAgICAgICAgICAgICAgICAgICAg IH0KPiA+ICAgICAgICAgICAgICAgfQo+ID4gICAgICAgfQo+ID4KPiA+Cj4gPiBUaGUgb3RoZXIg ZXhjZXB0aW9uIGlzOgo+ID4KPiA+IGphdmEubGFuZy5SdW50aW1lRXhjZXB0aW9uOiBqYXZhLmlv LklPRXhjZXB0aW9uOgo+ID4gU3RyZWFtIGNsb3NlZAo+ID4gICAgICAgIGF0Cj4gPgo+IGhrLmNv bS5jYXJmaWVsZC53ZWIuc2ltcGxlLkNvbnRyb2xsZXIuc2V0RG9jdW1lbnQoQ29udHJvbGxlci5q YXZhOjEwMCkKPiA+ICAgICAgICBhdAo+ID4KPiBoay5jb20uY2FyZmllbGQud2ViLnNpbXBsZS5D b250cm9sbGVyLmhhbmRsZVJlcXVlc3QoQ29udHJvbGxlci5qYXZhOjY5KQo+ID4gICAgICAgIGF0 Cj4gPgo+IGhrLmNvbS5jYXJmaWVsZC53ZWIuc2ltcGxlLkNvbnRyb2xsZXIucHJvY2VzcyhDb250 cm9sbGVyLmphdmE6MT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sZXdlYi1zdXBwb3J0Cj4gPgo+Cj4KPiBOaWFsbCBHYWxs YWdoZXIKPgo+IF9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fCj4gRG8gWW91IFlhaG9vIT8KPiBUaXJlZCBvZiBzcGFtPyAgWWFob28hIE1haWwgaGFzIHRo ZSBiZXN0IHNwYW0gcHJvdGVjdGlvbiBhcm91bmQKPiBodHRwOi8vbWFpbC55YWhvby5jb20KPgo+ Cj4gLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LQo+IFRoaXMgU0YubmV0IGVtYWlsIGlzIHNwb25zb3JlZCBieTogU3BsdW5rIEluYy4gRG8geW91 IGdyZXAgdGhyb3VnaCBsb2cgZmlsZXMKPiBmb3IgcHJvYmxlbXM/ICBTdG9wISAgRG93bmxvYWQg dGhlIG5ldyBBSkFYIHNlYXJjaCBlbmdpbmUgdGhhdCBtYWtlcwo+IHNlYXJjaGluZyB5b3VyIGxv ZyBmaWxlcyBhcyBlYXN5IGFzIHN1cmZpbmcgdGhlICB3ZWIuICBET1dOTE9BRCBTUExVTkshCj4g aHR0cDovL2Fkcy5vc2RuLmNvbS8/YWRfaWQ9NzYzNyZhbGxvY19pZD0xNjg2NSZvcD1jbGljawo+ IF9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCj4gU2ltcGxl d2ViLVN1cHBvcnQgbWFpbGluZyBsaXN0Cj4gU2ltcGxld2ViLVN1cHBvcnRAbGlzdHMuc291cmNl Zm9yZ2UubmV0Cj4gaHR0cHM6Ly9saXN0cy5zb3VyY2Vmb3JnZS5uZXQvbGlzdHMvbGlzdGluZm8v c2ltcGxld2ViLXN1cHBvcnQKPgo= |
From: Niall G. <gal...@ya...> - 2006-01-14 10:34:13
|
Hi Carfield, It seems as if the client has asynchronously closed the connection, either due to a browser refresh or perhaps some other I/O event. To investigate this further edit the MonitoredOutputStream.java source for Simple. Modify the destroy() method to become destroy(IOException e) and pass all exceptions to the destroy method. The you can throw these exceptions, which contain the specific error....this is something I should have done from the out set. For example: protected void destroy(IOException cause) throws IOException { if(open) { open = false; } throw cause; } This will provide the exact stack trace. Niall --- Carfield Yim <car...@ca...> wrote: > Try to implement HTTP compression, it work fine at > all browser I've > accessable: safari, firefox, opera, internet > explorer. However, there > are still socket exception and I don't know why: > > > java.io.IOException: Stream closed > at > simple.http.MonitoredOutputStream.ensureOpen(Unknown > Source) > at > simple.http.MonitoredOutputStream.write(Unknown > Source) > at simple.http.ResponseStream.write(Unknown > Source) > at > java.util.zip.GZIPOutputStream.finish(GZIPOutputStream.java:95) > at > java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:141) > at > hk.com.carfield.web.simple.Controller.rawDisplay(Controller.java:126) > at > hk.com.carfield.web.simple.Controller.handleRequest(Controller.java:64) > at > hk.com.carfield.web.simple.Controller.process(Controller.java:137) > at > simple.http.serve.BasicResource.handle(Unknown > Source) > at > simple.http.serve.ResourceProcessor.handle(Unknown > Source) > at simple.http.Dispatcher.run(Unknown Source) > at simple.util.process.Daemon.execute(Unknown > Source) > at simple.util.process.Daemon.run(Unknown > Source) > > And method rawDisplay is just a method to show the > file content directly: > > > private void rawDisplay(Response res, File > location) throws IOException, > FileNotFoundException { > res.set("Content-Encoding", "gzip"); > res.set("Vary", "Accept-Encoding"); > if (location.isFile()) { > final InputStream is = new > FileInputStream(location); > final OutputStream os = res.getOutputStream(); > OutputStream gos = null; > try { > gos = new GZIPOutputStream(os); > final String mime = > context.getMimeType(location.getName()); > res.set("Content-Type", mime); > IOUtils.copy(is, gos); > } finally { > is.close(); > if(gos != null) > gos.close(); > else > os.close(); > } > } > } > > > The other exception is: > > java.lang.RuntimeException: java.io.IOException: > Stream closed > at > hk.com.carfield.web.simple.Controller.setDocument(Controller.java:100) > at > hk.com.carfield.web.simple.Controller.handleRequest(Controller.java:69) > at > hk.com.carfield.web.simple.Controller.process(Controller.java:137) > at > simple.http.serve.BasicResource.handle(Unknown > Source) > at > simple.http.serve.ResourceProcessor.handle(Unknown > Source) > at simple.http.Dispatcher.run(Unknown Source) > at simple.util.process.Daemon.execute(Unknown > Source) > at simple.util.process.Daemon.run(Unknown > Source) > Caused by: java.io.IOException: Stream closed > at > simple.http.MonitoredOutputStream.ensureOpen(Unknown > Source) > at > simple.http.MonitoredOutputStream.write(Unknown > Source) > at simple.http.ResponseStream.write(Unknown > Source) > at > java.io.OutputStream.write(OutputStream.java:58) > at > java.util.zip.GZIPOutputStream.writeHeader(GZIPOutputStream.java:123) > at > java.util.zip.GZIPOutputStream.<init>(GZIPOutputStream.java:48) > at > java.util.zip.GZIPOutputStream.<init>(GZIPOutputStream.java:58) > at > hk.com.carfield.web.simple.Controller.setDocument(Controller.java:97) > ... 7 more > > > private void setDocument(Response response, > Document document) throws IOException { > res.set("Content-Encoding", "gzip"); > res.set("Vary", "Accept-Encoding"); > final OutputStream os = > response.getOutputStream(); > OutputStream gos = null; > try { > gos = new GZIPOutputStream(os); > document.write(gos); > } catch (Exception e) { > throw new RuntimeException(e); > } finally { > if(gos != null) > gos.close(); > else > os.close(); > } > } > > Anyone have any idea? > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do > you grep through log files > for problems? Stop! Download the new AJAX search > engine that makes > searching your log files as easy as surfing the > web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_idv37&alloc_id865&op=click > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > Niall Gallagher __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
From: Carfield Y. <car...@ca...> - 2006-01-14 04:28:42
|
Try to implement HTTP compression, it work fine at all browser I've accessable: safari, firefox, opera, internet explorer. However, there are still socket exception and I don't know why: java.io.IOException: Stream closed at simple.http.MonitoredOutputStream.ensureOpen(Unknown Source) at simple.http.MonitoredOutputStream.write(Unknown Source) at simple.http.ResponseStream.write(Unknown Source) at java.util.zip.GZIPOutputStream.finish(GZIPOutputStream.java:95) at java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.jav= a:141) at hk.com.carfield.web.simple.Controller.rawDisplay(Controller.java:= 126) at hk.com.carfield.web.simple.Controller.handleRequest(Controller.ja= va:64) at hk.com.carfield.web.simple.Controller.process(Controller.java:137= ) at simple.http.serve.BasicResource.handle(Unknown Source) at simple.http.serve.ResourceProcessor.handle(Unknown Source) at simple.http.Dispatcher.run(Unknown Source) at simple.util.process.Daemon.execute(Unknown Source) at simple.util.process.Daemon.run(Unknown Source) And method rawDisplay is just a method to show the file content directly: =09private void rawDisplay(Response res, File location) throws IOException, =09=09=09FileNotFoundException { =09=09res.set("Content-Encoding", "gzip"); =09=09res.set("Vary", "Accept-Encoding"); =09=09if (location.isFile()) { =09=09=09final InputStream is =3D new FileInputStream(location); =09=09=09final OutputStream os =3D res.getOutputStream(); =09=09=09OutputStream gos =3D null; =09=09=09try { =09=09=09=09gos =3D new GZIPOutputStream(os); =09=09=09=09final String mime =3D context.getMimeType(location.getName()); =09=09=09=09res.set("Content-Type", mime); =09=09=09=09IOUtils.copy(is, gos); =09=09=09} finally { =09=09=09=09is.close(); =09=09=09=09if(gos !=3D null) =09=09=09=09=09gos.close(); =09=09=09=09else =09=09=09=09=09os.close(); =09=09=09} =09=09} =09} The other exception is: java.lang.RuntimeException: java.io.IOException: Stream closed at hk.com.carfield.web.simple.Controller.setDocument(Controller.java= :100) at hk.com.carfield.web.simple.Controller.handleRequest(Controller.ja= va:69) at hk.com.carfield.web.simple.Controller.process(Controller.java:137= ) at simple.http.serve.BasicResource.handle(Unknown Source) at simple.http.serve.ResourceProcessor.handle(Unknown Source) at simple.http.Dispatcher.run(Unknown Source) at simple.util.process.Daemon.execute(Unknown Source) at simple.util.process.Daemon.run(Unknown Source) Caused by: java.io.IOException: Stream closed at simple.http.MonitoredOutputStream.ensureOpen(Unknown Source) at simple.http.MonitoredOutputStream.write(Unknown Source) at simple.http.ResponseStream.write(Unknown Source) at java.io.OutputStream.write(OutputStream.java:58) at java.util.zip.GZIPOutputStream.writeHeader(GZIPOutputStream.java:= 123) at java.util.zip.GZIPOutputStream.<init>(GZIPOutputStream.java:48) at java.util.zip.GZIPOutputStream.<init>(GZIPOutputStream.java:58) at hk.com.carfield.web.simple.Controller.setDocument(Controller.java= :97) ... 7 more =09private void setDocument(Response response, =09=09=09Document document) throws IOException { =09=09res.set("Content-Encoding", "gzip"); =09=09res.set("Vary", "Accept-Encoding"); =09=09final OutputStream os =3D response.getOutputStream(); =09=09OutputStream gos =3D null; =09=09try { =09=09=09gos =3D new GZIPOutputStream(os); =09=09=09document.write(gos); =09=09} catch (Exception e) { =09=09=09throw new RuntimeException(e); =09=09} finally { =09=09=09if(gos !=3D null) =09=09=09=09gos.close(); =09=09=09else =09=09=09=09os.close(); =09=09} =09} Anyone have any idea? |
From: petite_abeille <pet...@ma...> - 2006-01-11 05:36:30
|
On Jan 10, 2006, at 20:23, Christophe Roudet wrote: > Does anyone as an example on how to use the fileupload classes > (simple-upload)? http://dev.alt.textdrive.com/file/ZOE/Frameworks/SZApp/SZFileUpload.java You can always refer to the original Jakarta documentation as well: http://jakarta.apache.org/commons/fileupload/using.html Cheers -- PA, Onnay Equitursay http://alt.textdrive.com/ |