Raible's Wiki

Raible Designs
Wiki Home
Recent Changes


  - Korean
  - Chinese
  - Italian
  - Japanese

QuickStart Guide
  - Chinese
  - French
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish
  - Japanese

User Guide
  - Korean
  - Chinese

  - Chinese
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish

  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in

Referenced by
...and 14 more

JSPWiki v2.2.33


Hide Menu


Difference between version 65 and version 38:

At line 1 changed 1 line.
__Take part in a Struts Resume__ [Architecture Discussion|StrutsResumeArchitecture].
__What is Struts Resume?__\\
Struts Resume is being developed for two purposes: (1) so I can edit and publish my resume online and (2) to demonstrate developing a real-world app with [AppFuse]. Feel free to checkout the [online demo|http://demo.raibledesigns.com/struts-resume]
At line 3 changed 1 line.
!!__2003.10.30__ - Thank you number 2 for the Doclet King
<span style="color: green">__For common questions and howto's, see the [Struts Resume Support|StrutsResumeSupport] page.__</span>
At line 5 changed 1 line.
Now that the initial thank you is out of the way, here is Thank You #2. I think you should be declared "Doclet King" for the way you have embraced doclet-related software (probably Erik Hatcher too). In any case, since you love doclets sooo much (xdoclet, junitdoclet, etc.), let me introduce you to [dbdoclet (DocBook Doclet)|http://www.dbdoclet.org/]. This doclet creates DocBook output from Java source documentation (javadoc comments). One of the most common uses for this DocBook output is to convert it into PDF. So, instantly (within reason) you can have PDF javadoc documentation.
!!__2004.04.05__ - Struts Resume 0.9 Released!
At line 7 changed 3 lines.
Here's what you need to add to your {{build.xml}} (my {{build.xml}} is slightly different from {{struts-resume}}/{{appfuse}}, but you'll figure it out).
These are the files required:
This release is a major improvement over the last one. Not only did I upgrade all the code to use AppFuse 1.4 ([release notes|http://tinyurl.com/27z2k]), but I also removed Struts from the services layer. Moreover, you can actually enter almost all of the pieces of a resume and render it in HTML and Word format. The resume-entry piece (and sections you can enter) is largely based on what Monster.com uses. I may add other sections in the future (i.e. awards and publications).
At line 11 changed 3 lines.
The main reason this is not a 1.0 release is because an administrator is the only one who can edit the HTML template - and the Word/RTF template is not editable online. Allowing a user to override the default template(s) will be the primary goal in 1.0.
At line 15 changed 2 lines.
A portion of my {{build.xml}} __watch out for packagenames="ca.*" (adjust accordingly)__
Here's a specific rundown of all the changes from the changelog:
At line 18 changed 5 lines.
FYI. dbdoclet.dir is set via a property as follows:
{{{<property name="dbdoclet.dir" value="${user.home}/dbdoclet-${dbdoclet.ver}/share/dbdoclet"/>}}}
<!-- ==================== pdfdoc Target ============================= -->
* Upgraded to AppFuse 1.4 - Includes Spring and all kinds of other goodies.
** [AppFuse 1.4 Release Notes|http://tinyurl.com/27z2k]
* Added Resume Creation/Editing Wizard.
* Added ability to edit HTML Template online (Admins only).
* UI Updates:
** Background borrowed from [alistapart.com|http://www.alistapart.com]. (Thanks!)
** Changed from ListMenu to TabbedMenu.
** Changed to fixed-width layout (700px).
** Added CSS drop shadows to headers.
*** Idea from [http://phoenity.com/newtedge/drop_shadow/]
*** Hack to fix Safari in web/layouts/baseLayout.jsp
* The Tomcat User's resume can be on the demo server at [http://demo.raibledesigns.com/struts-resume/tomcat.html].
At line 24 removed 40 lines.
<target name="pdfdoc" depends="compile"
description="Create PDF documentation">
<mkdir dir="${dist.apidocs}"/>
<!-- === docbook === -->
<echo message="Creating docbook"/>
<javadoc sourcepath="${src.dir};${gen.dir}"
<classpath refid="compile.classpath"/>
<doclet name="com.mf.doclet.docbook.DocBookDoclet"
<param name="-properties" value="dbdoclet.properties"/>
<!-- === convert to Full XML with XIncluder === -->
<echo message="Running XIncluder"/>
<java classname="com.elharo.xml.xinclude.SAXXIncluder"
failonerror="yes" dir="${dist.apidocs}"
output="${dist.apidocs}/reference-full.xml" fork="yes">
<classpath refid="dbdoclet.xincluder.classpath"/>
<arg line="reference.xml"/>
<!-- === filter fo.xsl === -->
<copy tofile="${dist.apidocs}/fo.xsl" file="${metadata.dir}/xsl/fo.xsl">
<filter token="DBDOCLET_HOME" value="${dbdoclet.dir}"/>
<!-- === convert to pdf === -->
<echo message="Converting to PDF"/>
<java classname="org.apache.fop.apps.Fop"
failonerror="yes" dir="${dist.apidocs}" fork="yes">
<classpath refid="dbdoclet.fop.classpath"/>
<arg line="-xml reference-full.xml"/>
<arg line="-xsl fo.xsl"/>
<arg line="-pdf reference.pdf"/>
At line 65 changed 4 lines.
This portion of {{build.xml}} is dependent on the following {{metadata/xsl/fo.xsl}} file
<?xml version="1.0" encoding="iso-8859-1"?>
* [Online Demo|http://demo.raibledesigns.com/struts-resume]
* [Download|http://sourceforge.net/project/showfiles.php?group_id=49385&amp;package_id=75509&amp;release_id=228759] (~10.5 MB for src, ~5.4 MB for bin)
* [API Documentation and Source|http://static.raibledesigns.com/downloads/struts-resume/api/]
* [Mailing List|https://appfuse.dev.java.net/servlets/SummarizeList?listName=users]
At line 70 removed 210 lines.
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
<xsl:import href="file:@DBDOCLET_HOME@/tidbit/docbook/xsl/fo/docbook.xsl"/>
<xsl:param name="insert.xref.page.number">yes</xsl:param>
<xsl:param name="title.margin.left">0pt</xsl:param>
<xsl:param name="use.extensions">1</xsl:param>
<xsl:param name="tablecolumns.extension">0</xsl:param>
<xsl:param name="generate.index">1</xsl:param>
<xsl:param name="admon.graphics">1</xsl:param>
<xsl:param name="admon.graphics.path">@DBDOCLET_HOME@/tidbit/docbook/xsl/image
<xsl:param name="section.autolabel">1</xsl:param>
<xsl:param name="fop.extensions">1</xsl:param>
<xsl:param name="draft.watermark.image"></xsl:param>
<xsl:param name="section.label.includes.component.label">1</xsl:param>
and finally {{dbdoclet.properties}}
# The path of the output file. In the directory of the output file a
# subdirectory figures may be created, where the images for the document
# are stored.
# One of xml or sgml (case insensitive)
# The version of the produced DocBook. Should be 3.1 or 4.1 for SGML and
# 4.1.2 for XML.
# If set to true, the file Index.sgml is included. To generate an
# Index.sgml file you can use the script collateindex.pl. The script is
# part of The Modular DocBook Stylesheets.
# If set to false, the XML/SGML prolog (<?xml..><DOCTYPE...>) is not
# created. This property is necessary, if you want to incorporate the
# output into a DocBook source. e.g a website.
# A comma separated list of imagedata formats. For every format a
# ImageObject -> ImageData entry will be generated.
# Postscript for printing
# imagedata.formats=eps
# PNG for PDF and HTML
title=ROSI SWS
author.surname=Information Systems
copyright.holder=University of Toronto
abstract=Reference Handbook for ROSI SWS Java API
# This properties defines the value for the attribute width of the tag
# ProgramListing. It specifies the width of the longest line in a
# ProgramListing. A formatter can use this value to determine scaling or
# the size of the font used.
# If set to true, the output of warnings is enabled.
# If set to true, an inheritance path is added to the overview section
# for every class. If known, the classes are referenced among each
# other. The default value of this property is true.
# If dot from graphviz 1.8.9 is installed on your system, it is used to
# create the class diagrams. This property should contain the path to
# the dot binary.
# This property defines the vertical space between the classes in the
# class diagrams. The space is an inch value like 0.3.
# program.dot.ranksep=0.2
# This property enables fully qualified names in the class diagrams
Another yummy feature is [class diagrams|http://www.dbdoclet.org/projects/dbdoclet/en/uml.html] in PNG (or other) format. That's why you need the [graphviz package from AT&T|http://www.research.att.com/sw/tools/graphviz/]. A sample class diagram follows:
I am currently trying to modify the sources for dbdoclet to add the capability of handling custom tags. Right now xdocle-related custom tags just disappear into thin air. I have a working prototype but will wait to hear from the upstream author before making it available.
Any questions, drop me a line.
Haroon Rafique haroon.rafique@ca.utoronto (reverse the domain to send email)
!!__2003.10.30__ - Thank you for struts-resume
Hi Matt,
Kudos on your excellent work on appfuse and struts-resume. Since, I've been using appfuse and struts-resume to gather a basic understanding of struts and "helper" technologies, its time to give back a little.
I ran into the same problem as yourself, as per [your email|http://www.mail-archive.com/struts-user@jakarta.apache.org/msg60169.html]. So, I followed the email thread and wasn't quite happy with the JavaScript solution. So, I conjured a non-JavaScript solution which is posted below. Be aware that my struts understanding is fairly rudimentary and this might be a classic example of too much blending of V into the C from the MVC model.
This is part of action.BaseForm
* An overridden validate method which attempts to bypass
* validation.
* <div id="caution_overridden_validate" title="Overridden Validate">
* Due to a bug (or unintended feature) in struts, as
* explained in
* <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16401">this bu
g report</a>
* its difficult (or impossible) when using the Validator with
* LookupDispatchAction to bypass validation on a method level
* without employing JavaScript. I thought it would be nice to have
* a cancel method with no dependency on JavaScript which was able
* to bypass validation. Hence, in this class we override the
* validate method and look for the parameter name (e.g., action) and
* its value (e.g., Cancel) and if the cancel button was pressed,
* the call to super.validate is bypassed.
* <a href="http://www.mail-archive.com/struts-user@jakarta.apache.org/msg60
169.html">Initial report</a>
* by Matt Raible on struts-user mailing list.
* Follow up
* <a href="http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg129
* and
* <a href="http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg129
* by Brandon Goodin on struts-dev mailing list.
* </div>
* @param mapping The <code>ActionMapping</code> used to select this
* instance
* @param request The servlet request we are processing
* @return <code>ActionErrors</code> object that encapsulates any
* validation errors
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
// Identify the request parameter containing the method name
String parameter = mapping.getParameter();
if( parameter != null ) {
// Identify the method name to be dispatched to.
String name = request.getParameter(parameter);
MessageResources resources =
(MessageResources) request.getAttribute(Globals.MESSAGES_KEY);
// Identify the localized message for the cancel button
String message = resources.getMessage("button.cancel");
// if message resource matches the cancel button then no
// need to validate
if( name != null && name.equals(message) ) {
if( log.isDebugEnabled() ) {
log.debug(mapping.getAttribute() + " '" + name +
"' method, so no need to validate");
return null;
// perform regular validation
return super.validate(mapping, request);
What do you think of this approach?
Haroon Rafique haroon.rafique@ca.utoronto (reverse the domain to send email)
;:''This looks good Haroon - thanks for the code sample. ~ [MattRaible]''
!!__2003.10.10__ - Problem compiling in 0.8
I'm trying to compile struts-resume, which I just downloaded to have a sample app dealing with Velocity, but i'm obviously missing org.appfuse.webapp.form.UserForm and UserRoleForm. I manage to find UserForm in security-example1.1.zip but not UserRoleForm.
Is it a mistake or not in your app dist?\\
*''You have to use Ant to compile struts-resume. The *Form classes are generated by [XDoclet|http://www.xdoclet.com]. [MattRaible]''
!!__2003.09.15__ - Small bug discovered in 0.8
The global.js javascript file is missing the following method. I've updated the files in 0.8 to fix this bug. Without this method, when a user changes their password, it's not encrypted, and they can't login again.
function createFormElement(element, type, name, id, value, parent) {
var e = document.createElement(element);
e.setAttribute("name", name);
e.setAttribute("type", type);
e.setAttribute("id", id);
e.setAttribute("value", value);

Back to StrutsResume, or to the Page History.