|
From: <ian...@us...> - 2008-02-12 03:18:35
|
Revision: 734
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=734&view=rev
Author: iansmith
Date: 2008-02-11 19:18:32 -0800 (Mon, 11 Feb 2008)
Log Message:
-----------
If successfully validated an email addr, ogoglio now redirects to /emailValidated.html
Modified Paths:
--------------
maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AccountServlet.java
maven/trunk/ogoglio-server/src/main/webapp/META-INF/context.xml
Modified: maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java
===================================================================
--- maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java 2008-02-12 00:15:34 UTC (rev 733)
+++ maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java 2008-02-12 03:18:32 UTC (rev 734)
@@ -223,8 +223,12 @@
assertFalse(accountDoc.isEmailValid());
String emailValidationURL = getLastEmailValidationURL(accountDoc.getEmail());
assertNotNull(emailValidationURL);
- Log.debug("CHECKING VALIDATION URL:"+emailValidationURL);
- StreamUtils.discardInput(wire1.performGET(URI.create(emailValidationURL), null));
+ try {
+ StreamUtils.discardInput(wire1.performGET(URI.create(emailValidationURL), null));
+ } catch (IOException e) {
+ //this can have a few meanings, including that you haven't
+ fail("You were unable to GET the URL for email validation: it may mean that you ROOT application's web page (/emailValidated.html) hasn't been built yet.");
+ }
accountDoc = adminWebClient.getAccountDocument(username);
assertTrue(accountDoc.isEmailValid());
Modified: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AccountServlet.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AccountServlet.java 2008-02-12 00:15:34 UTC (rev 733)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AccountServlet.java 2008-02-12 03:18:32 UTC (rev 734)
@@ -23,6 +23,7 @@
import javax.media.j3d.Transform3D;
import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -492,7 +493,10 @@
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
return;
}
- sendStringResponse("ok", "text/plain", response);
+
+ //this isn't likely to do anything useful unless you set the crossContext=true attribute
+ //in your context decl for your root application
+ response.sendRedirect("/emailValidated.html");
}
}
Modified: maven/trunk/ogoglio-server/src/main/webapp/META-INF/context.xml
===================================================================
--- maven/trunk/ogoglio-server/src/main/webapp/META-INF/context.xml 2008-02-12 00:15:34 UTC (rev 733)
+++ maven/trunk/ogoglio-server/src/main/webapp/META-INF/context.xml 2008-02-12 03:18:32 UTC (rev 734)
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
-<Context reloadable="true" path="/og" >
+<Context reloadable="true" path="/og">
<Realm className="org.apache.catalina.realm.MemoryRealm" />
<ResourceLink name="mail/Session" global="mailSession" type="javax.mail.Session"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|