lipog-commit Mailing List for Little Portal Gizmo
Status: Beta
Brought to you by:
jbu
You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(94) |
Jun
(14) |
Jul
(168) |
Aug
(39) |
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(6) |
Dec
|
From: Joerg B. <jb...@us...> - 2011-11-10 18:55:23
|
Update of /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/session In directory vz-cvs-4.sog:/tmp/cvs-serv10116/src/net/heilancoo/portal/session Modified Files: Session.java Log Message: added destroySession() method to Session interface; session creation sanity check and error recovery Index: Session.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/session/Session.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Session.java 28 May 2009 18:34:49 -0000 1.8 --- Session.java 10 Nov 2011 18:55:21 -0000 1.9 *************** *** 18,22 **** * */ ! public interface Session extends Controller { ! } --- 18,23 ---- * */ ! public interface Session extends Controller ! { ! public void destroySession(); } |
Update of /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test In directory vz-cvs-4.sog:/tmp/cvs-serv10100/src/net/heilancoo/portal/webapps/test Modified Files: SimpleSession.java SessionWithSubs1.java SessionWithCustomTemplateFolder.java SimpleSessionMainEntryMissing.java SessionWithMultipleResponseFormatsTemplateMissing.java SessionWithSubs2.java SessionWithCustomEntry.java SessionWithCustomDefaultResponseFormat.java SessionWithMultipleResponseFormats.java Log Message: added destroySession() method to Session interface; session creation sanity check and error recovery Index: SimpleSession.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test/SimpleSession.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** SimpleSession.java 13 Aug 2009 22:35:18 -0000 1.8 --- SimpleSession.java 10 Nov 2011 18:55:18 -0000 1.9 *************** *** 35,37 **** --- 35,42 ---- HttpResponse response, FreeMarkerModel model) { } + + @Override + public void destroySession() + { + } } Index: SessionWithSubs2.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test/SessionWithSubs2.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SessionWithSubs2.java 7 Jul 2009 22:41:59 -0000 1.2 --- SessionWithSubs2.java 10 Nov 2011 18:55:18 -0000 1.3 *************** *** 30,32 **** --- 30,37 ---- @ExitPoint("cc/fareYeWell") public class SessionWithSubs2 implements Session { + + @Override + public void destroySession() + { + } } Index: SessionWithCustomDefaultResponseFormat.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test/SessionWithCustomDefaultResponseFormat.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** SessionWithCustomDefaultResponseFormat.java 13 Aug 2009 22:35:18 -0000 1.9 --- SessionWithCustomDefaultResponseFormat.java 10 Nov 2011 18:55:18 -0000 1.10 *************** *** 40,42 **** --- 40,47 ---- } + @Override + public void destroySession() + { + } + } Index: SessionWithSubs1.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test/SessionWithSubs1.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SessionWithSubs1.java 7 Jul 2009 22:41:59 -0000 1.2 --- SessionWithSubs1.java 10 Nov 2011 18:55:18 -0000 1.3 *************** *** 29,31 **** --- 29,36 ---- public class SessionWithSubs1 implements Session { + @Override + public void destroySession() + { + } + } Index: SessionWithCustomEntry.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test/SessionWithCustomEntry.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** SessionWithCustomEntry.java 13 Aug 2009 22:35:18 -0000 1.8 --- SessionWithCustomEntry.java 10 Nov 2011 18:55:18 -0000 1.9 *************** *** 37,39 **** --- 37,44 ---- HttpResponse response, FreeMarkerModel model) { } + + @Override + public void destroySession() + { + } } Index: SessionWithMultipleResponseFormats.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test/SessionWithMultipleResponseFormats.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** SessionWithMultipleResponseFormats.java 13 Aug 2009 22:35:18 -0000 1.8 --- SessionWithMultipleResponseFormats.java 10 Nov 2011 18:55:18 -0000 1.9 *************** *** 34,36 **** --- 34,41 ---- HttpResponse response, FreeMarkerModel model) { } + + @Override + public void destroySession() + { + } } Index: SessionWithCustomTemplateFolder.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test/SessionWithCustomTemplateFolder.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** SessionWithCustomTemplateFolder.java 13 Aug 2009 22:35:18 -0000 1.8 --- SessionWithCustomTemplateFolder.java 10 Nov 2011 18:55:18 -0000 1.9 *************** *** 33,35 **** --- 33,40 ---- } + @Override + public void destroySession() + { + } + } Index: SessionWithMultipleResponseFormatsTemplateMissing.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test/SessionWithMultipleResponseFormatsTemplateMissing.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** SessionWithMultipleResponseFormatsTemplateMissing.java 28 May 2009 18:34:46 -0000 1.7 --- SessionWithMultipleResponseFormatsTemplateMissing.java 10 Nov 2011 18:55:18 -0000 1.8 *************** *** 35,37 **** --- 35,42 ---- HttpResponse response, HttpContext context, FreeMarkerModel model) { } + + @Override + public void destroySession() + { + } } Index: SimpleSessionMainEntryMissing.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.test/src/net/heilancoo/portal/webapps/test/SimpleSessionMainEntryMissing.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** SimpleSessionMainEntryMissing.java 28 May 2009 18:34:46 -0000 1.7 --- SimpleSessionMainEntryMissing.java 10 Nov 2011 18:55:18 -0000 1.8 *************** *** 20,22 **** --- 20,27 ---- public class SimpleSessionMainEntryMissing implements Session { + @Override + public void destroySession() + { + } + } |
From: Joerg B. <jb...@us...> - 2011-11-10 18:55:16
|
Update of /cvsroot/lipog/net.heilancoo.bingo/src/net/heilancoo/bingo In directory vz-cvs-4.sog:/tmp/cvs-serv10095/src/net/heilancoo/bingo Modified Files: BingoSession.java Log Message: added destroySession() method to Session interface; session creation sanity check and error recovery Index: BingoSession.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.bingo/src/net/heilancoo/bingo/BingoSession.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** BingoSession.java 13 Aug 2009 22:35:21 -0000 1.13 --- BingoSession.java 10 Nov 2011 18:55:14 -0000 1.14 *************** *** 62,64 **** --- 62,69 ---- model.put("access", new Long(accessCounter)); } + + @Override + public void destroySession() + { + } } |
From: Joerg B. <jb...@us...> - 2011-11-10 18:55:12
|
Update of /cvsroot/lipog/net.heilancoo.portal.documentation/doc In directory vz-cvs-4.sog:/tmp/cvs-serv10074/doc Modified Files: webapp-123.html Log Message: added destroySession() method to Session interface; session creation sanity check and error recovery Index: webapp-123.html =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.documentation/doc/webapp-123.html,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** webapp-123.html 13 Aug 2009 22:35:27 -0000 1.20 --- webapp-123.html 10 Nov 2011 18:55:10 -0000 1.21 *************** *** 124,129 **** like this:</p> <pre> ! public class BingoSession implements Session { ! } </pre> --- 124,134 ---- like this:</p> <pre> ! public class BingoSession implements Session ! { ! @Override ! public void destroySession() ! { ! // TODO Auto-generated method stub ! } } </pre> *************** *** 136,140 **** very very simple and just generates a snippet of HTML.</p> <pre> ! public class BingoSession implements Session { private static final Logger logger = Logger.getLogger(BingoSession.class); --- 141,146 ---- very very simple and just generates a snippet of HTML.</p> <pre> ! public class BingoSession implements Session ! { private static final Logger logger = Logger.getLogger(BingoSession.class); *************** *** 144,151 **** private final long serial; ! public BingoSession(String user) { this.user = user; ! synchronized(sessionCounter) { this.serial = (sessionCounter[0]++); } --- 150,159 ---- private final long serial; ! public BingoSession(String user) ! { this.user = user; ! synchronized(sessionCounter) ! { this.serial = (sessionCounter[0]++); } *************** *** 155,161 **** public void main(HttpRequest request, FormFieldContainer fields, ! HttpResponse response) { ! try { String encoding = "UTF-8"; --- 163,171 ---- public void main(HttpRequest request, FormFieldContainer fields, ! HttpResponse response) ! { ! try ! { String encoding = "UTF-8"; *************** *** 167,186 **** response.setEntity(body); } ! catch (UnsupportedEncodingException e) { logger.error(e, e); } } } </pre> <p>Open the file BingoApplication class. It'll look like this:</p> <pre> ! public class BingoApplication implements Application { ! public BingoApplication() { // TODO Auto-generated constructor stub } @Override ! public String getVersion() { // TODO Auto-generated method stub return null; --- 177,205 ---- response.setEntity(body); } ! catch (UnsupportedEncodingException e) ! { logger.error(e, e); } } + + @Override + public void destroySession() + { + } } </pre> <p>Open the file BingoApplication class. It'll look like this:</p> <pre> ! public class BingoApplication implements Application ! { ! public BingoApplication() ! { // TODO Auto-generated constructor stub } @Override ! public String getVersion() ! { // TODO Auto-generated method stub return null; *************** *** 188,192 **** @Override ! public void initialise(ApplicationInfo info) { // TODO Auto-generated method stub } --- 207,212 ---- @Override ! public void initialise(ApplicationInfo info) ! { // TODO Auto-generated method stub } *************** *** 194,198 **** @Override public Session validateCredentialsAndMakeNewSession( ! FormFieldContainer fields) throws FormFieldAccessException { // TODO Auto-generated method stub return null; --- 214,219 ---- @Override public Session validateCredentialsAndMakeNewSession( ! FormFieldContainer fields) throws FormFieldAccessException ! { // TODO Auto-generated method stub return null; *************** *** 208,224 **** <pre> @ValidSessions({ BingoSession.class }) ! public class BingoApplication implements Application { ! public BingoApplication() { // TODO Auto-generated constructor stub } @Override ! public String getVersion() { return "1.0"; } @Override ! public void initialise(ApplicationInfo info) { // TODO Auto-generated method stub } --- 229,249 ---- <pre> @ValidSessions({ BingoSession.class }) ! public class BingoApplication implements Application ! { ! public BingoApplication() ! { // TODO Auto-generated constructor stub } @Override ! public String getVersion() ! { return "1.0"; } @Override ! public void initialise(ApplicationInfo info) ! { // TODO Auto-generated method stub } *************** *** 226,230 **** @Override public Session validateCredentialsAndMakeNewSession( ! FormFieldContainer fields) throws FormFieldAccessException { String user = fields.getStringValue("user"); String password = fields.getStringValue("password"); --- 251,256 ---- @Override public Session validateCredentialsAndMakeNewSession( ! FormFieldContainer fields) throws FormFieldAccessException ! { String user = fields.getStringValue("user"); String password = fields.getStringValue("password"); *************** *** 271,275 **** <p>Change class BingoSession so it ends up like this:</p> <pre> ! public class BingoSession implements Session { private static long [] sessionCounter = { 0 }; --- 297,302 ---- <p>Change class BingoSession so it ends up like this:</p> <pre> ! public class BingoSession implements Session ! { private static long [] sessionCounter = { 0 }; *************** *** 278,296 **** private long accessCounter; ! public BingoSession(String user) { this.user = user; this.accessCounter = 0; ! synchronized(sessionCounter) { this.serial = (sessionCounter[0]++); } } ! public long getAccessCounter() { return accessCounter; } @Request ! public void main(FormFieldContainer fields, FreeMarkerModel model) { accessCounter += 1; --- 305,327 ---- private long accessCounter; ! public BingoSession(String user) ! { this.user = user; this.accessCounter = 0; ! synchronized(sessionCounter) ! { this.serial = (sessionCounter[0]++); } } ! public long getAccessCounter() ! { return accessCounter; } @Request ! public void main(FormFieldContainer fields, FreeMarkerModel model) ! { accessCounter += 1; *************** *** 299,302 **** --- 330,338 ---- model.put("access", new Long(accessCounter)); } + + @Override + public void destroySession() + { + } } </pre> |
From: Joerg B. <jb...@us...> - 2011-11-10 18:55:03
|
Update of /cvsroot/lipog/net.heilancoo.portal.examples/src/net/heilancoo/portal/examples/json In directory vz-cvs-4.sog:/tmp/cvs-serv10046/src/net/heilancoo/portal/examples/json Modified Files: JsonSession.java Log Message: added destroySession() method to Session interface; session creation sanity check and error recovery Index: JsonSession.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.examples/src/net/heilancoo/portal/examples/json/JsonSession.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** JsonSession.java 13 Aug 2009 22:35:15 -0000 1.3 --- JsonSession.java 10 Nov 2011 18:54:59 -0000 1.4 *************** *** 59,61 **** --- 59,66 ---- model.put("arrayOf3", array); } + + @Override + public void destroySession() + { + } } |
From: Joerg B. <jb...@us...> - 2011-11-10 18:55:02
|
Update of /cvsroot/lipog/net.heilancoo.portal.examples/src/net/heilancoo/portal/examples/customentrypoint In directory vz-cvs-4.sog:/tmp/cvs-serv10046/src/net/heilancoo/portal/examples/customentrypoint Modified Files: CustomEntryPointSession.java Log Message: added destroySession() method to Session interface; session creation sanity check and error recovery Index: CustomEntryPointSession.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.examples/src/net/heilancoo/portal/examples/customentrypoint/CustomEntryPointSession.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CustomEntryPointSession.java 13 Aug 2009 22:35:15 -0000 1.2 --- CustomEntryPointSession.java 10 Nov 2011 18:54:59 -0000 1.3 *************** *** 50,52 **** --- 50,57 ---- model.put("time", new Date().toString()); } + + @Override + public void destroySession() + { + } } |
From: Nuno M. <nun...@us...> - 2009-08-25 19:49:24
|
Update of /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/application In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22086/src/net/heilancoo/portal/application Modified Files: Tag: COOKIE_SUPPORT2 ApplicationRequestHandler.java Log Message: Organized imports Index: ApplicationRequestHandler.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/application/ApplicationRequestHandler.java,v retrieving revision 1.28.2.2 retrieving revision 1.28.2.3 diff -C2 -d -r1.28.2.2 -r1.28.2.3 *** ApplicationRequestHandler.java 25 Aug 2009 19:47:51 -0000 1.28.2.2 --- ApplicationRequestHandler.java 25 Aug 2009 19:49:16 -0000 1.28.2.3 *************** *** 47,54 **** import org.apache.http.HttpResponse; import org.apache.http.HttpStatus; - import org.apache.http.client.CookieStore; - import org.apache.http.client.protocol.ClientContext; - import org.apache.http.impl.client.BasicCookieStore; - import org.apache.http.impl.cookie.BasicClientCookie; import org.apache.http.protocol.HttpContext; import org.apache.http.protocol.HttpRequestHandler; --- 47,50 ---- |
From: Nuno M. <nun...@us...> - 2009-08-25 19:48:01
|
Update of /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/application In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21950/src/net/heilancoo/portal/application Modified Files: Tag: COOKIE_SUPPORT2 ApplicationRequestHandler.java Log Message: Minor refactor Index: ApplicationRequestHandler.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/application/ApplicationRequestHandler.java,v retrieving revision 1.28.2.1 retrieving revision 1.28.2.2 diff -C2 -d -r1.28.2.1 -r1.28.2.2 *** ApplicationRequestHandler.java 25 Aug 2009 19:37:39 -0000 1.28.2.1 --- ApplicationRequestHandler.java 25 Aug 2009 19:47:51 -0000 1.28.2.2 *************** *** 18,22 **** import java.io.Reader; import java.lang.reflect.InvocationTargetException; - import java.net.CookieManager; import java.util.HashMap; import java.util.List; --- 18,21 ---- *************** *** 282,286 **** dispatchApplicationMethod(method, presentation, request, response, context); else { ! //nuno // try to get key from cookie String key = getKeyFromCookie(request); --- 281,285 ---- dispatchApplicationMethod(method, presentation, request, response, context); else { ! // try to get key from cookie String key = getKeyFromCookie(request); *************** *** 290,294 **** key = components[1] ; } - //nuno String controllerKey = components.length == 4 ? components[2] : ""; --- 289,292 ---- *************** *** 523,535 **** String key = storeSession(sc); - //nuno // test if cookies are enabled; assumes a testcookie has already been set if (request.containsHeader("Cookie")) { ! response.addHeader("Set-Cookie", "chave="+key); response.addHeader("Location", "/" + getUriPrefix() + "/" + "usecookie" + "/" + sm.getEntryPoint()); } else { response.addHeader("Location", "/" + getUriPrefix() + "/" + key + "/" + sm.getEntryPoint()); } - //nuno response.setStatusCode(HttpStatus.SC_MOVED_TEMPORARILY); --- 521,531 ---- String key = storeSession(sc); // test if cookies are enabled; assumes a testcookie has already been set if (request.containsHeader("Cookie")) { ! response.addHeader("Set-Cookie", "sessionkey="+key); response.addHeader("Location", "/" + getUriPrefix() + "/" + "usecookie" + "/" + sm.getEntryPoint()); } else { response.addHeader("Location", "/" + getUriPrefix() + "/" + key + "/" + sm.getEntryPoint()); } response.setStatusCode(HttpStatus.SC_MOVED_TEMPORARILY); |
From: Nuno M. <nun...@us...> - 2009-08-25 19:37:58
|
Update of /cvsroot/lipog/net.heilancoo.portal In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21179 Modified Files: Tag: COOKIE_SUPPORT2 plugin.xml Log Message: Tests with cookie support. Index: plugin.xml =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal/plugin.xml,v retrieving revision 1.6 retrieving revision 1.6.4.1 diff -C2 -d -r1.6 -r1.6.4.1 *** plugin.xml 10 May 2009 20:19:14 -0000 1.6 --- plugin.xml 25 Aug 2009 19:37:38 -0000 1.6.4.1 *************** *** 34,36 **** --- 34,46 ---- </product> </extension> + <extension + id="gizmo" + point="org.eclipse.core.runtime.products"> + <product + application="net.heilancoo.portal.service"> + <property + name="appName"> + </property> + </product> + </extension> </plugin> |
From: Nuno M. <nun...@us...> - 2009-08-25 19:37:49
|
Update of /cvsroot/lipog/net.heilancoo.portal/META-INF In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21179/META-INF Modified Files: Tag: COOKIE_SUPPORT2 MANIFEST.MF Log Message: Tests with cookie support. Index: MANIFEST.MF =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal/META-INF/MANIFEST.MF,v retrieving revision 1.4 retrieving revision 1.4.4.1 diff -C2 -d -r1.4 -r1.4.4.1 *** MANIFEST.MF 11 May 2009 16:43:12 -0000 1.4 --- MANIFEST.MF 25 Aug 2009 19:37:39 -0000 1.4.4.1 *************** *** 9,13 **** org.apache.httpcore;visibility:=reexport, org.apache.log4j;visibility:=reexport, ! net.heilancoo.utils;bundle-version="1.0.0";visibility:=reexport Bundle-ActivationPolicy: lazy Export-Package: net.heilancoo.portal, --- 9,14 ---- org.apache.httpcore;visibility:=reexport, org.apache.log4j;visibility:=reexport, ! net.heilancoo.utils;visibility:=reexport, ! org.apache.httpclient Bundle-ActivationPolicy: lazy Export-Package: net.heilancoo.portal, |
From: Nuno M. <nun...@us...> - 2009-08-25 19:37:49
|
Update of /cvsroot/lipog/net.heilancoo.portal/statics In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21179/statics Modified Files: Tag: COOKIE_SUPPORT2 login.html Log Message: Tests with cookie support. Index: login.html =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal/statics/login.html,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** login.html 20 Apr 2009 18:56:18 -0000 1.2 --- login.html 25 Aug 2009 19:37:39 -0000 1.2.2.1 *************** *** 2,16 **** <html> <head> ! <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> ! <title>Login</title> </head> <body> ! <form name="input" action="login-validate" method="post"> ! <table> ! <tr><td>Username:</td><td><input type="text" name="user"></td></tr> ! <tr><td>Password:</td><td><input type="password" name="password"></td></tr> ! <tr><td colspan="2" align="center"><input type="submit" value="Login"></td></tr> ! </table> ! </form> </body> </html> \ No newline at end of file --- 2,32 ---- <html> <head> ! <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> ! <title>Looking for a flat?</title> ! <link rel="stylesheet" href="/lookingforflat/static/style.css"> </head> <body> ! ! <div id="header"> ! <form name="input" action="login-validate" method="post"> ! Username: <input type="text" name="user"> ! Password: <input type="password" name="password"> ! <input type="submit" value="Login"> ! </form> ! </div> ! ! <br/> ! <br/> ! ! <div id="footer"> ! about | faq | support | privacy | terms of service | feedback always welcome ! <br/><br/> ! </div> ! ! <div id="powered"> ! <br/> ! Powered by <a href="http://lipog.sf.net">The Gizmo</a> ! </div> ! </body> </html> \ No newline at end of file |
From: Nuno M. <nun...@us...> - 2009-08-25 19:37:47
|
Update of /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/application In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21179/src/net/heilancoo/portal/application Modified Files: Tag: COOKIE_SUPPORT2 ApplicationRequestHandler.java Log Message: Tests with cookie support. Index: ApplicationRequestHandler.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/application/ApplicationRequestHandler.java,v retrieving revision 1.28 retrieving revision 1.28.2.1 diff -C2 -d -r1.28 -r1.28.2.1 *** ApplicationRequestHandler.java 13 Jul 2009 18:22:19 -0000 1.28 --- ApplicationRequestHandler.java 25 Aug 2009 19:37:39 -0000 1.28.2.1 *************** *** 18,21 **** --- 18,22 ---- import java.io.Reader; import java.lang.reflect.InvocationTargetException; + import java.net.CookieManager; import java.util.HashMap; import java.util.List; *************** *** 43,49 **** --- 44,55 ---- import net.heilancoo.utils.Utils; + import org.apache.http.Header; import org.apache.http.HttpRequest; import org.apache.http.HttpResponse; import org.apache.http.HttpStatus; + import org.apache.http.client.CookieStore; + import org.apache.http.client.protocol.ClientContext; + import org.apache.http.impl.client.BasicCookieStore; + import org.apache.http.impl.cookie.BasicClientCookie; import org.apache.http.protocol.HttpContext; import org.apache.http.protocol.HttpRequestHandler; *************** *** 260,263 **** --- 266,273 ---- if(components.length == 1) { what = "start page"; + + // to test cookie support/that cookies are enabled + response.addHeader("Set-Cookie", "testcookie"); + doStartPage(uri, request, response, context); } *************** *** 272,279 **** dispatchApplicationMethod(method, presentation, request, response, context); else { ! String key = components[1]; String controllerKey = components.length == 4 ? components[2] : ""; ! SessionCompound sc = getSessionFor(key); ! if(sc == null) ResponseHelper.error(HttpStatus.SC_NOT_FOUND, response, "No Session", "No session " + key + "."); --- 282,298 ---- dispatchApplicationMethod(method, presentation, request, response, context); else { ! //nuno ! // try to get key from cookie ! String key = getKeyFromCookie(request); ! ! if (key == null) { ! //fallback to get key from uri ! key = components[1] ; ! } ! //nuno ! String controllerKey = components.length == 4 ? components[2] : ""; ! SessionCompound sc = getSessionFor(key); ! if(sc == null) ResponseHelper.error(HttpStatus.SC_NOT_FOUND, response, "No Session", "No session " + key + "."); *************** *** 297,300 **** --- 316,331 ---- } + private String getKeyFromCookie(HttpRequest request) + { + if (request.containsHeader("Cookie")) + { + Header[] info = request.getHeaders("Cookie"); + String value = info[0].getValue(); + String[] key = value.split("="); + return (key[1]); + } + return null; + } + private void dispatchApplicationMethod(String method, String presentation, HttpRequest request, HttpResponse response, HttpContext context) throws Exception { *************** *** 419,423 **** } } ! private String getTemplateFolder(Bundle bundle, Class<?> controllerClass) { String templateFldr = ResponseHelper.getTemplateFolder(controllerClass); --- 450,454 ---- } } ! private String getTemplateFolder(Bundle bundle, Class<?> controllerClass) { String templateFldr = ResponseHelper.getTemplateFolder(controllerClass); *************** *** 491,495 **** String key = storeSession(sc); ! response.addHeader("Location", "/" + getUriPrefix() + "/" + key + "/" + sm.getEntryPoint()); response.setStatusCode(HttpStatus.SC_MOVED_TEMPORARILY); } --- 522,536 ---- String key = storeSession(sc); ! ! //nuno ! // test if cookies are enabled; assumes a testcookie has already been set ! if (request.containsHeader("Cookie")) { ! response.addHeader("Set-Cookie", "chave="+key); ! response.addHeader("Location", "/" + getUriPrefix() + "/" + "usecookie" + "/" + sm.getEntryPoint()); ! } else { ! response.addHeader("Location", "/" + getUriPrefix() + "/" + key + "/" + sm.getEntryPoint()); ! } ! //nuno ! response.setStatusCode(HttpStatus.SC_MOVED_TEMPORARILY); } |
From: Joerg B. <jb...@us...> - 2009-08-20 20:47:09
|
Update of /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv30813/src/net/heilancoo/portal Modified Files: PortalPlugin.java Log Message: tidy up of response generators Index: PortalPlugin.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/PortalPlugin.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** PortalPlugin.java 28 Jul 2009 16:40:50 -0000 1.25 --- PortalPlugin.java 20 Aug 2009 20:46:56 -0000 1.26 *************** *** 16,22 **** import java.io.IOException; import java.lang.reflect.Method; - import java.util.ArrayList; import java.util.HashMap; - import java.util.List; import java.util.Map; import java.util.Properties; --- 16,20 ---- *************** *** 70,74 **** private Map<String, ApplicationRequestHandler> webAppMap; ! private List<ResponderFactory> responseGeneratorFactories; private Thread httpServiceThread; --- 68,72 ---- private Map<String, ApplicationRequestHandler> webAppMap; ! private ResponderFactory responseGeneratorFactory; private Thread httpServiceThread; *************** *** 86,90 **** this.webAppMap = new TreeMap<String, ApplicationRequestHandler>(); this.requestHandlerMap = new HashMap<String, HttpRequestHandler>(); ! this.responseGeneratorFactories = new ArrayList<ResponderFactory>(); } --- 84,88 ---- this.webAppMap = new TreeMap<String, ApplicationRequestHandler>(); this.requestHandlerMap = new HashMap<String, HttpRequestHandler>(); ! this.responseGeneratorFactory = new ResponderFactory(); } *************** *** 117,127 **** public Responder findResponseGeneratorFor(Method method, Bundle bundle, MimeTypeMapper mimeMapper) { ! for(ResponderFactory factory : responseGeneratorFactories) { ! Responder g = factory.tryMakingResponderFor(method, bundle, mimeMapper); ! if(g != null) ! return g; ! } ! ! return null; } --- 115,119 ---- public Responder findResponseGeneratorFor(Method method, Bundle bundle, MimeTypeMapper mimeMapper) { ! return responseGeneratorFactory.tryMakingResponderFor(method, bundle, mimeMapper); } *************** *** 135,145 **** for(IExtension ex : point.getExtensions()) { for(IConfigurationElement ce : ex.getConfigurationElements()) { ! logger.info("Response generator factory " + ce.getAttribute("generator-factory") + "."); try { ! ResponderFactory gen = (ResponderFactory) ce.createExecutableExtension("generator-factory"); ! responseGeneratorFactories.add(gen); } ! catch (CoreException e) { logger.error(e, e); initialisationOk = false; --- 127,137 ---- for(IExtension ex : point.getExtensions()) { for(IConfigurationElement ce : ex.getConfigurationElements()) { ! logger.info("Response generator " + ce.getAttribute("generator") + "."); try { ! Responder resp = (Responder) ce.createExecutableExtension("generator"); ! responseGeneratorFactory.addResponder(resp.getClass()); } ! catch (Exception e) { logger.error(e, e); initialisationOk = false; |
From: Joerg B. <jb...@us...> - 2009-08-20 20:47:09
|
Update of /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/responders In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv30813/src/net/heilancoo/portal/responders Modified Files: ResponderFactory.java PlainResponder.java PlainResponderBasic.java ResponderMatcher.java Added Files: MethodPrototype.java Removed Files: PlainResponderFactory.java Log Message: tidy up of response generators --- PlainResponderFactory.java DELETED --- Index: PlainResponderBasic.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/responders/PlainResponderBasic.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PlainResponderBasic.java 13 Aug 2009 22:35:34 -0000 1.1 --- PlainResponderBasic.java 20 Aug 2009 20:46:56 -0000 1.2 *************** *** 27,32 **** --- 27,36 ---- * */ + @MethodPrototype({ FormFieldContainer.class }) public class PlainResponderBasic extends Responder { + public PlainResponderBasic() { + } + public PlainResponderBasic(Method method, Bundle bundle, MimeTypeMapper mimeMapper) { super(method); Index: ResponderMatcher.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/responders/ResponderMatcher.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ResponderMatcher.java 13 Aug 2009 22:35:34 -0000 1.1 --- ResponderMatcher.java 20 Aug 2009 20:46:56 -0000 1.2 *************** *** 32,38 **** private final Constructor<?> constructor; ! public ResponderMatcher(Class<?> responder, Class<?> [] parameters) throws SecurityException, NoSuchMethodException { this.constructor = responder.getConstructor(Method.class, Bundle.class, MimeTypeMapper.class); ! this.parameters = parameters; } --- 32,54 ---- private final Constructor<?> constructor; ! public ResponderMatcher(Class<?> responder) throws SecurityException, NoSuchMethodException, ResponderCreationException { ! MethodPrototype mp = responder.getAnnotation(MethodPrototype.class); ! ! if(mp == null) ! throw new ResponderCreationException("Annotation @MethodPrototype({ ... }) missing from responder " ! + responder.getCanonicalName() + "."); ! this.constructor = responder.getConstructor(Method.class, Bundle.class, MimeTypeMapper.class); ! this.parameters = mp.value(); ! ! StringBuilder sb = new StringBuilder(); ! ! for(Class<?> p : parameters) { ! if(sb.length() > 0) ! sb.append(", "); ! sb.append(p.getCanonicalName()); ! } ! ! logger.debug("Request method parameter list (" + sb.toString() + ") maps to " + responder.getCanonicalName() + "."); } Index: ResponderFactory.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/responders/ResponderFactory.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ResponderFactory.java 13 Aug 2009 22:35:33 -0000 1.3 --- ResponderFactory.java 20 Aug 2009 20:46:55 -0000 1.4 *************** *** 13,16 **** --- 13,18 ---- import java.lang.reflect.Method; + import java.util.ArrayList; + import java.util.List; import net.heilancoo.portal.MimeTypeMapper; *************** *** 24,31 **** public class ResponderFactory { ! private final ResponderMatcher [] matchers; ! protected ResponderFactory(ResponderMatcher [] matchers) { ! this.matchers = matchers; } --- 26,37 ---- public class ResponderFactory { ! private final List<ResponderMatcher> matchers; ! public ResponderFactory() { ! this.matchers = new ArrayList<ResponderMatcher>(); ! } ! ! public void addResponder(Class<?> responder) throws SecurityException, NoSuchMethodException, ResponderCreationException { ! matchers.add(new ResponderMatcher(responder)); } --- NEW FILE: MethodPrototype.java --- /* * Copyright (c) 2009 Heilan' Coo -- Joerg Bullmann * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which is available at http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Joerg Bullmann <jb...@he...> */ package net.heilancoo.portal.responders; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * @author joerg * */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) public @interface MethodPrototype { Class<?> [] value(); } Index: PlainResponder.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/responders/PlainResponder.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PlainResponder.java 13 Aug 2009 22:35:34 -0000 1.6 --- PlainResponder.java 20 Aug 2009 20:46:56 -0000 1.7 *************** *** 27,32 **** --- 27,36 ---- * */ + @MethodPrototype({ HttpRequest.class, FormFieldContainer.class, HttpResponse.class }) public class PlainResponder extends Responder { + public PlainResponder() { + } + public PlainResponder(Method method, Bundle bundle, MimeTypeMapper mimeMapper) { super(method); |
From: Joerg B. <jb...@us...> - 2009-08-20 20:47:09
|
Update of /cvsroot/lipog/net.heilancoo.portal In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv30813 Modified Files: plugin.xml Log Message: tidy up of response generators Index: plugin.xml =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal/plugin.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** plugin.xml 10 May 2009 20:19:14 -0000 1.6 --- plugin.xml 20 Aug 2009 20:46:56 -0000 1.7 *************** *** 4,8 **** <extension-point id="requesthandler" name="Request Map" schema="schema/requesthandler.exsd"/> <extension-point id="webfolder" name="Web Folder" schema="schema/webfolder.exsd"/> ! <extension-point id="responsegenerator" name="Response Generator Factory" schema="schema/responsegenerator.exsd"/> <extension-point id="webapp" name="Web Application" schema="schema/webapp.exsd"/> <extension --- 4,8 ---- <extension-point id="requesthandler" name="Request Map" schema="schema/requesthandler.exsd"/> <extension-point id="webfolder" name="Web Folder" schema="schema/webfolder.exsd"/> ! <extension-point id="responsegenerator" name="Response Generator" schema="schema/responsegenerator.exsd"/> <extension-point id="webapp" name="Web Application" schema="schema/webapp.exsd"/> <extension *************** *** 18,22 **** point="net.heilancoo.portal.responsegenerator"> <responsegenerator ! generator-factory="net.heilancoo.portal.responders.PlainResponderFactory"> </responsegenerator> </extension> --- 18,25 ---- point="net.heilancoo.portal.responsegenerator"> <responsegenerator ! generator="net.heilancoo.portal.responders.PlainResponder"> ! </responsegenerator> ! <responsegenerator ! generator="net.heilancoo.portal.responders.PlainResponderBasic"> </responsegenerator> </extension> |
From: Joerg B. <jb...@us...> - 2009-08-20 20:47:07
|
Update of /cvsroot/lipog/net.heilancoo.portal.documentation/doc In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv30802/doc Modified Files: change-log.html Log Message: tidy up of response generators Index: change-log.html =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.documentation/doc/change-log.html,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** change-log.html 13 Aug 2009 22:38:04 -0000 1.31 --- change-log.html 20 Aug 2009 20:46:52 -0000 1.32 *************** *** 11,14 **** --- 11,15 ---- <h2>Release 4 (upcoming)</h2> <ul> + <li>Simplified responder handling.</li> <li>Request methods can have more flexible parameter lists now.</li> <li>Web application test tutorial.</li> |
From: Joerg B. <jb...@us...> - 2009-08-20 20:47:05
|
Update of /cvsroot/lipog/net.heilancoo.portal/schema In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv30813/schema Modified Files: responsegenerator.exsd Log Message: tidy up of response generators Index: responsegenerator.exsd =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal/schema/responsegenerator.exsd,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** responsegenerator.exsd 8 Apr 2009 19:10:09 -0000 1.2 --- responsegenerator.exsd 20 Aug 2009 20:46:56 -0000 1.3 *************** *** 3,9 **** <schema targetNamespace="net.heilancoo.portal" xmlns="http://www.w3.org/2001/XMLSchema"> <annotation> ! <appinfo> <meta.schema plugin="net.heilancoo.portal" id="responsegenerator" name="Response Generator Factory"/> ! </appinfo> <documentation> [Enter description of this extension point.] --- 3,9 ---- <schema targetNamespace="net.heilancoo.portal" xmlns="http://www.w3.org/2001/XMLSchema"> <annotation> ! <appInfo> <meta.schema plugin="net.heilancoo.portal" id="responsegenerator" name="Response Generator Factory"/> ! </appInfo> <documentation> [Enter description of this extension point.] *************** *** 13,19 **** <element name="extension"> <annotation> ! <appinfo> <meta.element /> ! </appinfo> </annotation> <complexType> --- 13,19 ---- <element name="extension"> <annotation> ! <appInfo> <meta.element /> ! </appInfo> </annotation> <complexType> *************** *** 40,46 **** </documentation> ! <appinfo> <meta.attribute translatable="true"/> ! </appinfo> </annotation> </attribute> --- 40,46 ---- </documentation> ! <appInfo> <meta.attribute translatable="true"/> ! </appInfo> </annotation> </attribute> *************** *** 50,61 **** <element name="responsegenerator"> <complexType> ! <attribute name="generator-factory" type="string" use="required"> <annotation> <documentation> </documentation> ! <appinfo> ! <meta.attribute kind="java" basedOn="net.heilancoo.portal.responses.ResponderFactory:"/> ! </appinfo> </annotation> </attribute> --- 50,61 ---- <element name="responsegenerator"> <complexType> ! <attribute name="generator" type="string" use="required"> <annotation> <documentation> </documentation> ! <appInfo> ! <meta.attribute kind="java" basedOn="net.heilancoo.portal.responders.Responder:"/> ! </appInfo> </annotation> </attribute> *************** *** 64,70 **** <annotation> ! <appinfo> <meta.section type="since"/> ! </appinfo> <documentation> [Enter the first release in which this extension point appears.] --- 64,70 ---- <annotation> ! <appInfo> <meta.section type="since"/> ! </appInfo> <documentation> [Enter the first release in which this extension point appears.] *************** *** 73,79 **** <annotation> ! <appinfo> <meta.section type="examples"/> ! </appinfo> <documentation> [Enter extension point usage example here.] --- 73,79 ---- <annotation> ! <appInfo> <meta.section type="examples"/> ! </appInfo> <documentation> [Enter extension point usage example here.] *************** *** 82,88 **** <annotation> ! <appinfo> <meta.section type="apiInfo"/> ! </appinfo> <documentation> [Enter API information here.] --- 82,88 ---- <annotation> ! <appInfo> <meta.section type="apiInfo"/> ! </appInfo> <documentation> [Enter API information here.] *************** *** 91,97 **** <annotation> ! <appinfo> <meta.section type="implementation"/> ! </appinfo> <documentation> [Enter information about supplied implementation of this extension point.] --- 91,97 ---- <annotation> ! <appInfo> <meta.section type="implementation"/> ! </appInfo> <documentation> [Enter information about supplied implementation of this extension point.] |
Update of /cvsroot/lipog/net.heilancoo.portal.freemarker/src/net/heilancoo/portal/freemarker In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv30782/src/net/heilancoo/portal/freemarker Modified Files: FreeMarkerResponderFull.java FreeMarkerResponder.java FreeMarkerResponderBasic.java Removed Files: FreeMarkerResponderFactory.java Log Message: tidy up of response generators Index: FreeMarkerResponderFull.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.freemarker/src/net/heilancoo/portal/freemarker/FreeMarkerResponderFull.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FreeMarkerResponderFull.java 13 Aug 2009 22:35:30 -0000 1.1 --- FreeMarkerResponderFull.java 20 Aug 2009 20:46:49 -0000 1.2 *************** *** 18,21 **** --- 18,22 ---- import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.htmlforms.FormFieldContainer; + import net.heilancoo.portal.responders.MethodPrototype; import net.heilancoo.portal.responders.ResponderCreationException; *************** *** 28,33 **** --- 29,38 ---- * */ + @MethodPrototype({ HttpRequest.class, FormFieldContainer.class, HttpResponse.class, FreeMarkerModel.class }) public class FreeMarkerResponderFull extends FreeMarkerResponder { + public FreeMarkerResponderFull() { + } + public FreeMarkerResponderFull(Method method, Bundle bundle, MimeTypeMapper mimeMapper) throws ResponderCreationException { Index: FreeMarkerResponderBasic.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.freemarker/src/net/heilancoo/portal/freemarker/FreeMarkerResponderBasic.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FreeMarkerResponderBasic.java 13 Aug 2009 22:35:30 -0000 1.1 --- FreeMarkerResponderBasic.java 20 Aug 2009 20:46:49 -0000 1.2 *************** *** 18,21 **** --- 18,22 ---- import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.htmlforms.FormFieldContainer; + import net.heilancoo.portal.responders.MethodPrototype; import net.heilancoo.portal.responders.ResponderCreationException; *************** *** 28,33 **** --- 29,38 ---- * */ + @MethodPrototype({ FormFieldContainer.class, FreeMarkerModel.class }) public class FreeMarkerResponderBasic extends FreeMarkerResponder { + public FreeMarkerResponderBasic() { + } + public FreeMarkerResponderBasic(Method method, Bundle bundle, MimeTypeMapper mimeMapper) throws ResponderCreationException { Index: FreeMarkerResponder.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.freemarker/src/net/heilancoo/portal/freemarker/FreeMarkerResponder.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** FreeMarkerResponder.java 13 Aug 2009 22:35:30 -0000 1.16 --- FreeMarkerResponder.java 20 Aug 2009 20:46:49 -0000 1.17 *************** *** 54,57 **** --- 54,60 ---- private Map<String, String> responseFormatMimeTypes; + public FreeMarkerResponder() { + } + public FreeMarkerResponder(Method method, Bundle bundle, MimeTypeMapper mimeMapper) throws ResponderCreationException { --- FreeMarkerResponderFactory.java DELETED --- |
From: Joerg B. <jb...@us...> - 2009-08-20 20:46:57
|
Update of /cvsroot/lipog/net.heilancoo.portal.freemarker In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv30782 Modified Files: plugin.xml Log Message: tidy up of response generators Index: plugin.xml =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.freemarker/plugin.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** plugin.xml 8 Apr 2009 19:10:09 -0000 1.2 --- plugin.xml 20 Aug 2009 20:46:49 -0000 1.3 *************** *** 5,9 **** point="net.heilancoo.portal.responsegenerator"> <responsegenerator ! generator-factory="net.heilancoo.portal.freemarker.FreeMarkerResponderFactory"> </responsegenerator> </extension> --- 5,12 ---- point="net.heilancoo.portal.responsegenerator"> <responsegenerator ! generator="net.heilancoo.portal.freemarker.FreeMarkerResponderBasic"> ! </responsegenerator> ! <responsegenerator ! generator="net.heilancoo.portal.freemarker.FreeMarkerResponderFull"> </responsegenerator> </extension> |
From: Joerg B. <jb...@us...> - 2009-08-20 20:46:55
|
Update of /cvsroot/lipog/net.heilancoo.portal.json In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv30765 Modified Files: plugin.xml Log Message: tidy up of response generators Index: plugin.xml =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.json/plugin.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** plugin.xml 8 Apr 2009 19:03:39 -0000 1.2 --- plugin.xml 20 Aug 2009 20:46:46 -0000 1.3 *************** *** 5,9 **** point="net.heilancoo.portal.responsegenerator"> <responsegenerator ! generator-factory="net.heilancoo.portal.json.JsonResponderFactory"> </responsegenerator> </extension> --- 5,12 ---- point="net.heilancoo.portal.responsegenerator"> <responsegenerator ! generator="net.heilancoo.portal.json.JsonResponderBasic"> ! </responsegenerator> ! <responsegenerator ! generator="net.heilancoo.portal.json.JsonResponderFull"> </responsegenerator> </extension> |
Update of /cvsroot/lipog/net.heilancoo.portal.json/src/net/heilancoo/portal/json In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv30765/src/net/heilancoo/portal/json Modified Files: JsonResponderFull.java JsonResponderBasic.java JsonResponder.java Removed Files: JsonResponderFactory.java Log Message: tidy up of response generators --- JsonResponderFactory.java DELETED --- Index: JsonResponder.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.json/src/net/heilancoo/portal/json/JsonResponder.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** JsonResponder.java 13 Aug 2009 22:35:24 -0000 1.10 --- JsonResponder.java 20 Aug 2009 20:46:46 -0000 1.11 *************** *** 31,34 **** --- 31,37 ---- public abstract class JsonResponder extends Responder { + public JsonResponder() { + } + public JsonResponder(Method method) { this.method = method; Index: JsonResponderFull.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.json/src/net/heilancoo/portal/json/JsonResponderFull.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JsonResponderFull.java 13 Aug 2009 22:35:24 -0000 1.1 --- JsonResponderFull.java 20 Aug 2009 20:46:46 -0000 1.2 *************** *** 18,21 **** --- 18,22 ---- import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.htmlforms.FormFieldContainer; + import net.heilancoo.portal.responders.MethodPrototype; import org.apache.http.HttpRequest; *************** *** 28,33 **** --- 29,38 ---- * */ + @MethodPrototype({ HttpRequest.class, FormFieldContainer.class, HttpResponse.class, JSONObject.class }) public class JsonResponderFull extends JsonResponder { + public JsonResponderFull() { + } + public JsonResponderFull(Method method, Bundle bundle, MimeTypeMapper mimeMapper) { super(method); Index: JsonResponderBasic.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.json/src/net/heilancoo/portal/json/JsonResponderBasic.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JsonResponderBasic.java 13 Aug 2009 22:35:24 -0000 1.1 --- JsonResponderBasic.java 20 Aug 2009 20:46:46 -0000 1.2 *************** *** 18,21 **** --- 18,22 ---- import net.heilancoo.portal.controller.Controller; import net.heilancoo.portal.htmlforms.FormFieldContainer; + import net.heilancoo.portal.responders.MethodPrototype; import org.apache.http.HttpRequest; *************** *** 28,33 **** --- 29,38 ---- * */ + @MethodPrototype({ FormFieldContainer.class, JSONObject.class }) public class JsonResponderBasic extends JsonResponder { + public JsonResponderBasic() { + } + public JsonResponderBasic(Method method, Bundle bundle, MimeTypeMapper mimeMapper) { super(method); |
From: Joerg B. <jb...@us...> - 2009-08-20 16:35:15
|
Update of /cvsroot/lipog/net.heilancoo.portal.examples.test/src/net/heilancoo/portal/examples/redirect/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv6430/src/net/heilancoo/portal/examples/redirect/test Modified Files: Statistics.java OneUser.java Stress.java Log Message: combine per-thread statistics to one value Index: Stress.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.examples.test/src/net/heilancoo/portal/examples/redirect/test/Stress.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Stress.java 4 Aug 2009 21:06:57 -0000 1.1 --- Stress.java 20 Aug 2009 16:35:04 -0000 1.2 *************** *** 41,45 **** } ! public void doIt(int count) throws Exception { OneUser [] users = new OneUser[count]; --- 41,52 ---- } ! public void doIt(int count) throws Exception { ! Statistics loginStats = new Statistics(); ! Statistics logoutStats = new Statistics(); ! Statistics operationStats = new Statistics(); ! ! System.out.println("Exercising with " + count + " threads."); ! logger.info("Exercising with " + count + " threads."); ! OneUser [] users = new OneUser[count]; *************** *** 55,60 **** logger.info("==========="); ! for(OneUser u : users) ! u.stats(count + " "); logger.info("==========="); --- 62,75 ---- logger.info("==========="); ! for(OneUser u : users) { ! loginStats.combine(u.getLogin()); ! logoutStats.combine(u.getLogout()); ! operationStats.combine(u.getOperation()); ! } ! ! logger.info("stats -- threads: " + count); ! logger.info("stats -- logins: " + loginStats.toString()); ! logger.info("stats -- logouts: " + logoutStats.toString()); ! logger.info("stats -- operations: " + operationStats.toString()); logger.info("==========="); Index: Statistics.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.examples.test/src/net/heilancoo/portal/examples/redirect/test/Statistics.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Statistics.java 4 Aug 2009 21:06:57 -0000 1.1 --- Statistics.java 20 Aug 2009 16:35:04 -0000 1.2 *************** *** 32,35 **** --- 32,44 ---- } + public Statistics combine(Statistics other) { + count += other.count; + sum += other.sum; + min = Math.min(min, other.min); + max = Math.max(max, other.max); + + return this; + } + public void addValue(long val) { count += 1; Index: OneUser.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.examples.test/src/net/heilancoo/portal/examples/redirect/test/OneUser.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** OneUser.java 4 Aug 2009 21:06:57 -0000 1.1 --- OneUser.java 20 Aug 2009 16:35:04 -0000 1.2 *************** *** 39,46 **** private int listSize; private HtmlPage loggedIn; ! private Random randy; ! private Statistics login; ! private Statistics logout; ! private Statistics operation; public OneUser(String name, int seed) { --- 39,46 ---- private int listSize; private HtmlPage loggedIn; ! private final Random randy; ! private final Statistics login; ! private final Statistics logout; ! private final Statistics operation; public OneUser(String name, int seed) { *************** *** 64,67 **** --- 64,79 ---- } } + + public Statistics getLogin() { + return login; + } + + public Statistics getLogout() { + return logout; + } + + public Statistics getOperation() { + return operation; + } public void stats(String prefix) { |
From: Joerg B. <jb...@us...> - 2009-08-18 16:32:36
|
Update of /cvsroot/lipog/net.heilancoo.portal.examples/src/net/heilancoo/portal/examples/redirect In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv8841/src/net/heilancoo/portal/examples/redirect Modified Files: ToDoSession.java Log Message: fixed id initialisation Index: ToDoSession.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.examples/src/net/heilancoo/portal/examples/redirect/ToDoSession.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ToDoSession.java 13 Aug 2009 22:35:15 -0000 1.3 --- ToDoSession.java 18 Aug 2009 16:32:25 -0000 1.4 *************** *** 52,55 **** --- 52,57 ---- if(i.getId() > nextId) nextId = i.getId(); + + nextId += 1; } |
From: Joerg B. <jb...@us...> - 2009-08-13 22:38:15
|
Update of /cvsroot/lipog/net.heilancoo.portal.documentation/doc In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv12216/doc Modified Files: change-log.html Log Message: support request methods with more flexible parameter lists Index: change-log.html =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal.documentation/doc/change-log.html,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** change-log.html 26 Jul 2009 16:51:20 -0000 1.30 --- change-log.html 13 Aug 2009 22:38:04 -0000 1.31 *************** *** 11,14 **** --- 11,15 ---- <h2>Release 4 (upcoming)</h2> <ul> + <li>Request methods can have more flexible parameter lists now.</li> <li>Web application test tutorial.</li> <li>Methods like PortalTest.getSessionForPage(HtmlPage) that allows finding |
From: Joerg B. <jb...@us...> - 2009-08-13 22:35:52
|
Update of /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/application In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11834/src/net/heilancoo/portal/application Modified Files: ApplicationRequestHandler.java Log Message: support request methods with more flexible parameter lists Index: ApplicationRequestHandler.java =================================================================== RCS file: /cvsroot/lipog/net.heilancoo.portal/src/net/heilancoo/portal/application/ApplicationRequestHandler.java,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** ApplicationRequestHandler.java 26 Jul 2009 15:27:33 -0000 1.31 --- ApplicationRequestHandler.java 13 Aug 2009 22:35:34 -0000 1.32 *************** *** 234,239 **** public Object execute(Controller target, String format, HttpRequest request, FormFieldContainer fields, ! HttpResponse response, HttpContext context) throws Exception { ! doLogin(request.getRequestLine().getUri(), request, fields, response, context); return null; } --- 234,239 ---- public Object execute(Controller target, String format, HttpRequest request, FormFieldContainer fields, ! HttpResponse response) throws Exception { ! doLogin(request.getRequestLine().getUri(), request, fields, response); return null; } *************** *** 323,327 **** logger.info("Method " + method + ", application " + getUriPrefix()); ! Object redirect = g.execute(application, presentation, request, fields, response, context); if(redirect != null) { --- 323,327 ---- logger.info("Method " + method + ", application " + getUriPrefix()); ! Object redirect = g.execute(application, presentation, request, fields, response); if(redirect != null) { *************** *** 370,374 **** + ", session " + targetKey); ! Object redirect = g.execute(target, presentation, request, fields, response, context); String keyAndMethod = controllerKey.length() == 0 ? method : (controllerKey + "/" + method); --- 370,374 ---- + ", session " + targetKey); ! Object redirect = g.execute(target, presentation, request, fields, response); String keyAndMethod = controllerKey.length() == 0 ? method : (controllerKey + "/" + method); *************** *** 482,486 **** private void doLogin(String uri, HttpRequest request, FormFieldContainer fields, ! HttpResponse response, HttpContext context) throws FormFieldAccessException { String user = fields.getStringValue("user"); --- 482,486 ---- private void doLogin(String uri, HttpRequest request, FormFieldContainer fields, ! HttpResponse response) throws FormFieldAccessException { String user = fields.getStringValue("user"); *************** *** 488,497 **** if(user == null) ! loginFailedResponder.execute(null, null, request, fields, response, context); else { Session session = application.validateCredentialsAndMakeNewSession(fields); if(session == null) ! loginFailedResponder.execute(null, null, request, fields, response, context); else { SessionManager sm = sessionManagerMap.get(session.getClass()); --- 488,497 ---- if(user == null) ! loginFailedResponder.execute(null, null, request, fields, response); else { Session session = application.validateCredentialsAndMakeNewSession(fields); if(session == null) ! loginFailedResponder.execute(null, null, request, fields, response); else { SessionManager sm = sessionManagerMap.get(session.getClass()); |