Reworked so that location of Handle Service is read from request instead of from...
authorwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Wed, 5 Jun 2002 03:53:25 +0000 (03:53 +0000)
committerwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Wed, 5 Jun 2002 03:53:25 +0000 (03:53 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@29 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

.classpath
src/edu/internet2/middleware/shibboleth/hs/HandleService.java
src/edu/internet2/middleware/shibboleth/hs/HandleServiceConfig.java
webApplication/WEB-INF/conf/shibboleth.xml
webApplication/hserror.jsp

index b9f75e7..3c9f954 100644 (file)
@@ -3,7 +3,7 @@
     <classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/>
     <classpathentry kind="src" path="source"/>
     <classpathentry kind="lib" path="webApplication/WEB-INF/lib/shibboleth.jar"/>
-    <classpathentry kind="lib" path="buildlibs/servlet.jar" sourcepath="/ShibTest/buildlibs/servlet-src.jar"/>
+    <classpathentry kind="lib" path="buildlibs/servlet.jar" rootpath="" sourcepath="/shib-java/buildlibs/servlet-src.jar"/>
     <classpathentry kind="lib" path="buildlibs/xerces.jar"/>
     <classpathentry kind="lib" path="webApplication/WEB-INF/lib/log4j-1.2.jar"/>
     <classpathentry kind="lib" path="webApplication/WEB-INF/lib/commons-beanutils.jar"/>
@@ -11,7 +11,7 @@
     <classpathentry kind="lib" path="webApplication/WEB-INF/lib/commons-digester.jar"/>
     <classpathentry kind="lib"
         path="webApplication/WEB-INF/lib/jce-bc.jar" sourcepath="/ShibTest/buildlibs/jce-bc-src.jar"/>
-    <classpathentry kind="lib" path="buildlibs/junit.jar" rootpath="" sourcepath="/shib-java/buildlibs/junit-src.jar"/>
+    <classpathentry kind="lib" path="buildlibs/junit.jar" sourcepath="/shib-java/buildlibs/junit-src.jar"/>
     <classpathentry kind="lib" path="webApplication/WEB-INF/lib/jug.jar" sourcepath="/shib-java/webApplication/WEB-INF/lib/jug-src.jar"/>
     <classpathentry kind="output" path="webApplication\WEB-INF\classes"/>
 </classpath>
index 4ae18fa..a12e5aa 100755 (executable)
@@ -159,9 +159,6 @@ public class HandleService extends HttpServlet {
                getServletContext().setAttribute(
                        "hs_detailedHelpURL",
                        HandleServiceConfig.getDetailedHelpURL());
-               getServletContext().setAttribute(
-                       "hs_location",
-                       HandleServiceConfig.getHsURL());
        }
 
        /**
@@ -209,7 +206,8 @@ public class HandleService extends HttpServlet {
                                        req.getParameter("shire"),
                                        req.getRemoteAddr(),
                                        req.getRemoteUser(),
-                                       req.getAuthType());
+                                       req.getAuthType(),
+                                       req.getRequestURL().toString());
                        log.info(
                                "Assertion Generated: "
                                        + "elapsed time "
@@ -238,6 +236,7 @@ public class HandleService extends HttpServlet {
                log.warn("Handle Service Failure: " + e);
 
                req.setAttribute("errorText", e.toString());
+               req.setAttribute("requestURL", req.getRequestURL().toString());
                RequestDispatcher rd = req.getRequestDispatcher("/hserror.jsp");
 
                try {
@@ -289,7 +288,8 @@ public class HandleService extends HttpServlet {
                String shireURL,
                String clientAddress,
                String remoteUser,
-               String authType)
+               String authType,
+               String hsURL)
                throws HandleServiceException {
                try {
 
@@ -298,7 +298,7 @@ public class HandleService extends HttpServlet {
                                        remoteUser,
                                        key,
                                        Long.parseLong(HandleServiceConfig.getValidityPeriod()),
-                                       HandleServiceConfig.getHsURL());
+                                       hsURL);
 
                        log.info("Acquired Handle: " + aqh.getHandleID());
 
index 47ff84d..3e760eb 100755 (executable)
@@ -11,7 +11,6 @@ public class HandleServiceConfig {
 
        private static String logoLocation = "images/internet2.gif";
        private static String supportContact = "mailto:shib-support@internet2.org";
-       private static String hsURL = "http://shib2.internet2.edu/shibboleth/HS";
        private static String helpText =
                "In order to fulfill the request for the web"
                        + " resource you have just chosen, information must be sent from your home institution to the "
@@ -114,22 +113,6 @@ public class HandleServiceConfig {
        }
 
        /**
-        * Gets the hsURL.
-        * @return Returns a String
-        */
-       public static String getHsURL() {
-               return hsURL;
-       }
-
-       /**
-        * Sets the hsURL.
-        * @param hsURL The hsURL to set
-        */
-       public static void setHsURL(String hs_location) {
-               HandleServiceConfig.hsURL = hs_location;
-       }
-
-       /**
         * Gets the ticket.
         * @return Returns a String
         */
index 641116e..6071768 100755 (executable)
@@ -44,7 +44,6 @@
        <HsConfig 
                supportContact="mailto:shib-test@internet2.org"
                logoLocation="images/internet2.gif"
-               hsURL = "http://blah.com/HS"
                validityPeriod = "1400000"
                domain = "internet2.edu"
                issuer = "shib2.internet2.edu"
index f3e6277..6647ad1 100755 (executable)
@@ -5,7 +5,7 @@
        <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
        <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
        
-       <jsp:useBean id="hs_location" scope="application" class="java.lang.String"/>
+       <jsp:useBean id="requestURL" scope="request" class="java.lang.String"/>
        <jsp:useBean id="errorText" scope="request" class="java.lang.String"/>
        <jsp:useBean id="hs_supportContact" scope="application" class="java.lang.String"/>
        <jsp:useBean id="hs_logoLocation" scope="application" class="java.lang.String"/>
@@ -26,7 +26,7 @@
 
 <p>Please email <a href="mailto:<bean:write name="hs_supportContact" />"><bean:write name="hs_supportContact" /></a> and include the following error message:</p>
 
-<p class="error">Handle Service failure at (<bean:write name="hs_location" />)</p>
+<p class="error">Handle Service failure at (<bean:write name="requestURL" />)</p>
 
 <p><bean:write name="errorText" /></p>