Hi Can you take a look at http://stackoverflow.com/questions/2551517/gae-j-unable-to-register-a-custom-elresolver and see if it helps?
regards. On Mar 30, 10:05 am, Davide Angelocola <davide.angeloc...@gmail.com> wrote: > Hello, > > I've the following class: > > public class WebAiatListener implements ServletContextListener { > > private static final Logger logger = Logger.getAnonymousLogger(); > > @Override > public void contextInitialized(ServletContextEvent sce) { > ServletContext context = sce.getServletContext(); > > if (context == null) { > throw new NullPointerException("servlet context"); > } > > if (JspFactory.getDefaultFactory() == null) { > throw new NullPointerException("default factory"); > } > > if > (JspFactory.getDefaultFactory().getJspApplicationContext(context) == > null) { > throw new NullPointerException("jsp application context"); > } > > JspApplicationContext jspContext = > JspFactory.getDefaultFactory().getJspApplicationContext(context); > > if (jspContext == null) { > logger.info("cannot register 'EntityELResolver'"); > } else { > jspContext.addELResolver(new EntityELResolver()); > logger.info("'EntityELResolver' registered"); > } > } > > using the local dev environment it works but when I deploy it on GAE I > obtain the following exception: > > Failed startup of context > com.google.apphosting.utils.jetty.runtimeappenginewebappcont...@391da0{/,/ > base/data/home/apps/webaiat/3.340904528580025222} > java.lang.NullPointerException: default factory > > since JspFactory.getDefaultFactory() returns null. How can I register > a custom ELResolver? > Thanks. > > PS > Please note that I'm using servlet 2.5 version (so I'm using JSP 2.1): > <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns="http://java.sun.com/xml/ns/javaee" > xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" > > xsi:schemaLocation="http://java.sun.com/xml/ns/javaeehttp://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" > version="2.5"> -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.