diff --git a/.openshift/action_hooks/README.md b/.openshift/action_hooks/README.md new file mode 100644 index 00000000..86ac3ec5 --- /dev/null +++ b/.openshift/action_hooks/README.md @@ -0,0 +1,3 @@ +For information about which action hooks are supported, consult the OpenShift documentation: + +https://github.com/openshift/origin-server/blob/master/node/README.writing_applications.md diff --git a/src/main/webapp/health.jsp b/src/main/webapp/health.jsp new file mode 100755 index 00000000..d00491fd --- /dev/null +++ b/src/main/webapp/health.jsp @@ -0,0 +1 @@ +1 diff --git a/src/main/webapp/images/jbosscorp_logo.png b/src/main/webapp/images/jbosscorp_logo.png new file mode 100755 index 00000000..bfa0447f Binary files /dev/null and b/src/main/webapp/images/jbosscorp_logo.png differ diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html new file mode 100755 index 00000000..0367f1fb --- /dev/null +++ b/src/main/webapp/index.html @@ -0,0 +1,182 @@ + + + + + + Welcome to OpenShift + + + + + OpenShift logo +
OpenShift
+
+

+ Welcome to OpenShift, JBossEAP6.0 Cartridge +

+

+ Place your application here +

+

+ In order to commit to your new project, go to your projects git repo (created with the rhc app create command) directory. +

+

+ For example, if you named your application myfirstapp (by passing in -a myfirstapp to the rhc app create command), + you would find the contents of this app located under myfirstapp/src/main/webapp. You can edit that and push your + changes from the myfirstapp directory by running: +

+
+    git commit -a -m 'Some commit message'
+    git push
+  
+

+ Then reload this page. +

+

See the myfirstapp/README file for more information on the options for deploying applications.

+ + +

Sample Applications

+

To get started you can either modify the default war or try one of these samples: +

+ +

Example usage:

+
+  cd kitchensink
+  git remote add upstream -m master git://github.com/openshift/kitchensink-example.git
+  git pull -s recursive -X theirs upstream master
+  
+

+ +

Debugging

+

View debugging information about the server environment including memory pools by loading this JSP page: Debug

+ +

+ What's next? +

+ + + diff --git a/src/main/webapp/snoop.jsp b/src/main/webapp/snoop.jsp new file mode 100755 index 00000000..a112f626 --- /dev/null +++ b/src/main/webapp/snoop.jsp @@ -0,0 +1,283 @@ + + + JBossEAP6.0 JSP snoop page + <%@ page import="javax.servlet.http.HttpUtils,java.util.Enumeration" %> + <%@ page import="java.lang.management.*" %> + <%@ page import="java.util.*" %> + + + +

WebApp JSP Snoop page

+ + +

JVM Memory Monitor

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Memory MXBean

+
Heap Memory Usage +<%=ManagementFactory.getMemoryMXBean().getHeapMemoryUsage()%> +
Non-Heap Memory Usage +<%=ManagementFactory.getMemoryMXBean().getNonHeapMemoryUsage()%> +
+

Memory Pool MXBeans

+
+<% +Iterator iter = ManagementFactory.getMemoryPoolMXBeans().iterator(); +while (iter.hasNext()) { +MemoryPoolMXBean item = (MemoryPoolMXBean) iter.next(); +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
<%= item.getName() %>
Type<%= item.getType() %>
Usage<%= item.getUsage() %>
Peak Usage<%= item.getPeakUsage() %>
Collection Usage<%= item.getCollectionUsage() %>
+ + +<% +} +%> + +

Request information

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Requested URL:<%= HttpUtils.getRequestURL(request) %>
Request method:<%= request.getMethod() %>
Request URI:<%= request.getRequestURI() %>
Request protocol:<%= request.getProtocol() %>
Servlet path:<%= request.getServletPath() %>
Path info:<%= request.getPathInfo() %>
Path translated:<%= request.getPathTranslated() %>
Query string:<% if(request.getQueryString()!=null) out.write(request.getQueryString().replaceAll("<", "<").replaceAll(">",">")); %>
Content length:<%= request.getContentLength() %>
Content type:<%= request.getContentType() %>
Server name:<%= request.getServerName() %>
Server port:<%= request.getServerPort() %>
Remote user:<%= request.getRemoteUser() %>
Remote address:<%= request.getRemoteAddr() %>
Remote host:<%= request.getRemoteHost() %>
Authorization scheme:<%= request.getAuthType() %>
+ +<% + Enumeration e = request.getHeaderNames(); + if(e != null && e.hasMoreElements()) { +%> +

Request headers

+ + + + + + +<% + while(e.hasMoreElements()) { + String k = (String) e.nextElement(); +%> + + + + +<% + } +%> +
Header:Value:
<%= k %><%= request.getHeader(k) %>
+<% + } +%> + + +<% + e = request.getParameterNames(); + if(e != null && e.hasMoreElements()) { +%> +

Request parameters

+ + + + + + +<% + while(e.hasMoreElements()) { + String k = (String) e.nextElement(); + String val = request.getParameter(k); + String vals[] = request.getParameterValues(k); +%> + + + + + +<% + } +%> +
Parameter:Value:Multiple values:
<%= k.replaceAll("<", "<").replaceAll(">",">") %><%= val.replaceAll("<", "<").replaceAll(">",">") %><% + for(int i = 0; i < vals.length; i++) { + if(i > 0) + out.print("
"); + out.print(vals[i].replaceAll("<", "<").replaceAll(">",">")); + } + %>
+<% + } +%> + + +<% + e = request.getAttributeNames(); + if(e != null && e.hasMoreElements()) { +%> +

Request Attributes

+ + + + + +<% + while(e.hasMoreElements()) { + String k = (String) e.nextElement(); + Object val = request.getAttribute(k); +%> + + + + +<% + } +%> +
Attribute:Value:
<%= k.replaceAll("<", "<").replaceAll(">",">") %><%= val.toString().replaceAll("<", "<").replaceAll(">",">") %>
+<% + } +%> + + +<% + e = getServletConfig().getInitParameterNames(); + if(e != null && e.hasMoreElements()) { +%> +

Init parameters

+ + + + + +<% + while(e.hasMoreElements()) { + String k = (String) e.nextElement(); + String val = getServletConfig().getInitParameter(k); +%> + + + + +<% + } +%> +
Parameter:Value:
<%= k %><%= val %>
+<% + } +%> + + + +