Skip to Content.
Sympa Menu

perfsonar-dev - [pS-dev] [GEANT/SA2/ps-java-services] r5774 - in trunk/perfsonar-java-web-admin-xslt: . perfsonar-ja va-web-admin-xslt-component perfsonar-java-web-admin-xslt- component/src/main/java perfsonar-java-web-admin-xslt-comp onent/src/main/java/net perfsonar-java-web-admin-xslt-comp onent/src/main/java/net/geant perfsonar-java-web-admin-xsl t-component/src/main/java/net/geant/perfsonar perfsonar-ja va-web-admin-xslt-component/src/main/java/net/geant/perfso nar/webadmin perfsonar-java-web-admin-xslt-component/src/m ain/java/net/geant/perfsonar/webadmin/filters perfsonar-ja va-web-admin-xslt-component/src/main/java/net/geant/perfso nar/webadmin/helpers perfsonar-java-web-admin-xslt-compone nt/src/main/java/net/geant/perfsonar/webadmin/selftest per fsonar-java-web-admin-xslt-component/src/main/java/net/gea nt/perfsonar/webadmin/servlets perfsonar-java-web-admin-xs lt-component/src/main/java/net/geant/perfsonar/webadmin/xp ath perfsonar-java-web-admin-xslt-component/src/main/java/ net/geant/perfsonar/ webadmin/xslt perfsonar-java-web-admi n-xslt-exampleservice perfsonar-java-web-admin-xslt-exampl eservice/src/main/webapp/WEB-INF

Subject: perfsonar development work

List archive

[pS-dev] [GEANT/SA2/ps-java-services] r5774 - in trunk/perfsonar-java-web-admin-xslt: . perfsonar-ja va-web-admin-xslt-component perfsonar-java-web-admin-xslt- component/src/main/java perfsonar-java-web-admin-xslt-comp onent/src/main/java/net perfsonar-java-web-admin-xslt-comp onent/src/main/java/net/geant perfsonar-java-web-admin-xsl t-component/src/main/java/net/geant/perfsonar perfsonar-ja va-web-admin-xslt-component/src/main/java/net/geant/perfso nar/webadmin perfsonar-java-web-admin-xslt-component/src/m ain/java/net/geant/perfsonar/webadmin/filters perfsonar-ja va-web-admin-xslt-component/src/main/java/net/geant/perfso nar/webadmin/helpers perfsonar-java-web-admin-xslt-compone nt/src/main/java/net/geant/perfsonar/webadmin/selftest per fsonar-java-web-admin-xslt-component/src/main/java/net/gea nt/perfsonar/webadmin/servlets perfsonar-java-web-admin-xs lt-component/src/main/java/net/geant/perfsonar/webadmin/xp ath perfsonar-java-web-admin-xslt-component/src/main/java/ net/geant/perfsonar/ webadmin/xslt perfsonar-java-web-admi n-xslt-exampleservice perfsonar-java-web-admin-xslt-exampl eservice/src/main/webapp/WEB-INF


Chronological Thread 
  • From:
  • To:
  • Subject: [pS-dev] [GEANT/SA2/ps-java-services] r5774 - in trunk/perfsonar-java-web-admin-xslt: . perfsonar-ja va-web-admin-xslt-component perfsonar-java-web-admin-xslt- component/src/main/java perfsonar-java-web-admin-xslt-comp onent/src/main/java/net perfsonar-java-web-admin-xslt-comp onent/src/main/java/net/geant perfsonar-java-web-admin-xsl t-component/src/main/java/net/geant/perfsonar perfsonar-ja va-web-admin-xslt-component/src/main/java/net/geant/perfso nar/webadmin perfsonar-java-web-admin-xslt-component/src/m ain/java/net/geant/perfsonar/webadmin/filters perfsonar-ja va-web-admin-xslt-component/src/main/java/net/geant/perfso nar/webadmin/helpers perfsonar-java-web-admin-xslt-compone nt/src/main/java/net/geant/perfsonar/webadmin/selftest per fsonar-java-web-admin-xslt-component/src/main/java/net/gea nt/perfsonar/webadmin/servlets perfsonar-java-web-admin-xs lt-component/src/main/java/net/geant/perfsonar/webadmin/xp ath perfsonar-java-web-admin-xslt-component/src/main/java/ net/geant/perfsonar/ webadmin/xslt perfsonar-java-web-admi n-xslt-exampleservice perfsonar-java-web-admin-xslt-exampl eservice/src/main/webapp/WEB-INF
  • Date: Wed, 20 Oct 2010 13:45:11 +0100

Author: psnc.procyk
Date: 2010-10-20 13:45:11 +0100 (Wed, 20 Oct 2010)
New Revision: 5774

Added:

trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/

trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/

trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/

trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/

trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/filters/

trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/filters/AuthFilter.java

trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/helpers/

trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/helpers/AbstractInputHandler.java

trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/helpers/SimpleInputHandler.java

trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/selftest/

trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/selftest/SOAPClient.java

trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/selftest/SOAPClientException.java

trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/servlets/

trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/servlets/BasicServlet.java

trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/servlets/CoreServlet.java

trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/servlets/FormServlet.java

trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/servlets/ResourceServlet.java

trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/servlets/SelfTestServlet.java

trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/xpath/

trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/xpath/XPathProcessor.java

trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/xslt/

trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/xslt/XPathResolver.java

trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/xslt/XSLTTransformator.java
Removed:

trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/org/
Modified:

trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/pom.xml

trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-exampleservice/pom.xml

trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-exampleservice/src/main/webapp/WEB-INF/web.xml
trunk/perfsonar-java-web-admin-xslt/pom.xml
Log:
java package naming policy changed


Modified:
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/pom.xml
===================================================================
---
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/pom.xml
2010-10-20 12:44:05 UTC (rev 5773)
+++
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/pom.xml
2010-10-20 12:45:11 UTC (rev 5774)
@@ -1,7 +1,7 @@
<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/maven-v4_0_0.xsd";>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.perfsonar</groupId>
+ <groupId>net.geant.perfsonar</groupId>
<artifactId>perfsonar-java-web-admin-xslt-component</artifactId>
<packaging>jar</packaging>
<version>1.0</version>

Added:
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/filters/AuthFilter.java
===================================================================
---
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/filters/AuthFilter.java
(rev 0)
+++
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/filters/AuthFilter.java
2010-10-20 12:45:11 UTC (rev 5774)
@@ -0,0 +1,43 @@
+package net.geant.perfsonar.webadmin.filters;
+
+import java.io.IOException;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+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;
+
+public class AuthFilter implements Filter {
+
+ FilterConfig config;
+
+ public AuthFilter() {
+ }
+
+ public void init(FilterConfig filterConfig) throws ServletException {
+ this.config = filterConfig;
+ }
+
+ @Override
+ public void destroy() {
+ }
+
+ @Override
+ public void doFilter(ServletRequest arg0, ServletResponse arg1,
+ FilterChain arg2) throws IOException,
ServletException {
+ HttpServletRequest request = (HttpServletRequest) arg0;
+ HttpSession session = request.getSession();
+ if (session.getAttribute("logged") == null) {
+ HttpServletResponse response = (HttpServletResponse)
arg1;
+ session.setAttribute("page", "/views/login.jsp");
+ response.sendRedirect("main");
+ } else {
+ arg2.doFilter(arg0, arg1);
+ }
+ }
+}

Added:
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/helpers/AbstractInputHandler.java
===================================================================
---
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/helpers/AbstractInputHandler.java
(rev 0)
+++
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/helpers/AbstractInputHandler.java
2010-10-20 12:45:11 UTC (rev 5774)
@@ -0,0 +1,28 @@
+package net.geant.perfsonar.webadmin.helpers;
+
+import java.util.Map;
+
+import org.w3c.dom.Node;
+
+public abstract class AbstractInputHandler {
+
+ private Node node;
+ private String id;
+
+ public AbstractInputHandler(Node node, String id) {
+ super();
+ this.node = node;
+ this.id = id;
+ }
+
+ public abstract void handleInput(Map<?,?> map);
+
+ public Node getNode() {
+ return node;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+}

Added:
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/helpers/SimpleInputHandler.java
===================================================================
---
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/helpers/SimpleInputHandler.java
(rev 0)
+++
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/helpers/SimpleInputHandler.java
2010-10-20 12:45:11 UTC (rev 5774)
@@ -0,0 +1,22 @@
+package net.geant.perfsonar.webadmin.helpers;
+
+import java.util.Map;
+
+
+import org.w3c.dom.Node;
+
+public class SimpleInputHandler extends AbstractInputHandler{
+
+ public SimpleInputHandler(Node node, String id) {
+ super(node, id);
+ }
+
+ @Override
+ public void handleInput(Map<?, ?> map) {
+ String [] values=(String [])map.get(getId());
+ if(values!=null){
+ getNode().setTextContent(values[0]);
+ }
+ }
+
+}

Added:
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/selftest/SOAPClient.java
===================================================================
---
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/selftest/SOAPClient.java
(rev 0)
+++
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/selftest/SOAPClient.java
2010-10-20 12:45:11 UTC (rev 5774)
@@ -0,0 +1,73 @@
+package net.geant.perfsonar.webadmin.selftest;
+
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.ResponseHandler;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.BasicResponseHandler;
+import org.apache.http.impl.client.DefaultHttpClient;
+
+/**
+ *
+ * Simple SOAP client
+ *
+ * @author Slawomir Trzaszczka
+ *
+ */
+public class SOAPClient {
+
+ private final String url;
+
+ public SOAPClient(String url) {
+ this.url = url;
+ }
+
+ /**
+ *
+ * sends request to webService and returns content of the response
+ *
+ * @param content
+ * - content of the message (soap message)
+ * @return
+ * @throws UnsupportedEncodingException
+ */
+ public String sendMessage(String content) throws SOAPClientException {
+
+ HttpClient httpclient = new DefaultHttpClient();
+ HttpPost httpPost = new HttpPost(url);
+
+ // define required HTTP headers
+ httpPost.setHeader("Content-type", "text/xml;
charset=UTF-8;");
+ httpPost.setHeader("SOAPAction", "");
+
+ StringEntity entity;
+ try {
+ entity = new StringEntity(content);
+ httpPost.setEntity(entity);
+
+ ResponseHandler<String> responseHandler = new
BasicResponseHandler();
+
+ try {
+ return httpclient.execute(httpPost,
responseHandler);
+ } catch (ClientProtocolException e) {
+ e.printStackTrace();
+ throw new SOAPClientException(e);
+ } catch (IOException e) {
+ e.printStackTrace();
+ throw new SOAPClientException(e);
+ } finally {
+ if (httpclient != null) {
+
httpclient.getConnectionManager().shutdown();
+ }
+ }
+ } catch (UnsupportedEncodingException e1) {
+ e1.printStackTrace();
+ throw new SOAPClientException(e1);
+ }
+ }
+
+}

Added:
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/selftest/SOAPClientException.java
===================================================================
---
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/selftest/SOAPClientException.java
(rev 0)
+++
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/selftest/SOAPClientException.java
2010-10-20 12:45:11 UTC (rev 5774)
@@ -0,0 +1,9 @@
+package net.geant.perfsonar.webadmin.selftest;
+
+@SuppressWarnings("serial")
+public class SOAPClientException extends Exception{
+
+ public SOAPClientException(Throwable throwable) {
+ super(throwable);
+ }
+}

Added:
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/servlets/BasicServlet.java
===================================================================
---
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/servlets/BasicServlet.java
(rev 0)
+++
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/servlets/BasicServlet.java
2010-10-20 12:45:11 UTC (rev 5774)
@@ -0,0 +1,69 @@
+package net.geant.perfsonar.webadmin.servlets;
+
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import net.geant.perfsonar.webadmin.xpath.XPathProcessor;
+import net.geant.perfsonar.webadmin.xslt.XSLTTransformator;
+
+import org.w3c.dom.Node;
+
+@SuppressWarnings("serial")
+public class BasicServlet extends CoreServlet {
+
+ @Override
+ protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws ServletException, IOException {
+
+ String page = (String) req.getSession().getAttribute("page");
+ addRequiredPageElements(req);
+ if (page != null) {
+ String info = (String)
req.getSession().getAttribute("info");
+ req.getSession().removeAttribute("info");
+ req.getSession().removeAttribute("page");
+ req.setAttribute("content", info);
+ } else {
+ page = "/views/main.jsp";
+ req
+ .setAttribute("title",
+ "Welcome to the
perfSONAR service web admin administration interface");
+ req.setAttribute("content", "");
+ }
+
+
getServletConfig().getServletContext().getRequestDispatcher(page)
+ .forward(req, resp);
+ }
+
+ @Override
+ protected void doPost(HttpServletRequest req, HttpServletResponse
resp)
+ throws ServletException, IOException {
+
+ String username = (String)
req.getParameterValues("username")[0];
+ String password = (String)
req.getParameterValues("password")[0];
+
+ XPathProcessor xpPathProcessor = new XPathProcessor();
+ Node node = xpPathProcessor.getSingleElement(getPath()
+ + XSLTTransformator.CREDENTIAL,
"/credential");
+ String usernameCredential = node.getAttributes().getNamedItem(
+ "username").getNodeValue();
+ String passwordCredential = node.getAttributes().getNamedItem(
+ "password").getNodeValue();
+
+ if (usernameCredential.equals(username)
+ && passwordCredential.equals(password)) {
+ req.getSession().setAttribute("logged", true);
+ req.getSession().setAttribute("info", "Login
success");
+ req.getSession().setAttribute("page",
"/views/info.jsp");
+ } else {
+ req.getSession()
+ .setAttribute("info", "Incorrect
login or password");
+ req.getSession().setAttribute("page",
"/views/login.jsp");
+ }
+
+ redirect(req, resp, "/main");
+ }
+
+}

Added:
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/servlets/CoreServlet.java
===================================================================
---
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/servlets/CoreServlet.java
(rev 0)
+++
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/servlets/CoreServlet.java
2010-10-20 12:45:11 UTC (rev 5774)
@@ -0,0 +1,62 @@
+package net.geant.perfsonar.webadmin.servlets;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import net.geant.perfsonar.webadmin.xpath.XPathProcessor;
+import net.geant.perfsonar.webadmin.xslt.XSLTTransformator;
+
+import org.w3c.dom.Node;
+
+@SuppressWarnings("serial")
+public class CoreServlet extends HttpServlet {
+
+ private XSLTTransformator xsltTransformator;
+
+ @Override
+ public void init(ServletConfig config) throws ServletException {
+ super.init(config);
+ String basePath = getPath();
+ xsltTransformator = new XSLTTransformator(basePath);
+ }
+
+ protected XSLTTransformator getXsltTransformator() {
+ return xsltTransformator;
+ }
+
+ protected void addRequiredPageElements(HttpServletRequest req) {
+ addMenu(req);
+ addServiceInfo(req);
+ }
+
+ private void addMenu(HttpServletRequest req) {
+ req.setAttribute("menu", xsltTransformator.getMenuContent());
+ }
+
+ private void addServiceInfo(HttpServletRequest req) {
+ XPathProcessor xpPathProcessor = new XPathProcessor();
+ Node node = xpPathProcessor.getSingleElement(getPath()
+ + XSLTTransformator.WEB_ADMIN_CONFIG,
"//serviceInformation");
+ String serviceName =
node.getAttributes().getNamedItem("serviceName")
+ .getNodeValue();
+ String serviceVersion = node.getAttributes().getNamedItem(
+ "serviceVersion").getNodeValue();
+ req.setAttribute("serviceName", serviceName);
+ req.setAttribute("serviceVersion", serviceVersion);
+ }
+
+ protected void redirect(HttpServletRequest req, HttpServletResponse
res,
+ String path) {
+ res.setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY);
+ res.setHeader("Location", req.getContextPath() + path);
+ }
+
+ protected String getPath() {
+ String basePath = getServletContext().getRealPath("/") +
"WEB-INF";
+ return basePath;
+ }
+
+}

Added:
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/servlets/FormServlet.java
===================================================================
---
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/servlets/FormServlet.java
(rev 0)
+++
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/servlets/FormServlet.java
2010-10-20 12:45:11 UTC (rev 5774)
@@ -0,0 +1,92 @@
+package net.geant.perfsonar.webadmin.servlets;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.TransformerFactoryConfigurationError;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import net.geant.perfsonar.webadmin.helpers.AbstractInputHandler;
+
+import org.w3c.dom.Document;
+
+@SuppressWarnings("serial")
+public class FormServlet extends CoreServlet {
+
+ @Override
+ protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws ServletException, IOException {
+
+ String formName = req.getParameter("form");
+
+ String content = null;
+
+ if (formName != null && !formName.isEmpty()) {
+ // form
+ content =
getXsltTransformator().getFormContent(formName);
+ HttpSession session = req.getSession(true);
+ session.setAttribute("docs", getXsltTransformator()
+ .getXpPathResolver().getDoc());
+ session.setAttribute("nodes", getXsltTransformator()
+
.getXpPathResolver().getInputHandlers());
+ }
+
+ addRequiredPageElements(req);
+
+ req.setAttribute("content", content);
+
+ getServletConfig().getServletContext().getRequestDispatcher(
+ "/views/main.jsp").forward(req, resp);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ protected void doPost(HttpServletRequest req, HttpServletResponse
resp)
+ throws ServletException, IOException {
+
+ Map<String, AbstractInputHandler> nodes = (Map<String,
AbstractInputHandler>) req
+ .getSession().getAttribute("nodes");
+
+ for (String key : nodes.keySet()) {
+ nodes.get(key).handleInput(req.getParameterMap());
+ }
+
+ Map<String, Document> docs = (Map<String, Document>)
req.getSession()
+ .getAttribute("docs");
+ for (Entry<String, Document> entry : docs.entrySet()) {
+
+ Source source = new DOMSource(entry.getValue());
+ File file = new File(entry.getKey());
+ Result result = new StreamResult(file);
+ Transformer xformer;
+ try {
+ xformer =
TransformerFactory.newInstance().newTransformer();
+ xformer.transform(source, result);
+ } catch (TransformerConfigurationException e) {
+ e.printStackTrace();
+ } catch (TransformerFactoryConfigurationError e) {
+ e.printStackTrace();
+ } catch (TransformerException e) {
+ e.printStackTrace();
+ }
+ }
+
+ req.getSession().setAttribute("info", "Registration saved");
+ req.getSession().setAttribute("page", "/views/info.jsp");
+ redirect(req, resp, "/main");
+ }
+
+}

Added:
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/servlets/ResourceServlet.java
===================================================================
---
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/servlets/ResourceServlet.java
(rev 0)
+++
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/servlets/ResourceServlet.java
2010-10-20 12:45:11 UTC (rev 5774)
@@ -0,0 +1,59 @@
+package net.geant.perfsonar.webadmin.servlets;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@SuppressWarnings("serial")
+public class ResourceServlet extends HttpServlet {
+
+ /**
+ *
+ * @author Wiktor Procyk
+ *
+ */
+ public void doGet(HttpServletRequest req, HttpServletResponse res)
+ throws IOException, ServletException {
+ String fileName = req.getPathInfo();
+ String fileType =
fileName.substring(fileName.lastIndexOf(".") + 1,
+ fileName.length());
+ InputStream is =
this.getClass().getClassLoader().getResourceAsStream(
+ "wa" + req.getPathInfo());
+ if (is == null) { // nonexisting file requested; should it be
logged?
+ } else {
+ if (setContentTypeHelper(res, fileType, fileName)) {
+ int count = 0;
+ byte[] data = new byte[1024];
+ OutputStream os = res.getOutputStream();
+ while ((count = is.read(data)) != -1) {
+ os.write(data, 0, count);
+ }
+ }
+ }
+ }
+
+ private boolean setContentTypeHelper(HttpServletResponse response,
+ String fileType, String fileName) {
+ if (fileType.trim().equalsIgnoreCase("gif")) {
+ response.setContentType("image/gif");
+ } else if (fileType.trim().equalsIgnoreCase("png")) {
+ response.setContentType("image/png");
+ } else if (fileType.trim().equalsIgnoreCase("js")) {
+ response.setContentType("text/javascript");
+ } else if (fileType.trim().equalsIgnoreCase("css")) {
+ response.setContentType("text/css");
+ } else if (fileType.trim().equalsIgnoreCase("xml")) {
+ response.setContentType("text/xml");
+ } else { // unknown or unsupported extension of a resource
+ return false;
+ }
+ response.setHeader("Content-Disposition", "inline;
filename=\""
+ + fileName + "\"");
+ return true;
+ }
+}

Added:
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/servlets/SelfTestServlet.java
===================================================================
---
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/servlets/SelfTestServlet.java
(rev 0)
+++
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/servlets/SelfTestServlet.java
2010-10-20 12:45:11 UTC (rev 5774)
@@ -0,0 +1,84 @@
+package net.geant.perfsonar.webadmin.servlets;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import net.geant.perfsonar.webadmin.selftest.SOAPClient;
+import net.geant.perfsonar.webadmin.selftest.SOAPClientException;
+import net.geant.perfsonar.webadmin.xpath.XPathProcessor;
+import net.geant.perfsonar.webadmin.xslt.XSLTTransformator;
+
+import org.w3c.dom.Node;
+
+@SuppressWarnings("serial")
+public class SelfTestServlet extends CoreServlet {
+
+ private final String SELF_TEST_FILE = "wa/soapMessages/selfTest.xml";
+
+ @Override
+ protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws ServletException, IOException {
+
+ XPathProcessor xpPathProcessor = new XPathProcessor();
+ Node node = xpPathProcessor.getSingleElement(getPath()
+ + XSLTTransformator.WEB_ADMIN_CONFIG,
"//serviceInformation");
+ String accessPoint =
node.getAttributes().getNamedItem("accessPoint")
+ .getNodeValue();
+
+ SOAPClient soapClient = new SOAPClient(accessPoint);
+ String messageContent = this.getClass().getClassLoader()
+
.getResourceAsStream(SELF_TEST_FILE).toString();
+
+ String content = null;
+
+ if (messageContent == null) {
+ req.setAttribute("errorMessage", "Message is null");
+ } else {
+ String result;
+ try {
+ result =
soapClient.sendMessage(messageContent);
+ if (result != null) {
+ if (result.contains("error")) {
+ // XSLT processing
+ content =
getXsltTransformator().getSelftestContent(
+ result);
+ } else {
+ // print success
+ content = "SUCCESS";
+ }
+ } else {
+ req.setAttribute("errorMessage",
"Result is null");
+ }
+ } catch (SOAPClientException e) {
+ content = e.getMessage();
+ }
+ }
+
+ req.getSession().setAttribute("page", "/views/selfTest.jsp");
+ req.getSession().setAttribute("info", content);
+ redirect(req, resp, "/main");
+ }
+
+ @SuppressWarnings("unused")
+ private String getFileContent(String url) {
+ byte[] buffer = new byte[(int) new File(url).length()];
+ FileInputStream f;
+ try {
+ f = new FileInputStream(url);
+ f.read(buffer);
+ return new String(buffer);
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+}

Added:
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/xpath/XPathProcessor.java
===================================================================
---
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/xpath/XPathProcessor.java
(rev 0)
+++
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/xpath/XPathProcessor.java
2010-10-20 12:45:11 UTC (rev 5774)
@@ -0,0 +1,104 @@
+package net.geant.perfsonar.webadmin.xpath;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpression;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+public class XPathProcessor {
+
+ private Document doc;
+ private Map<String, Document> documents = new HashMap<String,
Document>();
+
+ public Map<String, Document> getDocuments() {
+ return documents;
+ }
+
+ public Document getDoc() {
+ return doc;
+ }
+
+ public Node getSingleElement(String file, String xpathQuery) {
+
+ DocumentBuilderFactory domFactory = DocumentBuilderFactory
+ .newInstance();
+ domFactory.setNamespaceAware(true);
+ DocumentBuilder builder;
+ try {
+ builder = domFactory.newDocumentBuilder();
+ if (documents.containsKey(file)) {
+ doc = documents.get(file);
+ } else {
+ doc = builder.parse(new File(file));
+ documents.put(file, doc);
+ }
+
+ XPath xpath = XPathFactory.newInstance().newXPath();
+ XPathExpression expr = xpath.compile(xpathQuery);
+
+ Object result = expr.evaluate(doc,
XPathConstants.NODESET);
+ Node node = ((NodeList) result).item(0);
+
+ return node;
+ } catch (ParserConfigurationException e) {
+ e.printStackTrace();
+ } catch (SAXException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ } catch (XPathExpressionException e) {
+ e.printStackTrace();
+ }
+
+ return null;
+ }
+
+ public Node getSingleElementFromContent(String content, String
xpathQuery) {
+
+ DocumentBuilderFactory domFactory = DocumentBuilderFactory
+ .newInstance();
+ domFactory.setNamespaceAware(true);
+ DocumentBuilder builder;
+ try {
+ builder = domFactory.newDocumentBuilder();
+
+ ByteArrayInputStream bais=new
ByteArrayInputStream(content.getBytes());
+
+ doc = builder.parse(bais);
+
+ XPath xpath = XPathFactory.newInstance().newXPath();
+ XPathExpression expr = xpath.compile(xpathQuery);
+
+ Object result = expr.evaluate(doc,
XPathConstants.NODESET);
+ Node node = ((NodeList) result).item(0);
+
+ return node;
+ } catch (ParserConfigurationException e) {
+ e.printStackTrace();
+ } catch (SAXException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ } catch (XPathExpressionException e) {
+ e.printStackTrace();
+ }
+
+ return null;
+ }
+
+}

Added:
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/xslt/XPathResolver.java
===================================================================
---
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/xslt/XPathResolver.java
(rev 0)
+++
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/xslt/XPathResolver.java
2010-10-20 12:45:11 UTC (rev 5774)
@@ -0,0 +1,130 @@
+package net.geant.perfsonar.webadmin.xslt;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpression;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+
+import net.geant.perfsonar.webadmin.helpers.AbstractInputHandler;
+import net.geant.perfsonar.webadmin.helpers.SimpleInputHandler;
+import net.geant.perfsonar.webadmin.xpath.XPathProcessor;
+
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+public class XPathResolver {
+
+ private final String url;
+ private final String inputNames[] = { "text", "radio", "select" };
+ private final Map<String, Node> inputNodes = new HashMap<String,
Node>();
+ private final Map<String, AbstractInputHandler> inputHandlers = new
HashMap<String, AbstractInputHandler>();
+ private XPathProcessor xpPathProcessor;
+
+ public XPathResolver(String url) {
+ this.url = url;
+ xpPathProcessor = new XPathProcessor();
+ }
+
+ private String generateId(String Xpath) {
+ return String.valueOf(Xpath.hashCode() +
System.currentTimeMillis());
+ }
+
+ public String replace(String formName, String xml) {
+
+ DocumentBuilderFactory domFactory = DocumentBuilderFactory
+ .newInstance();
+ domFactory.setNamespaceAware(true);
+ DocumentBuilder builder;
+ try {
+ builder = domFactory.newDocumentBuilder();
+ Document doc = builder.parse(new
ByteArrayInputStream(xml
+ .getBytes()));
+ XPath xpath = XPathFactory.newInstance().newXPath();
+ XPathExpression expr;
+ Node node;
+ for (String inputName : inputNames) {
+ expr =
xpath.compile("//form[@itemRefId='"
+ formName + "']//"
+ + inputName);
+ NodeList nodes = (NodeList) expr.evaluate(doc,
+ XPathConstants.NODESET);
+ for (int c = 0; c < nodes.getLength(); c++) {
+ node = nodes.item(c);
+ Node xpathNode =
node.getChildNodes().item(1);
+ String nodeXpath =
xpathNode.getTextContent();
+ String nodeFileURL =
xpathNode.getAttributes()
+
.getNamedItem("file").getNodeValue();
+ Node value =
xpPathProcessor.getSingleElement(url
+ + nodeFileURL,
nodeXpath);
+ // set value from xpath
+ Attr attr =
doc.createAttribute("value");
+ attr.setValue(value.getTextContent());
+
node.getAttributes().setNamedItem(attr);
+
+ // generate id
+ String id = generateId(nodeXpath);
+ attr = doc.createAttribute("name");
+ attr.setValue(id);
+
node.getAttributes().setNamedItem(attr);
+ inputNodes.put(id, value);
+ inputHandlers.put(id, new
SimpleInputHandler(value, id));
+ }
+ }
+
+ TransformerFactory tFactory =
TransformerFactory.newInstance();
+ Transformer transformer = tFactory.newTransformer();
+
+ ByteArrayOutputStream baos = new
ByteArrayOutputStream();
+ DOMSource source = new DOMSource(doc);
+ transformer.transform(source, new StreamResult(baos));
+
+ return baos.toString();
+
+ } catch (ParserConfigurationException e) {
+ e.printStackTrace();
+ } catch (SAXException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ } catch (XPathExpressionException e) {
+ e.printStackTrace();
+ } catch (TransformerConfigurationException e) {
+ e.printStackTrace();
+ } catch (TransformerException e) {
+ e.printStackTrace();
+ }
+
+ return null;
+ }
+
+ public Map<String, Document> getDoc() {
+ return xpPathProcessor.getDocuments();
+ }
+
+ public Map<String, Node> getInputNodes() {
+ return inputNodes;
+ }
+
+ public Map<String, AbstractInputHandler> getInputHandlers() {
+ return inputHandlers;
+ }
+
+}

Added:
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/xslt/XSLTTransformator.java
===================================================================
---
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/xslt/XSLTTransformator.java
(rev 0)
+++
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-component/src/main/java/net/geant/perfsonar/webadmin/xslt/XSLTTransformator.java
2010-10-20 12:45:11 UTC (rev 5774)
@@ -0,0 +1,140 @@
+package net.geant.perfsonar.webadmin.xslt;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.io.Reader;
+import java.io.StringWriter;
+import java.io.UnsupportedEncodingException;
+import java.io.Writer;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+public class XSLTTransformator {
+
+ public static final String CONFIG =
"/classes/perfsonar/conf/configuration.xml";
+ public static final String CREDENTIAL =
"/classes/perfsonar/conf/credential.xml";
+ public static final String WEB_ADMIN_CONFIG =
"/classes/perfsonar/conf/webAdminConfig.xml";
+ public static final String XSLT_FORM =
"org/perfsonar/webadmin/xslt/templates/xslt-form.xml";
+ public static final String XSLT_MENU =
"org/perfsonar/webadmin/xslt/templates/xslt-menu.xml";
+ public static final String xSLT_SELFTEST =
"org/perfsonar/webadmin/xslt/templates/xslt-selftest.xml";
+
+ private String url;
+ private XPathResolver xpPathResolver;
+
+ public XSLTTransformator(String url) {
+ super();
+ this.url = url;
+ }
+
+ private String getFileContent(String url) {
+ byte[] buffer = new byte[(int) new File(url).length()];
+ FileInputStream f;
+ try {
+ f = new FileInputStream(url);
+ f.read(buffer);
+ return new String(buffer);
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ private String convertStreamToString(InputStream is) {
+ /*
+ * To convert the InputStream to String we use the
Reader.read(char[]
+ * buffer) method. We iterate until the Reader return -1
which means
+ * there's no more data to read. We use the StringWriter
class to
+ * produce the string.
+ */
+ if (is != null) {
+ Writer writer = new StringWriter();
+ char[] buffer = new char[1024];
+ try {
+ Reader reader = new BufferedReader(new
InputStreamReader(is,
+ "UTF-8"));
+ int n;
+ while ((n = reader.read(buffer)) != -1) {
+ writer.write(buffer, 0, n);
+ }
+ } catch (UnsupportedEncodingException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ } finally {
+ try {
+ is.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ return writer.toString();
+ } else {
+ return "";
+ }
+ }
+
+ public String getFormContent(String formName) {
+ String xsltForm = convertStreamToString(this.getClass()
+
.getClassLoader().getResourceAsStream(XSLT_FORM));
+ xsltForm = xsltForm.replace("$FORM", formName);
+ String webAdminConfig = getFileContent(url +
WEB_ADMIN_CONFIG);
+ xpPathResolver = new XPathResolver(url);
+ webAdminConfig = xpPathResolver.replace(formName,
webAdminConfig);
+ Source xmlSource = new StreamSource(new ByteArrayInputStream(
+ webAdminConfig.getBytes()));
+ Source xsltSource = new StreamSource(new
ByteArrayInputStream(xsltForm
+ .getBytes()));
+ return getTranslatedContent(xmlSource, xsltSource);
+ }
+
+ public String getMenuContent() {
+ Source xmlSource = new StreamSource(new File(url +
WEB_ADMIN_CONFIG));
+ Source xsltSource = new
StreamSource(this.getClass().getClassLoader()
+ .getResourceAsStream(XSLT_MENU));
+ return getTranslatedContent(xmlSource, xsltSource);
+ }
+
+ public String getSelftestContent(String xmlContent) {
+ ByteArrayInputStream baos = new
ByteArrayInputStream(xmlContent
+ .getBytes());
+ Source xmlSource = new StreamSource(baos);
+ Source xsltSource = new
StreamSource(this.getClass().getClassLoader()
+ .getResourceAsStream(xSLT_SELFTEST));
+ return getTranslatedContent(xmlSource, xsltSource);
+ }
+
+ private String getTranslatedContent(Source xmlSource, Source
xsltSource) {
+ TransformerFactory transFact =
TransformerFactory.newInstance();
+ Transformer trans;
+ try {
+ trans = transFact.newTransformer(xsltSource);
+ ByteArrayOutputStream baos = new
ByteArrayOutputStream();
+ trans.transform(xmlSource, new StreamResult(baos));
+ return baos.toString();
+ } catch (TransformerConfigurationException e) {
+ e.printStackTrace();
+ } catch (TransformerException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ public XPathResolver getXpPathResolver() {
+ return xpPathResolver;
+ }
+}

Modified:
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-exampleservice/pom.xml
===================================================================
---
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-exampleservice/pom.xml
2010-10-20 12:44:05 UTC (rev 5773)
+++
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-exampleservice/pom.xml
2010-10-20 12:45:11 UTC (rev 5774)
@@ -1,7 +1,7 @@
<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/maven-v4_0_0.xsd";>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.perfsonar</groupId>
+ <groupId>net.geant.perfsonar</groupId>
<artifactId>perfsonar-java-web-admin-xslt-exampleservice</artifactId>
<packaging>war</packaging>
<version>1.0</version>
@@ -38,7 +38,7 @@

<dependencies>
<dependency>
- <groupId>org.perfsonar</groupId>
+ <groupId>net.geant.perfsonar</groupId>

<artifactId>perfsonar-java-web-admin-xslt-component</artifactId>
<version>1.0</version>
</dependency>

Modified:
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-exampleservice/src/main/webapp/WEB-INF/web.xml
===================================================================
---
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-exampleservice/src/main/webapp/WEB-INF/web.xml
2010-10-20 12:44:05 UTC (rev 5773)
+++
trunk/perfsonar-java-web-admin-xslt/perfsonar-java-web-admin-xslt-exampleservice/src/main/webapp/WEB-INF/web.xml
2010-10-20 12:45:11 UTC (rev 5774)
@@ -7,7 +7,7 @@

<filter>
<filter-name>authFilter</filter-name>
- <filter-class>org.perfsonar.webadmin.filters.AuthFilter</filter-class>
+
<filter-class>net.geant.perfsonar.webadmin.filters.AuthFilter</filter-class>
</filter>

<filter-mapping>
@@ -19,7 +19,7 @@

<servlet>
<servlet-name>basicServlet</servlet-name>
-
<servlet-class>org.perfsonar.webadmin.servlets.BasicServlet</servlet-class>
+
<servlet-class>net.geant.perfsonar.webadmin.servlets.BasicServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>basicServlet</servlet-name>
@@ -28,7 +28,7 @@

<servlet>
<servlet-name>formServlet</servlet-name>
-
<servlet-class>org.perfsonar.webadmin.servlets.FormServlet</servlet-class>
+
<servlet-class>net.geant.perfsonar.webadmin.servlets.FormServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>formServlet</servlet-name>
@@ -37,7 +37,7 @@

<servlet>
<servlet-name>selftestServlet</servlet-name>
-
<servlet-class>org.perfsonar.webadmin.servlets.SelfTestServlet</servlet-class>
+
<servlet-class>net.geant.perfsonar.webadmin.servlets.SelfTestServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>selftestServlet</servlet-name>
@@ -47,7 +47,7 @@
<!-- resources -->
<servlet>
<servlet-name>ResourceServlet</servlet-name>
-
<servlet-class>org.perfsonar.webadmin.servlets.ResourceServlet</servlet-class>
+
<servlet-class>net.geant.perfsonar.webadmin.servlets.ResourceServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ResourceServlet</servlet-name>
@@ -103,16 +103,10 @@
<servlet-mapping>
<servlet-name>selfTest_jsp</servlet-name>
<url-pattern>/views/selfTest.jsp</url-pattern>
- </servlet-mapping>
-
-<!-- banner.jsp -->
- <servlet>
- <servlet-name>banner_jsp</servlet-name>
- <servlet-class>jsp.views.parts.banner_jsp</servlet-class>
- </servlet>
- <servlet-mapping>
- <servlet-name>banner_jsp</servlet-name>
- <url-pattern>/views/parts/banner.jsp</url-pattern>
- </servlet-mapping>
-
+ </servlet-mapping>
+
+ <welcome-file-list id="WelcomeFileList">
+ <welcome-file>index.jsp</welcome-file>
+ </welcome-file-list>
+
</web-app>

Modified: trunk/perfsonar-java-web-admin-xslt/pom.xml
===================================================================
--- trunk/perfsonar-java-web-admin-xslt/pom.xml 2010-10-20 12:44:05 UTC (rev
5773)
+++ trunk/perfsonar-java-web-admin-xslt/pom.xml 2010-10-20 12:45:11 UTC (rev
5774)
@@ -3,7 +3,7 @@
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>perfsonar</groupId>
+<groupId>net.geant.perfsonar</groupId>
<artifactId>perfsonar-java-web-admin-xslt</artifactId>
<version>1.0</version>
<packaging>pom</packaging>



  • [pS-dev] [GEANT/SA2/ps-java-services] r5774 - in trunk/perfsonar-java-web-admin-xslt: . perfsonar-ja va-web-admin-xslt-component perfsonar-java-web-admin-xslt- component/src/main/java perfsonar-java-web-admin-xslt-comp onent/src/main/java/net perfsonar-java-web-admin-xslt-comp onent/src/main/java/net/geant perfsonar-java-web-admin-xsl t-component/src/main/java/net/geant/perfsonar perfsonar-ja va-web-admin-xslt-component/src/main/java/net/geant/perfso nar/webadmin perfsonar-java-web-admin-xslt-component/src/m ain/java/net/geant/perfsonar/webadmin/filters perfsonar-ja va-web-admin-xslt-component/src/main/java/net/geant/perfso nar/webadmin/helpers perfsonar-java-web-admin-xslt-compone nt/src/main/java/net/geant/perfsonar/webadmin/selftest per fsonar-java-web-admin-xslt-component/src/main/java/net/gea nt/perfsonar/webadmin/servlets perfsonar-java-web-admin-xs lt-component/src/main/java/net/geant/perfsonar/webadmin/xp ath perfsonar-java-web-admin-xslt-component/src/main/java/ net/geant/perfsonar/ webadmin/xslt perfsonar-java-web-admi n-xslt-exampleservice perfsonar-java-web-admin-xslt-exampl eservice/src/main/webapp/WEB-INF, svn-noreply, 10/20/2010

Archive powered by MHonArc 2.6.16.

Top of Page