aboutsummaryrefslogtreecommitdiff
path: root/id/ConfigWebTool
diff options
context:
space:
mode:
Diffstat (limited to 'id/ConfigWebTool')
-rw-r--r--id/ConfigWebTool/.classpath38
-rw-r--r--id/ConfigWebTool/pom.xml49
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/Constants.java11
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/auth/AuthenticatedUser.java117
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/config/ConfigurationProvider.java80
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/OAListElement.java77
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/exception/ConfigurationException.java17
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/filter/AuthenticationFilter.java236
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/helper/LanguageHelper.java34
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/IndexAction.java32
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/ListOAsAction.java112
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/MainAction.java65
-rw-r--r--id/ConfigWebTool/src/main/resources/applicationResources_de.properties25
-rw-r--r--id/ConfigWebTool/src/main/resources/log4j.properties20
-rw-r--r--id/ConfigWebTool/src/main/resources/struts.properties16
-rw-r--r--id/ConfigWebTool/src/main/resources/struts.xml37
-rw-r--r--id/ConfigWebTool/src/main/webapp/WEB-INF/log4j.properties20
-rw-r--r--id/ConfigWebTool/src/main/webapp/WEB-INF/web.xml83
-rw-r--r--id/ConfigWebTool/src/main/webapp/css/index.css68
-rw-r--r--id/ConfigWebTool/src/main/webapp/error.jsp22
-rw-r--r--id/ConfigWebTool/src/main/webapp/index.action0
-rw-r--r--id/ConfigWebTool/src/main/webapp/index.jsp24
-rw-r--r--id/ConfigWebTool/src/main/webapp/jsp/listOAs.jsp42
-rw-r--r--id/ConfigWebTool/src/main/webapp/jsp/mainpage.jsp27
-rw-r--r--id/ConfigWebTool/src/main/webapp/jsp/snippets/footer.jsp9
-rw-r--r--id/ConfigWebTool/src/main/webapp/jsp/snippets/header_userinfos.jsp12
-rw-r--r--id/ConfigWebTool/src/main/webapp/jsp/snippets/main_menu.jsp35
27 files changed, 1308 insertions, 0 deletions
diff --git a/id/ConfigWebTool/.classpath b/id/ConfigWebTool/.classpath
new file mode 100644
index 000000000..28bcc0ce1
--- /dev/null
+++ b/id/ConfigWebTool/.classpath
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v7.0"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/id/ConfigWebTool/pom.xml b/id/ConfigWebTool/pom.xml
new file mode 100644
index 000000000..36eb9ddad
--- /dev/null
+++ b/id/ConfigWebTool/pom.xml
@@ -0,0 +1,49 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>MOA.id</groupId>
+ <artifactId>ConfigurationInterface</artifactId>
+ <version>0.9</version>
+ <packaging>war</packaging>
+ <name>MOA-ID 2.0 Configuration Tool</name>
+ <description>Web based Configuration Tool for MOA-ID 2.x</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>MOA.id.server</groupId>
+ <artifactId>moa-id-commons</artifactId>
+ <version>1.5.2</version>
+ </dependency>
+
+ <dependency>
+ <groupId>at.gv.util</groupId>
+ <artifactId>egovutils</artifactId>
+ <version>1.0.2</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.struts</groupId>
+ <artifactId>struts2-core</artifactId>
+ <version>2.3.14.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.struts</groupId>
+ <artifactId>struts2-json-plugin</artifactId>
+ <version>2.3.14.3</version>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.6</version>
+ <type>jar</type>
+ <scope>compile</scope>
+ </dependency>
+
+ </dependencies>
+
+</project> \ No newline at end of file
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/Constants.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/Constants.java
new file mode 100644
index 000000000..a5a5de33c
--- /dev/null
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/Constants.java
@@ -0,0 +1,11 @@
+package at.gv.egovernment.moa.id.configuration;
+
+public class Constants {
+ public static final String STRUTS_SUCCESS = "success";
+ public static final String STRUTS_ERROR = "error";
+
+
+ public static final String SESSION_AUTH = "authsession";
+ public static final String SESSION_AUTH_ERROR = "authsessionerror";
+
+}
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/auth/AuthenticatedUser.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/auth/AuthenticatedUser.java
new file mode 100644
index 000000000..3ff48e92b
--- /dev/null
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/auth/AuthenticatedUser.java
@@ -0,0 +1,117 @@
+package at.gv.egovernment.moa.id.configuration.auth;
+
+import java.util.Date;
+
+public class AuthenticatedUser {
+
+ private boolean isAuthenticated = false;
+ private boolean isAdmin = false;
+
+ private long userID;
+ private String givenName;
+ private String familyName;
+ private Date lastLogin;
+
+ public AuthenticatedUser() {
+
+ }
+
+ public AuthenticatedUser(long userID, String givenName, String familyName,
+ boolean isAuthenticated, boolean isAdmin) {
+
+ this.familyName = familyName;
+ this.givenName = givenName;
+ this.userID = userID;
+ this.isAdmin = isAdmin;
+ this.isAuthenticated = isAuthenticated;
+ this.lastLogin = new Date();
+ }
+
+ /**
+ * @return the isAuthenticated
+ */
+ public boolean isAuthenticated() {
+ return isAuthenticated;
+ }
+
+ /**
+ * @param isAuthenticated the isAuthenticated to set
+ */
+ public void setAuthenticated(boolean isAuthenticated) {
+ this.isAuthenticated = isAuthenticated;
+ }
+
+ /**
+ * @return the isAdmin
+ */
+ public boolean isAdmin() {
+ return isAdmin;
+ }
+
+ /**
+ * @param isAdmin the isAdmin to set
+ */
+ public void setAdmin(boolean isAdmin) {
+ this.isAdmin = isAdmin;
+ }
+
+ /**
+ * @return the userID
+ */
+ public long getUserID() {
+ return userID;
+ }
+
+ /**
+ * @param userID the userID to set
+ */
+ public void setUserID(long userID) {
+ this.userID = userID;
+ }
+
+ /**
+ * @return the givenName
+ */
+ public String getGivenName() {
+ return givenName;
+ }
+
+ /**
+ * @param givenName the givenName to set
+ */
+ public void setGivenName(String givenName) {
+ this.givenName = givenName;
+ }
+
+ /**
+ * @return the familyName
+ */
+ public String getFamilyName() {
+ return familyName;
+ }
+
+ /**
+ * @param familyName the familyName to set
+ */
+ public void setFamilyName(String familyName) {
+ this.familyName = familyName;
+ }
+
+ /**
+ * @return the lastLogin
+ */
+ public Date getLastLogin() {
+ return lastLogin;
+ }
+
+ /**
+ * @param lastLogin the lastLogin to set
+ */
+ public void setLastLogin(Date lastLogin) {
+ this.lastLogin = lastLogin;
+ }
+
+
+
+
+}
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/config/ConfigurationProvider.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/config/ConfigurationProvider.java
new file mode 100644
index 000000000..07f599284
--- /dev/null
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/config/ConfigurationProvider.java
@@ -0,0 +1,80 @@
+package at.gv.egovernment.moa.id.configuration.config;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.Properties;
+
+import at.gv.egovernment.moa.id.commons.db.ConfigurationDBUtils;
+import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException;
+import at.gv.egovernment.moa.id.configuration.exception.ConfigurationException;
+import at.gv.egovernment.moa.logging.Logger;
+
+
+public class ConfigurationProvider {
+
+ private static final String SYSTEM_PROP_CONFIG = "moa.id.webconfig";
+
+ private static ConfigurationProvider instance;
+ private Properties props;
+
+ public static ConfigurationProvider getInstance() throws ConfigurationException {
+ if (instance == null) {
+ instance = new ConfigurationProvider();
+ }
+
+ return instance;
+ }
+
+ private ConfigurationProvider() throws ConfigurationException {
+ inizialize();
+ }
+
+ private void inizialize() throws ConfigurationException {
+
+ String configFileName = System.getProperty(SYSTEM_PROP_CONFIG);
+
+ if (configFileName == null) {
+ throw new ConfigurationException("config.01");
+ }
+ Logger.info("Loading MOA-ID-AUTH configuration " + configFileName);
+
+ //Initial Hibernate Framework
+ Logger.trace("Initializing Hibernate framework.");
+
+ //Load MOAID-2.0 properties file
+ File propertiesFile = new File(configFileName);
+ FileInputStream fis;
+ props = new Properties();
+
+
+ try {
+ fis = new FileInputStream(propertiesFile);
+ props.load(fis);
+
+ // initialize hibernate
+ synchronized (ConfigurationProvider.class) {
+
+ //Initial config Database
+ ConfigurationDBUtils.initHibernate(props);
+ }
+ Logger.trace("Hibernate initialization finished.");
+
+
+
+ } catch (FileNotFoundException e) {
+ throw new ConfigurationException("config.01", e);
+ } catch (IOException e) {
+ throw new ConfigurationException("config.02", e);
+ } catch (MOADatabaseException e) {
+ throw new ConfigurationException("config.03", e);
+ }
+
+ }
+
+ public boolean isLoginDeaktivated() {
+ String result = props.getProperty("general.login.deaktivate", "false");
+ return Boolean.parseBoolean(result);
+ }
+}
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/OAListElement.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/OAListElement.java
new file mode 100644
index 000000000..0ea21617e
--- /dev/null
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/OAListElement.java
@@ -0,0 +1,77 @@
+package at.gv.egovernment.moa.id.configuration.data;
+
+public class OAListElement {
+
+ private long dataBaseID;
+ private String oaIdentifier;
+ private String oaFriendlyName;
+ private String oaType;
+ private boolean isActive;
+
+
+ /**
+ * @return the dataBaseID
+ */
+ public long getDataBaseID() {
+ return dataBaseID;
+ }
+ /**
+ * @param dataBaseID the dataBaseID to set
+ */
+ public void setDataBaseID(long dataBaseID) {
+ this.dataBaseID = dataBaseID;
+ }
+ /**
+ * @return the oaIdentifier
+ */
+ public String getOaIdentifier() {
+ return oaIdentifier;
+ }
+ /**
+ * @param oaIdentifier the oaIdentifier to set
+ */
+ public void setOaIdentifier(String oaIdentifier) {
+ this.oaIdentifier = oaIdentifier;
+ }
+ /**
+ * @return the oaFriendlyName
+ */
+ public String getOaFriendlyName() {
+ return oaFriendlyName;
+ }
+ /**
+ * @param oaFriendlyName the oaFriendlyName to set
+ */
+ public void setOaFriendlyName(String oaFriendlyName) {
+ this.oaFriendlyName = oaFriendlyName;
+ }
+ /**
+ * @return the oaType
+ */
+ public String getOaType() {
+ return oaType;
+ }
+ /**
+ * @param oaType the oaType to set
+ */
+ public void setOaType(String oaType) {
+ this.oaType = oaType;
+ }
+ /**
+ * @return the isActive
+ */
+ public boolean isActive() {
+ return isActive;
+ }
+ /**
+ * @param isActive the isActive to set
+ */
+ public void setActive(boolean isActive) {
+ this.isActive = isActive;
+ }
+
+ public String getIsActive(){
+ return String.valueOf(isActive);
+ }
+
+}
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/exception/ConfigurationException.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/exception/ConfigurationException.java
new file mode 100644
index 000000000..39a18309a
--- /dev/null
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/exception/ConfigurationException.java
@@ -0,0 +1,17 @@
+package at.gv.egovernment.moa.id.configuration.exception;
+
+import at.gv.egovernment.moa.id.configuration.helper.LanguageHelper;
+
+public class ConfigurationException extends Exception {
+
+ private static final long serialVersionUID = 1L;
+
+ public ConfigurationException(String errorname) {
+ super(LanguageHelper.getErrorString(errorname, null));
+ }
+
+ public ConfigurationException(String errorname, Throwable e) {
+ super(LanguageHelper.getErrorString(errorname, null), e);
+ }
+
+}
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/filter/AuthenticationFilter.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/filter/AuthenticationFilter.java
new file mode 100644
index 000000000..517786d11
--- /dev/null
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/filter/AuthenticationFilter.java
@@ -0,0 +1,236 @@
+package at.gv.egovernment.moa.id.configuration.filter;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.StringTokenizer;
+import java.util.regex.Pattern;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.log4j.Logger;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import at.gv.egovernment.moa.id.configuration.Constants;
+import at.gv.egovernment.moa.id.configuration.auth.AuthenticatedUser;
+import at.gv.egovernment.moa.id.configuration.config.ConfigurationProvider;
+import at.gv.egovernment.moa.id.configuration.exception.ConfigurationException;
+import at.gv.egovernment.moa.util.MiscUtil;
+import at.gv.util.ToStringUtil;
+import at.gv.util.WebAppUtil;
+
+public class AuthenticationFilter implements Filter{
+
+ private final Logger log = Logger.getLogger(AuthenticationFilter.class);
+
+ private static ConfigurationProvider config;
+
+ public static final String STORED_REQUEST_URL_ID = String.class.getName() + ":" + "storedRequestURL";
+ public static final String WEB_XML_INIT_PARAM_LOGIN_PAGE = "loginPage";
+ public static final String WEB_XML_INIT_PARAM_ERROR_PAGE = "errorPage";
+ public static final String WEB_XML_INIT_PARAM_AUTHENTICATED_PAGE = "authenticatedPage"; // optional
+ public static final String WEB_XML_INIT_PARAM_SESSION_LOST_PAGE = "sessionLostPage"; // optional
+ public static final String WEB_XML_INIT_PARAM_ALLOWED_LIST = "allowedList";
+ public static final String WEB_XML_INIT_PARAM_ALLOWED_REGEX = "allowed";
+
+ private static final String WEB_XML_INIT_PARAM_EXCLUDED_PAGES_DELIMITER = ",";
+
+ private static String loginPage = null;
+ private boolean loginPageForward = true;
+ private static String errorPage = null;
+ private static String authenticatedPage = null;
+ private static String sessionLostPage = null;
+
+ private static String[] excludedPages = null;
+ private static Pattern excludedRegEx = null;
+
+
+
+ public AuthenticationFilter() throws ServletException {
+ try {
+ config = ConfigurationProvider.getInstance();
+
+ } catch (ConfigurationException e) {
+ throw new ServletException(AuthenticationFilter.class + ": Configuration can not be loaded!", e);
+ }
+ }
+
+ public static String getErrorPage() {
+ return errorPage;
+ }
+
+ public static String getAuthenticatedPage() {
+ return authenticatedPage;
+ }
+
+ public static String getLoginPage() {
+ return loginPage;
+ }
+
+ public static String getSessionLostPage() {
+ return sessionLostPage;
+ }
+
+ private boolean isExcluded(String url) {
+ boolean excluded = false;
+ if (MiscUtil.isNotEmpty(excludedPages)) {
+ for (String candidate : excludedPages) {
+ if (StringUtils.upperCase(url).endsWith(StringUtils.upperCase(candidate))) {
+ excluded = true;
+ break;
+ }
+ }
+ }
+ if (excludedRegEx != null && !excluded) {
+ // log.debug("Trying to match regex \"{}\" with \"{}\".",
+ // excludedRegEx.toString(), url);
+ if (excludedRegEx.matcher(url).matches()) {
+ excluded = true;
+ }
+ }
+ log.debug("URL \"" + url + "\" is " + (excluded ? "" : "NOT ") + "excluded from filter.");
+ return excluded;
+ }
+
+
+ public void destroy() {
+ log.trace("Shutting down" + this.getClass().getName() + "...");
+
+ }
+
+ public void doFilter(ServletRequest req, ServletResponse resp,
+ FilterChain filterchain) throws IOException, ServletException {
+
+ HttpServletRequest httpServletRequest = (HttpServletRequest) req;
+ HttpServletResponse httpServletResponse = (HttpServletResponse) resp;
+
+ HttpSession session = httpServletRequest.getSession();
+
+ Object authuser = session.getAttribute(Constants.SESSION_AUTH);
+
+ String requestURL = WebAppUtil.getRequestURLWithParameters(httpServletRequest, true);
+
+ log.trace("Request URL: " + requestURL);
+
+ if (authuser == null && !this.isExcluded(requestURL)) {
+
+ if (config.isLoginDeaktivated()) {
+ //add dummy Daten
+ log.warn("Authentication is deaktivated. Dummy authentication-information are used!");
+
+ if (authuser == null) {
+
+ authuser = new AuthenticatedUser(0000000, "Max", "TestUser", true, true);
+ httpServletRequest.getSession().setAttribute(Constants.SESSION_AUTH, authuser);
+ }
+
+ if (MiscUtil.isNotEmpty(getAuthenticatedPage())) {
+ if (loginPageForward) {
+ log.debug("Authenticated page is set. Forwarding to \"" + getAuthenticatedPage() + "\".");
+ RequestDispatcher dispatcher = req.getRequestDispatcher(getAuthenticatedPage());
+ dispatcher.forward(httpServletRequest, httpServletResponse);
+ } else {
+ log.debug("Authenticated page is set. Redirecting to \"" + getAuthenticatedPage() + "\".");
+ httpServletResponse.sendRedirect(httpServletResponse.encodeRedirectURL(getAuthenticatedPage()));
+ }
+ return;
+ }
+
+ } else {
+ //check login Daten
+ if (MiscUtil.isNotEmpty(getAuthenticatedPage())) {
+ log.debug("Unable to find authentication data. Authenticated page is given so there is no need to save original request url. " + (loginPageForward ? "Forwarding" : "Redirecting") + " to login page \"" + loginPage + "\".");
+
+ }
+ else {
+ log.debug("Unable to find authentication data. Storing request url and " + (loginPageForward ? "forwarding" : "redirecting") + " to login page \"" + loginPage + "\".");
+ // TODO: save HttpServletRequest
+ // log.debug("new CustomHttpServletRequest(request).toString() =
+ // {}", new
+ // CustomHttpServletRequest(httpServletRequest).toString());
+ session.setAttribute(STORED_REQUEST_URL_ID, requestURL);
+ }
+
+ if (loginPageForward) {
+ RequestDispatcher dispatcher = req.getRequestDispatcher(loginPage);
+ dispatcher.forward(httpServletRequest, httpServletResponse);
+
+ } else {
+ httpServletResponse.sendRedirect(httpServletResponse.encodeRedirectURL(loginPage));
+
+ }
+
+ }
+ }
+
+ filterchain.doFilter(req, resp);
+
+ }
+
+ public void init(FilterConfig filterConfig) throws ServletException {
+ log.debug("Starting init of " + this.getClass().getName() + ".");
+
+ // login page
+ loginPage = StringUtils.trim(filterConfig.getInitParameter(WEB_XML_INIT_PARAM_LOGIN_PAGE));
+ if (MiscUtil.isEmpty(loginPage)) {
+ throw new ServletException("ServletInitParameter \"" + WEB_XML_INIT_PARAM_LOGIN_PAGE + "\" must not be empty.");
+ }
+ loginPageForward = false; //!WebAppUtil.isFullQualifiedURL(loginPage);
+
+ // error page
+ errorPage = StringUtils.trim(filterConfig.getInitParameter(WEB_XML_INIT_PARAM_ERROR_PAGE));
+ if (MiscUtil.isEmpty(errorPage)) {
+ throw new ServletException("ServletInitParameter \"" + WEB_XML_INIT_PARAM_ERROR_PAGE + "\" must not be empty.");
+ }
+
+ // session lost page
+ sessionLostPage = StringUtils.trim(filterConfig.getInitParameter(WEB_XML_INIT_PARAM_SESSION_LOST_PAGE));
+ if (MiscUtil.isEmpty(sessionLostPage)) {
+ log.warn("ServletInitParameter \"" + WEB_XML_INIT_PARAM_SESSION_LOST_PAGE
+ + "\" is empty. This parameter defines a failsafe url the browser is redirected to if the original url has been lost due to session timeout.");
+ }
+
+ // authenticated page
+ authenticatedPage = StringUtils.trim(filterConfig.getInitParameter(WEB_XML_INIT_PARAM_AUTHENTICATED_PAGE));
+ if (MiscUtil.isEmpty(authenticatedPage)) {
+ log.debug("ServletInitParameter \"" + WEB_XML_INIT_PARAM_AUTHENTICATED_PAGE
+ + "\" is empty. This parameter defines the url the user is redirected to (instead of the original url) on successful authentication.");
+ }
+ String excluded = filterConfig.getInitParameter(WEB_XML_INIT_PARAM_ALLOWED_LIST);
+ ArrayList<String> excludedList = new ArrayList<String>();
+ if (MiscUtil.isNotEmpty(excluded)) {
+ StringTokenizer tokenizer = new StringTokenizer(excluded, WEB_XML_INIT_PARAM_EXCLUDED_PAGES_DELIMITER);
+ while (tokenizer.hasMoreTokens()) {
+ String ex = StringUtils.trim(tokenizer.nextToken());
+ if (MiscUtil.isNotEmpty(ex)) {
+ excludedList.add(ex);
+ }
+ }
+ }
+ excludedList.add(loginPage);
+ excludedList.add(errorPage);
+ excludedPages = new String[excludedList.size()];
+ excludedPages = excludedList.toArray(excludedPages);
+
+ String excludedRegExString = StringUtils.trim(filterConfig.getInitParameter(WEB_XML_INIT_PARAM_ALLOWED_REGEX));
+ if (MiscUtil.isNotEmpty(excludedRegExString)) {
+ excludedRegEx = Pattern.compile(excludedRegExString);
+ }
+
+ log.debug(WEB_XML_INIT_PARAM_LOGIN_PAGE + " [" + (loginPageForward ? "forward" : "redirect") + "] = \"" + loginPage + "\"");
+ log.debug(WEB_XML_INIT_PARAM_AUTHENTICATED_PAGE + " = \"" + (MiscUtil.isNotEmpty(authenticatedPage) ? authenticatedPage : "<n/a>") + "\"");
+ log.debug(WEB_XML_INIT_PARAM_ERROR_PAGE + " = \"" + errorPage + "\"");
+ log.debug(WEB_XML_INIT_PARAM_SESSION_LOST_PAGE + " = \"" + (MiscUtil.isNotEmpty(sessionLostPage) ? sessionLostPage : "<n/a>") + "\"");
+ log.debug(WEB_XML_INIT_PARAM_ALLOWED_LIST + " = " + ToStringUtil.toString(excludedPages, ", ", "\""));
+ log.debug(WEB_XML_INIT_PARAM_ALLOWED_REGEX + " = \"" + (excludedRegEx != null ? excludedRegEx.pattern() : "<n/a>") + "\"");
+ }
+
+}
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/helper/LanguageHelper.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/helper/LanguageHelper.java
new file mode 100644
index 000000000..80db5877c
--- /dev/null
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/helper/LanguageHelper.java
@@ -0,0 +1,34 @@
+package at.gv.egovernment.moa.id.configuration.helper;
+
+
+import java.text.MessageFormat;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+import javax.servlet.http.HttpServletRequest;
+
+
+public class LanguageHelper {
+
+ private static ResourceBundle errorRes_DE = ResourceBundle.getBundle("applicationResources", Locale.GERMAN);
+ private static ResourceBundle guiRes_DE = ResourceBundle.getBundle("applicationResources", Locale.GERMAN);
+
+ public static String getGUIString(String code, HttpServletRequest request) {
+ return guiRes_DE.getString(code);
+ }
+
+ public static String getErrorString(String code, HttpServletRequest request) {
+ return errorRes_DE.getString(code);
+ }
+
+ public static String getGUIString(String code, String parameter, HttpServletRequest request) {
+
+ return MessageFormat.format(getGUIString(code, request), parameter);
+ }
+
+ public static String getErrorString(String code, Object[] parameter, HttpServletRequest request) {
+
+ return MessageFormat.format(getGUIString(code, request), parameter);
+ }
+}
+
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/IndexAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/IndexAction.java
new file mode 100644
index 000000000..4e8e44007
--- /dev/null
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/IndexAction.java
@@ -0,0 +1,32 @@
+package at.gv.egovernment.moa.id.configuration.struts.action;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts2.interceptor.ServletRequestAware;
+import org.apache.struts2.interceptor.ServletResponseAware;
+
+import at.gv.egovernment.moa.id.configuration.Constants;
+import at.gv.egovernment.moa.id.configuration.config.ConfigurationProvider;
+import at.gv.egovernment.moa.id.configuration.exception.ConfigurationException;
+
+public class IndexAction implements ServletRequestAware,
+ ServletResponseAware {
+
+ private HttpServletRequest request;
+ private HttpServletResponse response;
+
+ public String start() {
+
+ return Constants.STRUTS_SUCCESS;
+ }
+
+
+ public void setServletResponse(HttpServletResponse arg0) {
+ this.response = arg0;
+ }
+ public void setServletRequest(HttpServletRequest arg0) {
+ this.request = arg0;
+ }
+
+}
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/ListOAsAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/ListOAsAction.java
new file mode 100644
index 000000000..cc613ef7b
--- /dev/null
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/ListOAsAction.java
@@ -0,0 +1,112 @@
+package at.gv.egovernment.moa.id.configuration.struts.action;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts2.interceptor.ServletRequestAware;
+import org.apache.struts2.interceptor.ServletResponseAware;
+
+import com.opensymphony.xwork2.ActionSupport;
+
+import at.gv.egovernment.moa.id.commons.db.ConfigurationDBRead;
+import at.gv.egovernment.moa.id.commons.db.ConfigurationDBUtils;
+import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineApplication;
+import at.gv.egovernment.moa.id.commons.db.dao.config.UserDatabase;
+import at.gv.egovernment.moa.id.configuration.Constants;
+import at.gv.egovernment.moa.id.configuration.auth.AuthenticatedUser;
+import at.gv.egovernment.moa.id.configuration.config.ConfigurationProvider;
+import at.gv.egovernment.moa.id.configuration.data.OAListElement;
+import at.gv.egovernment.moa.id.configuration.exception.ConfigurationException;
+import at.gv.egovernment.moa.id.configuration.helper.LanguageHelper;
+
+public class ListOAsAction extends ActionSupport implements ServletRequestAware,
+ ServletResponseAware {
+
+ private static final long serialVersionUID = 1L;
+
+ private HttpServletRequest request;
+ private HttpServletResponse response;
+
+ private ConfigurationProvider configuration;
+
+ private List<OAListElement> formOAs;
+
+
+ private AuthenticatedUser authUser;
+
+
+ public ListOAsAction() throws ConfigurationException {
+ configuration = ConfigurationProvider.getInstance();
+ }
+
+
+ public String listAllOnlineAppliactions() {
+
+ Object authUserObj = request.getSession().getAttribute(Constants.SESSION_AUTH);
+
+ if (authUserObj != null && authUserObj instanceof AuthenticatedUser) {
+ authUser = (AuthenticatedUser) authUserObj;
+
+ List<OnlineApplication> dbOAs = null;
+
+ if (authUser.isAdmin()) {
+ dbOAs = ConfigurationDBRead.getAllOnlineApplications();
+
+ } else {
+ UserDatabase authUserDB = ConfigurationDBRead.getUserWithID(authUser.getUserID());
+ dbOAs = authUserDB.getRegistratedOAs();
+ }
+
+
+ formOAs = new ArrayList<OAListElement>();
+ if (dbOAs == null) {
+ addActionError(LanguageHelper.getErrorString("errors.listOAs.noOA", request));
+ return Constants.STRUTS_SUCCESS;
+
+ } else {
+ for (OnlineApplication dboa : dbOAs) {
+ OAListElement listoa = new OAListElement();
+ listoa.setActive(dboa.isIsActive());
+ listoa.setDataBaseID(dboa.getHjid());
+ listoa.setOaFriendlyName(dboa.getFriendlyName());
+ listoa.setOaIdentifier(dboa.getPublicURLPrefix());
+ listoa.setOaType(dboa.getType());
+ formOAs.add(listoa);
+ }
+ }
+
+ return Constants.STRUTS_SUCCESS;
+
+ }
+
+ return Constants.STRUTS_ERROR;
+ }
+
+
+ public void setServletResponse(HttpServletResponse arg0) {
+ this.response = arg0;
+ }
+ public void setServletRequest(HttpServletRequest arg0) {
+ this.request = arg0;
+ }
+
+
+ /**
+ * @return the authUser
+ */
+ public AuthenticatedUser getAuthUser() {
+ return authUser;
+ }
+
+
+ /**
+ * @return the formOAs
+ */
+ public List<OAListElement> getFormOAs() {
+ return formOAs;
+ }
+
+}
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/MainAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/MainAction.java
new file mode 100644
index 000000000..ba9b0cc3f
--- /dev/null
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/MainAction.java
@@ -0,0 +1,65 @@
+package at.gv.egovernment.moa.id.configuration.struts.action;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts2.interceptor.ServletRequestAware;
+import org.apache.struts2.interceptor.ServletResponseAware;
+
+import at.gv.egovernment.moa.id.configuration.Constants;
+import at.gv.egovernment.moa.id.configuration.auth.AuthenticatedUser;
+import at.gv.egovernment.moa.id.configuration.config.ConfigurationProvider;
+import at.gv.egovernment.moa.id.configuration.exception.ConfigurationException;
+
+public class MainAction implements ServletRequestAware,
+ ServletResponseAware {
+
+ private HttpServletRequest request;
+ private HttpServletResponse response;
+
+ private ConfigurationProvider configuration;
+
+
+ private AuthenticatedUser authUser;
+
+
+ public MainAction() throws ConfigurationException {
+ configuration = ConfigurationProvider.getInstance();
+ }
+
+
+ public String generateMainFrame() {
+
+ Object authUserObj = request.getSession().getAttribute(Constants.SESSION_AUTH);
+
+ if (authUserObj != null && authUserObj instanceof AuthenticatedUser) {
+ authUser = (AuthenticatedUser) authUserObj;
+
+
+
+
+ return Constants.STRUTS_SUCCESS;
+ }
+ return Constants.STRUTS_ERROR;
+
+ }
+
+
+ public void setServletResponse(HttpServletResponse arg0) {
+ this.response = arg0;
+ }
+ public void setServletRequest(HttpServletRequest arg0) {
+ this.request = arg0;
+ }
+
+
+ /**
+ * @return the authUser
+ */
+ public AuthenticatedUser getAuthUser() {
+ return authUser;
+ }
+
+
+
+}
diff --git a/id/ConfigWebTool/src/main/resources/applicationResources_de.properties b/id/ConfigWebTool/src/main/resources/applicationResources_de.properties
new file mode 100644
index 000000000..14e6ba5be
--- /dev/null
+++ b/id/ConfigWebTool/src/main/resources/applicationResources_de.properties
@@ -0,0 +1,25 @@
+title=MOA-ID 2.x Configuration Tool
+
+
+config.01=Configfile is not found.
+config.02=Configfile is not readable.
+config.03=Hibernate Database connector can not be initialized
+
+error.title=Fehler:
+errors.listOAs.noOA=Es wurden keine Online-Applikationen in der Datenbank gefunden
+
+
+webpages.error.header=Es ist ein Fehler aufgetreten
+webpages.index.header=Willkommen beim MOA-ID 2.x Configuration Tool
+webpages.index.desciption.head=Um dieses Service nutzen zu können müssen sie sich einloggen.
+
+webpages.mainpage.menu.oa.insert=Neue Applikation anlegen
+webpages.mainpage.menu.oa.display=Meine Applikationen
+webpages.mainpage.menu.oa.search=Applikation suchen
+webpages.mainpage.menu.general.user=Meine Daten
+webpages.mainpage.menu.general.importexport=Importieren/Exportieren
+webpages.mainpage.menu.general.config.moaid=Allgemeine Konfiguration
+webpages.mainpage.menu.general.usermanagement=Benutzerverwaltung
+
+webpages.header.info=Sie sind angemeldet als:
+webpages.header.lastlogin=Letzte Anmeldung am:
diff --git a/id/ConfigWebTool/src/main/resources/log4j.properties b/id/ConfigWebTool/src/main/resources/log4j.properties
new file mode 100644
index 000000000..a264eaa85
--- /dev/null
+++ b/id/ConfigWebTool/src/main/resources/log4j.properties
@@ -0,0 +1,20 @@
+# Set root category priority to INFO and its only appender to CONSOLE.
+log4j.rootCategory=INFO, CONSOLE
+#log4j.rootCategory=INFO, CONSOLE, LOGFILE
+
+# Set the enterprise logger category to FATAL and its only appender to CONSOLE.
+log4j.logger.at.gv.egovernment.moa.id.configuration=DEBUG, CONSOLE
+
+# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CONSOLE.Threshold=INFO
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.CONSOLE.layout.ConversionPattern=- %m%n
+
+# LOGFILE is set to be a File appender using a PatternLayout.
+log4j.appender.LOGFILE=org.apache.log4j.FileAppender
+log4j.appender.LOGFILE.File=axis.log
+log4j.appender.LOGFILE.Append=true
+log4j.appender.LOGFILE.Threshold=INFO
+log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
+log4j.appender.LOGFILE.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
diff --git a/id/ConfigWebTool/src/main/resources/struts.properties b/id/ConfigWebTool/src/main/resources/struts.properties
new file mode 100644
index 000000000..2ef882658
--- /dev/null
+++ b/id/ConfigWebTool/src/main/resources/struts.properties
@@ -0,0 +1,16 @@
+
+
+# struts.configuration=org.apache.struts2.config.DefaultConfiguration
+
+# struts.multipart.parser=cos
+# struts.multipart.parser=pell
+struts.multipart.parser=jakarta
+# uses javax.servlet.context.tempdir by default
+struts.multipart.saveDir=
+struts.multipart.maxSize=-1
+
+struts.ui.theme=css_xhtml
+
+struts.devMode=false
+struts.action.extension=action,,
+
diff --git a/id/ConfigWebTool/src/main/resources/struts.xml b/id/ConfigWebTool/src/main/resources/struts.xml
new file mode 100644
index 000000000..9faaaeceb
--- /dev/null
+++ b/id/ConfigWebTool/src/main/resources/struts.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE struts PUBLIC
+ "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
+ "http://struts.apache.org/dtds/struts-2.0.dtd">
+
+<struts>
+
+ <package name="default" namespace="/" extends="struts-default">
+
+ <default-interceptor-ref name="defaultStack"/>
+
+ <action name="index" method="start" class="at.gv.egovernment.moa.id.configuration.struts.action.IndexAction">
+ <result name="success">/index.jsp</result>
+ <interceptor-ref name="defaultStack"/>
+ </action>
+
+ <action name="error" method="error" class="at.gv.egovernment.moa.id.configuration.struts.action.IndexAction">
+ <result name="error">/error.jsp</result>
+ <interceptor-ref name="defaultStack"/>
+ </action>
+
+ <action name="main" method="generateMainFrame" class="at.gv.egovernment.moa.id.configuration.struts.action.MainAction">
+ <result name="success">/jsp/mainpage.jsp</result>
+ <result name="error">/error.jsp</result>
+ <interceptor-ref name="defaultStack"/>
+ </action>
+
+ <action name="listallapplications" method="listAllOnlineAppliactions" class="at.gv.egovernment.moa.id.configuration.struts.action.ListOAsAction">
+ <result name="success">/jsp/listOAs.jsp</result>
+ <result name="error">/error.jsp</result>
+ <interceptor-ref name="defaultStack"/>
+ </action>
+
+
+ </package>
+
+</struts> \ No newline at end of file
diff --git a/id/ConfigWebTool/src/main/webapp/WEB-INF/log4j.properties b/id/ConfigWebTool/src/main/webapp/WEB-INF/log4j.properties
new file mode 100644
index 000000000..3ca86f404
--- /dev/null
+++ b/id/ConfigWebTool/src/main/webapp/WEB-INF/log4j.properties
@@ -0,0 +1,20 @@
+# Set root category priority to INFO and its only appender to CONSOLE.
+log4j.rootCategory=INFO, CONSOLE
+#log4j.rootCategory=INFO, CONSOLE, LOGFILE
+
+# Set the enterprise logger category to FATAL and its only appender to CONSOLE.
+log4j.logger.org.apache.axis.enterprise=FATAL, CONSOLE
+
+# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CONSOLE.Threshold=INFO
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.CONSOLE.layout.ConversionPattern=- %m%n
+
+# LOGFILE is set to be a File appender using a PatternLayout.
+log4j.appender.LOGFILE=org.apache.log4j.FileAppender
+log4j.appender.LOGFILE.File=axis.log
+log4j.appender.LOGFILE.Append=true
+log4j.appender.LOGFILE.Threshold=INFO
+log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
+log4j.appender.LOGFILE.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
diff --git a/id/ConfigWebTool/src/main/webapp/WEB-INF/web.xml b/id/ConfigWebTool/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 000000000..c680c875e
--- /dev/null
+++ b/id/ConfigWebTool/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <display-name>DemoAppMandates</display-name>
+
+
+ <filter>
+ <filter-name>AuthenicationFiler</filter-name>
+ <filter-class>at.gv.egovernment.moa.id.configuration.filter.AuthenticationFilter</filter-class>
+ <init-param>
+ <param-name>loginPage</param-name>
+ <param-value>index.action</param-value>
+ </init-param>
+ <init-param>
+ <param-name>errorPage</param-name>
+ <param-value>error.action</param-value>
+ </init-param>
+ <init-param>
+ <param-name>sessionLostPage</param-name>
+ <param-value>/</param-value>
+ </init-param>
+ <init-param>
+ <param-name>authenticatedPage</param-name>
+ <param-value>main.action</param-value>
+ </init-param>
+ <init-param>
+ <param-name>allowed</param-name>
+ <param-value>^.*((/index.action)|(/error.action)|(/jsp/.*)|(/css/.*)|(/images/.*)|(/js/.*))$</param-value>
+ </init-param>
+ </filter>
+ <filter-mapping>
+ <filter-name>AuthenicationFiler</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+
+<!--
+ <filter>
+ <filter-name>sitemash</filter-name>
+ <filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class>
+ </filter> -->
+
+ <filter>
+ <filter-name>struts2</filter-name>
+ <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
+ </filter>
+
+<!-- <filter>
+ <filter-name>EncodingFilter</filter-name>
+ <filter-class>at.iaik.commons.webapp.filter.encoding.EncodingFilter</filter-class>
+ <init-param>
+ <param-name>encoding</param-name>
+ <param-value>UTF-8</param-value>
+ </init-param>
+ <init-param>
+ <param-name>setResponseEncoding</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ <init-param>
+ <param-name>forceResponseEncoding</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ </filter> -->
+
+<!-- <filter-mapping>
+ <filter-name>sitemash</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping> -->
+
+ <filter-mapping>
+ <filter-name>struts2</filter-name>
+ <url-pattern>*.action</url-pattern>
+ </filter-mapping>
+
+<!-- <filter-mapping>
+ <filter-name>EncodingFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping> -->
+
+
+ <welcome-file-list>
+ <welcome-file>/index.action</welcome-file>
+ </welcome-file-list>
+</web-app>
diff --git a/id/ConfigWebTool/src/main/webapp/css/index.css b/id/ConfigWebTool/src/main/webapp/css/index.css
new file mode 100644
index 000000000..838080186
--- /dev/null
+++ b/id/ConfigWebTool/src/main/webapp/css/index.css
@@ -0,0 +1,68 @@
+@CHARSET "UTF-8";
+
+#header_area {
+ height: 40px;
+ background-color: green;
+ display: block;
+}
+
+#header_area>p {
+ font-size: 20px;
+ margin-left: 25px;
+ padding-top: 8px;
+}
+
+#menu_area {
+ margin-top: 25px;
+ border-color: black;
+ border-style: solid;
+ border-width: 2px;
+ width: 250px;
+ margin-left: 15px;
+ position: relative;
+ padding-left: 15px;
+ float: left;
+ background-color: gray;
+
+}
+
+.menu_element {
+ margin-top: 15px;
+ margin-bottom: 15px;
+ font-size: 20px;
+ display: block;
+ background-color: red;
+ margin-right: 18px;
+ margin-top: 5px;
+ height: 30px;
+ border-radius: 10px;
+ padding-top: 5px;
+}
+
+.menu_element>a {
+ padding: 5px;
+ margin-left: 5px;
+}
+
+#information_area {
+ float: left;
+ padding-left: 25px;
+}
+
+
+#footer_area {
+ background-color: green;
+ clear: both;
+ display: block;
+ height: 40px;
+ margin-top: 15px;
+ padding-left: 30px;
+ position: relative;
+ top: 15px;
+}
+
+#footer_area>p {
+ font-size: 20px;
+ text-align: center;
+ padding-top: 8px;
+}
diff --git a/id/ConfigWebTool/src/main/webapp/error.jsp b/id/ConfigWebTool/src/main/webapp/error.jsp
new file mode 100644
index 000000000..79e701c76
--- /dev/null
+++ b/id/ConfigWebTool/src/main/webapp/error.jsp
@@ -0,0 +1,22 @@
+<%@page import="at.gv.egovernment.moa.id.configuration.helper.LanguageHelper"%>
+
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+ <link rel="stylesheet" type="text/css" href="css/index.css">
+ <title><%=LanguageHelper.getGUIString("title", request) %></title>
+ </head>
+
+ <body>
+ <h1><%=LanguageHelper.getGUIString("webpages.error.header", request) %></h1>
+
+ <div id="information_area">
+
+ </div>
+
+ </body>
+</html> \ No newline at end of file
diff --git a/id/ConfigWebTool/src/main/webapp/index.action b/id/ConfigWebTool/src/main/webapp/index.action
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/id/ConfigWebTool/src/main/webapp/index.action
diff --git a/id/ConfigWebTool/src/main/webapp/index.jsp b/id/ConfigWebTool/src/main/webapp/index.jsp
new file mode 100644
index 000000000..45587a9a8
--- /dev/null
+++ b/id/ConfigWebTool/src/main/webapp/index.jsp
@@ -0,0 +1,24 @@
+<%@page import="at.gv.egovernment.moa.id.configuration.helper.LanguageHelper"%>
+
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+ <link rel="stylesheet" type="text/css" href="css/index.css">
+ <title><%=LanguageHelper.getGUIString("title", request) %></title>
+ </head>
+
+ <body>
+ <h1><%=LanguageHelper.getGUIString("webpages.index.header", request) %></h1>
+
+ <div id="information_area">
+ <p><%=LanguageHelper.getGUIString("webpages.index.desciption.head", request) %></p>
+ <br/>
+ <a href="main.action">Login</a>
+ </div>
+
+ </body>
+</html> \ No newline at end of file
diff --git a/id/ConfigWebTool/src/main/webapp/jsp/listOAs.jsp b/id/ConfigWebTool/src/main/webapp/jsp/listOAs.jsp
new file mode 100644
index 000000000..8e7b531c1
--- /dev/null
+++ b/id/ConfigWebTool/src/main/webapp/jsp/listOAs.jsp
@@ -0,0 +1,42 @@
+<%@page import="at.gv.egovernment.moa.id.configuration.helper.LanguageHelper"%>
+
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+ <link rel="stylesheet" type="text/css" href="css/index.css">
+ <title><%=LanguageHelper.getGUIString("title", request) %></title>
+ </head>
+
+ <body>
+
+ <jsp:include page="snippets/header_userinfos.jsp"></jsp:include>
+
+ <jsp:include page="snippets/main_menu.jsp"></jsp:include>
+
+ <div id="information_area">
+ <s:if test="hasActionErrors()">
+ <div id="error_area">
+ <label><%=LanguageHelper.getGUIString("error.title", request) %></label>
+ <s:actionerror/>
+ </div>
+ </s:if>
+
+ <div id="list_area">
+ <s:iterator var="OAelement" value="formOAs">
+ <div class="listElement">
+ <s:property value="oaIdentifier"/>&nbsp;&nbsp;<s:property value="oaFriendlyName"/>&nbsp;&nbsp;<s:property value="isActive"/>
+ </div>
+
+ </s:iterator>
+ </div>
+
+ </div>
+
+ <jsp:include page="snippets/footer.jsp"></jsp:include>
+
+ </body>
+</html> \ No newline at end of file
diff --git a/id/ConfigWebTool/src/main/webapp/jsp/mainpage.jsp b/id/ConfigWebTool/src/main/webapp/jsp/mainpage.jsp
new file mode 100644
index 000000000..798fdb742
--- /dev/null
+++ b/id/ConfigWebTool/src/main/webapp/jsp/mainpage.jsp
@@ -0,0 +1,27 @@
+<%@page import="at.gv.egovernment.moa.id.configuration.helper.LanguageHelper"%>
+
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+ <link rel="stylesheet" type="text/css" href="css/index.css">
+ <title><%=LanguageHelper.getGUIString("title", request) %></title>
+ </head>
+
+ <body>
+
+ <jsp:include page="snippets/header_userinfos.jsp"></jsp:include>
+
+ <jsp:include page="snippets/main_menu.jsp"></jsp:include>
+
+ <div id="information_area">
+ <p>das ist ein Test Text</p>
+ </div>
+
+ <jsp:include page="snippets/footer.jsp"></jsp:include>
+
+ </body>
+</html> \ No newline at end of file
diff --git a/id/ConfigWebTool/src/main/webapp/jsp/snippets/footer.jsp b/id/ConfigWebTool/src/main/webapp/jsp/snippets/footer.jsp
new file mode 100644
index 000000000..a0f12eed4
--- /dev/null
+++ b/id/ConfigWebTool/src/main/webapp/jsp/snippets/footer.jsp
@@ -0,0 +1,9 @@
+<%@page import="at.gv.egovernment.moa.id.configuration.helper.LanguageHelper"%>
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<html>
+ <div id="footer_area">
+ <p>MOA-ID 2.x Configuration Tool</p>
+ </div>
+</html> \ No newline at end of file
diff --git a/id/ConfigWebTool/src/main/webapp/jsp/snippets/header_userinfos.jsp b/id/ConfigWebTool/src/main/webapp/jsp/snippets/header_userinfos.jsp
new file mode 100644
index 000000000..a10b6e202
--- /dev/null
+++ b/id/ConfigWebTool/src/main/webapp/jsp/snippets/header_userinfos.jsp
@@ -0,0 +1,12 @@
+<%@page import="at.gv.egovernment.moa.id.configuration.helper.LanguageHelper"%>
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<html>
+ <div id="header_area">
+ <p><%=LanguageHelper.getGUIString("webpages.header.info", request) %>
+ <s:property value="authUser.givenName"/> <s:property value="authUser.familyName"/>,&nbsp;&nbsp;&nbsp;
+ <%=LanguageHelper.getGUIString("webpages.header.lastlogin", request) %> <s:property value="authUser.lastLogin"/>
+ </p>
+ </div>
+</html> \ No newline at end of file
diff --git a/id/ConfigWebTool/src/main/webapp/jsp/snippets/main_menu.jsp b/id/ConfigWebTool/src/main/webapp/jsp/snippets/main_menu.jsp
new file mode 100644
index 000000000..99447f4ca
--- /dev/null
+++ b/id/ConfigWebTool/src/main/webapp/jsp/snippets/main_menu.jsp
@@ -0,0 +1,35 @@
+<%@page import="at.gv.egovernment.moa.id.configuration.helper.LanguageHelper"%>
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<html>
+ <div id="menu_area">
+ <div class="menu_element">
+ <a href=""><%=LanguageHelper.getGUIString("webpages.mainpage.menu.oa.insert", request) %></a>
+ </div>
+ <div class="menu_element">
+ <a href=""><%=LanguageHelper.getGUIString("webpages.mainpage.menu.oa.search", request) %></a>
+ </div>
+ <div class="menu_element">
+ <s:url action="listallapplications.action" var="listAllOAs"/>
+ <a href="<s:property value="#listAllOAs" />"><%=LanguageHelper.getGUIString("webpages.mainpage.menu.oa.display", request) %></a>
+ </div>
+
+ <s:if test="authUser.isAdmin()">
+ <div class="menu_element">
+ <a href=""><%=LanguageHelper.getGUIString("webpages.mainpage.menu.general.config.moaid", request) %></a>
+ </div>
+ <div class="menu_element">
+ <a href=""><%=LanguageHelper.getGUIString("webpages.mainpage.menu.general.importexport", request) %></a>
+ </div>
+ <div class="menu_element">
+ <a href=""><%=LanguageHelper.getGUIString("webpages.mainpage.menu.general.usermanagement", request) %></a>
+ </div>
+ </s:if>
+
+ <div class="menu_element">
+ <a href=""><%=LanguageHelper.getGUIString("webpages.mainpage.menu.general.user", request) %></a>
+ </div>
+
+ </div>
+</html> \ No newline at end of file