JSTL added
This commit is contained in:
parent
7ac90f2da3
commit
8087a56b82
17
README.md
17
README.md
@ -5,9 +5,9 @@ Servlet for Oracle APEX to run PDF Reports based on Apache FOP
|
||||
Fahrdienst-Anwendung / Kostenblatt
|
||||
|
||||
* Uses Apache FOP for rendering
|
||||
https://xmlgraphics.apache.org/fop/
|
||||
<https://xmlgraphics.apache.org/fop/>
|
||||
* Uses JavaMelody for monitoring
|
||||
https://github.com/javamelody/javamelody/wiki
|
||||
<https://github.com/javamelody/javamelody/wiki>
|
||||
* Use Java 11 LTS (also tested with Java 17 LTS and Java 21 LTS)
|
||||
|
||||
## Run tests
|
||||
@ -17,25 +17,30 @@ https://github.com/javamelody/javamelody/wiki
|
||||
`mvn package verify`
|
||||
|
||||
## Upgrade
|
||||
|
||||
* set new version in pom.xml
|
||||
* check dependent libraries for updates
|
||||
* run tests and build
|
||||
|
||||
## Release
|
||||
|
||||
* create a tag with version number
|
||||
* create a github release
|
||||
|
||||
## Installation
|
||||
|
||||
* rename target/fop4apex*.war to fop4apex.war
|
||||
* copy fop4apex.war to tomcat webapps folder
|
||||
* Oracle APEX - Sample Settings
|
||||
* PrintServer External (Apache FOP)
|
||||
* Protocol HTTP / HTTPS
|
||||
* Host 127.0.0.1
|
||||
* Port 8080
|
||||
* Protocol HTTP / HTTPS
|
||||
* Host 127.0.0.1
|
||||
* Port 8080
|
||||
* Script: /fop4apex/pdf
|
||||
* Timeout 300
|
||||
|
||||
### Debugging
|
||||
|
||||
Add to Tomcat logging.properties:
|
||||
```
|
||||
org.apache.tomcat.util.http.Parameters.level = ALL
|
||||
@ -43,6 +48,7 @@ de.pdv.apex.level = ALL
|
||||
```
|
||||
|
||||
### Deploy to tomcat 9.x (IntelliJ / Netbeans) / Jetty 10.x
|
||||
|
||||
Run http://localhost:port/
|
||||
|
||||
Example:
|
||||
@ -50,6 +56,7 @@ Example:
|
||||
* http://localhost:8080/fop4apex_war_exploded/monitoring
|
||||
|
||||
## Conversion using Apache fop (windows powershell)
|
||||
|
||||
```
|
||||
$env:PATH="c:\Users\oliver1\Downloads\_tools\fop-2.9\fop;$env:PATH"
|
||||
cd src\test\ressources\samples
|
||||
|
||||
6
pom.xml
6
pom.xml
@ -29,6 +29,12 @@
|
||||
<version>4.0.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/javax.servlet/jstl -->
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>jstl</artifactId>
|
||||
<version>1.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
|
||||
@ -1,10 +1,16 @@
|
||||
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||
<%@ page import="java.util.Map" %>
|
||||
<%@ page import="java.util.LinkedHashMap" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en" data-theme="dark">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="Apache Formatting Objects Processor integration for Oracle Application Express, converts xml and fop to pdf">
|
||||
<link rel="stylesheet" href="webjars/pico/css/pico.min.css">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="description" content="Apache Formatting Objects Processor integration for Oracle Application Express, converts xml and fop to pdf" />
|
||||
<link rel="stylesheet" href="webjars/pico/css/pico.min.css" />
|
||||
<title>Apache FOP for Oracle APEX</title>
|
||||
</head>
|
||||
<body>
|
||||
@ -42,11 +48,11 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Port</th>
|
||||
<td>8080</td>
|
||||
<td><c:out value="${pageContext.request.serverPort}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Script</th>
|
||||
<td>${pageContext.request.contextPath}/pdf</td>
|
||||
<td><c:out value="${pageContext.request.contextPath}"/>/pdf</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Timeout</td>
|
||||
@ -61,24 +67,42 @@
|
||||
<pre>org.apache.tomcat.util.http.Parameters.level = ALL
|
||||
de.pdv.apex.level = ALL</pre>
|
||||
|
||||
<h2>Server Info / Environment</h2>
|
||||
<%--@elvariable id="System" type=""--%>
|
||||
<pre>
|
||||
Server Version: <%= application.getServerInfo() %>
|
||||
Servlet Version: <%= application.getMajorVersion() %>.<%= application.getMinorVersion() %>
|
||||
JSP Version: <%= JspFactory.getDefaultFactory().getEngineInfo().getSpecificationVersion() %>
|
||||
Context Path: ${pageContext.request.contextPath}
|
||||
<%
|
||||
Map<String,String> systemProperties = new LinkedHashMap<>();
|
||||
systemProperties.put("Server Version",application.getServerInfo());
|
||||
systemProperties.put("Servlet Version",String.format("%d.%d",application.getMajorVersion(),application.getMinorVersion()));
|
||||
systemProperties.put("JSP Version",JspFactory.getDefaultFactory().getEngineInfo().getSpecificationVersion());
|
||||
systemProperties.put("Context Path", request.getContextPath() );
|
||||
systemProperties.put("","");
|
||||
systemProperties.put("java.version",System.getProperty("java.version"));
|
||||
systemProperties.put("java.vm.vendor",System.getProperty("java.vm.vendor"));
|
||||
systemProperties.put("user.country",System.getProperty("user.country"));
|
||||
systemProperties.put("user.language",System.getProperty("user.language"));
|
||||
systemProperties.put("user.name",System.getProperty("user.name"));
|
||||
systemProperties.put("user.timezone",System.getProperty("user.timezone"));
|
||||
systemProperties.put("os.name",System.getProperty("os.name"));
|
||||
systemProperties.put("os.version",System.getProperty("os.version"));
|
||||
systemProperties.put("file.encoding",System.getProperty("file.encoding"));
|
||||
systemProperties.put("sun.jnu.encoding",System.getProperty("sun.jnu.encoding"));
|
||||
request.setAttribute("systemProperties",systemProperties);
|
||||
%>
|
||||
|
||||
java.version: ${System.getProperty("java.version")}
|
||||
java.vm.vendor: ${System.getProperty("java.vm.vendor")}
|
||||
user.country: ${System.getProperty("user.country")}
|
||||
user.language: ${System.getProperty("user.language")}
|
||||
user.name: ${System.getProperty("user.name")}
|
||||
user.timezone: ${System.getProperty("user.timezone")}
|
||||
os.name: ${System.getProperty("os.name")}
|
||||
os.version: ${System.getProperty("os.version")}
|
||||
file.encoding: ${System.getProperty("file.encoding")}
|
||||
sun.jnu.encoding: ${System.getProperty("sun.jnu.encoding")}</pre>
|
||||
<h2>Server Info / Environment</h2>
|
||||
<table role="grid">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Parameter</th>
|
||||
<th scope="col">Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<c:forEach var="property" items="${systemProperties}">
|
||||
<tr>
|
||||
<th scope="row"><c:out value="${property.key}"/></th>
|
||||
<td><c:out value="${property.value}"/></td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</table>
|
||||
<p>page built with <a href="https://picocss.com/">Pico.css</a>, fop conversion with <a href="https://xmlgraphics.apache.org/fop/">Apache FOP</a> </p>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user