daveb 01/04/19 21:22:34
Added: contrib/temporary/enhydra-velocity/example/presentation
WelcomePresentation.java
Log:
Example presentation
Revision Changes Path
1.1
jakarta-velocity/contrib/temporary/enhydra-velocity/example/presentation/WelcomePresentation.java
Index: WelcomePresentation.java
===================================================================
// Enhydra
import com.lutris.appserver.server.httpPresentation.*;
// Velocity Service
import com.miceda.velsrv.vpo.*;
import org.apache.velocity.VelocityContext;
// Standard imports
import java.io.IOException;
import java.util.Date;
import java.text.DateFormat;
/**
* Simple example of how to use for presentation.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Dave Bryson</a>
* @version 1.0
* @since 1.0
* @see VelocityPO
*/
public class WelcomePresentation extends VelocityPO
{
protected String processRequest( HttpPresentationComms comms, VelocityContext
context )
throws Exception
{
// Populate the context
context.put("mymessage","Hello from Velocity");
context.put("today", new Date() );
// pass the name of the template
return getOutput( context, "welcome.vm");
}
}