Added a couple of convenience methods.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1154 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: InvocationContext.java,v 1.1 2001/10/31 09:44:22 mdb Exp $
|
||||
// $Id: InvocationContext.java,v 1.2 2003/06/28 17:11:54 mdb Exp $
|
||||
//
|
||||
// samskivert library - useful routines for java programs
|
||||
// Copyright (C) 2001 Michael Bayne
|
||||
@@ -72,6 +72,22 @@ public class InvocationContext extends VelocityContext
|
||||
return RuntimeSingleton.getTemplate(path);
|
||||
}
|
||||
|
||||
/**
|
||||
* A convenience method for putting an int value into the context.
|
||||
*/
|
||||
public void put (String key, int value)
|
||||
{
|
||||
put(key, new Integer(value));
|
||||
}
|
||||
|
||||
/**
|
||||
* A convenience method for putting a boolean value into the context.
|
||||
*/
|
||||
public void put (String key, boolean value)
|
||||
{
|
||||
put(key, new Boolean(value));
|
||||
}
|
||||
|
||||
protected HttpServletRequest _req;
|
||||
protected HttpServletResponse _rsp;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user