|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.ditchnet.jsp.taglib.twod.listener.TwoDServletContextListener
ServletContextListener that handles creating a
directory named org.ditchnet.taglib.2d/ in this
web app's root directory. Why do this? The <twod:canvas≷ tag
generates images that can be referenced the src attributes
of <img> tags. Therefore, they must be placed in a known
location outside of the WEB-INF directory so that client
browsers can access them.
By implementing this feature as as ServletContextListener,
These resources are deployed immediately on reloading your web app, and
are therefore available before the first request!
| Field Summary | |
static java.lang.String |
DEST_FOLDER_NAME
|
| Constructor Summary | |
TwoDServletContextListener()
|
|
| Method Summary | |
void |
contextDestroyed(javax.servlet.ServletContextEvent evt)
|
void |
contextInitialized(javax.servlet.ServletContextEvent evt)
Creates the directory to store images later. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String DEST_FOLDER_NAME
| Constructor Detail |
public TwoDServletContextListener()
| Method Detail |
public void contextInitialized(javax.servlet.ServletContextEvent evt)
contextInitialized in interface javax.servlet.ServletContextListenerpublic void contextDestroyed(javax.servlet.ServletContextEvent evt)
contextDestroyed in interface javax.servlet.ServletContextListener
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||