[
https://issues.jboss.org/browse/FORGE-2164?page=com.atlassian.jira.plugin...
]
Antonio Goncalves updated FORGE-2164:
-------------------------------------
Description:
It should be possible to create classes implementing ServletContextListener or any other
listener defined in the Servlet spec.
A Servlet Listener can implement several interfaces :
{code}
javax.servlet.ServletContextListener
javax.servlet.ServletContextAttributeListener
javax.servlet.ServletRequestListener
javax.servlet.ServletRequestAttributeListener
javax.servlet.http.HttpSessionListener
javax.servlet.http.HttpSessionActivationListener
javax.servlet.http.HttpSessionAttributeListener
{code}
So the command should look like :
{code}
servlet-new-listener --named MyListener --listener ServletContextListener
ServletRequestListener HttpSessionListener
{code}
This should generate
{code}
@WebListener
public class MyListener implements ServletContextListener, ServletRequestListener,
HttpSessionListener {
@Override
public void contextInitialized(ServletContextEvent sce) {
}
@Override
public void contextDestroyed(ServletContextEvent sce) {
}
@Override
public void sessionCreated(HttpSessionEvent se) {
}
@Override
public void sessionDestroyed(HttpSessionEvent se) {
}
@Override
public void requestDestroyed(ServletRequestEvent sre) {
}
@Override
public void requestInitialized(ServletRequestEvent sre) {
}
}
{code}
This should be easier to do with [ROASTER-51]
was:It should be possible to create classes implementing ServletContextListener or any
other listener defined in the Servlet spec
Being able to create listeners defined in the Servlet spec
----------------------------------------------------------
Key: FORGE-2164
URL:
https://issues.jboss.org/browse/FORGE-2164
Project: Forge
Issue Type: Sub-task
Components: Java EE
Affects Versions: 2.12.3.Final
Reporter: George Gastaldi
Labels: starter
Fix For: 2.x Future
It should be possible to create classes implementing ServletContextListener or any other
listener defined in the Servlet spec.
A Servlet Listener can implement several interfaces :
{code}
javax.servlet.ServletContextListener
javax.servlet.ServletContextAttributeListener
javax.servlet.ServletRequestListener
javax.servlet.ServletRequestAttributeListener
javax.servlet.http.HttpSessionListener
javax.servlet.http.HttpSessionActivationListener
javax.servlet.http.HttpSessionAttributeListener
{code}
So the command should look like :
{code}
servlet-new-listener --named MyListener --listener ServletContextListener
ServletRequestListener HttpSessionListener
{code}
This should generate
{code}
@WebListener
public class MyListener implements ServletContextListener, ServletRequestListener,
HttpSessionListener {
@Override
public void contextInitialized(ServletContextEvent sce) {
}
@Override
public void contextDestroyed(ServletContextEvent sce) {
}
@Override
public void sessionCreated(HttpSessionEvent se) {
}
@Override
public void sessionDestroyed(HttpSessionEvent se) {
}
@Override
public void requestDestroyed(ServletRequestEvent sre) {
}
@Override
public void requestInitialized(ServletRequestEvent sre) {
}
}
{code}
This should be easier to do with [ROASTER-51]
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)