Creating HTML version of User Profile
One of the methods in the JavaBean is producing an HTML file which you
saw on the previous slide. It is extracted from User Profile file.
/**
* Method: viewProfile
* <p>
* Find the profile.xml and display the XML file.
* </p>
* @param None
* @return boolean status
* @throws None
*/
public boolean viewProfile() {
boolean status = false;
String xmlFile = documentRoot + "WEB-INF/Descriptors/users/"
+ user + "/profile.xml";
String xslFile = documentRoot + "styles/profile.xsl";
htmlFile = documentRoot + "TempPages/profile.html";
Transform transformer = new Transform();
status = transformer.writeHTML(xmlFile, xslFile, htmlFile);
return status;
}
|