diff --git a/apps/showcase/src/main/java/org/apache/struts/action2/showcase/jasper/JasperAction.java b/apps/showcase/src/main/java/org/apache/struts/action2/showcase/jasper/JasperAction.java deleted file mode 100644 index 981f1f447..000000000 --- a/apps/showcase/src/main/java/org/apache/struts/action2/showcase/jasper/JasperAction.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * $Id$ - * - * Copyright 2006 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.struts.action2.showcase.jasper; - -import java.util.Set; -import java.io.File; - -import net.sf.jasperreports.engine.JasperCompileManager; - -import com.opensymphony.xwork.ActionSupport; -import org.apache.struts.action2.ServletActionContext; -import org.apache.struts.action2.showcase.person.PersonManager; - -/** - */ -public class JasperAction extends ActionSupport { - - private static final long serialVersionUID = 6320765173392624324L; - - private PersonManager personManager; - - public void setPersonManager(PersonManager personManager) { - this.personManager = personManager; - } - - /* - * (non-Javadoc) - * - * @see com.opensymphony.xwork.ActionSupport#execute() - */ - public String execute() throws Exception { - - /* - * Here we compile our xml jasper template to a jasper file. - * Note: this isn't exactly considered 'good practice'. - * You should either use precompiled jasper files (.jasper) or provide some kind of check - * to make sure you're not compiling the file on every request. - * If you don't have to compile the report, you just setup your data source (eg. a List), and skip this - */ - try { - String reportSource = ServletActionContext.getServletContext().getRealPath("/jasper/sample_report.jrxml"); - File parent = new File(reportSource).getParentFile(); - JasperCompileManager.compileReportToFile( - reportSource, - new File(parent, "sample_report.jasper").getAbsolutePath()); - } catch (Exception e) { - e.printStackTrace(); - return ERROR; - } - //if all goes well .. - return SUCCESS; - } - - /** - * @return Returns the people. - */ - public Set getPeople() { - return personManager.getPeople(); - } - -} diff --git a/apps/showcase/src/main/webapp/WEB-INF/classes/xwork-person.xml b/apps/showcase/src/main/webapp/WEB-INF/classes/xwork-person.xml index bd3d4f48c..e0b54cab3 100644 --- a/apps/showcase/src/main/webapp/WEB-INF/classes/xwork-person.xml +++ b/apps/showcase/src/main/webapp/WEB-INF/classes/xwork-person.xml @@ -11,16 +11,6 @@ listPeople.ftl - - - - /jasper/sample_report.jasper - people - peoplereport - - - - listPeople.action newPerson.ftl diff --git a/apps/showcase/src/main/webapp/jasper/sample_report.jrxml b/apps/showcase/src/main/webapp/jasper/sample_report.jrxml deleted file mode 100644 index d8f197e85..000000000 --- a/apps/showcase/src/main/webapp/jasper/sample_report.jrxml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - <band height="50"> - <staticText> - <reportElement x="0" y="0" width="180" height="15"/> - <textElement/> - <text> - <![CDATA[Webwork JasperReports Sample]]> - </text> - </staticText> - </band> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/apps/showcase/src/main/webapp/person/editPeople.jsp b/apps/showcase/src/main/webapp/person/editPeople.jsp index 9e2fc4b0c..b7401b4a6 100644 --- a/apps/showcase/src/main/webapp/person/editPeople.jsp +++ b/apps/showcase/src/main/webapp/person/editPeople.jsp @@ -35,7 +35,6 @@ diff --git a/apps/showcase/src/main/webapp/person/index.jsp b/apps/showcase/src/main/webapp/person/index.jsp index 1b32a622c..48afafe75 100644 --- a/apps/showcase/src/main/webapp/person/index.jsp +++ b/apps/showcase/src/main/webapp/person/index.jsp @@ -7,7 +7,6 @@ diff --git a/apps/showcase/src/main/webapp/person/listPeople.ftl b/apps/showcase/src/main/webapp/person/listPeople.ftl index 1eb49a38b..b2b854f65 100644 --- a/apps/showcase/src/main/webapp/person/listPeople.ftl +++ b/apps/showcase/src/main/webapp/person/listPeople.ftl @@ -23,7 +23,6 @@ There are ${peopleCount} people... diff --git a/apps/showcase/src/main/webapp/person/newPerson.ftl b/apps/showcase/src/main/webapp/person/newPerson.ftl index 308c43add..897612177 100644 --- a/apps/showcase/src/main/webapp/person/newPerson.ftl +++ b/apps/showcase/src/main/webapp/person/newPerson.ftl @@ -13,7 +13,6 @@