java - Tomcat 8 + Jersey not showing JSP pages -
i'm using jersey rest application. but, 1 of methods must return viewable can simple html file. have read tutorials, , finished using jsp template. working great when run locally, using jetty. but, using tomcat 8, following exception:
http status 500 - org.glassfish.jersey.server.containerexception: javax.servlet.servletexception: java.lang.linkageerror: loader constraint violation: when resolving method "org.apache.jasper.runtime.instancemanagerfactory.getinstancemanager(ljavax/servlet/servletconfig;)lorg/apache/tomcat/instancemanager;" class loader (instance of org/apache/jasper/servlet/jasperloader) of current class, org/apache/jsp/web_002dinf/jsp/confirmacao_jsp, , class loader (instance of java/net/urlclassloader) method's defining class, org/apache/jasper/runtime/instancemanagerfactory, have different class objects type org/apache/tomcat/instancemanager used in signature
type exception report
message org.glassfish.jersey.server.containerexception: javax.servlet.servletexception: java.lang.linkageerror: loader constraint violation: when resolving method "org.apache.jasper.runtime.instancemanagerfactory.getinstancemanager(ljavax/servlet/servletconfig;)lorg/apache/tomcat/instancemanager;" class loader (instance of org/apache/jasper/servlet/jasperloader) of current class, org/apache/jsp/web_002dinf/jsp/confirmacao_jsp, , class loader (instance of java/net/urlclassloader) method's defining class, org/apache/jasper/runtime/instancemanagerfactory, have different class objects type org/apache/tomcat/instancemanager used in signature
description server encountered internal error prevented fulfilling request.
exception
javax.servlet.servletexception: org.glassfish.jersey.server.containerexception: javax.servlet.servletexception: java.lang.linkageerror: loader constraint violation: when resolving method "org.apache.jasper.runtime.instancemanagerfactory.getinstancemanager(ljavax/servlet/servletconfig;)lorg/apache/tomcat/instancemanager;" class loader (instance of org/apache/jasper/servlet/jasperloader) of current class, org/apache/jsp/web_002dinf/jsp/confirmacao_jsp, , class loader (instance of java/net/urlclassloader) method's defining class, org/apache/jasper/runtime/instancemanagerfactory, have different class objects type org/apache/tomcat/instancemanager used in signature
my servlet configuration is:
<servlet> <servlet-name>jersey web application</servlet-name> <servlet-class>org.glassfish.jersey.servlet.servletcontainer</servlet-class> <init-param> <param-name>jersey.config.server.provider.packages</param-name> <param-value>gs.relferreira.corporativo.rest;org.codehaus.jackson.jaxrs</param-value> </init-param> <init-param> <param-name>javax.ws.rs.application</param-name> <param-value>gs.relferreira.corporativo.rest.relferreiraapplication</param-value> </init-param> <init-param> <param-name>jersey.config.server.mvc.templatebasepath.jsp</param-name> <param-value>/web-inf/jsp/</param-value> </init-param> <init-param> <param-name>jersey.config.server.provider.classnames</param-name> <param-value>org.glassfish.jersey.server.mvc.jsp.jspmvcfeature</param-value> </init-param> <init-param> <param-name>com.sun.jersey.config.servlet.filter.staticcontentregex</param-name> <param-value>/resources/(images|css)/. </param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet>
and method return view following:
@get @path("confirmar/{idusuario}/{token}") @produces(mediatype.text_html) public viewable validaremail(@pathparam("idusuario") int idusuario, @pathparam("token") string token){ if(m_controlador.validaremail(idusuario, token)) return new viewable("/confirmacao.jsp", null); else return new viewable("/erro.jsp", null); }
Comments
Post a Comment