|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.melati.template.MultipartTemplateContext
public class MultipartTemplateContext
A ServletTemplateContext
which allows access to the filename and
body of any file which is uploaded from a HTML form field.
(by setting its ENCTYPE to ``multipart/form-data'' and
setting the field's type to * ``file'').
You can retrieve the value of any field variable as usual by using getForm(s).
Note that you need to pass in a ServletTemplateContext
to the constructor.
Constructor Summary | |
---|---|
MultipartTemplateContext(Melati melati,
ServletTemplateContext context)
Constructor. |
|
MultipartTemplateContext(Melati melati,
ServletTemplateContext context,
int maxSize)
Constructor. |
Method Summary | |
---|---|
Object |
get(String s)
Get an object from the Context by key. |
Object |
getContext()
Return the Context itself, as an Object. |
Enumeration |
getFieldNames()
|
String |
getFormField(String s)
Get a field from an HTML Form. |
MultipartFormField |
getMultipartFormField(String s)
Get a multi-part field from an HTML form. |
javax.servlet.http.HttpSession |
getSession()
Get the HttpSession . |
void |
put(String s,
Object o)
Put an object into the Context with a key. |
void |
setPassbackExceptionHandling()
Set the current exception handling style. |
void |
setPropagateExceptionHandling()
Set the current exception handling style. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MultipartTemplateContext(Melati melati, ServletTemplateContext context) throws IOException
melati
- our Melaticontext
- the ServletTemplateContext
IOException
public MultipartTemplateContext(Melati melati, ServletTemplateContext context, int maxSize) throws IOException
melati
- our Melaticontext
- the ServletTemplateContextmaxSize
- maximum allowed size
IOException
Method Detail |
---|
public void put(String s, Object o)
put
in interface TemplateContext
s
- the keyo
- the objectTemplateContext.put(java.lang.String, java.lang.Object)
public String getFormField(String s)
getFormField
in interface ServletTemplateContext
s
- the field's name
ServletTemplateContext.getFormField(java.lang.String)
public MultipartFormField getMultipartFormField(String s)
getMultipartFormField
in interface ServletTemplateContext
s
- the field's name
ServletTemplateContext.getMultipartFormField(java.lang.String)
public Enumeration getFieldNames()
public Object get(String s)
get
in interface TemplateContext
s
- key
TemplateContext.get(java.lang.String)
public javax.servlet.http.HttpSession getSession()
HttpSession
.
getSession
in interface ServletTemplateContext
ServletTemplateContext.getSession()
public Object getContext()
getContext
in interface TemplateContext
TemplateContext.getContext()
public void setPassbackExceptionHandling()
setPassbackExceptionHandling
in interface TemplateContext
TemplateContext.setPassbackExceptionHandling()
public void setPropagateExceptionHandling()
setPropagateExceptionHandling
in interface TemplateContext
TemplateContext.setPropagateExceptionHandling()
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |