Open Source-Based Portal-Lite, Page 4
To make updates simple, you want to deploy this as a war file, and you don't want the non-technical users to have to do anything other than replace the war file in webapps, so set server.xml to not explode wars like this:
<Host name="localhost" debug="0" appBase="webapps" unpackWARs="false" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
This initial demo helped in the sale of three BI initiatives within six months. The demo was so easy to use by the presentation team that I didn't know it had been part of the presentations until after the projects were completed.
One complaint about the initial demo was that the data was stale. I solved this problem by using POI HSSF and making minimal changes to the project-provided examples. HSSF is a real handy project for reading and writing to Microsoft Excel file, but it is not built for speed. You can download my POC portal application and see how simple it was to plug in HSSF as a data source. Essentially, it is called by a Struts action class using a Form Bean (not included) that stores the last update timestamp of the spreadsheet along with the data values in application scope. You can use the timestamp to determine whether to repopulate your bean with new data to improve performance.
When I first began learning Java, one of the developers I worked with would often say "Reuse is everything." Time and experience have taught me that writing every component to be reusable defeats the purpose of doing so (decreasing effort). The key to writing reusable code that returns its promise is in identifying a future use before making it reusable. Open Source implementations and portals are the perfect opportunity to write reusable components such as the light-weight portal described in this article.
- Tomcat 5.5.x (http://archive.apache.org/dist/jakarta/tomcat-5/)
- Tomcat Compatibility (same path as tomcat)
- Struts (http://struts.apache.org/download.cgi)
- POI (http://jakarta.apache.org/poi/index.html)
- JDK (http://java.sun.com/j2se)
- Example Portal (Download.zip)
1 One reason I like Open Source solutions is that if something is almost what you want, it's possible to change it to what you do want. A little tweaking of the Templates TLD and some minor coding allowed me to adapt Templates to take run-time values and saved days of work on a major Struts-based project.
2 The script was build hastily and only works properly in Internet Explorer. It's not difficult to tweak it to be cross-browser compatible; I haven't done that because I have had the luxury of building Intranet portals for some time now that will only be used on IE.
4 Open Source components go through rapid version changes. The versions this article is based on my have changed enough where you may need to reference current documentation to implement everything. Packaging also changes, so you may need to download support libs for these projects.
About the Author
Scott Nelson is a Principal Technical Consultant at for a professional services company based in Cambridge, MA.. His client engagements over the last three years have focused on the delivery of business intelligence to leadership teams in large multi-national companies through portal applications. Between client projects, he leads and develops prototype implementations of new technologies and products.