diff --git a/hsarweb/build.xml b/hsarweb/build.xml new file mode 100644 index 0000000..011bff7 --- /dev/null +++ b/hsarweb/build.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hsarweb/lib/cas-client-core-3.1.10.jar b/hsarweb/lib/cas-client-core-3.1.10.jar new file mode 100644 index 0000000..d56fea0 Binary files /dev/null and b/hsarweb/lib/cas-client-core-3.1.10.jar differ diff --git a/hsarweb/lib/commons-beanutils-1.7.0.jar b/hsarweb/lib/commons-beanutils-1.7.0.jar new file mode 100644 index 0000000..b1b89c9 Binary files /dev/null and b/hsarweb/lib/commons-beanutils-1.7.0.jar differ diff --git a/hsarweb/lib/commons-codec-1.3.jar b/hsarweb/lib/commons-codec-1.3.jar new file mode 100644 index 0000000..957b675 Binary files /dev/null and b/hsarweb/lib/commons-codec-1.3.jar differ diff --git a/hsarweb/lib/commons-collections-3.2.jar b/hsarweb/lib/commons-collections-3.2.jar new file mode 100644 index 0000000..75580be Binary files /dev/null and b/hsarweb/lib/commons-collections-3.2.jar differ diff --git a/hsarweb/lib/commons-digester-1.8.jar b/hsarweb/lib/commons-digester-1.8.jar new file mode 100644 index 0000000..1110f0a Binary files /dev/null and b/hsarweb/lib/commons-digester-1.8.jar differ diff --git a/hsarweb/lib/commons-discovery-0.4.jar b/hsarweb/lib/commons-discovery-0.4.jar new file mode 100644 index 0000000..8355f0b Binary files /dev/null and b/hsarweb/lib/commons-discovery-0.4.jar differ diff --git a/hsarweb/lib/commons-logging-1.1.1.jar b/hsarweb/lib/commons-logging-1.1.1.jar new file mode 100644 index 0000000..1deef14 Binary files /dev/null and b/hsarweb/lib/commons-logging-1.1.1.jar differ diff --git a/hsarweb/lib/jstl-api-1.2.jar b/hsarweb/lib/jstl-api-1.2.jar new file mode 100644 index 0000000..183ed63 Binary files /dev/null and b/hsarweb/lib/jstl-api-1.2.jar differ diff --git a/hsarweb/lib/jstl-impl-1.2.jar b/hsarweb/lib/jstl-impl-1.2.jar new file mode 100644 index 0000000..110ca51 Binary files /dev/null and b/hsarweb/lib/jstl-impl-1.2.jar differ diff --git a/hsarweb/lib/myfaces-api-2.0.1.jar b/hsarweb/lib/myfaces-api-2.0.1.jar new file mode 100644 index 0000000..bbcada1 Binary files /dev/null and b/hsarweb/lib/myfaces-api-2.0.1.jar differ diff --git a/hsarweb/lib/myfaces-impl-2.0.1.jar b/hsarweb/lib/myfaces-impl-2.0.1.jar new file mode 100644 index 0000000..199b7d8 Binary files /dev/null and b/hsarweb/lib/myfaces-impl-2.0.1.jar differ diff --git a/hsarweb/src/de/hsadmin/web/Bean.java b/hsarweb/src/de/hsadmin/web/Bean.java new file mode 100644 index 0000000..a6d3c63 --- /dev/null +++ b/hsarweb/src/de/hsadmin/web/Bean.java @@ -0,0 +1,23 @@ +package de.hsadmin.web; + +import java.text.DateFormat; +import java.util.Date; + +import javax.faces.bean.ManagedBean; +import javax.faces.bean.SessionScoped; + +@ManagedBean +@SessionScoped +public class Bean { + + public final static DateFormat df = DateFormat.getTimeInstance(DateFormat.SHORT); + + public String getMessage() { + return "Hallo Welt"; + } + + public String getTime() { + return df.format(new Date()); + } + +} diff --git a/hsarweb/src/de/hsadmin/web/Context.java b/hsarweb/src/de/hsadmin/web/Context.java new file mode 100644 index 0000000..06f94f7 --- /dev/null +++ b/hsarweb/src/de/hsadmin/web/Context.java @@ -0,0 +1,26 @@ +package de.hsadmin.web; + +import javax.faces.bean.ManagedBean; +import javax.faces.bean.SessionScoped; +import javax.faces.context.ExternalContext; +import javax.faces.context.FacesContext; + +import org.jasig.cas.client.authentication.AttributePrincipal; +import org.jasig.cas.client.util.AbstractCasFilter; +import org.jasig.cas.client.validation.Assertion; + +@ManagedBean +@SessionScoped +public class Context { + + private ExternalContext getContext() { + return FacesContext.getCurrentInstance().getExternalContext(); + } + + public String getUser() { + Assertion assertion = (Assertion) getContext().getSessionMap().get(AbstractCasFilter.CONST_CAS_ASSERTION); + AttributePrincipal principal = assertion.getPrincipal(); + return principal.getName(); + } + +} diff --git a/hsarweb/src/de/hsadmin/web/Modules.java b/hsarweb/src/de/hsadmin/web/Modules.java new file mode 100644 index 0000000..bff8508 --- /dev/null +++ b/hsarweb/src/de/hsadmin/web/Modules.java @@ -0,0 +1,22 @@ +package de.hsadmin.web; + +import java.util.ArrayList; +import java.util.List; + +import javax.faces.bean.ApplicationScoped; +import javax.faces.bean.ManagedBean; + +@ManagedBean +@ApplicationScoped +public class Modules { + + public String[] pageNames = new String[] { "hello" }; + + public List getPageNames() { + ArrayList names = new ArrayList(); + for (String name : pageNames) { + names.add(name); + } + return names; + } +} diff --git a/hsarweb/src/texts/messages_de.properties b/hsarweb/src/texts/messages_de.properties new file mode 100644 index 0000000..936ac2e --- /dev/null +++ b/hsarweb/src/texts/messages_de.properties @@ -0,0 +1 @@ +hello=Hallo \ No newline at end of file diff --git a/hsarweb/src/texts/messages_en.properties b/hsarweb/src/texts/messages_en.properties new file mode 100644 index 0000000..b400b0c --- /dev/null +++ b/hsarweb/src/texts/messages_en.properties @@ -0,0 +1 @@ +hello=Hello \ No newline at end of file diff --git a/hsarweb/webapp/WEB-INF/faces-config.xml b/hsarweb/webapp/WEB-INF/faces-config.xml new file mode 100644 index 0000000..2a65339 --- /dev/null +++ b/hsarweb/webapp/WEB-INF/faces-config.xml @@ -0,0 +1,19 @@ + + + + + + de + en + + texts.messages + + texts.messages + msgs + + + + \ No newline at end of file diff --git a/hsarweb/webapp/WEB-INF/web.xml b/hsarweb/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..eda5425 --- /dev/null +++ b/hsarweb/webapp/WEB-INF/web.xml @@ -0,0 +1,70 @@ + + + + + CAS Authentication Filter + org.jasig.cas.client.authentication.AuthenticationFilter + + casServerLoginUrl + http://agnes.ostwall195.de:8080/cas/login + + + serverName + http://agnes.ostwall195.de:8080 + + + service + http://agnes.ostwall195.de:8080/hsarweb + + + + + CAS Validation Filter + org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter + + casServerUrlPrefix + http://agnes.ostwall195.de:8080/cas + + + serverName + http://agnes.ostwall195.de:8080 + + + proxyReceptorUrl + /proxyReceptor + + + service + http://agnes.ostwall195.de:8080/hsarweb + + + + + CAS Authentication Filter + /* + + + + CAS Validation Filter + /* + + + + Faces Servlet + javax.faces.webapp.FacesServlet + 1 + + + + Faces Servlet + *.html + + + + index.jsp + + + diff --git a/hsarweb/webapp/hello/index.xhtml b/hsarweb/webapp/hello/index.xhtml new file mode 100644 index 0000000..cd95698 --- /dev/null +++ b/hsarweb/webapp/hello/index.xhtml @@ -0,0 +1,21 @@ + + + + + Hello World + + + + + + + Hallo  , es ist jetzt  Uhr. + + + + + \ No newline at end of file diff --git a/hsarweb/webapp/index.jsp b/hsarweb/webapp/index.jsp new file mode 100644 index 0000000..033e747 --- /dev/null +++ b/hsarweb/webapp/index.jsp @@ -0,0 +1,12 @@ + +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> + + + + + Hello World + + + + + \ No newline at end of file diff --git a/hsarweb/webapp/resources/images/logo.png b/hsarweb/webapp/resources/images/logo.png new file mode 100644 index 0000000..f0d4dbc Binary files /dev/null and b/hsarweb/webapp/resources/images/logo.png differ diff --git a/hsarweb/webapp/resources/styles/hsar.css b/hsarweb/webapp/resources/styles/hsar.css new file mode 100644 index 0000000..bc514e7 --- /dev/null +++ b/hsarweb/webapp/resources/styles/hsar.css @@ -0,0 +1,93 @@ +body { + font-family:Arial,Helvetica,SansSerif; + font-style:normal; + font-variant:normal; + font-size:12pt; + font-weight:normal; + margin:0px; + padding:0px; + min-height:1600px; + color:#707172; + background-color:#f0f0f0; +} +.page { + width:944px; + margin-left:auto; + margin-top:2px; + margin-right:auto; + padding-top:0px; + padding-left:0px; + padding-right:0px; + color:#707172; + background-color:#ffffff; +} +.header { + height:68px; + width:944px; + margin:0px; + padding:0px; + background-color:#005094; + background-image:url(../resources/images/logo.png); + background-repeat:no-repeat; + border-style: none solid; + border-width: 1px; + border-color: #005094; +} +.main { + width:936px; + margin:0px; + padding-top:10px; + padding-left:4px; + padding-right:4px; + padding-bottom:0px; + border-style: none solid; + border-width: 1px; + border-color: #dd4901; +} +.menu { + float:left; + width:300px; + margin-left:0px; + margin-top:0px; + margin-right:0px; + padding-top:0px; + padding-left:0px; + padding-right:0px; +} +.content { + width:606px; + margin-left:304px; + margin-top:0px; + margin-right:auto; + margin-bottom:0px; + padding-top:0px; + padding-left:10px; + padding-right:10px; +} +.footer { + width:944px; + clear:left; + font-family:Arial,Helvetica,SansSerif; + font-style:normal; + font-variant:normal; + font-size:10pt; + font-weight:normal; + text-decoration:none; + text-align:center; + padding-top:4px; + padding-bottom:4px; + padding-left:0px; + padding-right:0px; + border-top-color:#ede9e8; + border-top-width:2pt; + border-top-style:solid; + border-left-style: solid; + border-left-width: 1px; + border-left-color: #dd4901; + border-right-style: solid; + border-right-width: 1px; + border-right-color: #dd4901; + border-bottom-style: solid; + border-bottom-width: 1px; + border-bottom-color: #dd4901; +} diff --git a/hsarweb/webapp/templates/menu-template.xhtml b/hsarweb/webapp/templates/menu-template.xhtml new file mode 100644 index 0000000..29d37e5 --- /dev/null +++ b/hsarweb/webapp/templates/menu-template.xhtml @@ -0,0 +1,26 @@ + + + + + Hello World + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/hsarweb/webapp/templates/template.xhtml b/hsarweb/webapp/templates/template.xhtml new file mode 100644 index 0000000..8d3d4af --- /dev/null +++ b/hsarweb/webapp/templates/template.xhtml @@ -0,0 +1,33 @@ + + + + + + + + #{title} + + + + +
+
+ +
+
+ +
+ Default Content +
+
+ +
+
+ \ No newline at end of file