simpleweb-support Mailing List for Simple (Page 6)
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: -=}\\*/{=- <rui...@gm...> - 2011-12-23 03:01:05
|
hi, the Address returned by the Request returns null for getDomain() and -1 for getPort() toString() returns only the path and query... what can i be doing wrong? [] rui |
From: -=}\\*/{=- <rui...@gm...> - 2011-12-12 02:02:54
|
From: -=}\\*/{=- <rui...@gm...> - 2011-12-12 01:44:05
|
http://www.simpleframework.org/doc/tutorial/tutorial.php#async ... the code in the example was out of date, hope i fixed it well... did not test. import java.io.IOException; import org.simpleframework.http.core.Container; import org.simpleframework.transport.connect.Connection; import org.simpleframework.transport.connect.SocketConnection; import org.simpleframework.http.Response; import org.simpleframework.http.Request; import java.net.InetSocketAddress; import java.net.SocketAddress; import java.io.PrintStream; import org.simpleframework.util.thread.Scheduler; public class AsynchronousService implements Container { public static class Task implements Runnable { private final Response response; private final Request request; public Task(Request request, Response response) { this.response = response; this.request = request; } public void run() { try { PrintStream body = response.getPrintStream(); long time = System.currentTimeMillis(); response.set("Content-Type", "text/plain"); response.set("Server", "HelloWorld/1.0 (Simple 4.0)"); response.setDate("Date", time); response.setDate("Last-Modified", time); body.println("Hello World"); body.close(); } catch (IOException ioe) { ioe.printStackTrace(); } } } Scheduler queue; public AsynchronousService(Scheduler queue) { this.queue = queue; } public void handle(Request request, Response response) { Task task = new Task(request, response); queue.execute(task); } public static void main(String[] list) throws Exception { Scheduler scheduler = new Scheduler(50); Container container = new AsynchronousService(scheduler); Connection connection = new SocketConnection(container); SocketAddress address = new InetSocketAddress(8080); connection.connect(address); } } cheers, rui |
From: Niall G. <gal...@ya...> - 2011-12-10 23:25:13
|
This is the wrong mailing list for simple xml. However you can achieve this via templates i think using values like ${name}. Sent from Yahoo!7 Mail on Android |
From: -=}\\*/{=- <rui...@gm...> - 2011-12-10 23:03:00
|
hi, i've been coding the last days and would like to suggest some method of inheriting from a parent node parent when specifying the "empty" parameter. http://simple.sourceforge.net/download/stream/doc/javadoc/org/simpleframework/xml/Attribute.html#empty() example of usage... i'm loading the server directly from a xml (configuration) file which will describe several contexts... i would like to be able to define default parameters in the ancestor/root nodes... another solution would be to be able to define free namespaces that declare defaults... maybe something like: <root> <namespacce-ignored-tag attr0="default value" attr1="other default value" if-not-distinguished-by-tag-name-maybe-by-a-special-attr-that-also-refers-a-xpath-to-the-defaultable-nodes="*"> <context/> <context attr0="overriding ancestor default"/> </namespacce-ignored-tag> </root> i think using the special attribute with xpath selection is better as it leaves the tag free for something like <defaults-for-public-servers SimpleXPath="*" or _SXP_="*" ... >, making the code more readable and allowing to specify the affected nodes (but not non descendants). both options would be nicer... <_SimpleDescendantDefaulter_...> or simply <_SDD_ ...> maybe option to provide the special attribute/element name to the Persister. converting variableNames into/from variable-names... would also be nice... if there is already a way to do these or similar please tell me. cheers, rui |
From: -=}\\*/{=- <rui...@gm...> - 2011-12-07 19:58:09
|
i know! :D isn't it great!? its perfect! gratz to the author & ty :D the more i read, the more i like it... already started to make the migration :D ... and take the chance to rewrite and reorganize my code. simple is as simple as keep it small simple needs :) your project seams to be worthy of the enormous amount of milliseconds i spend looking to other projects, trying to see a piece of code that is simple... really, i'm loving the code on the examples and your api seams neither more nor less of what is required or demanded. On 7 December 2011 19:25, Jeffrey Blattman <jef...@gm...>wrote: > simple isn't a servlet engine or even a server, it's a framework for > building custom HTTP servers. > > On Wed, Dec 7, 2011 at 5:55 AM, -=}\*/{=- <rui...@gm...> wrote: > >> a have a small servlet project http://kisslet.alphabit.org/ currently >> running on tomcat... >> tomcat provides much more and less than i need (at the time i even coded >> the multipart requests and file upload, which fall out of the project)... >> so i was looking (once more (already had tried winstone)) for a smaller and >> simpler servlet engine when i hit this site... and this simple name just >> kind of rhymes with my project... seams to implement what i need, does not >> have what i don't need, and does not require all >> that publishing protocol... seams that will allow to do exactly what i >> want... >> >> so i'm seriously considering keeping with simplicity and adopt your >> platform. >> ... maybe rename the project to KISF... KeepItSimpleFramework... >> >> glad i found this, was looking for about 2 days... (or several years :P) >> happy day to you! :D >> >> >> >> >> ------------------------------------------------------------------------------ >> Cloud Services Checklist: Pricing and Packaging Optimization >> This white paper is intended to serve as a reference, checklist and point >> of >> discussion for anyone considering optimizing the pricing and packaging >> model >> of a cloud services business. Read Now! >> http://www.accelacomm.com/jaw/sfnl/114/51491232/ >> _______________________________________________ >> Simpleweb-Support mailing list >> Sim...@li... >> https://lists.sourceforge.net/lists/listinfo/simpleweb-support >> >> > > > ------------------------------------------------------------------------------ > Cloud Services Checklist: Pricing and Packaging Optimization > This white paper is intended to serve as a reference, checklist and point > of > discussion for anyone considering optimizing the pricing and packaging > model > of a cloud services business. Read Now! > http://www.accelacomm.com/jaw/sfnl/114/51491232/ > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > |
From: Jeffrey B. <jef...@gm...> - 2011-12-07 19:25:13
|
simple isn't a servlet engine or even a server, it's a framework for building custom HTTP servers. On Wed, Dec 7, 2011 at 5:55 AM, -=}\*/{=- <rui...@gm...> wrote: > a have a small servlet project http://kisslet.alphabit.org/ currently > running on tomcat... > tomcat provides much more and less than i need (at the time i even coded > the multipart requests and file upload, which fall out of the project)... > so i was looking (once more (already had tried winstone)) for a smaller and > simpler servlet engine when i hit this site... and this simple name just > kind of rhymes with my project... seams to implement what i need, does not > have what i don't need, and does not require all > that publishing protocol... seams that will allow to do exactly what i > want... > > so i'm seriously considering keeping with simplicity and adopt your > platform. > ... maybe rename the project to KISF... KeepItSimpleFramework... > > glad i found this, was looking for about 2 days... (or several years :P) > happy day to you! :D > > > > > ------------------------------------------------------------------------------ > Cloud Services Checklist: Pricing and Packaging Optimization > This white paper is intended to serve as a reference, checklist and point > of > discussion for anyone considering optimizing the pricing and packaging > model > of a cloud services business. Read Now! > http://www.accelacomm.com/jaw/sfnl/114/51491232/ > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > |
From: -=}\\*/{=- <rui...@gm...> - 2011-12-07 13:56:04
|
a have a small servlet project http://kisslet.alphabit.org/ currently running on tomcat... tomcat provides much more and less than i need (at the time i even coded the multipart requests and file upload, which fall out of the project)... so i was looking (once more (already had tried winstone)) for a smaller and simpler servlet engine when i hit this site... and this simple name just kind of rhymes with my project... seams to implement what i need, does not have what i don't need, and does not require all that publishing protocol... seams that will allow to do exactly what i want... so i'm seriously considering keeping with simplicity and adopt your platform. ... maybe rename the project to KISF... KeepItSimpleFramework... glad i found this, was looking for about 2 days... (or several years :P) happy day to you! :D |
From: Niall G. <gal...@ya...> - 2011-11-26 09:56:12
|
Hi, there is nothing specifically for this framework. If you manage to integrate it in some way I'd be interested to hear about it. Niall Sent from Yahoo!7 Mail on Android |
From: Noppanit C. <nop...@gm...> - 2011-11-24 13:24:47
|
Hi, I just started to use Simple Framework and I love it. By the way, I'm trying to use Coffeescript as well. Is there a way to integrate wro4j http://code.google.com/p/wro4j/ to Simple Framework to be able to compile Coffeescript at run-time. Thank you very much. -- Best Regards, Noppanit Charassinvichai |
From: Niall G. <gal...@ya...> - 2011-11-08 09:28:43
|
The values are whatever you want, the keys are strings. ________________________________ From: frank maltman <fra...@go...> To: Simple support and user issues <sim...@li...> Sent: Friday, 4 November 2011 9:01 PM Subject: Re: [Simpleweb-Support] Problem with session and generics On Fri, 4 Nov 2011 11:24:02 +0000 Toby <tob...@gm...> wrote: > It looks like the Session implements Map but uses a Lease object which uses > the generic type for its key. So I understand this to mean that in > Session<T>, the T refers to the Key of the underlying map and Objects are > stored as values. > > Not sure if that's right, I just skimmed the source. If I'm wrong, someone > will correct me, I'm sure. This does sound right, unfortunately I've still not found a way to actually use the interface without the above type error (I'm assuming that session keys are Strings and values are Integer). Does anybody have a working example? ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ Simpleweb-Support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simpleweb-support |
From: frank m. <fra...@go...> - 2011-11-04 21:01:18
|
On Fri, 4 Nov 2011 11:24:02 +0000 Toby <tob...@gm...> wrote: > It looks like the Session implements Map but uses a Lease object which uses > the generic type for its key. So I understand this to mean that in > Session<T>, the T refers to the Key of the underlying map and Objects are > stored as values. > > Not sure if that's right, I just skimmed the source. If I'm wrong, someone > will correct me, I'm sure. This does sound right, unfortunately I've still not found a way to actually use the interface without the above type error (I'm assuming that session keys are Strings and values are Integer). Does anybody have a working example? |
From: Toby <tob...@gm...> - 2011-11-04 11:24:10
|
It looks like the Session implements Map but uses a Lease object which uses the generic type for its key. So I understand this to mean that in Session<T>, the T refers to the Key of the underlying map and Objects are stored as values. Not sure if that's right, I just skimmed the source. If I'm wrong, someone will correct me, I'm sure. Cheers On 3 November 2011 20:06, frank maltman <fra...@go...>wrote: > Hello. > > Sessions seem slightly underdocumented. I'm trying to store > the value '23' under the key 'state' for a given session: > > import org.simpleframework.http.session.Session; > > public final class test > { > public static void setLoggedIn(final Session<?> session) > { > session.put("state", 23); > } > } > > "Type safety: The method put(Object, Object) belongs to the raw type > Map. References to generic type Map<K,V> should be parameterized" > > I'm not sure what the error message is trying to tell me. What is the > type parameter on Session supposed to be? > > fm > > > ------------------------------------------------------------------------------ > RSA(R) Conference 2012 > Save $700 by Nov 18 > Register now > http://p.sf.net/sfu/rsa-sfdev2dev1 > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > |
From: frank m. <fra...@go...> - 2011-11-03 20:06:14
|
Hello. Sessions seem slightly underdocumented. I'm trying to store the value '23' under the key 'state' for a given session: import org.simpleframework.http.session.Session; public final class test { public static void setLoggedIn(final Session<?> session) { session.put("state", 23); } } "Type safety: The method put(Object, Object) belongs to the raw type Map. References to generic type Map<K,V> should be parameterized" I'm not sure what the error message is trying to tell me. What is the type parameter on Session supposed to be? fm |
From: <sim...@br...> - 2011-09-29 13:08:32
|
Dave, Sorry it took so long to get back to this. We just released a new program in our suite and like always, smooth a coarse sandpaper! The web site is a very cool concept! Are you using the current version of Simple Framework? Is Spring deploy via WAR or did you get this going some other way? I am more interesting in get BlazeDS than Spring working, but they both "deploy" as WAR files, so I figure step 1 is get Simple Framework to be able to deploy WAR files. Thanks for any information! Jeffrey David Fogel said the following on 9/23/2011 1:19 PM: > Hi Jeffrey- > > We use Simple Framework in production to run our web app ( > http://TipTheWeb.org/ ). We use also use Spring, and everything works > really well - there's nothing incompatible between Spring > context/dependency injection stuff and Simple. More specifically, we > use an OSGi stack with Spring DM, and we use Restlet API backed by > Simple, but that's probably not going to help you much. > > Previous versions of simple framework did have a servlet compatibility > layer, although I've never used it, and it doesn't appear to be part > of recent downloads. The last version it appeared in seems to be this > one: > http://www.simpleframework.org/download/4.1.16/ > > hope that helps > > Dave Fogel > http://TipTheWeb.org/ > > On Fri, Sep 23, 2011 at 1:05 PM, Jeffrey A. Krzysztow > <sim...@br...> wrote: >> I have a project that has AIR applications and I use Simple Framework to handle the simple requests/responses that I have had to >> content with so far. >> >> Would like to know if anyone has also used Simple Framework with Spring and or BlazeDS? >> >> Either way, I'd any tips or suggestions as to how to get Servlet/WAR capabilities in the Simple Framework? >> >> Thanks much for any information given! I do appreciate it greatly! >> >> Jeffrey A. Krzysztow >> >> ------------------------------------------------------------------------------ >> All of the data generated in your IT infrastructure is seriously valuable. >> Why? It contains a definitive record of application performance, security >> threats, fraudulent activity, and more. Splunk takes this data and makes >> sense of it. IT sense. And common sense. >> http://p.sf.net/sfu/splunk-d2dcopy2 >> _______________________________________________ >> Simpleweb-Support mailing list >> Sim...@li... >> https://lists.sourceforge.net/lists/listinfo/simpleweb-support >> > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is seriously valuable. > Why? It contains a definitive record of application performance, security > threats, fraudulent activity, and more. Splunk takes this data and makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2dcopy2 > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > |
From: David F. <car...@gm...> - 2011-09-23 18:19:17
|
Hi Jeffrey- We use Simple Framework in production to run our web app ( http://TipTheWeb.org/ ). We use also use Spring, and everything works really well - there's nothing incompatible between Spring context/dependency injection stuff and Simple. More specifically, we use an OSGi stack with Spring DM, and we use Restlet API backed by Simple, but that's probably not going to help you much. Previous versions of simple framework did have a servlet compatibility layer, although I've never used it, and it doesn't appear to be part of recent downloads. The last version it appeared in seems to be this one: http://www.simpleframework.org/download/4.1.16/ hope that helps Dave Fogel http://TipTheWeb.org/ On Fri, Sep 23, 2011 at 1:05 PM, Jeffrey A. Krzysztow <sim...@br...> wrote: > I have a project that has AIR applications and I use Simple Framework to handle the simple requests/responses that I have had to > content with so far. > > Would like to know if anyone has also used Simple Framework with Spring and or BlazeDS? > > Either way, I'd any tips or suggestions as to how to get Servlet/WAR capabilities in the Simple Framework? > > Thanks much for any information given! I do appreciate it greatly! > > Jeffrey A. Krzysztow > > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is seriously valuable. > Why? It contains a definitive record of application performance, security > threats, fraudulent activity, and more. Splunk takes this data and makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2dcopy2 > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > |
From: Jeffrey A. K. <sim...@br...> - 2011-09-23 17:47:19
|
I have a project that has AIR applications and I use Simple Framework to handle the simple requests/responses that I have had to content with so far. Would like to know if anyone has also used Simple Framework with Spring and or BlazeDS? Either way, I'd any tips or suggestions as to how to get Servlet/WAR capabilities in the Simple Framework? Thanks much for any information given! I do appreciate it greatly! Jeffrey A. Krzysztow |
From: Ian C. <ian...@gm...> - 2011-09-07 14:02:22
|
I'm initializing SimpleWeb as follows: final Processor processor = new ContainerProcessor(new SynchronousContainer(this), new FileAllocator(), 5); final Server server = new SocketSnoopServer(new ProcessorServer(processor, 5 )); connection = new SocketConnection(server); connection.connect(new InetSocketAddress(listenPort)); I'm using it to implement a REST API (using JSON as a data encoding). I'm currently looking at a use-case where I will need to deal with considerable request volume, potentially over 1,000 requests per second. I'm wondering whether SimpleWeb will make use of HTTP 1.1 persistent connections and pipelining, which I assume would make it easier to handle this load, both for the server and clients talking to the server. Is the way I'm initializing SimpleWeb optimal for dealing with this volume of requests? Thanks, Ian. -- Ian Clarke Blog: http://blog.locut.us/ |
From: jlh <jl...@gm...> - 2011-07-11 18:12:22
|
Thanks for your reply! Niall Gallagher wrote: > The properties file is in the jar archive, are you somehow > repackaging the jar? No, I took it straight from SourceForge. > If you extract the downloadable jar file you will see the > properties file within the jar. I download simple-4.1.21.zip and then inspect the contained JAR file simple-4.1.21.jar and see no file 'Content.properties' in it. Not on version 4.1.21, not on version 4.0.7, but I do find it in version 3.1.3... Did it get lost in 4.x versions? > It is named Content.properties. I'm now puzzled about why the file is called Content.properties, when it is called FileIndexer.properties in the source tree and when it's the class FileIndexer that uses it (and loads it via ResourceBundle.getBundle())... > --- On Sun, 10/7/11, jlh <jlh@...> wrote: > > I only just started to find my way around this amazing > > framework > > and I'm also quite a beginner to Java in general. > > Right now I'm > > stuck trying to serve the correct Content-Type header, > > because > > FileIndexer.getContentType() always returns the default > > "application/octetstream". Apparently, > > getContentType() is > > supposed to find the content type by looking up the file > > extension > > in the file FileIndexer.properties (which is good enough > > for my > > purpose). That file ships with the source tree, but > > unless I'm > > mistaken, it isn't included in the JAR file, at least > > "unzip -l > > simple-4.1.21.jar" makes me think so. Is this a bug, > > or am I > > supposed to put a copy of this file somewhere? |
From: Niall G. <gal...@ya...> - 2011-07-11 11:12:12
|
The properties file is in the jar archive, are you somehow repackaging the jar? If you extract the downloadable jar file you will see the properties file within the jar. It is named Content.properties. --- On Sun, 10/7/11, jlh <jl...@gm...> wrote: > From: jlh <jl...@gm...> > Subject: [Simpleweb-Support] FileIndexer.getContentType() missing properties file > To: sim...@li... > Received: Sunday, 10 July, 2011, 7:07 AM > Hello list! > > I only just started to find my way around this amazing > framework > and I'm also quite a beginner to Java in general. > Right now I'm > stuck trying to serve the correct Content-Type header, > because > FileIndexer.getContentType() always returns the default > "application/octetstream". Apparently, > getContentType() is > supposed to find the content type by looking up the file > extension > in the file FileIndexer.properties (which is good enough > for my > purpose). That file ships with the source tree, but > unless I'm > mistaken, it isn't included in the JAR file, at least > "unzip -l > simple-4.1.21.jar" makes me think so. Is this a bug, > or am I > supposed to put a copy of this file somewhere? > > Thanks in advance for any hints. If possible, Cc: > me. > > jlh > > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is > seriously valuable. > Why? It contains a definitive record of application > performance, security > threats, fraudulent activity, and more. Splunk takes this > data and makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > |
From: jlh <jl...@gm...> - 2011-07-10 14:07:14
|
Hello list! I only just started to find my way around this amazing framework and I'm also quite a beginner to Java in general. Right now I'm stuck trying to serve the correct Content-Type header, because FileIndexer.getContentType() always returns the default "application/octetstream". Apparently, getContentType() is supposed to find the content type by looking up the file extension in the file FileIndexer.properties (which is good enough for my purpose). That file ships with the source tree, but unless I'm mistaken, it isn't included in the JAR file, at least "unzip -l simple-4.1.21.jar" makes me think so. Is this a bug, or am I supposed to put a copy of this file somewhere? Thanks in advance for any hints. If possible, Cc: me. jlh |
From: Niall G. <gal...@ya...> - 2011-04-08 09:25:53
|
Hi, A session is just a map of key value pairs, if you implement a Strategy you can maintain state within this map as its passed on every call to the Strategy. So I would implement a Strategy that acts as a bridge between your session and the internal one. Niall --- On Thu, 7/4/11, Bernardo S. A. Silva <ber...@gm...> wrote: > From: Bernardo S. A. Silva <ber...@gm...> > Subject: [Simpleweb-Support] Create a custom SessionManager > To: sim...@li... > Received: Thursday, 7 April, 2011, 7:48 PM > Hi all, > > I want to create my own SessionManager on Simple (for > example, a > memcached or a redis one). > So, how can I attatch it to the server? I am not seeing the > way I can > declare: "use this SessionManager..." > > Thanks in advance, > Bernardo Silva > > ------------------------------------------------------------------------------ > Xperia(TM) PLAY > It's a major breakthrough. An authentic gaming > smartphone on the nation's most reliable network. > And it wants your games. > http://p.sf.net/sfu/verizon-sfdev > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > |
From: Bernardo S. A. S. <ber...@gm...> - 2011-04-08 02:48:49
|
Hi all, I want to create my own SessionManager on Simple (for example, a memcached or a redis one). So, how can I attatch it to the server? I am not seeing the way I can declare: "use this SessionManager..." Thanks in advance, Bernardo Silva |
From: Niall G. <gal...@ya...> - 2011-01-13 10:09:59
|
Hi, Yes, this is the way you should intercept the connections. Regards, Niall --- On Wed, 12/1/11, Brad McEvoy <br...@br...> wrote: > From: Brad McEvoy <br...@br...> > Subject: Re: [Simpleweb-Support] Removing weaker ciphers from SSL support > To: sim...@li... > Received: Wednesday, 12 January, 2011, 12:39 PM > Hi Guys, > > Attached is some code from the Berry project which might > help. And some snippets from the attached source file. Note > the SecureProcessor class which is an implementation of > Server. I got most of this code from somewhere, can't > remember where. > > ---------------- > > protected SocketConnection initHttps( int > port ) { > SSLServerSocketFactory fac = > (SSLServerSocketFactory) > SSLServerSocketFactory.getDefault(); > > log.info( "initHttps: port: " + > port + " sslProtocol: " + sslProtocol + " > keystoreAlgorithm:" + keystoreAlgorithm ); > try { > KeyStore keystore > = KeyStore.getInstance( keystoreType ); > keystore.load( > new FileInputStream( keystoreFile ), > keystorePassword.toCharArray() ); > log.info( > "listing aliases defined in keystore" ); > > Enumeration<String> aliases = keystore.aliases(); > while( > aliases.hasMoreElements() ) { > > String a = aliases.nextElement(); > > log.info( " - alias: " + a ); > > Certificate cert = keystore.getCertificate( a ); > > log.info(" - cert type: " + > cert.getType()); > > log.info(" - algorithm: " + > cert.getPublicKey().getAlgorithm() ); > > log.info(" - format: " + > cert.getPublicKey().getFormat() ); > } > > > KeyManagerFactory > kmf = KeyManagerFactory.getInstance( keystoreAlgorithm ); > kmf.init( > keystore, keystorePassword.toCharArray() ); > > X509TrustManager > trustManager = new AnonymousTrustManager(); > > X509TrustManager[] trustManagers = new > X509TrustManager[]{trustManager}; > > SSLContext sslc = > SSLContext.getInstance( sslProtocol ); // An SSLContext is > an environment for implementing JSSE. It is used to create a > ServerSocketFactory > sslc.init( > kmf.getKeyManagers(), trustManagers, null ); > > > ContainerServer > processor = new ContainerServer(this, 25); > > org.simpleframework.transport.Server secure = new > SecureProcessor(processor, sslc); > SocketConnection > ssl = new SocketConnection(secure); > InetSocketAddress > address = new InetSocketAddress( port ); > ssl.connect( > address, sslc ); > > ------------------------------------------------------ > > > private static class SecureProcessor > implements org.simpleframework.transport.Server { > > private ContainerServer > processor; > private SSLContext context; > > public SecureProcessor( > ContainerServer processor, SSLContext context ) { > this.processor = > processor; > this.context = > context; > } > > public void process( Socket > pipeline ) throws IOException { > final > SocketChannel channel = pipeline.getChannel(); > final Map map = > new HashMap(); > Socket secure = > new Socket() { > > > private SSLEngine engine; > > > public Map getAttributes() { > > return map; > } > > > public SocketChannel getChannel() { > > return channel; > } > > > public SSLEngine getEngine() { > > if( engine == null ) { > > engine = > context.createSSLEngine(); > > } > > return engine; > } > }; > > processor.process( secure ); > } > > public void stop() { > } > } > } > > > On 13/01/11 01:50, Fábio Matos wrote: > > This also interest me, but it seems that Simple does > not gives you > > access to the SSLEngine. > > > > Example: > > ... > > Connection connection = new > SocketConnection(container); > > connection.connect(address, sslContext); > > ... > > > > Following the trail of the sslContext we get: > > org.simpleframework.transport.connect.* > > > > SocketConnection -> ListenerManager > -> Listener -> Acceptor > > > > where we have: > > > > private void process(SocketChannel channel) throws > IOException { > > SSLEngine engine = > context.createSSLEngine(); > > > > try { > > process(channel, > engine); > > } catch(Exception e) { > > channel.close(); > > } > > } > > > > this will then follow on and set the engine in the > Socket used. > > > > So, I don't see any easy way to get access to the > SSLEngine created to > > call the setEnabledCipherSuites method. > > > > > > > > 2011/1/12 Bruno Harbulot<br...@di...> > >> Hi, > >> > >> I think the problem is that configuring the cipher > suites is done via > >> the SSLEngine, not via the SSLContext: > >> http://download.oracle.com/javase/6/docs/api/javax/net/ssl/SSLEngine.html#setEnabledCipherSuites%28java.lang.String[]%29 > >> > >> One would need to be able to get hold of the > SSLEngine instance to > >> configure this. > >> > >> Best wishes, > >> > >> Bruno. > >> > >> > >> On 12/01/2011 08:29, Niall Gallagher wrote: > >>> Hi, > >>> > >>> You should be in complete control of SSL. All > you need to do is create > >>> an SSLContext and pass it to the connection. > It will create an SSLEngine > >>> per connection. > >>> > >>> There is nothing you need to do in Simple. > >>> > >>> Niall > >>> > >>> --- On *Mon, 10/1/11, Andrew Barlow /<and...@sd...>/* > wrote: > >>> > >>> > >>> From: Andrew Barlow<and...@sd...> > >>> Subject: > [Simpleweb-Support] Removing weaker ciphers from SSL > support > >>> To: "Simple support and > user issues" > >>> <sim...@li...> > >>> Received: Monday, 10 > January, 2011, 8:07 AM > >>> > >>> We have just received the > results of a security audit on a system > >>> that we developed which > uses Simple 4.1.21 to deliver content over SSL. > >>> > >>> The finding was: > >>> > >>> "Three weak SSL ciphers > were noted as being supported by the web > >>> server. These ciphers all > used a symmetric key length of 56 bits or > >>> less and are considered > unsuitable for use by a financial services > >>> application. > >>> OpenSSL name: > EXP-DES-CBC-SHA > >>> Detailed information: Key > Exchange: RSA(512); Authentication: RSA; > >>> Encryption: DES(40); MAC: > SHA1 > >>> OpenSSL name: EXP-RC4-MD5 > >>> Detailed information: Key > Exchange: RSA(512); Authentication: RSA; > >>> Encryption: RC4(40); MAC: > MD5 > >>> OpenSSL name: DES-CBC-SHA > >>> Detailed information: Key > Exchange: RSA; Authentication: " > >>> > >>> and the recommendation was > that the server be configured to remove > >>> these weak ciphers. > >>> > >>> Is this something we do in > Simple, or do we make changes in the Java > >>> keystore? > >>> > >>> Does anyone have any > experience of this? > >>> > >>> Andy Barlow > >>> > >>> > >>> / > >>> / > >>> / > >>> / > >>> > >>> > >>> > >>> > >>> -----Inline Attachment > Follows----- > >>> > >>> > ------------------------------------------------------------------------------ > >>> Gaining the trust of > online customers is vital for the success of > >>> any company > >>> that requires sensitive > data to be transmitted over the Web. Learn > >>> how to > >>> best implement a security > strategy that keeps consumers' information > >>> secure > >>> and instills the > confidence they need to proceed with transactions. > >>> http://p.sf.net/sfu/oracle-sfdevnl > >>> > >>> -----Inline Attachment > Follows----- > >>> > >>> > _______________________________________________ > >>> Simpleweb-Support mailing > list > >>> Sim...@li... > >>> </mc/compose?to=Sim...@li...> > >>> https://lists.sourceforge.net/lists/listinfo/simpleweb-support > >>> > >>> > >>> > >>> > >>> > ------------------------------------------------------------------------------ > >>> Protect Your Site and Customers from Malware > Attacks > >>> Learn about various malware tactics and how to > avoid them. Understand > >>> malware threats, the impact they can have on > your business, and how you > >>> can protect your company and customers by > using code signing. > >>> http://p.sf.net/sfu/oracle-sfdevnl > >>> > >>> > >>> > >>> > _______________________________________________ > >>> Simpleweb-Support mailing list > >>> Sim...@li... > >>> https://lists.sourceforge.net/lists/listinfo/simpleweb-support > >> > ------------------------------------------------------------------------------ > >> Protect Your Site and Customers from Malware > Attacks > >> Learn about various malware tactics and how to > avoid them. Understand > >> malware threats, the impact they can have on your > business, and how you > >> can protect your company and customers by using > code signing. > >> http://p.sf.net/sfu/oracle-sfdevnl > >> _______________________________________________ > >> Simpleweb-Support mailing list > >> Sim...@li... > >> https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > > ------------------------------------------------------------------------------ > > Protect Your Site and Customers from Malware Attacks > > Learn about various malware tactics and how to avoid > them. Understand > > malware threats, the impact they can have on your > business, and how you > > can protect your company and customers by using code > signing. > > http://p.sf.net/sfu/oracle-sfdevnl > > _______________________________________________ > > Simpleweb-Support mailing list > > Sim...@li... > > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > > -----Inline Attachment Follows----- > > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. > Understand > malware threats, the impact they can have on your business, > and how you > can protect your company and customers by using code > signing. > http://p.sf.net/sfu/oracle-sfdevnl > -----Inline Attachment Follows----- > > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > |
From: Niall G. <gal...@ya...> - 2011-01-13 10:07:12
|
Hi, Yes, you do have access to it. Take a look at the org.simpleframework.transport.Server interface. Notice how it accepts the org.simpleframework.transport.Socket. There is a Socket.getEngine method. Here is where you do what you want. Niall --- On Wed, 12/1/11, Fábio Matos <fab...@gm...> wrote: > From: Fábio Matos <fab...@gm...> > Subject: Re: [Simpleweb-Support] Removing weaker ciphers from SSL support > To: "Simple support and user issues" <sim...@li...> > Received: Wednesday, 12 January, 2011, 4:50 AM > This also interest me, but it seems > that Simple does not gives you > access to the SSLEngine. > > Example: > ... > Connection connection = new SocketConnection(container); > connection.connect(address, sslContext); > ... > > Following the trail of the sslContext we get: > org.simpleframework.transport.connect.* > > SocketConnection -> ListenerManager -> Listener -> > Acceptor > > where we have: > > private void process(SocketChannel channel) throws > IOException { > SSLEngine engine = context.createSSLEngine(); > > try { > process(channel, engine); > } catch(Exception e) { > channel.close(); > } > } > > this will then follow on and set the engine in the Socket > used. > > So, I don't see any easy way to get access to the SSLEngine > created to > call the setEnabledCipherSuites method. > > > > 2011/1/12 Bruno Harbulot <br...@di...> > > > > Hi, > > > > I think the problem is that configuring the cipher > suites is done via > > the SSLEngine, not via the SSLContext: > > http://download.oracle.com/javase/6/docs/api/javax/net/ssl/SSLEngine.html#setEnabledCipherSuites%28java.lang.String[]%29 > > > > One would need to be able to get hold of the SSLEngine > instance to > > configure this. > > > > Best wishes, > > > > Bruno. > > > > > > On 12/01/2011 08:29, Niall Gallagher wrote: > > > Hi, > > > > > > You should be in complete control of SSL. All you > need to do is create > > > an SSLContext and pass it to the connection. It > will create an SSLEngine > > > per connection. > > > > > > There is nothing you need to do in Simple. > > > > > > Niall > > > > > > --- On *Mon, 10/1/11, Andrew Barlow /<and...@sd...>/* > wrote: > > > > > > > > > From: Andrew Barlow <and...@sd...> > > > Subject: [Simpleweb-Support] Removing > weaker ciphers from SSL support > > > To: "Simple support and user issues" > > > <sim...@li...> > > > Received: Monday, 10 January, 2011, 8:07 > AM > > > > > > We have just received the results of a > security audit on a system > > > that we developed which uses Simple 4.1.21 > to deliver content over SSL. > > > > > > The finding was: > > > > > > "Three weak SSL ciphers were noted as being > supported by the web > > > server. These ciphers all used a symmetric > key length of 56 bits or > > > less and are considered unsuitable for use > by a financial services > > > application. > > > OpenSSL name: EXP-DES-CBC-SHA > > > Detailed information: Key Exchange: > RSA(512); Authentication: RSA; > > > Encryption: DES(40); MAC: SHA1 > > > OpenSSL name: EXP-RC4-MD5 > > > Detailed information: Key Exchange: > RSA(512); Authentication: RSA; > > > Encryption: RC4(40); MAC: MD5 > > > OpenSSL name: DES-CBC-SHA > > > Detailed information: Key Exchange: RSA; > Authentication: " > > > > > > and the recommendation was that the server > be configured to remove > > > these weak ciphers. > > > > > > Is this something we do in Simple, or do we > make changes in the Java > > > keystore? > > > > > > Does anyone have any experience of this? > > > > > > Andy Barlow > > > > > > > > > / > > > / > > > / > > > / > > > > > > > > > > > > > > > -----Inline Attachment Follows----- > > > > > > > ------------------------------------------------------------------------------ > > > Gaining the trust of online customers is > vital for the success of > > > any company > > > that requires sensitive data to be > transmitted over the Web. Learn > > > how to > > > best implement a security strategy that > keeps consumers' information > > > secure > > > and instills the confidence they need to > proceed with transactions. > > > http://p.sf.net/sfu/oracle-sfdevnl > > > > > > -----Inline Attachment Follows----- > > > > > > > _______________________________________________ > > > Simpleweb-Support mailing list > > > Sim...@li... > > > </mc/compose?to=Sim...@li...> > > > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > Protect Your Site and Customers from Malware > Attacks > > > Learn about various malware tactics and how to > avoid them. Understand > > > malware threats, the impact they can have on your > business, and how you > > > can protect your company and customers by using > code signing. > > > http://p.sf.net/sfu/oracle-sfdevnl > > > > > > > > > > > > _______________________________________________ > > > Simpleweb-Support mailing list > > > Sim...@li... > > > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > > > > ------------------------------------------------------------------------------ > > Protect Your Site and Customers from Malware Attacks > > Learn about various malware tactics and how to avoid > them. Understand > > malware threats, the impact they can have on your > business, and how you > > can protect your company and customers by using code > signing. > > http://p.sf.net/sfu/oracle-sfdevnl > > _______________________________________________ > > Simpleweb-Support mailing list > > Sim...@li... > > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. > Understand > malware threats, the impact they can have on your business, > and how you > can protect your company and customers by using code > signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > |