Skip to content

Instantly share code, notes, and snippets.

View steinermatt's full-sized avatar

Matthias Steiner steinermatt

View GitHub Profile
@steinermatt
steinermatt / default.jsp
Created September 14, 2013 16:11
pjax-tiles / src / main / webapp / WEB-INF / layouts / default.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<!DOCTYPE html>
<html lang="en">
<head>
<title><tiles:getAsString name="title"/></title>
<tiles:insertAttribute name="meta"/>
<tiles:insertAttribute name="stylesheets"/>
@steinermatt
steinermatt / pjax.jsp
Created September 14, 2013 16:14
pjax-tiles / src / main / webapp / WEB-INF / layouts / pjax.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<tiles:insertAttribute name="content" />
@steinermatt
steinermatt / PJAXViewPreparer.java
Created September 14, 2013 16:16
pjax-tiles / src / main / java / net / inscope / sandbox / pjax / web / PJAXViewPreparer.java
package net.inscope.sandbox.pjax.web;
import org.apache.tiles.Attribute;
import org.apache.tiles.AttributeContext;
import org.apache.tiles.context.TilesRequestContext;
import org.apache.tiles.preparer.PreparerException;
import org.apache.tiles.preparer.ViewPreparer;
public class PJAXViewPreparer implements ViewPreparer
{
@steinermatt
steinermatt / tiles-defs.xml
Created September 14, 2013 16:17
pjax-tiles / src / main / webapp / WEB-INF / tiles-defs.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN"
"http://tiles.apache.org/dtds/tiles-config_2_1.dtd">
<tiles-definitions>
<definition name="default.definition" template="/WEB-INF/layouts/default.jsp">
<put-attribute name="meta" value="/WEB-INF/views/tiles/meta.jsp" />
<put-attribute name="js" value="/WEB-INF/views/tiles/js.jsp" />
<put-attribute name="stylesheets" value="/WEB-INF/views/tiles/stylesheets.jsp" />
<put-attribute name="header" value="/WEB-INF/views/tiles/header.jsp" />
@steinermatt
steinermatt / hello_world_servlet_snippet
Last active August 29, 2015 13:58
SAP HANA Cloud Platform - "Hello World" servlet
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.getWriter().println("Hello World!");
}
@steinermatt
steinermatt / settings.xml
Created April 14, 2014 07:43
SAP HANA Cloud Platform - Maven proxy configuration in settings.xml
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository/>
<interactiveMode/>
<usePluginRegistry/>
<offline/>
<pluginGroups/>
<servers/>
@steinermatt
steinermatt / pom.xml (extract)
Created April 15, 2014 08:56
SAP HANA Cloud Platform - RFC-based connectivity (extract of pom.xml)
<!-- Apache CXF -->
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>${org.apache.cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>${org.apache.cxf.version}</version>
@steinermatt
steinermatt / com.sap.cloudlabs.connectivity.sflight.FlightService (extract)
Created April 15, 2014 09:03
SAP HANA Cloud Platform - RFC-based connectivity - FlightService skeleton
@Service("flightService")
@Path("/flight.svc")
@Produces({ "application/json" })
public class FlightService {
@GET
@Path("/flights/{cityFrom}/{cityTo}")
@Produces("application/json")
public String getFlightList(@Context HttpServletRequest req, @PathParam("cityFrom") String cityFrom,
@PathParam("cityTo") String cityTo)
@steinermatt
steinermatt / dest_sflight.jcoDestination
Last active August 29, 2015 13:59
SAP HANA Cloud Platform - RFC-based connectivity (dest_sflight)
#Tue Apr 15 09:43:56 UTC 2014
Name=dest_sflight
Type=RFC
jco.client.r3name=FLI
jco.client.group=PUBLIC
jco.client.lang=EN
jco.destination.repository.user=DEVELOPER
jco.client.cloud_connector_version=2
jco.client.user=DEVELOPER
jco.client.client=001
@steinermatt
steinermatt / index.html
Created June 24, 2014 07:42
SAP UI5 - Hello World (RDE Getting started)
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Hello World</title>
<script src="resources/sap-ui-core.js"
id="sap-ui-bootstrap"
data-sap-ui-libs="sap.ui.commons"
data-sap-ui-theme="sap_goldreflection">
</script>