Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Yahoo News Search</title><style type="text/css">
body {
font-family: sans-serif;
font-size: 0.85em;
margin: 2em 8em;
}
public File generateFOFromXml(File xslFile,File xmlFile){
File tempout = null;
try {
TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer transformer = tFactory.newTransformer(new StreamSource(xslFile));
tempout = File.createTempFile("tmp", ".fo");
transformer.transform(new StreamSource(xmlFile), new StreamResult(new FileOutputStream(tempout)));
} catch (TransformerConfigurationException tce) {
LOGGER.error("Transformer Configuration Error",tce);
} catch (IOException ioe) {
public void doRequest(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
IOException {
//Check for the parameters being correct from the request.
RequestHelper requestHelper = new RequestHelper(request);
if ("".compareTo(requestHelper.getRequestParameter("username")) == 0) {
//forward to the login.jsp page to allow logins
LOGGER.error("No Form submitted so forward to login page\n");
#propertiesFile.1=btvisionvideosubmissionhandler.properties
#propertiesFile.2=aotvvideosubmissionhandler.properties
#propertiesFile.3=telstra_aflvideosubmissionhandler.properties
#propertiesFile.4=telstra_aflFTPHandler.properties
#propertiesFile.5=telstra_aflAkamaiPoller.properties
#propertiesFile.6=telstra_nrlvideosubmissionhandler.properties
#propertiesFile.7=telstra_nrlFTPHandler.properties
#propertiesFile.8=telstra_nrlAkamaiPoller.properties
#propertiesFile.9=telstra_v8videosubmissionhandler.properties
#propertiesFile.10=telstra_v8FTPHandler.properties
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Sample namespace-based configuration
-
- $Id: applicationContext-security.xml 3019 2008-05-01 17:51:48Z luke_t $
-->
<beans:beans xmlns="http://www.springframework.org/schema/security"
xmlns:beans="http://www.springframework.org/schema/beans"
Projects as follows
C:\Development\Fop - Apache FOP 1.0 source
C:\Development\MyApp\Core - Core web app requires FOP
C:\Development\MyApp\Modulex - each module has its own name and requires Core but installs in the tomcat as a different webapp
c:\Development\enginename - different engines for access, will need FOP but will be needed by core (replaces the requirement for FOP in Core) <-- possible change
Projects as follows
C:\Development\Fop - Apache FOP 1.0 source
C:\Development\MyApp\Core - Core web app requires FOP
C:\Development\MyApp\Modulex - each module has its own name and requires Core but installs in the tomcat as a different webapp
c:\Development\enginename - different engines for access, will need FOP but will be needed by core (replaces the requirement for FOP in Core) <-- possible change
*/
public static void copyFolderContents(File srcFolder, File dstFolder, boolean preserveFileDates) throws Exception {
try {
if (srcFolder.isDirectory()) {
org.apache.commons.io.FileUtils.copyDirectory(srcFolder, dstFolder, preserveFileDates); <--- Error here
}
} catch(Exception e) {
logger.error("Failed to copy contents of folder:[" +
srcFolder.getAbsolutePath() + "] to folder [" +
dstFolder.getAbsolutePath() + "].", e
Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
Maven home: C:\apache-maven-3.0.3-bin\apache-maven-3.0.3\bin\..
Java version: 1.6.0_23-ea, vendor: Sun Microsystems Inc.
Java home: C:\Program Files\Java\jdk1.6.0_23\jre
Default locale: en_GB, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from C:\apache-maven-3.0.3-bin\apache-maven-3.0.3\bin\..\conf\settings.xml
[DEBUG] Reading user settings from C:\Users\Theresa\.m2\settings.xml
[DEBUG] Using local repository at C:\Users\Theresa\.m2\repository
package uk.co.inbrand.inbrandcore.db;
import java.net.InetAddress;
import java.sql.CallableStatement;
import java.sql.Clob;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;