|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 | |
|---|---|
java.lang.Object |
get(java.lang.String s)
Get an object from the Context by key. |
java.lang.Object |
getContext()
Return the Context itself, as an Object. |
java.util.Enumeration |
getFieldNames()
|
java.lang.String |
getFormField(java.lang.String s)
Get a field from an HTML Form. |
MultipartFormField |
getMultipartFormField(java.lang.String s)
Get a multi-part field from an HTML form. |
javax.servlet.http.HttpSession |
getSession()
Get the HttpSession . |
void |
put(java.lang.String s,
java.lang.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 java.io.IOException
melati - our Melaticontext - the ServletTemplateContext
java.io.IOException
public MultipartTemplateContext(Melati melati,
ServletTemplateContext context,
int maxSize)
throws java.io.IOException
melati - our Melaticontext - the ServletTemplateContextmaxSize - maximum allowed size
java.io.IOException| Method Detail |
|---|
public void put(java.lang.String s,
java.lang.Object o)
put in interface TemplateContexts - the keyo - the objectTemplateContext.put(java.lang.String, java.lang.Object)public java.lang.String getFormField(java.lang.String s)
getFormField in interface ServletTemplateContexts - the field's name
ServletTemplateContext.getFormField(java.lang.String)public MultipartFormField getMultipartFormField(java.lang.String s)
getMultipartFormField in interface ServletTemplateContexts - the field's name
ServletTemplateContext.getMultipartFormField(java.lang.String)public java.util.Enumeration getFieldNames()
public java.lang.Object get(java.lang.String s)
get in interface TemplateContexts - key
TemplateContext.get(java.lang.String)public javax.servlet.http.HttpSession getSession()
HttpSession .
getSession in interface ServletTemplateContextServletTemplateContext.getSession()public java.lang.Object getContext()
getContext in interface TemplateContextTemplateContext.getContext()public void setPassbackExceptionHandling()
setPassbackExceptionHandling in interface TemplateContextTemplateContext.setPassbackExceptionHandling()public void setPropagateExceptionHandling()
setPropagateExceptionHandling in interface TemplateContextTemplateContext.setPropagateExceptionHandling()
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||