Re: [jetty-dev] [jetty-users] JSP pages are recompiled at runtime

classic Classic list List threaded Threaded
24 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] [jetty-users] JSP pages are recompiled at runtime

Joakim Erdfelt-8
The fact that you mention /tmp/embedded-jetty-jsp hints that you are using the example code from

Is this true?

If so, can you describe how you are adding your pre-compiled JSPs to the ServletContextHandler?


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 1:24 PM, upendar devu <[hidden email]> wrote:
We recently upgraded from Jetty version 8 to 9.4.6  ; The embedded Jetty server recompiling the JSP pages and creating a folder /tmp/embedded-jetty-jsp despite the configuration attribute Development is set to false.

In my lower env   - the folder embedded-jetty-jsp is getting created and we see all the recompiled JSP pages .

in Production env -  the folder embedded-jetty-jsp is getting created and we see ONLY few of the JSP pages are getting recompiled . Due to this we are getting below error on clicking the page in the portal - the page associated to jSP is recompiled in that tmp folder.

We need your help to find the rootcause and fix for this issue. 

Error :

07 Sep 2017 16:26:28,153 [qtp1043351526-50615] ERROR biz.xxxx.xxxx.common.struts.ExceptionInterceptor (intercept:31) - JSPException including path '/pages/theme/xxxx.jsp'. org.apache.tiles.request.render.CannotRenderException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:399) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:238) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:103) at org.apache.tiles.impl.mgmt.CachingTilesContainer.render(CachingTilesContainer.java:126) at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:161) at org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.java:208) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277) at com.opensymphony.xwork2.interceptor.annotations.AnnotationWorkflowInterceptor.intercept(AnnotationWorkflowInterceptor.java:133) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.doIntercept(ConversionErrorInterceptor.java:139) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:133) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:88) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:174) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:171) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.PreBindInterceptor.intercept(PreBindInterceptor.java:19) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.LiteResultInterceptor.intercept(LiteResultInterceptor.java:51) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.FragmentInterceptor.intercept(FragmentInterceptor.java:35) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:246) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.NoCacheInterceptor.intercept(NoCacheInterceptor.java:39) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.SecurityInterceptor.intercept(SecurityInterceptor.java:70) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.ExceptionInterceptor.intercept(ExceptionInterceptor.java:23) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.factory.StrutsActionProxy.execute(StrutsActionProxy.java:54) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564) at org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:81) at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:143) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:64) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.ResponseUrlFilter.onDynamic(ResponseUrlFilter.java:14) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.PerformanceFilter.onDynamic(PerformanceFilter.java:17) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.SecurityContextFilter.onDynamic(SecurityContextFilter.java:18) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:564) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128) at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.request.servlet.ServletUtil.wrapServletException(ServletUtil.java:61) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:125) at org.apache.tiles.request.AbstractViewRequest.dispatch(AbstractViewRequest.java:47) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.request.render.ChainedDelegateRenderer.render(ChainedDelegateRenderer.java:68) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:108) at org.apache.tiles.template.InsertAttributeModel.renderAttribute(InsertAttributeModel.java:188) at org.apache.tiles.template.InsertAttributeModel.execute(InsertAttributeModel.java:132) at org.apache.tiles.jsp.taglib.InsertAttributeTag.doTag(InsertAttributeTag.java:299) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_tiles_005finsertAttribute_005f10(layout_jsp.java:1645) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fotherwise_005f0(layout_jsp.java:1614) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f1(layout_jsp.java:1527) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fwhen_005f0(layout_jsp.java:1010) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f0(layout_jsp.java:915) at org.apache.jsp.pages.common.layout_jsp._jspService(layout_jsp.java:255) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:833) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:203) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:73) at org.apache.tiles.request.servlet.ServletRequest.forward(ServletRequest.java:265) at org.apache.tiles.request.servlet.ServletRequest.doForward(ServletRequest.java:228) at org.apache.tiles.request.AbstractClientRequest.dispatch(AbstractClientRequest.java:57) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:397) ... 85 more Caused by: java.lang.NoClassDefFoundError: org/apache/jsp/tag/web/form_tag at org.apache.jsp.pages.theme.xxxx_jsp._jspx_meth_neu_005fform_005f0(xxxx_jsp.java:378) at org.apache.jsp.pages.theme.xxxx_jsp._jspService(xxxx_jsp.java:301) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.include(Dispatcher.java:124) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:887) at org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:679) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:673) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:123) ... 128 more


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] [jetty-users] JSP pages are recompiled at runtime

upendar devu
Thanks for quick response.  I dont think we followed the example code you followed but little lines of code might match .

Attached code snippet what we are using.  Please refer the code.

I think below line of code does .
WebAppContext.setBaseResource(new ResourceCollection(validPaths.toArray(new String[0])));.
i.e 
WebAppContext.setBaseResource(new ResourceCollection("src/main/webapp", "src/main/resources", "src/main", "webapp", ".");



On Wed, Sep 13, 2017 at 4:45 PM, Joakim Erdfelt <[hidden email]> wrote:
The fact that you mention /tmp/embedded-jetty-jsp hints that you are using the example code from

Is this true?

If so, can you describe how you are adding your pre-compiled JSPs to the ServletContextHandler?


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 1:24 PM, upendar devu <[hidden email]> wrote:
We recently upgraded from Jetty version 8 to 9.4.6  ; The embedded Jetty server recompiling the JSP pages and creating a folder /tmp/embedded-jetty-jsp despite the configuration attribute Development is set to false.

In my lower env   - the folder embedded-jetty-jsp is getting created and we see all the recompiled JSP pages .

in Production env -  the folder embedded-jetty-jsp is getting created and we see ONLY few of the JSP pages are getting recompiled . Due to this we are getting below error on clicking the page in the portal - the page associated to jSP is recompiled in that tmp folder.

We need your help to find the rootcause and fix for this issue. 

Error :

07 Sep 2017 16:26:28,153 [qtp1043351526-50615] ERROR biz.xxxx.xxxx.common.struts.ExceptionInterceptor (intercept:31) - JSPException including path '/pages/theme/xxxx.jsp'. org.apache.tiles.request.render.CannotRenderException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:399) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:238) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:103) at org.apache.tiles.impl.mgmt.CachingTilesContainer.render(CachingTilesContainer.java:126) at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:161) at org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.java:208) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277) at com.opensymphony.xwork2.interceptor.annotations.AnnotationWorkflowInterceptor.intercept(AnnotationWorkflowInterceptor.java:133) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.doIntercept(ConversionErrorInterceptor.java:139) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:133) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:88) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:174) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:171) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.PreBindInterceptor.intercept(PreBindInterceptor.java:19) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.LiteResultInterceptor.intercept(LiteResultInterceptor.java:51) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.FragmentInterceptor.intercept(FragmentInterceptor.java:35) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:246) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.NoCacheInterceptor.intercept(NoCacheInterceptor.java:39) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.SecurityInterceptor.intercept(SecurityInterceptor.java:70) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.ExceptionInterceptor.intercept(ExceptionInterceptor.java:23) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.factory.StrutsActionProxy.execute(StrutsActionProxy.java:54) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564) at org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:81) at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:143) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:64) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.ResponseUrlFilter.onDynamic(ResponseUrlFilter.java:14) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.PerformanceFilter.onDynamic(PerformanceFilter.java:17) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.SecurityContextFilter.onDynamic(SecurityContextFilter.java:18) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:564) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128) at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.request.servlet.ServletUtil.wrapServletException(ServletUtil.java:61) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:125) at org.apache.tiles.request.AbstractViewRequest.dispatch(AbstractViewRequest.java:47) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.request.render.ChainedDelegateRenderer.render(ChainedDelegateRenderer.java:68) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:108) at org.apache.tiles.template.InsertAttributeModel.renderAttribute(InsertAttributeModel.java:188) at org.apache.tiles.template.InsertAttributeModel.execute(InsertAttributeModel.java:132) at org.apache.tiles.jsp.taglib.InsertAttributeTag.doTag(InsertAttributeTag.java:299) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_tiles_005finsertAttribute_005f10(layout_jsp.java:1645) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fotherwise_005f0(layout_jsp.java:1614) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f1(layout_jsp.java:1527) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fwhen_005f0(layout_jsp.java:1010) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f0(layout_jsp.java:915) at org.apache.jsp.pages.common.layout_jsp._jspService(layout_jsp.java:255) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:833) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:203) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:73) at org.apache.tiles.request.servlet.ServletRequest.forward(ServletRequest.java:265) at org.apache.tiles.request.servlet.ServletRequest.doForward(ServletRequest.java:228) at org.apache.tiles.request.AbstractClientRequest.dispatch(AbstractClientRequest.java:57) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:397) ... 85 more Caused by: java.lang.NoClassDefFoundError: org/apache/jsp/tag/web/form_tag at org.apache.jsp.pages.theme.xxxx_jsp._jspx_meth_neu_005fform_005f0(xxxx_jsp.java:378) at org.apache.jsp.pages.theme.xxxx_jsp._jspService(xxxx_jsp.java:301) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.include(Dispatcher.java:124) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:887) at org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:679) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:673) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:123) ... 128 more


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev

Jetty_startup_code.java (9K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] [jetty-users] JSP pages are recompiled at runtime

Joakim Erdfelt-8
I would have expected each compiled JSP to be added as a Servlet to the ServletContextHandler via the .addServlet() call.


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 2:10 PM, upendar devu <[hidden email]> wrote:
Thanks for quick response.  I dont think we followed the example code you followed but little lines of code might match .

Attached code snippet what we are using.  Please refer the code.

I think below line of code does .
WebAppContext.setBaseResource(new ResourceCollection(validPaths.toArray(new String[0])));.
i.e 
WebAppContext.setBaseResource(new ResourceCollection("src/main/webapp", "src/main/resources", "src/main", "webapp", ".");



On Wed, Sep 13, 2017 at 4:45 PM, Joakim Erdfelt <[hidden email]> wrote:
The fact that you mention /tmp/embedded-jetty-jsp hints that you are using the example code from

Is this true?

If so, can you describe how you are adding your pre-compiled JSPs to the ServletContextHandler?


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 1:24 PM, upendar devu <[hidden email]> wrote:
We recently upgraded from Jetty version 8 to 9.4.6  ; The embedded Jetty server recompiling the JSP pages and creating a folder /tmp/embedded-jetty-jsp despite the configuration attribute Development is set to false.

In my lower env   - the folder embedded-jetty-jsp is getting created and we see all the recompiled JSP pages .

in Production env -  the folder embedded-jetty-jsp is getting created and we see ONLY few of the JSP pages are getting recompiled . Due to this we are getting below error on clicking the page in the portal - the page associated to jSP is recompiled in that tmp folder.

We need your help to find the rootcause and fix for this issue. 

Error :

07 Sep 2017 16:26:28,153 [qtp1043351526-50615] ERROR biz.xxxx.xxxx.common.struts.ExceptionInterceptor (intercept:31) - JSPException including path '/pages/theme/xxxx.jsp'. org.apache.tiles.request.render.CannotRenderException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:399) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:238) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:103) at org.apache.tiles.impl.mgmt.CachingTilesContainer.render(CachingTilesContainer.java:126) at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:161) at org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.java:208) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277) at com.opensymphony.xwork2.interceptor.annotations.AnnotationWorkflowInterceptor.intercept(AnnotationWorkflowInterceptor.java:133) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.doIntercept(ConversionErrorInterceptor.java:139) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:133) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:88) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:174) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:171) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.PreBindInterceptor.intercept(PreBindInterceptor.java:19) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.LiteResultInterceptor.intercept(LiteResultInterceptor.java:51) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.FragmentInterceptor.intercept(FragmentInterceptor.java:35) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:246) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.NoCacheInterceptor.intercept(NoCacheInterceptor.java:39) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.SecurityInterceptor.intercept(SecurityInterceptor.java:70) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.ExceptionInterceptor.intercept(ExceptionInterceptor.java:23) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.factory.StrutsActionProxy.execute(StrutsActionProxy.java:54) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564) at org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:81) at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:143) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:64) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.ResponseUrlFilter.onDynamic(ResponseUrlFilter.java:14) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.PerformanceFilter.onDynamic(PerformanceFilter.java:17) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.SecurityContextFilter.onDynamic(SecurityContextFilter.java:18) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:564) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128) at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.request.servlet.ServletUtil.wrapServletException(ServletUtil.java:61) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:125) at org.apache.tiles.request.AbstractViewRequest.dispatch(AbstractViewRequest.java:47) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.request.render.ChainedDelegateRenderer.render(ChainedDelegateRenderer.java:68) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:108) at org.apache.tiles.template.InsertAttributeModel.renderAttribute(InsertAttributeModel.java:188) at org.apache.tiles.template.InsertAttributeModel.execute(InsertAttributeModel.java:132) at org.apache.tiles.jsp.taglib.InsertAttributeTag.doTag(InsertAttributeTag.java:299) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_tiles_005finsertAttribute_005f10(layout_jsp.java:1645) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fotherwise_005f0(layout_jsp.java:1614) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f1(layout_jsp.java:1527) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fwhen_005f0(layout_jsp.java:1010) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f0(layout_jsp.java:915) at org.apache.jsp.pages.common.layout_jsp._jspService(layout_jsp.java:255) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:833) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:203) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:73) at org.apache.tiles.request.servlet.ServletRequest.forward(ServletRequest.java:265) at org.apache.tiles.request.servlet.ServletRequest.doForward(ServletRequest.java:228) at org.apache.tiles.request.AbstractClientRequest.dispatch(AbstractClientRequest.java:57) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:397) ... 85 more Caused by: java.lang.NoClassDefFoundError: org/apache/jsp/tag/web/form_tag at org.apache.jsp.pages.theme.xxxx_jsp._jspx_meth_neu_005fform_005f0(xxxx_jsp.java:378) at org.apache.jsp.pages.theme.xxxx_jsp._jspService(xxxx_jsp.java:301) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.include(Dispatcher.java:124) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:887) at org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:679) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:673) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:123) ... 128 more


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] [jetty-users] JSP pages are recompiled at runtime

upendar devu
In reply to this post by Joakim Erdfelt-8
I'm thinking the below line of code caused recompiling the JSPs at runtime . but  all jsp pages are recompiled in lower env but  only few pages are recompiled in production env that caused the error that I mentioned in previous email. we didnt see any errors in lower env

context.setAttribute("javax.servlet.context.tempdir", getScratchDir());


On Wed, Sep 13, 2017 at 4:45 PM, Joakim Erdfelt <[hidden email]> wrote:
The fact that you mention /tmp/embedded-jetty-jsp hints that you are using the example code from

Is this true?

If so, can you describe how you are adding your pre-compiled JSPs to the ServletContextHandler?


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 1:24 PM, upendar devu <[hidden email]> wrote:
We recently upgraded from Jetty version 8 to 9.4.6  ; The embedded Jetty server recompiling the JSP pages and creating a folder /tmp/embedded-jetty-jsp despite the configuration attribute Development is set to false.

In my lower env   - the folder embedded-jetty-jsp is getting created and we see all the recompiled JSP pages .

in Production env -  the folder embedded-jetty-jsp is getting created and we see ONLY few of the JSP pages are getting recompiled . Due to this we are getting below error on clicking the page in the portal - the page associated to jSP is recompiled in that tmp folder.

We need your help to find the rootcause and fix for this issue. 

Error :

07 Sep 2017 16:26:28,153 [qtp1043351526-50615] ERROR biz.xxxx.xxxx.common.struts.ExceptionInterceptor (intercept:31) - JSPException including path '/pages/theme/xxxx.jsp'. org.apache.tiles.request.render.CannotRenderException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:399) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:238) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:103) at org.apache.tiles.impl.mgmt.CachingTilesContainer.render(CachingTilesContainer.java:126) at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:161) at org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.java:208) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277) at com.opensymphony.xwork2.interceptor.annotations.AnnotationWorkflowInterceptor.intercept(AnnotationWorkflowInterceptor.java:133) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.doIntercept(ConversionErrorInterceptor.java:139) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:133) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:88) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:174) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:171) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.PreBindInterceptor.intercept(PreBindInterceptor.java:19) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.LiteResultInterceptor.intercept(LiteResultInterceptor.java:51) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.FragmentInterceptor.intercept(FragmentInterceptor.java:35) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:246) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.NoCacheInterceptor.intercept(NoCacheInterceptor.java:39) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.SecurityInterceptor.intercept(SecurityInterceptor.java:70) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.ExceptionInterceptor.intercept(ExceptionInterceptor.java:23) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.factory.StrutsActionProxy.execute(StrutsActionProxy.java:54) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564) at org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:81) at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:143) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:64) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.ResponseUrlFilter.onDynamic(ResponseUrlFilter.java:14) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.PerformanceFilter.onDynamic(PerformanceFilter.java:17) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.SecurityContextFilter.onDynamic(SecurityContextFilter.java:18) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:564) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128) at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.request.servlet.ServletUtil.wrapServletException(ServletUtil.java:61) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:125) at org.apache.tiles.request.AbstractViewRequest.dispatch(AbstractViewRequest.java:47) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.request.render.ChainedDelegateRenderer.render(ChainedDelegateRenderer.java:68) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:108) at org.apache.tiles.template.InsertAttributeModel.renderAttribute(InsertAttributeModel.java:188) at org.apache.tiles.template.InsertAttributeModel.execute(InsertAttributeModel.java:132) at org.apache.tiles.jsp.taglib.InsertAttributeTag.doTag(InsertAttributeTag.java:299) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_tiles_005finsertAttribute_005f10(layout_jsp.java:1645) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fotherwise_005f0(layout_jsp.java:1614) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f1(layout_jsp.java:1527) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fwhen_005f0(layout_jsp.java:1010) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f0(layout_jsp.java:915) at org.apache.jsp.pages.common.layout_jsp._jspService(layout_jsp.java:255) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:833) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:203) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:73) at org.apache.tiles.request.servlet.ServletRequest.forward(ServletRequest.java:265) at org.apache.tiles.request.servlet.ServletRequest.doForward(ServletRequest.java:228) at org.apache.tiles.request.AbstractClientRequest.dispatch(AbstractClientRequest.java:57) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:397) ... 85 more Caused by: java.lang.NoClassDefFoundError: org/apache/jsp/tag/web/form_tag at org.apache.jsp.pages.theme.xxxx_jsp._jspx_meth_neu_005fform_005f0(xxxx_jsp.java:378) at org.apache.jsp.pages.theme.xxxx_jsp._jspService(xxxx_jsp.java:301) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.include(Dispatcher.java:124) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:887) at org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:679) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:673) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:123) ... 128 more


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] [jetty-users] JSP pages are recompiled at runtime

upendar devu
In reply to this post by Joakim Erdfelt-8
We removed below line of code then we dont see the folder embedded-jetty-jsp getting created . I believe server using the pre compiled jsp pages as I dont locate the JSPs recompiling.

context.setAttribute("javax.servlet.context.tempdir", getScratchDir());

On Wed, Sep 13, 2017 at 5:16 PM, Joakim Erdfelt <[hidden email]> wrote:
I would have expected each compiled JSP to be added as a Servlet to the ServletContextHandler via the .addServlet() call.


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 2:10 PM, upendar devu <[hidden email]> wrote:
Thanks for quick response.  I dont think we followed the example code you followed but little lines of code might match .

Attached code snippet what we are using.  Please refer the code.

I think below line of code does .
WebAppContext.setBaseResource(new ResourceCollection(validPaths.toArray(new String[0])));.
i.e 
WebAppContext.setBaseResource(new ResourceCollection("src/main/webapp", "src/main/resources", "src/main", "webapp", ".");



On Wed, Sep 13, 2017 at 4:45 PM, Joakim Erdfelt <[hidden email]> wrote:
The fact that you mention /tmp/embedded-jetty-jsp hints that you are using the example code from

Is this true?

If so, can you describe how you are adding your pre-compiled JSPs to the ServletContextHandler?


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 1:24 PM, upendar devu <[hidden email]> wrote:
We recently upgraded from Jetty version 8 to 9.4.6  ; The embedded Jetty server recompiling the JSP pages and creating a folder /tmp/embedded-jetty-jsp despite the configuration attribute Development is set to false.

In my lower env   - the folder embedded-jetty-jsp is getting created and we see all the recompiled JSP pages .

in Production env -  the folder embedded-jetty-jsp is getting created and we see ONLY few of the JSP pages are getting recompiled . Due to this we are getting below error on clicking the page in the portal - the page associated to jSP is recompiled in that tmp folder.

We need your help to find the rootcause and fix for this issue. 

Error :

07 Sep 2017 16:26:28,153 [qtp1043351526-50615] ERROR biz.xxxx.xxxx.common.struts.ExceptionInterceptor (intercept:31) - JSPException including path '/pages/theme/xxxx.jsp'. org.apache.tiles.request.render.CannotRenderException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:399) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:238) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:103) at org.apache.tiles.impl.mgmt.CachingTilesContainer.render(CachingTilesContainer.java:126) at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:161) at org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.java:208) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277) at com.opensymphony.xwork2.interceptor.annotations.AnnotationWorkflowInterceptor.intercept(AnnotationWorkflowInterceptor.java:133) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.doIntercept(ConversionErrorInterceptor.java:139) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:133) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:88) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:174) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:171) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.PreBindInterceptor.intercept(PreBindInterceptor.java:19) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.LiteResultInterceptor.intercept(LiteResultInterceptor.java:51) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.FragmentInterceptor.intercept(FragmentInterceptor.java:35) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:246) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.NoCacheInterceptor.intercept(NoCacheInterceptor.java:39) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.SecurityInterceptor.intercept(SecurityInterceptor.java:70) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.ExceptionInterceptor.intercept(ExceptionInterceptor.java:23) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.factory.StrutsActionProxy.execute(StrutsActionProxy.java:54) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564) at org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:81) at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:143) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:64) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.ResponseUrlFilter.onDynamic(ResponseUrlFilter.java:14) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.PerformanceFilter.onDynamic(PerformanceFilter.java:17) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.SecurityContextFilter.onDynamic(SecurityContextFilter.java:18) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:564) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128) at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.request.servlet.ServletUtil.wrapServletException(ServletUtil.java:61) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:125) at org.apache.tiles.request.AbstractViewRequest.dispatch(AbstractViewRequest.java:47) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.request.render.ChainedDelegateRenderer.render(ChainedDelegateRenderer.java:68) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:108) at org.apache.tiles.template.InsertAttributeModel.renderAttribute(InsertAttributeModel.java:188) at org.apache.tiles.template.InsertAttributeModel.execute(InsertAttributeModel.java:132) at org.apache.tiles.jsp.taglib.InsertAttributeTag.doTag(InsertAttributeTag.java:299) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_tiles_005finsertAttribute_005f10(layout_jsp.java:1645) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fotherwise_005f0(layout_jsp.java:1614) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f1(layout_jsp.java:1527) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fwhen_005f0(layout_jsp.java:1010) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f0(layout_jsp.java:915) at org.apache.jsp.pages.common.layout_jsp._jspService(layout_jsp.java:255) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:833) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:203) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:73) at org.apache.tiles.request.servlet.ServletRequest.forward(ServletRequest.java:265) at org.apache.tiles.request.servlet.ServletRequest.doForward(ServletRequest.java:228) at org.apache.tiles.request.AbstractClientRequest.dispatch(AbstractClientRequest.java:57) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:397) ... 85 more Caused by: java.lang.NoClassDefFoundError: org/apache/jsp/tag/web/form_tag at org.apache.jsp.pages.theme.xxxx_jsp._jspx_meth_neu_005fform_005f0(xxxx_jsp.java:378) at org.apache.jsp.pages.theme.xxxx_jsp._jspService(xxxx_jsp.java:301) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.include(Dispatcher.java:124) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:887) at org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:679) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:673) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:123) ... 128 more


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] [jetty-users] JSP pages are recompiled at runtime

Joakim Erdfelt-8
Removing that scratchdir attribute just moves the jsp compilation to system temp (aka java.io.tmpdir)
Its a requirement for JSP, you cannot run without a scratch directory.
In fact, you'll get startup errors if the scratch directory is bad/invalid.

Eg:

The JSP engine is not configured with a scratch dir. \n 
Please add \"jsp.initparams=scratchdir=<dir-name>\" \n 
in the servlets.properties file for this context.

or 

The scratchDir you specified: {0} is unusable.

I believe that to use precompiled JSPs you have to put the precompiled versions into your ServletContextHandler as servlets.

Jan, do you concur?


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 2:18 PM, upendar devu <[hidden email]> wrote:
We removed below line of code then we dont see the folder embedded-jetty-jsp getting created . I believe server using the pre compiled jsp pages as I dont locate the JSPs recompiling.

context.setAttribute("javax.servlet.context.tempdir", getScratchDir());

On Wed, Sep 13, 2017 at 5:16 PM, Joakim Erdfelt <[hidden email]> wrote:
I would have expected each compiled JSP to be added as a Servlet to the ServletContextHandler via the .addServlet() call.


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 2:10 PM, upendar devu <[hidden email]> wrote:
Thanks for quick response.  I dont think we followed the example code you followed but little lines of code might match .

Attached code snippet what we are using.  Please refer the code.

I think below line of code does .
WebAppContext.setBaseResource(new ResourceCollection(validPaths.toArray(new String[0])));.
i.e 
WebAppContext.setBaseResource(new ResourceCollection("src/main/webapp", "src/main/resources", "src/main", "webapp", ".");



On Wed, Sep 13, 2017 at 4:45 PM, Joakim Erdfelt <[hidden email]> wrote:
The fact that you mention /tmp/embedded-jetty-jsp hints that you are using the example code from

Is this true?

If so, can you describe how you are adding your pre-compiled JSPs to the ServletContextHandler?


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 1:24 PM, upendar devu <[hidden email]> wrote:
We recently upgraded from Jetty version 8 to 9.4.6  ; The embedded Jetty server recompiling the JSP pages and creating a folder /tmp/embedded-jetty-jsp despite the configuration attribute Development is set to false.

In my lower env   - the folder embedded-jetty-jsp is getting created and we see all the recompiled JSP pages .

in Production env -  the folder embedded-jetty-jsp is getting created and we see ONLY few of the JSP pages are getting recompiled . Due to this we are getting below error on clicking the page in the portal - the page associated to jSP is recompiled in that tmp folder.

We need your help to find the rootcause and fix for this issue. 

Error :

07 Sep 2017 16:26:28,153 [qtp1043351526-50615] ERROR biz.xxxx.xxxx.common.struts.ExceptionInterceptor (intercept:31) - JSPException including path '/pages/theme/xxxx.jsp'. org.apache.tiles.request.render.CannotRenderException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:399) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:238) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:103) at org.apache.tiles.impl.mgmt.CachingTilesContainer.render(CachingTilesContainer.java:126) at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:161) at org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.java:208) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277) at com.opensymphony.xwork2.interceptor.annotations.AnnotationWorkflowInterceptor.intercept(AnnotationWorkflowInterceptor.java:133) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.doIntercept(ConversionErrorInterceptor.java:139) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:133) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:88) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:174) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:171) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.PreBindInterceptor.intercept(PreBindInterceptor.java:19) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.LiteResultInterceptor.intercept(LiteResultInterceptor.java:51) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.FragmentInterceptor.intercept(FragmentInterceptor.java:35) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:246) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.NoCacheInterceptor.intercept(NoCacheInterceptor.java:39) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.SecurityInterceptor.intercept(SecurityInterceptor.java:70) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.ExceptionInterceptor.intercept(ExceptionInterceptor.java:23) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.factory.StrutsActionProxy.execute(StrutsActionProxy.java:54) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564) at org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:81) at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:143) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:64) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.ResponseUrlFilter.onDynamic(ResponseUrlFilter.java:14) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.PerformanceFilter.onDynamic(PerformanceFilter.java:17) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.SecurityContextFilter.onDynamic(SecurityContextFilter.java:18) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:564) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128) at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.request.servlet.ServletUtil.wrapServletException(ServletUtil.java:61) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:125) at org.apache.tiles.request.AbstractViewRequest.dispatch(AbstractViewRequest.java:47) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.request.render.ChainedDelegateRenderer.render(ChainedDelegateRenderer.java:68) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:108) at org.apache.tiles.template.InsertAttributeModel.renderAttribute(InsertAttributeModel.java:188) at org.apache.tiles.template.InsertAttributeModel.execute(InsertAttributeModel.java:132) at org.apache.tiles.jsp.taglib.InsertAttributeTag.doTag(InsertAttributeTag.java:299) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_tiles_005finsertAttribute_005f10(layout_jsp.java:1645) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fotherwise_005f0(layout_jsp.java:1614) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f1(layout_jsp.java:1527) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fwhen_005f0(layout_jsp.java:1010) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f0(layout_jsp.java:915) at org.apache.jsp.pages.common.layout_jsp._jspService(layout_jsp.java:255) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:833) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:203) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:73) at org.apache.tiles.request.servlet.ServletRequest.forward(ServletRequest.java:265) at org.apache.tiles.request.servlet.ServletRequest.doForward(ServletRequest.java:228) at org.apache.tiles.request.AbstractClientRequest.dispatch(AbstractClientRequest.java:57) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:397) ... 85 more Caused by: java.lang.NoClassDefFoundError: org/apache/jsp/tag/web/form_tag at org.apache.jsp.pages.theme.xxxx_jsp._jspx_meth_neu_005fform_005f0(xxxx_jsp.java:378) at org.apache.jsp.pages.theme.xxxx_jsp._jspService(xxxx_jsp.java:301) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.include(Dispatcher.java:124) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:887) at org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:679) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:673) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:123) ... 128 more


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] [jetty-users] JSP pages are recompiled at runtime

upendar devu
I'm sure that we didn't get any errors removing scratch dir.

On Sep 13, 2017 5:39 PM, "Joakim Erdfelt" <[hidden email]> wrote:
Removing that scratchdir attribute just moves the jsp compilation to system temp (aka java.io.tmpdir)
Its a requirement for JSP, you cannot run without a scratch directory.
In fact, you'll get startup errors if the scratch directory is bad/invalid.

Eg:

The JSP engine is not configured with a scratch dir. \n 
Please add \"jsp.initparams=scratchdir=<dir-name>\" \n 
in the servlets.properties file for this context.

or 

The scratchDir you specified: {0} is unusable.

I believe that to use precompiled JSPs you have to put the precompiled versions into your ServletContextHandler as servlets.

Jan, do you concur?


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 2:18 PM, upendar devu <[hidden email]> wrote:
We removed below line of code then we dont see the folder embedded-jetty-jsp getting created . I believe server using the pre compiled jsp pages as I dont locate the JSPs recompiling.

context.setAttribute("javax.servlet.context.tempdir", getScratchDir());

On Wed, Sep 13, 2017 at 5:16 PM, Joakim Erdfelt <[hidden email]> wrote:
I would have expected each compiled JSP to be added as a Servlet to the ServletContextHandler via the .addServlet() call.


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 2:10 PM, upendar devu <[hidden email]> wrote:
Thanks for quick response.  I dont think we followed the example code you followed but little lines of code might match .

Attached code snippet what we are using.  Please refer the code.

I think below line of code does .
WebAppContext.setBaseResource(new ResourceCollection(validPaths.toArray(new String[0])));.
i.e 
WebAppContext.setBaseResource(new ResourceCollection("src/main/webapp", "src/main/resources", "src/main", "webapp", ".");



On Wed, Sep 13, 2017 at 4:45 PM, Joakim Erdfelt <[hidden email]> wrote:
The fact that you mention /tmp/embedded-jetty-jsp hints that you are using the example code from

Is this true?

If so, can you describe how you are adding your pre-compiled JSPs to the ServletContextHandler?


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 1:24 PM, upendar devu <[hidden email]> wrote:
We recently upgraded from Jetty version 8 to 9.4.6  ; The embedded Jetty server recompiling the JSP pages and creating a folder /tmp/embedded-jetty-jsp despite the configuration attribute Development is set to false.

In my lower env   - the folder embedded-jetty-jsp is getting created and we see all the recompiled JSP pages .

in Production env -  the folder embedded-jetty-jsp is getting created and we see ONLY few of the JSP pages are getting recompiled . Due to this we are getting below error on clicking the page in the portal - the page associated to jSP is recompiled in that tmp folder.

We need your help to find the rootcause and fix for this issue. 

Error :

07 Sep 2017 16:26:28,153 [qtp1043351526-50615] ERROR biz.xxxx.xxxx.common.struts.ExceptionInterceptor (intercept:31) - JSPException including path '/pages/theme/xxxx.jsp'. org.apache.tiles.request.render.CannotRenderException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:399) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:238) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:103) at org.apache.tiles.impl.mgmt.CachingTilesContainer.render(CachingTilesContainer.java:126) at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:161) at org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.java:208) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277) at com.opensymphony.xwork2.interceptor.annotations.AnnotationWorkflowInterceptor.intercept(AnnotationWorkflowInterceptor.java:133) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.doIntercept(ConversionErrorInterceptor.java:139) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:133) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:88) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:174) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:171) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.PreBindInterceptor.intercept(PreBindInterceptor.java:19) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.LiteResultInterceptor.intercept(LiteResultInterceptor.java:51) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.FragmentInterceptor.intercept(FragmentInterceptor.java:35) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:246) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.NoCacheInterceptor.intercept(NoCacheInterceptor.java:39) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.SecurityInterceptor.intercept(SecurityInterceptor.java:70) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.ExceptionInterceptor.intercept(ExceptionInterceptor.java:23) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.factory.StrutsActionProxy.execute(StrutsActionProxy.java:54) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564) at org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:81) at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:143) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:64) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.ResponseUrlFilter.onDynamic(ResponseUrlFilter.java:14) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.PerformanceFilter.onDynamic(PerformanceFilter.java:17) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.SecurityContextFilter.onDynamic(SecurityContextFilter.java:18) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:564) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128) at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.request.servlet.ServletUtil.wrapServletException(ServletUtil.java:61) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:125) at org.apache.tiles.request.AbstractViewRequest.dispatch(AbstractViewRequest.java:47) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.request.render.ChainedDelegateRenderer.render(ChainedDelegateRenderer.java:68) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:108) at org.apache.tiles.template.InsertAttributeModel.renderAttribute(InsertAttributeModel.java:188) at org.apache.tiles.template.InsertAttributeModel.execute(InsertAttributeModel.java:132) at org.apache.tiles.jsp.taglib.InsertAttributeTag.doTag(InsertAttributeTag.java:299) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_tiles_005finsertAttribute_005f10(layout_jsp.java:1645) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fotherwise_005f0(layout_jsp.java:1614) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f1(layout_jsp.java:1527) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fwhen_005f0(layout_jsp.java:1010) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f0(layout_jsp.java:915) at org.apache.jsp.pages.common.layout_jsp._jspService(layout_jsp.java:255) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:833) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:203) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:73) at org.apache.tiles.request.servlet.ServletRequest.forward(ServletRequest.java:265) at org.apache.tiles.request.servlet.ServletRequest.doForward(ServletRequest.java:228) at org.apache.tiles.request.AbstractClientRequest.dispatch(AbstractClientRequest.java:57) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:397) ... 85 more Caused by: java.lang.NoClassDefFoundError: org/apache/jsp/tag/web/form_tag at org.apache.jsp.pages.theme.xxxx_jsp._jspx_meth_neu_005fform_005f0(xxxx_jsp.java:378) at org.apache.jsp.pages.theme.xxxx_jsp._jspService(xxxx_jsp.java:301) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.include(Dispatcher.java:124) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:887) at org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:679) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:673) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:123) ... 128 more


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] [jetty-users] JSP pages are recompiled at runtime

Joakim Erdfelt-8
Have you configured java.util.logging on your project?
It's used heavily by the Apache JSP library.
You'll learn a lot from its output.


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 2:56 PM, upendar devu <[hidden email]> wrote:
I'm sure that we didn't get any errors removing scratch dir.

On Sep 13, 2017 5:39 PM, "Joakim Erdfelt" <[hidden email]> wrote:
Removing that scratchdir attribute just moves the jsp compilation to system temp (aka java.io.tmpdir)
Its a requirement for JSP, you cannot run without a scratch directory.
In fact, you'll get startup errors if the scratch directory is bad/invalid.

Eg:

The JSP engine is not configured with a scratch dir. \n 
Please add \"jsp.initparams=scratchdir=<dir-name>\" \n 
in the servlets.properties file for this context.

or 

The scratchDir you specified: {0} is unusable.

I believe that to use precompiled JSPs you have to put the precompiled versions into your ServletContextHandler as servlets.

Jan, do you concur?


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 2:18 PM, upendar devu <[hidden email]> wrote:
We removed below line of code then we dont see the folder embedded-jetty-jsp getting created . I believe server using the pre compiled jsp pages as I dont locate the JSPs recompiling.

context.setAttribute("javax.servlet.context.tempdir", getScratchDir());

On Wed, Sep 13, 2017 at 5:16 PM, Joakim Erdfelt <[hidden email]> wrote:
I would have expected each compiled JSP to be added as a Servlet to the ServletContextHandler via the .addServlet() call.


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 2:10 PM, upendar devu <[hidden email]> wrote:
Thanks for quick response.  I dont think we followed the example code you followed but little lines of code might match .

Attached code snippet what we are using.  Please refer the code.

I think below line of code does .
WebAppContext.setBaseResource(new ResourceCollection(validPaths.toArray(new String[0])));.
i.e 
WebAppContext.setBaseResource(new ResourceCollection("src/main/webapp", "src/main/resources", "src/main", "webapp", ".");



On Wed, Sep 13, 2017 at 4:45 PM, Joakim Erdfelt <[hidden email]> wrote:
The fact that you mention /tmp/embedded-jetty-jsp hints that you are using the example code from

Is this true?

If so, can you describe how you are adding your pre-compiled JSPs to the ServletContextHandler?


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 1:24 PM, upendar devu <[hidden email]> wrote:
We recently upgraded from Jetty version 8 to 9.4.6  ; The embedded Jetty server recompiling the JSP pages and creating a folder /tmp/embedded-jetty-jsp despite the configuration attribute Development is set to false.

In my lower env   - the folder embedded-jetty-jsp is getting created and we see all the recompiled JSP pages .

in Production env -  the folder embedded-jetty-jsp is getting created and we see ONLY few of the JSP pages are getting recompiled . Due to this we are getting below error on clicking the page in the portal - the page associated to jSP is recompiled in that tmp folder.

We need your help to find the rootcause and fix for this issue. 

Error :

07 Sep 2017 16:26:28,153 [qtp1043351526-50615] ERROR biz.xxxx.xxxx.common.struts.ExceptionInterceptor (intercept:31) - JSPException including path '/pages/theme/xxxx.jsp'. org.apache.tiles.request.render.CannotRenderException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:399) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:238) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:103) at org.apache.tiles.impl.mgmt.CachingTilesContainer.render(CachingTilesContainer.java:126) at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:161) at org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.java:208) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277) at com.opensymphony.xwork2.interceptor.annotations.AnnotationWorkflowInterceptor.intercept(AnnotationWorkflowInterceptor.java:133) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.doIntercept(ConversionErrorInterceptor.java:139) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:133) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:88) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:174) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:171) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.PreBindInterceptor.intercept(PreBindInterceptor.java:19) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.LiteResultInterceptor.intercept(LiteResultInterceptor.java:51) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.FragmentInterceptor.intercept(FragmentInterceptor.java:35) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:246) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.NoCacheInterceptor.intercept(NoCacheInterceptor.java:39) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.SecurityInterceptor.intercept(SecurityInterceptor.java:70) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.ExceptionInterceptor.intercept(ExceptionInterceptor.java:23) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.factory.StrutsActionProxy.execute(StrutsActionProxy.java:54) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564) at org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:81) at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:143) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:64) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.ResponseUrlFilter.onDynamic(ResponseUrlFilter.java:14) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.PerformanceFilter.onDynamic(PerformanceFilter.java:17) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.SecurityContextFilter.onDynamic(SecurityContextFilter.java:18) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:564) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128) at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.request.servlet.ServletUtil.wrapServletException(ServletUtil.java:61) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:125) at org.apache.tiles.request.AbstractViewRequest.dispatch(AbstractViewRequest.java:47) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.request.render.ChainedDelegateRenderer.render(ChainedDelegateRenderer.java:68) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:108) at org.apache.tiles.template.InsertAttributeModel.renderAttribute(InsertAttributeModel.java:188) at org.apache.tiles.template.InsertAttributeModel.execute(InsertAttributeModel.java:132) at org.apache.tiles.jsp.taglib.InsertAttributeTag.doTag(InsertAttributeTag.java:299) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_tiles_005finsertAttribute_005f10(layout_jsp.java:1645) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fotherwise_005f0(layout_jsp.java:1614) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f1(layout_jsp.java:1527) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fwhen_005f0(layout_jsp.java:1010) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f0(layout_jsp.java:915) at org.apache.jsp.pages.common.layout_jsp._jspService(layout_jsp.java:255) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:833) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:203) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:73) at org.apache.tiles.request.servlet.ServletRequest.forward(ServletRequest.java:265) at org.apache.tiles.request.servlet.ServletRequest.doForward(ServletRequest.java:228) at org.apache.tiles.request.AbstractClientRequest.dispatch(AbstractClientRequest.java:57) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:397) ... 85 more Caused by: java.lang.NoClassDefFoundError: org/apache/jsp/tag/web/form_tag at org.apache.jsp.pages.theme.xxxx_jsp._jspx_meth_neu_005fform_005f0(xxxx_jsp.java:378) at org.apache.jsp.pages.theme.xxxx_jsp._jspService(xxxx_jsp.java:301) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.include(Dispatcher.java:124) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:887) at org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:679) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:673) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:123) ... 128 more


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] [jetty-users] JSP pages are recompiled at runtime

Jan Bartel
In reply to this post by upendar devu
The recommended way to deploy for a production environment is to precompile jsps and place <servlet> definitions for them into web.xml. You can use a tool like the jetty-jspc-maven-plugin to do that for you: see https://www.eclipse.org/jetty/documentation/current/jetty-jspc-maven-plugin.html. You could also use an ant task to do the compilation, see https://tomcat.apache.org/tomcat-8.5-doc/jasper-howto.html#Production_Configuration. This way, page accesses are fast as there is no on-the-fly compilation and thus no need for a full jdk on the production machine.

When NOT using precompiled jsps defined as <servlets>, when a jsp page is requested, the jsp engine uses the scratch dir to look for a class matching the jsp. It does so iff development==true or the page is being requested for the first  time. The page will be (re)compiled iff: the class does not exist, or the modification date on the jsp page is more recent than the date on the class file.

As Joakim suggests, you should try and produce more debug logs to determine the difference between your test and production environments. But ideally, you would instead use the proper pre-compilation procedure for your production environment.

Jan


On 14 September 2017 at 07:56, upendar devu <[hidden email]> wrote:
I'm sure that we didn't get any errors removing scratch dir.

On Sep 13, 2017 5:39 PM, "Joakim Erdfelt" <[hidden email]> wrote:
Removing that scratchdir attribute just moves the jsp compilation to system temp (aka java.io.tmpdir)
Its a requirement for JSP, you cannot run without a scratch directory.
In fact, you'll get startup errors if the scratch directory is bad/invalid.

Eg:

The JSP engine is not configured with a scratch dir. \n 
Please add \"jsp.initparams=scratchdir=<dir-name>\" \n 
in the servlets.properties file for this context.

or 

The scratchDir you specified: {0} is unusable.

I believe that to use precompiled JSPs you have to put the precompiled versions into your ServletContextHandler as servlets.

Jan, do you concur?


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 2:18 PM, upendar devu <[hidden email]> wrote:
We removed below line of code then we dont see the folder embedded-jetty-jsp getting created . I believe server using the pre compiled jsp pages as I dont locate the JSPs recompiling.

context.setAttribute("javax.servlet.context.tempdir", getScratchDir());

On Wed, Sep 13, 2017 at 5:16 PM, Joakim Erdfelt <[hidden email]> wrote:
I would have expected each compiled JSP to be added as a Servlet to the ServletContextHandler via the .addServlet() call.


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 2:10 PM, upendar devu <[hidden email]> wrote:
Thanks for quick response.  I dont think we followed the example code you followed but little lines of code might match .

Attached code snippet what we are using.  Please refer the code.

I think below line of code does .
WebAppContext.setBaseResource(new ResourceCollection(validPaths.toArray(new String[0])));.
i.e 
WebAppContext.setBaseResource(new ResourceCollection("src/main/webapp", "src/main/resources", "src/main", "webapp", ".");



On Wed, Sep 13, 2017 at 4:45 PM, Joakim Erdfelt <[hidden email]> wrote:
The fact that you mention /tmp/embedded-jetty-jsp hints that you are using the example code from

Is this true?

If so, can you describe how you are adding your pre-compiled JSPs to the ServletContextHandler?


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 1:24 PM, upendar devu <[hidden email]> wrote:
We recently upgraded from Jetty version 8 to 9.4.6  ; The embedded Jetty server recompiling the JSP pages and creating a folder /tmp/embedded-jetty-jsp despite the configuration attribute Development is set to false.

In my lower env   - the folder embedded-jetty-jsp is getting created and we see all the recompiled JSP pages .

in Production env -  the folder embedded-jetty-jsp is getting created and we see ONLY few of the JSP pages are getting recompiled . Due to this we are getting below error on clicking the page in the portal - the page associated to jSP is recompiled in that tmp folder.

We need your help to find the rootcause and fix for this issue. 

Error :

07 Sep 2017 16:26:28,153 [qtp1043351526-50615] ERROR biz.xxxx.xxxx.common.struts.ExceptionInterceptor (intercept:31) - JSPException including path '/pages/theme/xxxx.jsp'. org.apache.tiles.request.render.CannotRenderException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:399) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:238) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:103) at org.apache.tiles.impl.mgmt.CachingTilesContainer.render(CachingTilesContainer.java:126) at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:161) at org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.java:208) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277) at com.opensymphony.xwork2.interceptor.annotations.AnnotationWorkflowInterceptor.intercept(AnnotationWorkflowInterceptor.java:133) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.doIntercept(ConversionErrorInterceptor.java:139) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:133) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:88) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:174) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:171) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.PreBindInterceptor.intercept(PreBindInterceptor.java:19) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.LiteResultInterceptor.intercept(LiteResultInterceptor.java:51) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.FragmentInterceptor.intercept(FragmentInterceptor.java:35) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:246) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.NoCacheInterceptor.intercept(NoCacheInterceptor.java:39) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.SecurityInterceptor.intercept(SecurityInterceptor.java:70) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.ExceptionInterceptor.intercept(ExceptionInterceptor.java:23) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.factory.StrutsActionProxy.execute(StrutsActionProxy.java:54) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564) at org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:81) at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:143) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:64) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.ResponseUrlFilter.onDynamic(ResponseUrlFilter.java:14) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.PerformanceFilter.onDynamic(PerformanceFilter.java:17) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.SecurityContextFilter.onDynamic(SecurityContextFilter.java:18) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:564) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128) at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.request.servlet.ServletUtil.wrapServletException(ServletUtil.java:61) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:125) at org.apache.tiles.request.AbstractViewRequest.dispatch(AbstractViewRequest.java:47) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.request.render.ChainedDelegateRenderer.render(ChainedDelegateRenderer.java:68) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:108) at org.apache.tiles.template.InsertAttributeModel.renderAttribute(InsertAttributeModel.java:188) at org.apache.tiles.template.InsertAttributeModel.execute(InsertAttributeModel.java:132) at org.apache.tiles.jsp.taglib.InsertAttributeTag.doTag(InsertAttributeTag.java:299) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_tiles_005finsertAttribute_005f10(layout_jsp.java:1645) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fotherwise_005f0(layout_jsp.java:1614) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f1(layout_jsp.java:1527) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fwhen_005f0(layout_jsp.java:1010) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f0(layout_jsp.java:915) at org.apache.jsp.pages.common.layout_jsp._jspService(layout_jsp.java:255) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:833) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:203) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:73) at org.apache.tiles.request.servlet.ServletRequest.forward(ServletRequest.java:265) at org.apache.tiles.request.servlet.ServletRequest.doForward(ServletRequest.java:228) at org.apache.tiles.request.AbstractClientRequest.dispatch(AbstractClientRequest.java:57) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:397) ... 85 more Caused by: java.lang.NoClassDefFoundError: org/apache/jsp/tag/web/form_tag at org.apache.jsp.pages.theme.xxxx_jsp._jspx_meth_neu_005fform_005f0(xxxx_jsp.java:378) at org.apache.jsp.pages.theme.xxxx_jsp._jspService(xxxx_jsp.java:301) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.include(Dispatcher.java:124) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:887) at org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:679) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:673) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:123) ... 128 more


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev



--
Jan Bartel <[hidden email]>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] [jetty-users] JSP pages are recompiled at runtime

upendar devu
We are using jetty jspc maven plugin since jetty version 8; migration to jetty 9.4.6 team added scratch dir code.however no issues seen in lower env as all jsp pages are recompiled into tmp location. But only few pages are recompiled that caused errors listed in my email thread.now removed scratch dir code and no recompilation jsps seen.we added more logs but couldn't find why few pages are recompiled in prod env. 
Thank you

On Sep 13, 2017 6:43 PM, "Jan Bartel" <[hidden email]> wrote:
The recommended way to deploy for a production environment is to precompile jsps and place <servlet> definitions for them into web.xml. You can use a tool like the jetty-jspc-maven-plugin to do that for you: see https://www.eclipse.org/jetty/documentation/current/jetty-jspc-maven-plugin.html. You could also use an ant task to do the compilation, see https://tomcat.apache.org/tomcat-8.5-doc/jasper-howto.html#Production_Configuration. This way, page accesses are fast as there is no on-the-fly compilation and thus no need for a full jdk on the production machine.

When NOT using precompiled jsps defined as <servlets>, when a jsp page is requested, the jsp engine uses the scratch dir to look for a class matching the jsp. It does so iff development==true or the page is being requested for the first  time. The page will be (re)compiled iff: the class does not exist, or the modification date on the jsp page is more recent than the date on the class file.

As Joakim suggests, you should try and produce more debug logs to determine the difference between your test and production environments. But ideally, you would instead use the proper pre-compilation procedure for your production environment.

Jan


On 14 September 2017 at 07:56, upendar devu <[hidden email]> wrote:
I'm sure that we didn't get any errors removing scratch dir.

On Sep 13, 2017 5:39 PM, "Joakim Erdfelt" <[hidden email]> wrote:
Removing that scratchdir attribute just moves the jsp compilation to system temp (aka java.io.tmpdir)
Its a requirement for JSP, you cannot run without a scratch directory.
In fact, you'll get startup errors if the scratch directory is bad/invalid.

Eg:

The JSP engine is not configured with a scratch dir. \n 
Please add \"jsp.initparams=scratchdir=<dir-name>\" \n 
in the servlets.properties file for this context.

or 

The scratchDir you specified: {0} is unusable.

I believe that to use precompiled JSPs you have to put the precompiled versions into your ServletContextHandler as servlets.

Jan, do you concur?


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 2:18 PM, upendar devu <[hidden email]> wrote:
We removed below line of code then we dont see the folder embedded-jetty-jsp getting created . I believe server using the pre compiled jsp pages as I dont locate the JSPs recompiling.

context.setAttribute("javax.servlet.context.tempdir", getScratchDir());

On Wed, Sep 13, 2017 at 5:16 PM, Joakim Erdfelt <[hidden email]> wrote:
I would have expected each compiled JSP to be added as a Servlet to the ServletContextHandler via the .addServlet() call.


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 2:10 PM, upendar devu <[hidden email]> wrote:
Thanks for quick response.  I dont think we followed the example code you followed but little lines of code might match .

Attached code snippet what we are using.  Please refer the code.

I think below line of code does .
WebAppContext.setBaseResource(new ResourceCollection(validPaths.toArray(new String[0])));.
i.e 
WebAppContext.setBaseResource(new ResourceCollection("src/main/webapp", "src/main/resources", "src/main", "webapp", ".");



On Wed, Sep 13, 2017 at 4:45 PM, Joakim Erdfelt <[hidden email]> wrote:
The fact that you mention /tmp/embedded-jetty-jsp hints that you are using the example code from

Is this true?

If so, can you describe how you are adding your pre-compiled JSPs to the ServletContextHandler?


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 1:24 PM, upendar devu <[hidden email]> wrote:
We recently upgraded from Jetty version 8 to 9.4.6  ; The embedded Jetty server recompiling the JSP pages and creating a folder /tmp/embedded-jetty-jsp despite the configuration attribute Development is set to false.

In my lower env   - the folder embedded-jetty-jsp is getting created and we see all the recompiled JSP pages .

in Production env -  the folder embedded-jetty-jsp is getting created and we see ONLY few of the JSP pages are getting recompiled . Due to this we are getting below error on clicking the page in the portal - the page associated to jSP is recompiled in that tmp folder.

We need your help to find the rootcause and fix for this issue. 

Error :

07 Sep 2017 16:26:28,153 [qtp1043351526-50615] ERROR biz.xxxx.xxxx.common.struts.ExceptionInterceptor (intercept:31) - JSPException including path '/pages/theme/xxxx.jsp'. org.apache.tiles.request.render.CannotRenderException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:399) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:238) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:103) at org.apache.tiles.impl.mgmt.CachingTilesContainer.render(CachingTilesContainer.java:126) at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:161) at org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.java:208) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277) at com.opensymphony.xwork2.interceptor.annotations.AnnotationWorkflowInterceptor.intercept(AnnotationWorkflowInterceptor.java:133) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.doIntercept(ConversionErrorInterceptor.java:139) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:133) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:88) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:174) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:171) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.PreBindInterceptor.intercept(PreBindInterceptor.java:19) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.LiteResultInterceptor.intercept(LiteResultInterceptor.java:51) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.FragmentInterceptor.intercept(FragmentInterceptor.java:35) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:246) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.NoCacheInterceptor.intercept(NoCacheInterceptor.java:39) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.SecurityInterceptor.intercept(SecurityInterceptor.java:70) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.ExceptionInterceptor.intercept(ExceptionInterceptor.java:23) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.factory.StrutsActionProxy.execute(StrutsActionProxy.java:54) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564) at org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:81) at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:143) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:64) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.ResponseUrlFilter.onDynamic(ResponseUrlFilter.java:14) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.PerformanceFilter.onDynamic(PerformanceFilter.java:17) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.SecurityContextFilter.onDynamic(SecurityContextFilter.java:18) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:564) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128) at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.request.servlet.ServletUtil.wrapServletException(ServletUtil.java:61) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:125) at org.apache.tiles.request.AbstractViewRequest.dispatch(AbstractViewRequest.java:47) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.request.render.ChainedDelegateRenderer.render(ChainedDelegateRenderer.java:68) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:108) at org.apache.tiles.template.InsertAttributeModel.renderAttribute(InsertAttributeModel.java:188) at org.apache.tiles.template.InsertAttributeModel.execute(InsertAttributeModel.java:132) at org.apache.tiles.jsp.taglib.InsertAttributeTag.doTag(InsertAttributeTag.java:299) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_tiles_005finsertAttribute_005f10(layout_jsp.java:1645) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fotherwise_005f0(layout_jsp.java:1614) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f1(layout_jsp.java:1527) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fwhen_005f0(layout_jsp.java:1010) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f0(layout_jsp.java:915) at org.apache.jsp.pages.common.layout_jsp._jspService(layout_jsp.java:255) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:833) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:203) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:73) at org.apache.tiles.request.servlet.ServletRequest.forward(ServletRequest.java:265) at org.apache.tiles.request.servlet.ServletRequest.doForward(ServletRequest.java:228) at org.apache.tiles.request.AbstractClientRequest.dispatch(AbstractClientRequest.java:57) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:397) ... 85 more Caused by: java.lang.NoClassDefFoundError: org/apache/jsp/tag/web/form_tag at org.apache.jsp.pages.theme.xxxx_jsp._jspx_meth_neu_005fform_005f0(xxxx_jsp.java:378) at org.apache.jsp.pages.theme.xxxx_jsp._jspService(xxxx_jsp.java:301) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.include(Dispatcher.java:124) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:887) at org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:679) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:673) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:123) ... 128 more


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev



--
Jan Bartel <[hidden email]>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev

_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] [jetty-users] JSP pages are recompiled at runtime

Joakim Erdfelt-8
"no recompilation jsps seen"
... doesn't mean its not still happening (just somewhere else on your filesystem).

Enable the debug logging and you'll see that scratchDir still exists, just not configured in a place you expect.
You'll also see events in the debug logs for when it recompiles.


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 3:50 PM, upendar devu <[hidden email]> wrote:
We are using jetty jspc maven plugin since jetty version 8; migration to jetty 9.4.6 team added scratch dir code.however no issues seen in lower env as all jsp pages are recompiled into tmp location. But only few pages are recompiled that caused errors listed in my email thread.now removed scratch dir code and no recompilation jsps seen.we added more logs but couldn't find why few pages are recompiled in prod env. 
Thank you

On Sep 13, 2017 6:43 PM, "Jan Bartel" <[hidden email]> wrote:
The recommended way to deploy for a production environment is to precompile jsps and place <servlet> definitions for them into web.xml. You can use a tool like the jetty-jspc-maven-plugin to do that for you: see https://www.eclipse.org/jetty/documentation/current/jetty-jspc-maven-plugin.html. You could also use an ant task to do the compilation, see https://tomcat.apache.org/tomcat-8.5-doc/jasper-howto.html#Production_Configuration. This way, page accesses are fast as there is no on-the-fly compilation and thus no need for a full jdk on the production machine.

When NOT using precompiled jsps defined as <servlets>, when a jsp page is requested, the jsp engine uses the scratch dir to look for a class matching the jsp. It does so iff development==true or the page is being requested for the first  time. The page will be (re)compiled iff: the class does not exist, or the modification date on the jsp page is more recent than the date on the class file.

As Joakim suggests, you should try and produce more debug logs to determine the difference between your test and production environments. But ideally, you would instead use the proper pre-compilation procedure for your production environment.

Jan


On 14 September 2017 at 07:56, upendar devu <[hidden email]> wrote:
I'm sure that we didn't get any errors removing scratch dir.

On Sep 13, 2017 5:39 PM, "Joakim Erdfelt" <[hidden email]> wrote:
Removing that scratchdir attribute just moves the jsp compilation to system temp (aka java.io.tmpdir)
Its a requirement for JSP, you cannot run without a scratch directory.
In fact, you'll get startup errors if the scratch directory is bad/invalid.

Eg:

The JSP engine is not configured with a scratch dir. \n 
Please add \"jsp.initparams=scratchdir=<dir-name>\" \n 
in the servlets.properties file for this context.

or 

The scratchDir you specified: {0} is unusable.

I believe that to use precompiled JSPs you have to put the precompiled versions into your ServletContextHandler as servlets.

Jan, do you concur?


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 2:18 PM, upendar devu <[hidden email]> wrote:
We removed below line of code then we dont see the folder embedded-jetty-jsp getting created . I believe server using the pre compiled jsp pages as I dont locate the JSPs recompiling.

context.setAttribute("javax.servlet.context.tempdir", getScratchDir());

On Wed, Sep 13, 2017 at 5:16 PM, Joakim Erdfelt <[hidden email]> wrote:
I would have expected each compiled JSP to be added as a Servlet to the ServletContextHandler via the .addServlet() call.


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 2:10 PM, upendar devu <[hidden email]> wrote:
Thanks for quick response.  I dont think we followed the example code you followed but little lines of code might match .

Attached code snippet what we are using.  Please refer the code.

I think below line of code does .
WebAppContext.setBaseResource(new ResourceCollection(validPaths.toArray(new String[0])));.
i.e 
WebAppContext.setBaseResource(new ResourceCollection("src/main/webapp", "src/main/resources", "src/main", "webapp", ".");



On Wed, Sep 13, 2017 at 4:45 PM, Joakim Erdfelt <[hidden email]> wrote:
The fact that you mention /tmp/embedded-jetty-jsp hints that you are using the example code from

Is this true?

If so, can you describe how you are adding your pre-compiled JSPs to the ServletContextHandler?


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 1:24 PM, upendar devu <[hidden email]> wrote:
We recently upgraded from Jetty version 8 to 9.4.6  ; The embedded Jetty server recompiling the JSP pages and creating a folder /tmp/embedded-jetty-jsp despite the configuration attribute Development is set to false.

In my lower env   - the folder embedded-jetty-jsp is getting created and we see all the recompiled JSP pages .

in Production env -  the folder embedded-jetty-jsp is getting created and we see ONLY few of the JSP pages are getting recompiled . Due to this we are getting below error on clicking the page in the portal - the page associated to jSP is recompiled in that tmp folder.

We need your help to find the rootcause and fix for this issue. 

Error :

07 Sep 2017 16:26:28,153 [qtp1043351526-50615] ERROR biz.xxxx.xxxx.common.struts.ExceptionInterceptor (intercept:31) - JSPException including path '/pages/theme/xxxx.jsp'. org.apache.tiles.request.render.CannotRenderException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:399) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:238) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:103) at org.apache.tiles.impl.mgmt.CachingTilesContainer.render(CachingTilesContainer.java:126) at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:161) at org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.java:208) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277) at com.opensymphony.xwork2.interceptor.annotations.AnnotationWorkflowInterceptor.intercept(AnnotationWorkflowInterceptor.java:133) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.doIntercept(ConversionErrorInterceptor.java:139) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:133) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:88) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:174) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:171) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.PreBindInterceptor.intercept(PreBindInterceptor.java:19) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.LiteResultInterceptor.intercept(LiteResultInterceptor.java:51) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.FragmentInterceptor.intercept(FragmentInterceptor.java:35) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:246) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.NoCacheInterceptor.intercept(NoCacheInterceptor.java:39) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.SecurityInterceptor.intercept(SecurityInterceptor.java:70) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.ExceptionInterceptor.intercept(ExceptionInterceptor.java:23) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.factory.StrutsActionProxy.execute(StrutsActionProxy.java:54) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564) at org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:81) at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:143) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:64) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.ResponseUrlFilter.onDynamic(ResponseUrlFilter.java:14) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.PerformanceFilter.onDynamic(PerformanceFilter.java:17) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.SecurityContextFilter.onDynamic(SecurityContextFilter.java:18) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:564) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128) at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.request.servlet.ServletUtil.wrapServletException(ServletUtil.java:61) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:125) at org.apache.tiles.request.AbstractViewRequest.dispatch(AbstractViewRequest.java:47) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.request.render.ChainedDelegateRenderer.render(ChainedDelegateRenderer.java:68) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:108) at org.apache.tiles.template.InsertAttributeModel.renderAttribute(InsertAttributeModel.java:188) at org.apache.tiles.template.InsertAttributeModel.execute(InsertAttributeModel.java:132) at org.apache.tiles.jsp.taglib.InsertAttributeTag.doTag(InsertAttributeTag.java:299) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_tiles_005finsertAttribute_005f10(layout_jsp.java:1645) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fotherwise_005f0(layout_jsp.java:1614) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f1(layout_jsp.java:1527) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fwhen_005f0(layout_jsp.java:1010) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f0(layout_jsp.java:915) at org.apache.jsp.pages.common.layout_jsp._jspService(layout_jsp.java:255) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:833) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:203) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:73) at org.apache.tiles.request.servlet.ServletRequest.forward(ServletRequest.java:265) at org.apache.tiles.request.servlet.ServletRequest.doForward(ServletRequest.java:228) at org.apache.tiles.request.AbstractClientRequest.dispatch(AbstractClientRequest.java:57) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:397) ... 85 more Caused by: java.lang.NoClassDefFoundError: org/apache/jsp/tag/web/form_tag at org.apache.jsp.pages.theme.xxxx_jsp._jspx_meth_neu_005fform_005f0(xxxx_jsp.java:378) at org.apache.jsp.pages.theme.xxxx_jsp._jspService(xxxx_jsp.java:301) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.include(Dispatcher.java:124) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:887) at org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:679) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:673) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:123) ... 128 more


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev



--
Jan Bartel <[hidden email]>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev

_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] [jetty-users] JSP pages are recompiled at runtime

upendar devu
After removing scratch dir I don't see jsps getting recompiled since embded-jetty-jsp dir not found in tmp location and not even in entire system. Conclusion is removing scratch dir helping resolve the recompilation issue. What I wanted to know is when scratch dir is enabled why only few jsps are recompiled that caused io exception and no class def errors ..

On Sep 13, 2017 7:09 PM, "Joakim Erdfelt" <[hidden email]> wrote:
"no recompilation jsps seen"
... doesn't mean its not still happening (just somewhere else on your filesystem).

Enable the debug logging and you'll see that scratchDir still exists, just not configured in a place you expect.
You'll also see events in the debug logs for when it recompiles.


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 3:50 PM, upendar devu <[hidden email]> wrote:
We are using jetty jspc maven plugin since jetty version 8; migration to jetty 9.4.6 team added scratch dir code.however no issues seen in lower env as all jsp pages are recompiled into tmp location. But only few pages are recompiled that caused errors listed in my email thread.now removed scratch dir code and no recompilation jsps seen.we added more logs but couldn't find why few pages are recompiled in prod env. 
Thank you

On Sep 13, 2017 6:43 PM, "Jan Bartel" <[hidden email]> wrote:
The recommended way to deploy for a production environment is to precompile jsps and place <servlet> definitions for them into web.xml. You can use a tool like the jetty-jspc-maven-plugin to do that for you: see https://www.eclipse.org/jetty/documentation/current/jetty-jspc-maven-plugin.html. You could also use an ant task to do the compilation, see https://tomcat.apache.org/tomcat-8.5-doc/jasper-howto.html#Production_Configuration. This way, page accesses are fast as there is no on-the-fly compilation and thus no need for a full jdk on the production machine.

When NOT using precompiled jsps defined as <servlets>, when a jsp page is requested, the jsp engine uses the scratch dir to look for a class matching the jsp. It does so iff development==true or the page is being requested for the first  time. The page will be (re)compiled iff: the class does not exist, or the modification date on the jsp page is more recent than the date on the class file.

As Joakim suggests, you should try and produce more debug logs to determine the difference between your test and production environments. But ideally, you would instead use the proper pre-compilation procedure for your production environment.

Jan


On 14 September 2017 at 07:56, upendar devu <[hidden email]> wrote:
I'm sure that we didn't get any errors removing scratch dir.

On Sep 13, 2017 5:39 PM, "Joakim Erdfelt" <[hidden email]> wrote:
Removing that scratchdir attribute just moves the jsp compilation to system temp (aka java.io.tmpdir)
Its a requirement for JSP, you cannot run without a scratch directory.
In fact, you'll get startup errors if the scratch directory is bad/invalid.

Eg:

The JSP engine is not configured with a scratch dir. \n 
Please add \"jsp.initparams=scratchdir=<dir-name>\" \n 
in the servlets.properties file for this context.

or 

The scratchDir you specified: {0} is unusable.

I believe that to use precompiled JSPs you have to put the precompiled versions into your ServletContextHandler as servlets.

Jan, do you concur?


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 2:18 PM, upendar devu <[hidden email]> wrote:
We removed below line of code then we dont see the folder embedded-jetty-jsp getting created . I believe server using the pre compiled jsp pages as I dont locate the JSPs recompiling.

context.setAttribute("javax.servlet.context.tempdir", getScratchDir());

On Wed, Sep 13, 2017 at 5:16 PM, Joakim Erdfelt <[hidden email]> wrote:
I would have expected each compiled JSP to be added as a Servlet to the ServletContextHandler via the .addServlet() call.


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 2:10 PM, upendar devu <[hidden email]> wrote:
Thanks for quick response.  I dont think we followed the example code you followed but little lines of code might match .

Attached code snippet what we are using.  Please refer the code.

I think below line of code does .
WebAppContext.setBaseResource(new ResourceCollection(validPaths.toArray(new String[0])));.
i.e 
WebAppContext.setBaseResource(new ResourceCollection("src/main/webapp", "src/main/resources", "src/main", "webapp", ".");



On Wed, Sep 13, 2017 at 4:45 PM, Joakim Erdfelt <[hidden email]> wrote:
The fact that you mention /tmp/embedded-jetty-jsp hints that you are using the example code from

Is this true?

If so, can you describe how you are adding your pre-compiled JSPs to the ServletContextHandler?


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 1:24 PM, upendar devu <[hidden email]> wrote:
We recently upgraded from Jetty version 8 to 9.4.6  ; The embedded Jetty server recompiling the JSP pages and creating a folder /tmp/embedded-jetty-jsp despite the configuration attribute Development is set to false.

In my lower env   - the folder embedded-jetty-jsp is getting created and we see all the recompiled JSP pages .

in Production env -  the folder embedded-jetty-jsp is getting created and we see ONLY few of the JSP pages are getting recompiled . Due to this we are getting below error on clicking the page in the portal - the page associated to jSP is recompiled in that tmp folder.

We need your help to find the rootcause and fix for this issue. 

Error :

07 Sep 2017 16:26:28,153 [qtp1043351526-50615] ERROR biz.xxxx.xxxx.common.struts.ExceptionInterceptor (intercept:31) - JSPException including path '/pages/theme/xxxx.jsp'. org.apache.tiles.request.render.CannotRenderException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:399) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:238) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:103) at org.apache.tiles.impl.mgmt.CachingTilesContainer.render(CachingTilesContainer.java:126) at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:161) at org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.java:208) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277) at com.opensymphony.xwork2.interceptor.annotations.AnnotationWorkflowInterceptor.intercept(AnnotationWorkflowInterceptor.java:133) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.doIntercept(ConversionErrorInterceptor.java:139) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:133) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:88) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:174) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:171) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.PreBindInterceptor.intercept(PreBindInterceptor.java:19) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.LiteResultInterceptor.intercept(LiteResultInterceptor.java:51) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.FragmentInterceptor.intercept(FragmentInterceptor.java:35) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:246) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.NoCacheInterceptor.intercept(NoCacheInterceptor.java:39) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.SecurityInterceptor.intercept(SecurityInterceptor.java:70) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.ExceptionInterceptor.intercept(ExceptionInterceptor.java:23) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.factory.StrutsActionProxy.execute(StrutsActionProxy.java:54) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564) at org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:81) at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:143) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:64) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.ResponseUrlFilter.onDynamic(ResponseUrlFilter.java:14) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.PerformanceFilter.onDynamic(PerformanceFilter.java:17) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.SecurityContextFilter.onDynamic(SecurityContextFilter.java:18) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:564) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128) at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.request.servlet.ServletUtil.wrapServletException(ServletUtil.java:61) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:125) at org.apache.tiles.request.AbstractViewRequest.dispatch(AbstractViewRequest.java:47) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.request.render.ChainedDelegateRenderer.render(ChainedDelegateRenderer.java:68) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:108) at org.apache.tiles.template.InsertAttributeModel.renderAttribute(InsertAttributeModel.java:188) at org.apache.tiles.template.InsertAttributeModel.execute(InsertAttributeModel.java:132) at org.apache.tiles.jsp.taglib.InsertAttributeTag.doTag(InsertAttributeTag.java:299) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_tiles_005finsertAttribute_005f10(layout_jsp.java:1645) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fotherwise_005f0(layout_jsp.java:1614) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f1(layout_jsp.java:1527) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fwhen_005f0(layout_jsp.java:1010) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f0(layout_jsp.java:915) at org.apache.jsp.pages.common.layout_jsp._jspService(layout_jsp.java:255) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:833) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:203) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:73) at org.apache.tiles.request.servlet.ServletRequest.forward(ServletRequest.java:265) at org.apache.tiles.request.servlet.ServletRequest.doForward(ServletRequest.java:228) at org.apache.tiles.request.AbstractClientRequest.dispatch(AbstractClientRequest.java:57) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:397) ... 85 more Caused by: java.lang.NoClassDefFoundError: org/apache/jsp/tag/web/form_tag at org.apache.jsp.pages.theme.xxxx_jsp._jspx_meth_neu_005fform_005f0(xxxx_jsp.java:378) at org.apache.jsp.pages.theme.xxxx_jsp._jspService(xxxx_jsp.java:301) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.include(Dispatcher.java:124) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:887) at org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:679) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:673) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:123) ... 128 more


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev



--
Jan Bartel <[hidden email]>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev

_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev

_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] [jetty-users] JSP pages are recompiled at runtime

Joakim Erdfelt-8
Lets take a closer look ...

What Apache JSP are we using ...

$ mvn dependency:tree
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building embedded-jetty-jsp 1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ embedded-jetty-jsp ---
[INFO] org.eclipse.jetty.demo:embedded-jetty-jsp:jar:1-SNAPSHOT
[INFO] +- javax.servlet:javax.servlet-api:jar:3.1.0:compile
[INFO] +- junit:junit:jar:4.12:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.eclipse.jetty:jetty-annotations:jar:9.4.5.v20170502:compile
[INFO] |  +- org.eclipse.jetty:jetty-plus:jar:9.4.5.v20170502:compile
[INFO] |  |  \- org.eclipse.jetty:jetty-jndi:jar:9.4.5.v20170502:compile
[INFO] |  +- javax.annotation:javax.annotation-api:jar:1.2:compile
[INFO] |  +- org.ow2.asm:asm:jar:5.1:compile
[INFO] |  \- org.ow2.asm:asm-commons:jar:5.1:compile
[INFO] |     \- org.ow2.asm:asm-tree:jar:5.1:compile
[INFO] +- org.eclipse.jetty:jetty-webapp:jar:9.4.5.v20170502:compile
[INFO] |  +- org.eclipse.jetty:jetty-xml:jar:9.4.5.v20170502:compile
[INFO] |  \- org.eclipse.jetty:jetty-servlet:jar:9.4.5.v20170502:compile
[INFO] |     \- org.eclipse.jetty:jetty-security:jar:9.4.5.v20170502:compile
[INFO] |        \- org.eclipse.jetty:jetty-server:jar:9.4.5.v20170502:compile
[INFO] |           +- org.eclipse.jetty:jetty-http:jar:9.4.5.v20170502:compile
[INFO] |           \- org.eclipse.jetty:jetty-io:jar:9.4.5.v20170502:compile
[INFO] +- org.eclipse.jetty:apache-jsp:jar:9.4.5.v20170502:compile
[INFO] |  +- org.eclipse.jetty:jetty-util:jar:9.4.5.v20170502:compile
[INFO] |  +- org.eclipse.jetty.toolchain:jetty-schemas:jar:3.1:compile
[INFO] |  +- org.mortbay.jasper:apache-jsp:jar:8.5.9.1:compile
[INFO] |  |  \- org.mortbay.jasper:apache-el:jar:8.5.9.1:compile
[INFO] |  \- org.eclipse.jdt.core.compiler:ecj:jar:4.4.2:compile
[INFO] \- org.eclipse.jetty:apache-jstl:pom:9.4.5.v20170502:compile
[INFO]    +- org.apache.taglibs:taglibs-standard-spec:jar:1.2.5:compile
[INFO]    \- org.apache.taglibs:taglibs-standard-impl:jar:1.2.5:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.895 s
[INFO] Finished at: 2017-09-13T23:19:10Z
[INFO] Final Memory: 14M/491M
[INFO] ------------------------------------------------------------------------

That would be Apache Jasper JSP 8.5.9 per above.

Lets see what Apache Jasper JSP 8.5.9 does with scratchDir ...


Yup, you still have a scratchDir.

Your change to remove the "javax.servlet.context.tempdir" attribute has only moved the location of the scratchDir from a place you know and recognize to one that is defaulted by the implementation based on your os/shell environment's specific configuration.

You are essentially at line #674 (which now returns null), and then lines #675 thru #680 just defaults to "java.io.tmpdir" for the scratchDir.

Joakim Erdfelt / [hidden email]


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] [jetty-users] JSP pages are recompiled at runtime

Jan Bartel
In reply to this post by upendar devu
You're confusing 2 separate but related things:  the javax.servlet.context.tempdir, and the jsp engine scratch dir.  The former is the place where the webapp will be unpacked to if necessary, and the jsp engine scratch dir is the location to which jsps will be compiled.  Jetty tells the jsp engine that the scratch dir to use is the javax.servlet.context.tempdir/jsp.  So if you set javax.servlet.context.tempdir=/tmp/embedded-jetty-jsp the scratchdir will be /tmp/embedded-jetty-jsp/jsp.  If you don't set the javax.servlet.context.tempdir it defaults to java.io.tmpdir, which on *nix systems is "/tmp", so the scratch dir would be /tmp/jsp.


Again, if you are correctly using the jspc maven plugin to generate classes from your jsps, and also populate web.xml with appropriate <servlet>s, then jsp-on-the fly compilation never happens because the JspServlet is never hit.  If you are seeing any on-the-fly compilation at all, then you have not populated web.xml correctly.

Jan


On 14 September 2017 at 09:16, upendar devu <[hidden email]> wrote:
After removing scratch dir I don't see jsps getting recompiled since embded-jetty-jsp dir not found in tmp location and not even in entire system. Conclusion is removing scratch dir helping resolve the recompilation issue. What I wanted to know is when scratch dir is enabled why only few jsps are recompiled that caused io exception and no class def errors ..

On Sep 13, 2017 7:09 PM, "Joakim Erdfelt" <[hidden email]> wrote:
"no recompilation jsps seen"
... doesn't mean its not still happening (just somewhere else on your filesystem).

Enable the debug logging and you'll see that scratchDir still exists, just not configured in a place you expect.
You'll also see events in the debug logs for when it recompiles.


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 3:50 PM, upendar devu <[hidden email]> wrote:
We are using jetty jspc maven plugin since jetty version 8; migration to jetty 9.4.6 team added scratch dir code.however no issues seen in lower env as all jsp pages are recompiled into tmp location. But only few pages are recompiled that caused errors listed in my email thread.now removed scratch dir code and no recompilation jsps seen.we added more logs but couldn't find why few pages are recompiled in prod env. 
Thank you

On Sep 13, 2017 6:43 PM, "Jan Bartel" <[hidden email]> wrote:
The recommended way to deploy for a production environment is to precompile jsps and place <servlet> definitions for them into web.xml. You can use a tool like the jetty-jspc-maven-plugin to do that for you: see https://www.eclipse.org/jetty/documentation/current/jetty-jspc-maven-plugin.html. You could also use an ant task to do the compilation, see https://tomcat.apache.org/tomcat-8.5-doc/jasper-howto.html#Production_Configuration. This way, page accesses are fast as there is no on-the-fly compilation and thus no need for a full jdk on the production machine.

When NOT using precompiled jsps defined as <servlets>, when a jsp page is requested, the jsp engine uses the scratch dir to look for a class matching the jsp. It does so iff development==true or the page is being requested for the first  time. The page will be (re)compiled iff: the class does not exist, or the modification date on the jsp page is more recent than the date on the class file.

As Joakim suggests, you should try and produce more debug logs to determine the difference between your test and production environments. But ideally, you would instead use the proper pre-compilation procedure for your production environment.

Jan


On 14 September 2017 at 07:56, upendar devu <[hidden email]> wrote:
I'm sure that we didn't get any errors removing scratch dir.

On Sep 13, 2017 5:39 PM, "Joakim Erdfelt" <[hidden email]> wrote:
Removing that scratchdir attribute just moves the jsp compilation to system temp (aka java.io.tmpdir)
Its a requirement for JSP, you cannot run without a scratch directory.
In fact, you'll get startup errors if the scratch directory is bad/invalid.

Eg:

The JSP engine is not configured with a scratch dir. \n 
Please add \"jsp.initparams=scratchdir=<dir-name>\" \n 
in the servlets.properties file for this context.

or 

The scratchDir you specified: {0} is unusable.

I believe that to use precompiled JSPs you have to put the precompiled versions into your ServletContextHandler as servlets.

Jan, do you concur?


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 2:18 PM, upendar devu <[hidden email]> wrote:
We removed below line of code then we dont see the folder embedded-jetty-jsp getting created . I believe server using the pre compiled jsp pages as I dont locate the JSPs recompiling.

context.setAttribute("javax.servlet.context.tempdir", getScratchDir());

On Wed, Sep 13, 2017 at 5:16 PM, Joakim Erdfelt <[hidden email]> wrote:
I would have expected each compiled JSP to be added as a Servlet to the ServletContextHandler via the .addServlet() call.


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 2:10 PM, upendar devu <[hidden email]> wrote:
Thanks for quick response.  I dont think we followed the example code you followed but little lines of code might match .

Attached code snippet what we are using.  Please refer the code.

I think below line of code does .
WebAppContext.setBaseResource(new ResourceCollection(validPaths.toArray(new String[0])));.
i.e 
WebAppContext.setBaseResource(new ResourceCollection("src/main/webapp", "src/main/resources", "src/main", "webapp", ".");



On Wed, Sep 13, 2017 at 4:45 PM, Joakim Erdfelt <[hidden email]> wrote:
The fact that you mention /tmp/embedded-jetty-jsp hints that you are using the example code from

Is this true?

If so, can you describe how you are adding your pre-compiled JSPs to the ServletContextHandler?


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 1:24 PM, upendar devu <[hidden email]> wrote:
We recently upgraded from Jetty version 8 to 9.4.6  ; The embedded Jetty server recompiling the JSP pages and creating a folder /tmp/embedded-jetty-jsp despite the configuration attribute Development is set to false.

In my lower env   - the folder embedded-jetty-jsp is getting created and we see all the recompiled JSP pages .

in Production env -  the folder embedded-jetty-jsp is getting created and we see ONLY few of the JSP pages are getting recompiled . Due to this we are getting below error on clicking the page in the portal - the page associated to jSP is recompiled in that tmp folder.

We need your help to find the rootcause and fix for this issue. 

Error :

07 Sep 2017 16:26:28,153 [qtp1043351526-50615] ERROR biz.xxxx.xxxx.common.struts.ExceptionInterceptor (intercept:31) - JSPException including path '/pages/theme/xxxx.jsp'. org.apache.tiles.request.render.CannotRenderException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:399) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:238) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:103) at org.apache.tiles.impl.mgmt.CachingTilesContainer.render(CachingTilesContainer.java:126) at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:161) at org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.java:208) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277) at com.opensymphony.xwork2.interceptor.annotations.AnnotationWorkflowInterceptor.intercept(AnnotationWorkflowInterceptor.java:133) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.doIntercept(ConversionErrorInterceptor.java:139) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:133) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:88) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:174) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:171) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.PreBindInterceptor.intercept(PreBindInterceptor.java:19) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.LiteResultInterceptor.intercept(LiteResultInterceptor.java:51) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.FragmentInterceptor.intercept(FragmentInterceptor.java:35) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:246) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.NoCacheInterceptor.intercept(NoCacheInterceptor.java:39) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.SecurityInterceptor.intercept(SecurityInterceptor.java:70) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.ExceptionInterceptor.intercept(ExceptionInterceptor.java:23) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.factory.StrutsActionProxy.execute(StrutsActionProxy.java:54) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564) at org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:81) at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:143) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:64) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.ResponseUrlFilter.onDynamic(ResponseUrlFilter.java:14) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.PerformanceFilter.onDynamic(PerformanceFilter.java:17) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.SecurityContextFilter.onDynamic(SecurityContextFilter.java:18) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:564) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128) at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.request.servlet.ServletUtil.wrapServletException(ServletUtil.java:61) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:125) at org.apache.tiles.request.AbstractViewRequest.dispatch(AbstractViewRequest.java:47) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.request.render.ChainedDelegateRenderer.render(ChainedDelegateRenderer.java:68) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:108) at org.apache.tiles.template.InsertAttributeModel.renderAttribute(InsertAttributeModel.java:188) at org.apache.tiles.template.InsertAttributeModel.execute(InsertAttributeModel.java:132) at org.apache.tiles.jsp.taglib.InsertAttributeTag.doTag(InsertAttributeTag.java:299) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_tiles_005finsertAttribute_005f10(layout_jsp.java:1645) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fotherwise_005f0(layout_jsp.java:1614) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f1(layout_jsp.java:1527) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fwhen_005f0(layout_jsp.java:1010) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f0(layout_jsp.java:915) at org.apache.jsp.pages.common.layout_jsp._jspService(layout_jsp.java:255) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:833) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:203) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:73) at org.apache.tiles.request.servlet.ServletRequest.forward(ServletRequest.java:265) at org.apache.tiles.request.servlet.ServletRequest.doForward(ServletRequest.java:228) at org.apache.tiles.request.AbstractClientRequest.dispatch(AbstractClientRequest.java:57) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:397) ... 85 more Caused by: java.lang.NoClassDefFoundError: org/apache/jsp/tag/web/form_tag at org.apache.jsp.pages.theme.xxxx_jsp._jspx_meth_neu_005fform_005f0(xxxx_jsp.java:378) at org.apache.jsp.pages.theme.xxxx_jsp._jspService(xxxx_jsp.java:301) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.include(Dispatcher.java:124) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:887) at org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:679) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:673) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:123) ... 128 more


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev



--
Jan Bartel <[hidden email]>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev

_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev

_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev



--
Jan Bartel <[hidden email]>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] [jetty-users] JSP pages are recompiled at runtime

upendar devu
I meant to say removing scratch dir means  removing the below of line of code as mentioned in one my previous emails.Later I started using the tern removal of scratch dir.

context.setAttribute("javax.servlet.context.tempdir", getScratchDir());

The below summary would help you. Please let me know if you find any.

Case 1 :
 Development =false
 context.setAttribute("javax.servlet.context.tempdir", getScratchDir());

Case 1Results: 
1. JSPs are getting recompiled into the specified scratch dir i.e /tmp/embedded-jetty-jsp as this folder has .class files.  
2. Lower envs - All jsps are recompiled and no errors are seen; Example if the application has 100 jsp pages then we seen 100.class files 
3. Production env - Only few recompiled JSP pages are seen in /tmp/embedded-jetty-jsp   Example if the application has 100 jsp pages then we seen 4 .class files  and caused errors - see entire stack trace listed in my first email thread. Struggling to find the root cause why only few jsp pages are recompiled.

Case 2 :
 Development =false
//Removed this line of code 
//context.setAttribute("javax.servlet.context.tempdir", getScratchDir());

Case 2 Results: 
1. Created a directory under /tmp folder  with name as jetty-0.0.0.0-9011-applicatioName-_xx-any-4301518294514062102.dir with 0 files under it. this proved jsp pages are not getting recompiled since no  .class files are found under /tmp
2.  no issues are encountered . Yet to take call to move the changes to prod








On Wed, Sep 13, 2017 at 7:37 PM, Jan Bartel <[hidden email]> wrote:
You're confusing 2 separate but related things:  the javax.servlet.context.tempdir, and the jsp engine scratch dir.  The former is the place where the webapp will be unpacked to if necessary, and the jsp engine scratch dir is the location to which jsps will be compiled.  Jetty tells the jsp engine that the scratch dir to use is the javax.servlet.context.tempdir/jsp.  So if you set javax.servlet.context.tempdir=/tmp/embedded-jetty-jsp the scratchdir will be /tmp/embedded-jetty-jsp/jsp.  If you don't set the javax.servlet.context.tempdir it defaults to java.io.tmpdir, which on *nix systems is "/tmp", so the scratch dir would be /tmp/jsp.


Again, if you are correctly using the jspc maven plugin to generate classes from your jsps, and also populate web.xml with appropriate <servlet>s, then jsp-on-the fly compilation never happens because the JspServlet is never hit.  If you are seeing any on-the-fly compilation at all, then you have not populated web.xml correctly.

Jan


On 14 September 2017 at 09:16, upendar devu <[hidden email]> wrote:
After removing scratch dir I don't see jsps getting recompiled since embded-jetty-jsp dir not found in tmp location and not even in entire system. Conclusion is removing scratch dir helping resolve the recompilation issue. What I wanted to know is when scratch dir is enabled why only few jsps are recompiled that caused io exception and no class def errors ..

On Sep 13, 2017 7:09 PM, "Joakim Erdfelt" <[hidden email]> wrote:
"no recompilation jsps seen"
... doesn't mean its not still happening (just somewhere else on your filesystem).

Enable the debug logging and you'll see that scratchDir still exists, just not configured in a place you expect.
You'll also see events in the debug logs for when it recompiles.


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 3:50 PM, upendar devu <[hidden email]> wrote:
We are using jetty jspc maven plugin since jetty version 8; migration to jetty 9.4.6 team added scratch dir code.however no issues seen in lower env as all jsp pages are recompiled into tmp location. But only few pages are recompiled that caused errors listed in my email thread.now removed scratch dir code and no recompilation jsps seen.we added more logs but couldn't find why few pages are recompiled in prod env. 
Thank you

On Sep 13, 2017 6:43 PM, "Jan Bartel" <[hidden email]> wrote:
The recommended way to deploy for a production environment is to precompile jsps and place <servlet> definitions for them into web.xml. You can use a tool like the jetty-jspc-maven-plugin to do that for you: see https://www.eclipse.org/jetty/documentation/current/jetty-jspc-maven-plugin.html. You could also use an ant task to do the compilation, see https://tomcat.apache.org/tomcat-8.5-doc/jasper-howto.html#Production_Configuration. This way, page accesses are fast as there is no on-the-fly compilation and thus no need for a full jdk on the production machine.

When NOT using precompiled jsps defined as <servlets>, when a jsp page is requested, the jsp engine uses the scratch dir to look for a class matching the jsp. It does so iff development==true or the page is being requested for the first  time. The page will be (re)compiled iff: the class does not exist, or the modification date on the jsp page is more recent than the date on the class file.

As Joakim suggests, you should try and produce more debug logs to determine the difference between your test and production environments. But ideally, you would instead use the proper pre-compilation procedure for your production environment.

Jan


On 14 September 2017 at 07:56, upendar devu <[hidden email]> wrote:
I'm sure that we didn't get any errors removing scratch dir.

On Sep 13, 2017 5:39 PM, "Joakim Erdfelt" <[hidden email]> wrote:
Removing that scratchdir attribute just moves the jsp compilation to system temp (aka java.io.tmpdir)
Its a requirement for JSP, you cannot run without a scratch directory.
In fact, you'll get startup errors if the scratch directory is bad/invalid.

Eg:

The JSP engine is not configured with a scratch dir. \n 
Please add \"jsp.initparams=scratchdir=<dir-name>\" \n 
in the servlets.properties file for this context.

or 

The scratchDir you specified: {0} is unusable.

I believe that to use precompiled JSPs you have to put the precompiled versions into your ServletContextHandler as servlets.

Jan, do you concur?


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 2:18 PM, upendar devu <[hidden email]> wrote:
We removed below line of code then we dont see the folder embedded-jetty-jsp getting created . I believe server using the pre compiled jsp pages as I dont locate the JSPs recompiling.

context.setAttribute("javax.servlet.context.tempdir", getScratchDir());

On Wed, Sep 13, 2017 at 5:16 PM, Joakim Erdfelt <[hidden email]> wrote:
I would have expected each compiled JSP to be added as a Servlet to the ServletContextHandler via the .addServlet() call.


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 2:10 PM, upendar devu <[hidden email]> wrote:
Thanks for quick response.  I dont think we followed the example code you followed but little lines of code might match .

Attached code snippet what we are using.  Please refer the code.

I think below line of code does .
WebAppContext.setBaseResource(new ResourceCollection(validPaths.toArray(new String[0])));.
i.e 
WebAppContext.setBaseResource(new ResourceCollection("src/main/webapp", "src/main/resources", "src/main", "webapp", ".");



On Wed, Sep 13, 2017 at 4:45 PM, Joakim Erdfelt <[hidden email]> wrote:
The fact that you mention /tmp/embedded-jetty-jsp hints that you are using the example code from

Is this true?

If so, can you describe how you are adding your pre-compiled JSPs to the ServletContextHandler?


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 1:24 PM, upendar devu <[hidden email]> wrote:
We recently upgraded from Jetty version 8 to 9.4.6  ; The embedded Jetty server recompiling the JSP pages and creating a folder /tmp/embedded-jetty-jsp despite the configuration attribute Development is set to false.

In my lower env   - the folder embedded-jetty-jsp is getting created and we see all the recompiled JSP pages .

in Production env -  the folder embedded-jetty-jsp is getting created and we see ONLY few of the JSP pages are getting recompiled . Due to this we are getting below error on clicking the page in the portal - the page associated to jSP is recompiled in that tmp folder.

We need your help to find the rootcause and fix for this issue. 

Error :

07 Sep 2017 16:26:28,153 [qtp1043351526-50615] ERROR biz.xxxx.xxxx.common.struts.ExceptionInterceptor (intercept:31) - JSPException including path '/pages/theme/xxxx.jsp'. org.apache.tiles.request.render.CannotRenderException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:399) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:238) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:103) at org.apache.tiles.impl.mgmt.CachingTilesContainer.render(CachingTilesContainer.java:126) at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:161) at org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.java:208) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277) at com.opensymphony.xwork2.interceptor.annotations.AnnotationWorkflowInterceptor.intercept(AnnotationWorkflowInterceptor.java:133) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.doIntercept(ConversionErrorInterceptor.java:139) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:133) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:88) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:174) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:171) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.PreBindInterceptor.intercept(PreBindInterceptor.java:19) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.LiteResultInterceptor.intercept(LiteResultInterceptor.java:51) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.FragmentInterceptor.intercept(FragmentInterceptor.java:35) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:246) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.NoCacheInterceptor.intercept(NoCacheInterceptor.java:39) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.SecurityInterceptor.intercept(SecurityInterceptor.java:70) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.ExceptionInterceptor.intercept(ExceptionInterceptor.java:23) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.factory.StrutsActionProxy.execute(StrutsActionProxy.java:54) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564) at org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:81) at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:143) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:64) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.ResponseUrlFilter.onDynamic(ResponseUrlFilter.java:14) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.PerformanceFilter.onDynamic(PerformanceFilter.java:17) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.SecurityContextFilter.onDynamic(SecurityContextFilter.java:18) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:564) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128) at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.request.servlet.ServletUtil.wrapServletException(ServletUtil.java:61) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:125) at org.apache.tiles.request.AbstractViewRequest.dispatch(AbstractViewRequest.java:47) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.request.render.ChainedDelegateRenderer.render(ChainedDelegateRenderer.java:68) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:108) at org.apache.tiles.template.InsertAttributeModel.renderAttribute(InsertAttributeModel.java:188) at org.apache.tiles.template.InsertAttributeModel.execute(InsertAttributeModel.java:132) at org.apache.tiles.jsp.taglib.InsertAttributeTag.doTag(InsertAttributeTag.java:299) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_tiles_005finsertAttribute_005f10(layout_jsp.java:1645) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fotherwise_005f0(layout_jsp.java:1614) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f1(layout_jsp.java:1527) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fwhen_005f0(layout_jsp.java:1010) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f0(layout_jsp.java:915) at org.apache.jsp.pages.common.layout_jsp._jspService(layout_jsp.java:255) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:833) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:203) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:73) at org.apache.tiles.request.servlet.ServletRequest.forward(ServletRequest.java:265) at org.apache.tiles.request.servlet.ServletRequest.doForward(ServletRequest.java:228) at org.apache.tiles.request.AbstractClientRequest.dispatch(AbstractClientRequest.java:57) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:397) ... 85 more Caused by: java.lang.NoClassDefFoundError: org/apache/jsp/tag/web/form_tag at org.apache.jsp.pages.theme.xxxx_jsp._jspx_meth_neu_005fform_005f0(xxxx_jsp.java:378) at org.apache.jsp.pages.theme.xxxx_jsp._jspService(xxxx_jsp.java:301) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.include(Dispatcher.java:124) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:887) at org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:679) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:673) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:123) ... 128 more


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev



--
Jan Bartel <[hidden email]>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev

_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev

_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev



--
Jan Bartel <[hidden email]>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] [jetty-users] JSP pages are recompiled at runtime

Jan Bartel
If you have use the maven jspc plugin, then you should have a web.xml file that contains <servlet> definitions for each jsp page. Is that the case or not? 

Jan

On 14 September 2017 at 10:25, upendar devu <[hidden email]> wrote:
I meant to say removing scratch dir means  removing the below of line of code as mentioned in one my previous emails.Later I started using the tern removal of scratch dir.

context.setAttribute("javax.servlet.context.tempdir", getScratchDir());

The below summary would help you. Please let me know if you find any.

Case 1 :
 Development =false
 context.setAttribute("javax.servlet.context.tempdir", getScratchDir());

Case 1Results: 
1. JSPs are getting recompiled into the specified scratch dir i.e /tmp/embedded-jetty-jsp as this folder has .class files.  
2. Lower envs - All jsps are recompiled and no errors are seen; Example if the application has 100 jsp pages then we seen 100.class files 
3. Production env - Only few recompiled JSP pages are seen in /tmp/embedded-jetty-jsp   Example if the application has 100 jsp pages then we seen 4 .class files  and caused errors - see entire stack trace listed in my first email thread. Struggling to find the root cause why only few jsp pages are recompiled.

Case 2 :
 Development =false
//Removed this line of code 
//context.setAttribute("javax.servlet.context.tempdir", getScratchDir());

Case 2 Results: 
1. Created a directory under /tmp folder  with name as jetty-0.0.0.0-9011-applicatioName-_xx-any-4301518294514062102.dir with 0 files under it. this proved jsp pages are not getting recompiled since no  .class files are found under /tmp
2.  no issues are encountered . Yet to take call to move the changes to prod








On Wed, Sep 13, 2017 at 7:37 PM, Jan Bartel <[hidden email]> wrote:
You're confusing 2 separate but related things:  the javax.servlet.context.tempdir, and the jsp engine scratch dir.  The former is the place where the webapp will be unpacked to if necessary, and the jsp engine scratch dir is the location to which jsps will be compiled.  Jetty tells the jsp engine that the scratch dir to use is the javax.servlet.context.tempdir/jsp.  So if you set javax.servlet.context.tempdir=/tmp/embedded-jetty-jsp the scratchdir will be /tmp/embedded-jetty-jsp/jsp.  If you don't set the javax.servlet.context.tempdir it defaults to java.io.tmpdir, which on *nix systems is "/tmp", so the scratch dir would be /tmp/jsp.


Again, if you are correctly using the jspc maven plugin to generate classes from your jsps, and also populate web.xml with appropriate <servlet>s, then jsp-on-the fly compilation never happens because the JspServlet is never hit.  If you are seeing any on-the-fly compilation at all, then you have not populated web.xml correctly.

Jan


On 14 September 2017 at 09:16, upendar devu <[hidden email]> wrote:
After removing scratch dir I don't see jsps getting recompiled since embded-jetty-jsp dir not found in tmp location and not even in entire system. Conclusion is removing scratch dir helping resolve the recompilation issue. What I wanted to know is when scratch dir is enabled why only few jsps are recompiled that caused io exception and no class def errors ..

On Sep 13, 2017 7:09 PM, "Joakim Erdfelt" <[hidden email]> wrote:
"no recompilation jsps seen"
... doesn't mean its not still happening (just somewhere else on your filesystem).

Enable the debug logging and you'll see that scratchDir still exists, just not configured in a place you expect.
You'll also see events in the debug logs for when it recompiles.


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 3:50 PM, upendar devu <[hidden email]> wrote:
We are using jetty jspc maven plugin since jetty version 8; migration to jetty 9.4.6 team added scratch dir code.however no issues seen in lower env as all jsp pages are recompiled into tmp location. But only few pages are recompiled that caused errors listed in my email thread.now removed scratch dir code and no recompilation jsps seen.we added more logs but couldn't find why few pages are recompiled in prod env. 
Thank you

On Sep 13, 2017 6:43 PM, "Jan Bartel" <[hidden email]> wrote:
The recommended way to deploy for a production environment is to precompile jsps and place <servlet> definitions for them into web.xml. You can use a tool like the jetty-jspc-maven-plugin to do that for you: see https://www.eclipse.org/jetty/documentation/current/jetty-jspc-maven-plugin.html. You could also use an ant task to do the compilation, see https://tomcat.apache.org/tomcat-8.5-doc/jasper-howto.html#Production_Configuration. This way, page accesses are fast as there is no on-the-fly compilation and thus no need for a full jdk on the production machine.

When NOT using precompiled jsps defined as <servlets>, when a jsp page is requested, the jsp engine uses the scratch dir to look for a class matching the jsp. It does so iff development==true or the page is being requested for the first  time. The page will be (re)compiled iff: the class does not exist, or the modification date on the jsp page is more recent than the date on the class file.

As Joakim suggests, you should try and produce more debug logs to determine the difference between your test and production environments. But ideally, you would instead use the proper pre-compilation procedure for your production environment.

Jan


On 14 September 2017 at 07:56, upendar devu <[hidden email]> wrote:
I'm sure that we didn't get any errors removing scratch dir.

On Sep 13, 2017 5:39 PM, "Joakim Erdfelt" <[hidden email]> wrote:
Removing that scratchdir attribute just moves the jsp compilation to system temp (aka java.io.tmpdir)
Its a requirement for JSP, you cannot run without a scratch directory.
In fact, you'll get startup errors if the scratch directory is bad/invalid.

Eg:

The JSP engine is not configured with a scratch dir. \n 
Please add \"jsp.initparams=scratchdir=<dir-name>\" \n 
in the servlets.properties file for this context.

or 

The scratchDir you specified: {0} is unusable.

I believe that to use precompiled JSPs you have to put the precompiled versions into your ServletContextHandler as servlets.

Jan, do you concur?


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 2:18 PM, upendar devu <[hidden email]> wrote:
We removed below line of code then we dont see the folder embedded-jetty-jsp getting created . I believe server using the pre compiled jsp pages as I dont locate the JSPs recompiling.

context.setAttribute("javax.servlet.context.tempdir", getScratchDir());

On Wed, Sep 13, 2017 at 5:16 PM, Joakim Erdfelt <[hidden email]> wrote:
I would have expected each compiled JSP to be added as a Servlet to the ServletContextHandler via the .addServlet() call.


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 2:10 PM, upendar devu <[hidden email]> wrote:
Thanks for quick response.  I dont think we followed the example code you followed but little lines of code might match .

Attached code snippet what we are using.  Please refer the code.

I think below line of code does .
WebAppContext.setBaseResource(new ResourceCollection(validPaths.toArray(new String[0])));.
i.e 
WebAppContext.setBaseResource(new ResourceCollection("src/main/webapp", "src/main/resources", "src/main", "webapp", ".");



On Wed, Sep 13, 2017 at 4:45 PM, Joakim Erdfelt <[hidden email]> wrote:
The fact that you mention /tmp/embedded-jetty-jsp hints that you are using the example code from

Is this true?

If so, can you describe how you are adding your pre-compiled JSPs to the ServletContextHandler?


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 1:24 PM, upendar devu <[hidden email]> wrote:
We recently upgraded from Jetty version 8 to 9.4.6  ; The embedded Jetty server recompiling the JSP pages and creating a folder /tmp/embedded-jetty-jsp despite the configuration attribute Development is set to false.

In my lower env   - the folder embedded-jetty-jsp is getting created and we see all the recompiled JSP pages .

in Production env -  the folder embedded-jetty-jsp is getting created and we see ONLY few of the JSP pages are getting recompiled . Due to this we are getting below error on clicking the page in the portal - the page associated to jSP is recompiled in that tmp folder.

We need your help to find the rootcause and fix for this issue. 

Error :

07 Sep 2017 16:26:28,153 [qtp1043351526-50615] ERROR biz.xxxx.xxxx.common.struts.ExceptionInterceptor (intercept:31) - JSPException including path '/pages/theme/xxxx.jsp'. org.apache.tiles.request.render.CannotRenderException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:399) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:238) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:103) at org.apache.tiles.impl.mgmt.CachingTilesContainer.render(CachingTilesContainer.java:126) at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:161) at org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.java:208) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277) at com.opensymphony.xwork2.interceptor.annotations.AnnotationWorkflowInterceptor.intercept(AnnotationWorkflowInterceptor.java:133) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.doIntercept(ConversionErrorInterceptor.java:139) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:133) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:88) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:174) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:171) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.PreBindInterceptor.intercept(PreBindInterceptor.java:19) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.LiteResultInterceptor.intercept(LiteResultInterceptor.java:51) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.FragmentInterceptor.intercept(FragmentInterceptor.java:35) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:246) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.NoCacheInterceptor.intercept(NoCacheInterceptor.java:39) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.SecurityInterceptor.intercept(SecurityInterceptor.java:70) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.ExceptionInterceptor.intercept(ExceptionInterceptor.java:23) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.factory.StrutsActionProxy.execute(StrutsActionProxy.java:54) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564) at org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:81) at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:143) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:64) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.ResponseUrlFilter.onDynamic(ResponseUrlFilter.java:14) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.PerformanceFilter.onDynamic(PerformanceFilter.java:17) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.SecurityContextFilter.onDynamic(SecurityContextFilter.java:18) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:564) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128) at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.request.servlet.ServletUtil.wrapServletException(ServletUtil.java:61) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:125) at org.apache.tiles.request.AbstractViewRequest.dispatch(AbstractViewRequest.java:47) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.request.render.ChainedDelegateRenderer.render(ChainedDelegateRenderer.java:68) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:108) at org.apache.tiles.template.InsertAttributeModel.renderAttribute(InsertAttributeModel.java:188) at org.apache.tiles.template.InsertAttributeModel.execute(InsertAttributeModel.java:132) at org.apache.tiles.jsp.taglib.InsertAttributeTag.doTag(InsertAttributeTag.java:299) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_tiles_005finsertAttribute_005f10(layout_jsp.java:1645) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fotherwise_005f0(layout_jsp.java:1614) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f1(layout_jsp.java:1527) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fwhen_005f0(layout_jsp.java:1010) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f0(layout_jsp.java:915) at org.apache.jsp.pages.common.layout_jsp._jspService(layout_jsp.java:255) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:833) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:203) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:73) at org.apache.tiles.request.servlet.ServletRequest.forward(ServletRequest.java:265) at org.apache.tiles.request.servlet.ServletRequest.doForward(ServletRequest.java:228) at org.apache.tiles.request.AbstractClientRequest.dispatch(AbstractClientRequest.java:57) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:397) ... 85 more Caused by: java.lang.NoClassDefFoundError: org/apache/jsp/tag/web/form_tag at org.apache.jsp.pages.theme.xxxx_jsp._jspx_meth_neu_005fform_005f0(xxxx_jsp.java:378) at org.apache.jsp.pages.theme.xxxx_jsp._jspService(xxxx_jsp.java:301) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.include(Dispatcher.java:124) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:887) at org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:679) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:673) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:123) ... 128 more


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev



--
Jan Bartel <[hidden email]>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev

_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev

_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev



--
Jan Bartel <[hidden email]>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev



--
Jan Bartel <[hidden email]>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] [jetty-users] JSP pages are recompiled at runtime

upendar devu
Yes that's right

On Sep 14, 2017 6:27 AM, "Jan Bartel" <[hidden email]> wrote:
If you have use the maven jspc plugin, then you should have a web.xml file that contains <servlet> definitions for each jsp page. Is that the case or not? 

Jan

On 14 September 2017 at 10:25, upendar devu <[hidden email]> wrote:
I meant to say removing scratch dir means  removing the below of line of code as mentioned in one my previous emails.Later I started using the tern removal of scratch dir.

context.setAttribute("javax.servlet.context.tempdir", getScratchDir());

The below summary would help you. Please let me know if you find any.

Case 1 :
 Development =false
 context.setAttribute("javax.servlet.context.tempdir", getScratchDir());

Case 1Results: 
1. JSPs are getting recompiled into the specified scratch dir i.e /tmp/embedded-jetty-jsp as this folder has .class files.  
2. Lower envs - All jsps are recompiled and no errors are seen; Example if the application has 100 jsp pages then we seen 100.class files 
3. Production env - Only few recompiled JSP pages are seen in /tmp/embedded-jetty-jsp   Example if the application has 100 jsp pages then we seen 4 .class files  and caused errors - see entire stack trace listed in my first email thread. Struggling to find the root cause why only few jsp pages are recompiled.

Case 2 :
 Development =false
//Removed this line of code 
//context.setAttribute("javax.servlet.context.tempdir", getScratchDir());

Case 2 Results: 
1. Created a directory under /tmp folder  with name as jetty-0.0.0.0-9011-applicatioName-_xx-any-4301518294514062102.dir with 0 files under it. this proved jsp pages are not getting recompiled since no  .class files are found under /tmp
2.  no issues are encountered . Yet to take call to move the changes to prod








On Wed, Sep 13, 2017 at 7:37 PM, Jan Bartel <[hidden email]> wrote:
You're confusing 2 separate but related things:  the javax.servlet.context.tempdir, and the jsp engine scratch dir.  The former is the place where the webapp will be unpacked to if necessary, and the jsp engine scratch dir is the location to which jsps will be compiled.  Jetty tells the jsp engine that the scratch dir to use is the javax.servlet.context.tempdir/jsp.  So if you set javax.servlet.context.tempdir=/tmp/embedded-jetty-jsp the scratchdir will be /tmp/embedded-jetty-jsp/jsp.  If you don't set the javax.servlet.context.tempdir it defaults to java.io.tmpdir, which on *nix systems is "/tmp", so the scratch dir would be /tmp/jsp.


Again, if you are correctly using the jspc maven plugin to generate classes from your jsps, and also populate web.xml with appropriate <servlet>s, then jsp-on-the fly compilation never happens because the JspServlet is never hit.  If you are seeing any on-the-fly compilation at all, then you have not populated web.xml correctly.

Jan


On 14 September 2017 at 09:16, upendar devu <[hidden email]> wrote:
After removing scratch dir I don't see jsps getting recompiled since embded-jetty-jsp dir not found in tmp location and not even in entire system. Conclusion is removing scratch dir helping resolve the recompilation issue. What I wanted to know is when scratch dir is enabled why only few jsps are recompiled that caused io exception and no class def errors ..

On Sep 13, 2017 7:09 PM, "Joakim Erdfelt" <[hidden email]> wrote:
"no recompilation jsps seen"
... doesn't mean its not still happening (just somewhere else on your filesystem).

Enable the debug logging and you'll see that scratchDir still exists, just not configured in a place you expect.
You'll also see events in the debug logs for when it recompiles.


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 3:50 PM, upendar devu <[hidden email]> wrote:
We are using jetty jspc maven plugin since jetty version 8; migration to jetty 9.4.6 team added scratch dir code.however no issues seen in lower env as all jsp pages are recompiled into tmp location. But only few pages are recompiled that caused errors listed in my email thread.now removed scratch dir code and no recompilation jsps seen.we added more logs but couldn't find why few pages are recompiled in prod env. 
Thank you

On Sep 13, 2017 6:43 PM, "Jan Bartel" <[hidden email]> wrote:
The recommended way to deploy for a production environment is to precompile jsps and place <servlet> definitions for them into web.xml. You can use a tool like the jetty-jspc-maven-plugin to do that for you: see https://www.eclipse.org/jetty/documentation/current/jetty-jspc-maven-plugin.html. You could also use an ant task to do the compilation, see https://tomcat.apache.org/tomcat-8.5-doc/jasper-howto.html#Production_Configuration. This way, page accesses are fast as there is no on-the-fly compilation and thus no need for a full jdk on the production machine.

When NOT using precompiled jsps defined as <servlets>, when a jsp page is requested, the jsp engine uses the scratch dir to look for a class matching the jsp. It does so iff development==true or the page is being requested for the first  time. The page will be (re)compiled iff: the class does not exist, or the modification date on the jsp page is more recent than the date on the class file.

As Joakim suggests, you should try and produce more debug logs to determine the difference between your test and production environments. But ideally, you would instead use the proper pre-compilation procedure for your production environment.

Jan


On 14 September 2017 at 07:56, upendar devu <[hidden email]> wrote:
I'm sure that we didn't get any errors removing scratch dir.

On Sep 13, 2017 5:39 PM, "Joakim Erdfelt" <[hidden email]> wrote:
Removing that scratchdir attribute just moves the jsp compilation to system temp (aka java.io.tmpdir)
Its a requirement for JSP, you cannot run without a scratch directory.
In fact, you'll get startup errors if the scratch directory is bad/invalid.

Eg:

The JSP engine is not configured with a scratch dir. \n 
Please add \"jsp.initparams=scratchdir=<dir-name>\" \n 
in the servlets.properties file for this context.

or 

The scratchDir you specified: {0} is unusable.

I believe that to use precompiled JSPs you have to put the precompiled versions into your ServletContextHandler as servlets.

Jan, do you concur?


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 2:18 PM, upendar devu <[hidden email]> wrote:
We removed below line of code then we dont see the folder embedded-jetty-jsp getting created . I believe server using the pre compiled jsp pages as I dont locate the JSPs recompiling.

context.setAttribute("javax.servlet.context.tempdir", getScratchDir());

On Wed, Sep 13, 2017 at 5:16 PM, Joakim Erdfelt <[hidden email]> wrote:
I would have expected each compiled JSP to be added as a Servlet to the ServletContextHandler via the .addServlet() call.


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 2:10 PM, upendar devu <[hidden email]> wrote:
Thanks for quick response.  I dont think we followed the example code you followed but little lines of code might match .

Attached code snippet what we are using.  Please refer the code.

I think below line of code does .
WebAppContext.setBaseResource(new ResourceCollection(validPaths.toArray(new String[0])));.
i.e 
WebAppContext.setBaseResource(new ResourceCollection("src/main/webapp", "src/main/resources", "src/main", "webapp", ".");



On Wed, Sep 13, 2017 at 4:45 PM, Joakim Erdfelt <[hidden email]> wrote:
The fact that you mention /tmp/embedded-jetty-jsp hints that you are using the example code from

Is this true?

If so, can you describe how you are adding your pre-compiled JSPs to the ServletContextHandler?


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 1:24 PM, upendar devu <[hidden email]> wrote:
We recently upgraded from Jetty version 8 to 9.4.6  ; The embedded Jetty server recompiling the JSP pages and creating a folder /tmp/embedded-jetty-jsp despite the configuration attribute Development is set to false.

In my lower env   - the folder embedded-jetty-jsp is getting created and we see all the recompiled JSP pages .

in Production env -  the folder embedded-jetty-jsp is getting created and we see ONLY few of the JSP pages are getting recompiled . Due to this we are getting below error on clicking the page in the portal - the page associated to jSP is recompiled in that tmp folder.

We need your help to find the rootcause and fix for this issue. 

Error :

07 Sep 2017 16:26:28,153 [qtp1043351526-50615] ERROR biz.xxxx.xxxx.common.struts.ExceptionInterceptor (intercept:31) - JSPException including path '/pages/theme/xxxx.jsp'. org.apache.tiles.request.render.CannotRenderException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:399) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:238) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:103) at org.apache.tiles.impl.mgmt.CachingTilesContainer.render(CachingTilesContainer.java:126) at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:161) at org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.java:208) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277) at com.opensymphony.xwork2.interceptor.annotations.AnnotationWorkflowInterceptor.intercept(AnnotationWorkflowInterceptor.java:133) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.doIntercept(ConversionErrorInterceptor.java:139) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:133) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:88) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:174) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:171) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.PreBindInterceptor.intercept(PreBindInterceptor.java:19) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.LiteResultInterceptor.intercept(LiteResultInterceptor.java:51) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.FragmentInterceptor.intercept(FragmentInterceptor.java:35) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:246) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.NoCacheInterceptor.intercept(NoCacheInterceptor.java:39) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.SecurityInterceptor.intercept(SecurityInterceptor.java:70) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.ExceptionInterceptor.intercept(ExceptionInterceptor.java:23) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.factory.StrutsActionProxy.execute(StrutsActionProxy.java:54) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564) at org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:81) at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:143) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:64) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.ResponseUrlFilter.onDynamic(ResponseUrlFilter.java:14) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.PerformanceFilter.onDynamic(PerformanceFilter.java:17) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.SecurityContextFilter.onDynamic(SecurityContextFilter.java:18) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:564) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128) at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.request.servlet.ServletUtil.wrapServletException(ServletUtil.java:61) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:125) at org.apache.tiles.request.AbstractViewRequest.dispatch(AbstractViewRequest.java:47) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.request.render.ChainedDelegateRenderer.render(ChainedDelegateRenderer.java:68) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:108) at org.apache.tiles.template.InsertAttributeModel.renderAttribute(InsertAttributeModel.java:188) at org.apache.tiles.template.InsertAttributeModel.execute(InsertAttributeModel.java:132) at org.apache.tiles.jsp.taglib.InsertAttributeTag.doTag(InsertAttributeTag.java:299) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_tiles_005finsertAttribute_005f10(layout_jsp.java:1645) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fotherwise_005f0(layout_jsp.java:1614) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f1(layout_jsp.java:1527) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fwhen_005f0(layout_jsp.java:1010) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f0(layout_jsp.java:915) at org.apache.jsp.pages.common.layout_jsp._jspService(layout_jsp.java:255) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:833) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:203) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:73) at org.apache.tiles.request.servlet.ServletRequest.forward(ServletRequest.java:265) at org.apache.tiles.request.servlet.ServletRequest.doForward(ServletRequest.java:228) at org.apache.tiles.request.AbstractClientRequest.dispatch(AbstractClientRequest.java:57) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:397) ... 85 more Caused by: java.lang.NoClassDefFoundError: org/apache/jsp/tag/web/form_tag at org.apache.jsp.pages.theme.xxxx_jsp._jspx_meth_neu_005fform_005f0(xxxx_jsp.java:378) at org.apache.jsp.pages.theme.xxxx_jsp._jspService(xxxx_jsp.java:301) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.include(Dispatcher.java:124) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:887) at org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:679) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:673) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:123) ... 128 more


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev



--
Jan Bartel <[hidden email]>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev

_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev

_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev



--
Jan Bartel <[hidden email]>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev



--
Jan Bartel <[hidden email]>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev

_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] [jetty-users] JSP pages are recompiled at runtime

upendar devu
In reply to this post by Jan Bartel
We are using maven jspc plugin. but  we are not using web.xml file instead we have jetty-web.xml file with below content.


<?xml version="1.0"  encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">

<Configure class="org.eclipse.jetty.webapp.WebAppContext">
    <Get name="sessionHandler">
        <Set name="secureRequestOnly" type="boolean">true</Set>
            <Set name="httpOnly" type="boolean">true</Set>
        </Get>
</Configure>



[DEBUG] Goal:          org.eclipse.jetty:jetty-jspc-maven-plugin:9.4.5.v20170502:jspc (jspc)
[DEBUG] Style:         Regular
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <classesDirectory default-value="${project.build.outputDirectory}"/>
  <generatedClasses default-value="${project.build.outputDirectory}"/>
  <includes default-value="**/*.jsp, **/*.jspx"/>
  <keepSources default-value="false"/>
  <mergeFragment default-value="true"/>
  <pluginArtifacts default-value="${plugin.artifacts}"/>
  <project default-value="${project}"/>
  <projectArtifacts default-value="${project.artifacts}"/>
  <scanAllDirectories default-value="true"/>
  <tldJarNamePatterns default-value=".*taglibs[^/]*.jar|.*jstl[^/]*.jar$"/>
  <useProvidedScope default-value="false"/>
  <webAppSourceDirectory default-value="${basedir}/src/main/webapp"/>
  <webXml default-value="${basedir}/src/main/webapp/WEB-INF/web.xml"/>
  <webXmlFragment default-value="${basedir}/target/webfrag.xml"/>
</configuration>


On Thu, Sep 14, 2017 at 6:27 AM, Jan Bartel <[hidden email]> wrote:
If you have use the maven jspc plugin, then you should have a web.xml file that contains <servlet> definitions for each jsp page. Is that the case or not? 

Jan

On 14 September 2017 at 10:25, upendar devu <[hidden email]> wrote:
I meant to say removing scratch dir means  removing the below of line of code as mentioned in one my previous emails.Later I started using the tern removal of scratch dir.

context.setAttribute("javax.servlet.context.tempdir", getScratchDir());

The below summary would help you. Please let me know if you find any.

Case 1 :
 Development =false
 context.setAttribute("javax.servlet.context.tempdir", getScratchDir());

Case 1Results: 
1. JSPs are getting recompiled into the specified scratch dir i.e /tmp/embedded-jetty-jsp as this folder has .class files.  
2. Lower envs - All jsps are recompiled and no errors are seen; Example if the application has 100 jsp pages then we seen 100.class files 
3. Production env - Only few recompiled JSP pages are seen in /tmp/embedded-jetty-jsp   Example if the application has 100 jsp pages then we seen 4 .class files  and caused errors - see entire stack trace listed in my first email thread. Struggling to find the root cause why only few jsp pages are recompiled.

Case 2 :
 Development =false
//Removed this line of code 
//context.setAttribute("javax.servlet.context.tempdir", getScratchDir());

Case 2 Results: 
1. Created a directory under /tmp folder  with name as jetty-0.0.0.0-9011-applicatioName-_xx-any-4301518294514062102.dir with 0 files under it. this proved jsp pages are not getting recompiled since no  .class files are found under /tmp
2.  no issues are encountered . Yet to take call to move the changes to prod








On Wed, Sep 13, 2017 at 7:37 PM, Jan Bartel <[hidden email]> wrote:
You're confusing 2 separate but related things:  the javax.servlet.context.tempdir, and the jsp engine scratch dir.  The former is the place where the webapp will be unpacked to if necessary, and the jsp engine scratch dir is the location to which jsps will be compiled.  Jetty tells the jsp engine that the scratch dir to use is the javax.servlet.context.tempdir/jsp.  So if you set javax.servlet.context.tempdir=/tmp/embedded-jetty-jsp the scratchdir will be /tmp/embedded-jetty-jsp/jsp.  If you don't set the javax.servlet.context.tempdir it defaults to java.io.tmpdir, which on *nix systems is "/tmp", so the scratch dir would be /tmp/jsp.


Again, if you are correctly using the jspc maven plugin to generate classes from your jsps, and also populate web.xml with appropriate <servlet>s, then jsp-on-the fly compilation never happens because the JspServlet is never hit.  If you are seeing any on-the-fly compilation at all, then you have not populated web.xml correctly.

Jan


On 14 September 2017 at 09:16, upendar devu <[hidden email]> wrote:
After removing scratch dir I don't see jsps getting recompiled since embded-jetty-jsp dir not found in tmp location and not even in entire system. Conclusion is removing scratch dir helping resolve the recompilation issue. What I wanted to know is when scratch dir is enabled why only few jsps are recompiled that caused io exception and no class def errors ..

On Sep 13, 2017 7:09 PM, "Joakim Erdfelt" <[hidden email]> wrote:
"no recompilation jsps seen"
... doesn't mean its not still happening (just somewhere else on your filesystem).

Enable the debug logging and you'll see that scratchDir still exists, just not configured in a place you expect.
You'll also see events in the debug logs for when it recompiles.


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 3:50 PM, upendar devu <[hidden email]> wrote:
We are using jetty jspc maven plugin since jetty version 8; migration to jetty 9.4.6 team added scratch dir code.however no issues seen in lower env as all jsp pages are recompiled into tmp location. But only few pages are recompiled that caused errors listed in my email thread.now removed scratch dir code and no recompilation jsps seen.we added more logs but couldn't find why few pages are recompiled in prod env. 
Thank you

On Sep 13, 2017 6:43 PM, "Jan Bartel" <[hidden email]> wrote:
The recommended way to deploy for a production environment is to precompile jsps and place <servlet> definitions for them into web.xml. You can use a tool like the jetty-jspc-maven-plugin to do that for you: see https://www.eclipse.org/jetty/documentation/current/jetty-jspc-maven-plugin.html. You could also use an ant task to do the compilation, see https://tomcat.apache.org/tomcat-8.5-doc/jasper-howto.html#Production_Configuration. This way, page accesses are fast as there is no on-the-fly compilation and thus no need for a full jdk on the production machine.

When NOT using precompiled jsps defined as <servlets>, when a jsp page is requested, the jsp engine uses the scratch dir to look for a class matching the jsp. It does so iff development==true or the page is being requested for the first  time. The page will be (re)compiled iff: the class does not exist, or the modification date on the jsp page is more recent than the date on the class file.

As Joakim suggests, you should try and produce more debug logs to determine the difference between your test and production environments. But ideally, you would instead use the proper pre-compilation procedure for your production environment.

Jan


On 14 September 2017 at 07:56, upendar devu <[hidden email]> wrote:
I'm sure that we didn't get any errors removing scratch dir.

On Sep 13, 2017 5:39 PM, "Joakim Erdfelt" <[hidden email]> wrote:
Removing that scratchdir attribute just moves the jsp compilation to system temp (aka java.io.tmpdir)
Its a requirement for JSP, you cannot run without a scratch directory.
In fact, you'll get startup errors if the scratch directory is bad/invalid.

Eg:

The JSP engine is not configured with a scratch dir. \n 
Please add \"jsp.initparams=scratchdir=<dir-name>\" \n 
in the servlets.properties file for this context.

or 

The scratchDir you specified: {0} is unusable.

I believe that to use precompiled JSPs you have to put the precompiled versions into your ServletContextHandler as servlets.

Jan, do you concur?


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 2:18 PM, upendar devu <[hidden email]> wrote:
We removed below line of code then we dont see the folder embedded-jetty-jsp getting created . I believe server using the pre compiled jsp pages as I dont locate the JSPs recompiling.

context.setAttribute("javax.servlet.context.tempdir", getScratchDir());

On Wed, Sep 13, 2017 at 5:16 PM, Joakim Erdfelt <[hidden email]> wrote:
I would have expected each compiled JSP to be added as a Servlet to the ServletContextHandler via the .addServlet() call.


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 2:10 PM, upendar devu <[hidden email]> wrote:
Thanks for quick response.  I dont think we followed the example code you followed but little lines of code might match .

Attached code snippet what we are using.  Please refer the code.

I think below line of code does .
WebAppContext.setBaseResource(new ResourceCollection(validPaths.toArray(new String[0])));.
i.e 
WebAppContext.setBaseResource(new ResourceCollection("src/main/webapp", "src/main/resources", "src/main", "webapp", ".");



On Wed, Sep 13, 2017 at 4:45 PM, Joakim Erdfelt <[hidden email]> wrote:
The fact that you mention /tmp/embedded-jetty-jsp hints that you are using the example code from

Is this true?

If so, can you describe how you are adding your pre-compiled JSPs to the ServletContextHandler?


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 1:24 PM, upendar devu <[hidden email]> wrote:
We recently upgraded from Jetty version 8 to 9.4.6  ; The embedded Jetty server recompiling the JSP pages and creating a folder /tmp/embedded-jetty-jsp despite the configuration attribute Development is set to false.

In my lower env   - the folder embedded-jetty-jsp is getting created and we see all the recompiled JSP pages .

in Production env -  the folder embedded-jetty-jsp is getting created and we see ONLY few of the JSP pages are getting recompiled . Due to this we are getting below error on clicking the page in the portal - the page associated to jSP is recompiled in that tmp folder.

We need your help to find the rootcause and fix for this issue. 

Error :

07 Sep 2017 16:26:28,153 [qtp1043351526-50615] ERROR biz.xxxx.xxxx.common.struts.ExceptionInterceptor (intercept:31) - JSPException including path '/pages/theme/xxxx.jsp'. org.apache.tiles.request.render.CannotRenderException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:399) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:238) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:103) at org.apache.tiles.impl.mgmt.CachingTilesContainer.render(CachingTilesContainer.java:126) at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:161) at org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.java:208) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277) at com.opensymphony.xwork2.interceptor.annotations.AnnotationWorkflowInterceptor.intercept(AnnotationWorkflowInterceptor.java:133) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.doIntercept(ConversionErrorInterceptor.java:139) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:133) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:88) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:174) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:171) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.PreBindInterceptor.intercept(PreBindInterceptor.java:19) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.LiteResultInterceptor.intercept(LiteResultInterceptor.java:51) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.FragmentInterceptor.intercept(FragmentInterceptor.java:35) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:246) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.NoCacheInterceptor.intercept(NoCacheInterceptor.java:39) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.SecurityInterceptor.intercept(SecurityInterceptor.java:70) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.ExceptionInterceptor.intercept(ExceptionInterceptor.java:23) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.factory.StrutsActionProxy.execute(StrutsActionProxy.java:54) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564) at org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:81) at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:143) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:64) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.ResponseUrlFilter.onDynamic(ResponseUrlFilter.java:14) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.PerformanceFilter.onDynamic(PerformanceFilter.java:17) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.SecurityContextFilter.onDynamic(SecurityContextFilter.java:18) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:564) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128) at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.request.servlet.ServletUtil.wrapServletException(ServletUtil.java:61) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:125) at org.apache.tiles.request.AbstractViewRequest.dispatch(AbstractViewRequest.java:47) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.request.render.ChainedDelegateRenderer.render(ChainedDelegateRenderer.java:68) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:108) at org.apache.tiles.template.InsertAttributeModel.renderAttribute(InsertAttributeModel.java:188) at org.apache.tiles.template.InsertAttributeModel.execute(InsertAttributeModel.java:132) at org.apache.tiles.jsp.taglib.InsertAttributeTag.doTag(InsertAttributeTag.java:299) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_tiles_005finsertAttribute_005f10(layout_jsp.java:1645) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fotherwise_005f0(layout_jsp.java:1614) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f1(layout_jsp.java:1527) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fwhen_005f0(layout_jsp.java:1010) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f0(layout_jsp.java:915) at org.apache.jsp.pages.common.layout_jsp._jspService(layout_jsp.java:255) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:833) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:203) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:73) at org.apache.tiles.request.servlet.ServletRequest.forward(ServletRequest.java:265) at org.apache.tiles.request.servlet.ServletRequest.doForward(ServletRequest.java:228) at org.apache.tiles.request.AbstractClientRequest.dispatch(AbstractClientRequest.java:57) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:397) ... 85 more Caused by: java.lang.NoClassDefFoundError: org/apache/jsp/tag/web/form_tag at org.apache.jsp.pages.theme.xxxx_jsp._jspx_meth_neu_005fform_005f0(xxxx_jsp.java:378) at org.apache.jsp.pages.theme.xxxx_jsp._jspService(xxxx_jsp.java:301) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.include(Dispatcher.java:124) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:887) at org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:679) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:673) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:123) ... 128 more


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev



--
Jan Bartel <[hidden email]>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev

_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev

_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev



--
Jan Bartel <[hidden email]>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev



--
Jan Bartel <[hidden email]>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] [jetty-users] JSP pages are recompiled at runtime

Jan Bartel
Ok, you've got the jetty-jspc-maven-plugin configured.  You have "mergeFragment=true" that means it will merge your src/main/webapp/WEB-INF/web.xml with the generated <servlet>s, into the file target/web.xml.  Unless you configure the maven-war-plugin to use that as the web.xml file, you're not using the merged file. You need to configure the maven-war-plugin like this:

       <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-war-plugin</artifactId>
          <configuration>
            <webXml>${basedir}/target/web.xml</webXml>
          </configuration>
        </plugin>

Jan


On 15 September 2017 at 12:24, upendar devu <[hidden email]> wrote:
We are using maven jspc plugin. but  we are not using web.xml file instead we have jetty-web.xml file with below content.


<?xml version="1.0"  encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">

<Configure class="org.eclipse.jetty.webapp.WebAppContext">
    <Get name="sessionHandler">
        <Set name="secureRequestOnly" type="boolean">true</Set>
            <Set name="httpOnly" type="boolean">true</Set>
        </Get>
</Configure>



[DEBUG] Goal:          org.eclipse.jetty:jetty-jspc-maven-plugin:9.4.5.v20170502:jspc (jspc)
[DEBUG] Style:         Regular
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <classesDirectory default-value="${project.build.outputDirectory}"/>
  <generatedClasses default-value="${project.build.outputDirectory}"/>
  <includes default-value="**/*.jsp, **/*.jspx"/>
  <keepSources default-value="false"/>
  <mergeFragment default-value="true"/>
  <pluginArtifacts default-value="${plugin.artifacts}"/>
  <project default-value="${project}"/>
  <projectArtifacts default-value="${project.artifacts}"/>
  <scanAllDirectories default-value="true"/>
  <tldJarNamePatterns default-value=".*taglibs[^/]*.jar|.*jstl[^/]*.jar$"/>
  <useProvidedScope default-value="false"/>
  <webAppSourceDirectory default-value="${basedir}/src/main/webapp"/>
  <webXml default-value="${basedir}/src/main/webapp/WEB-INF/web.xml"/>
  <webXmlFragment default-value="${basedir}/target/webfrag.xml"/>
</configuration>


On Thu, Sep 14, 2017 at 6:27 AM, Jan Bartel <[hidden email]> wrote:
If you have use the maven jspc plugin, then you should have a web.xml file that contains <servlet> definitions for each jsp page. Is that the case or not? 

Jan

On 14 September 2017 at 10:25, upendar devu <[hidden email]> wrote:
I meant to say removing scratch dir means  removing the below of line of code as mentioned in one my previous emails.Later I started using the tern removal of scratch dir.

context.setAttribute("javax.servlet.context.tempdir", getScratchDir());

The below summary would help you. Please let me know if you find any.

Case 1 :
 Development =false
 context.setAttribute("javax.servlet.context.tempdir", getScratchDir());

Case 1Results: 
1. JSPs are getting recompiled into the specified scratch dir i.e /tmp/embedded-jetty-jsp as this folder has .class files.  
2. Lower envs - All jsps are recompiled and no errors are seen; Example if the application has 100 jsp pages then we seen 100.class files 
3. Production env - Only few recompiled JSP pages are seen in /tmp/embedded-jetty-jsp   Example if the application has 100 jsp pages then we seen 4 .class files  and caused errors - see entire stack trace listed in my first email thread. Struggling to find the root cause why only few jsp pages are recompiled.

Case 2 :
 Development =false
//Removed this line of code 
//context.setAttribute("javax.servlet.context.tempdir", getScratchDir());

Case 2 Results: 
1. Created a directory under /tmp folder  with name as jetty-0.0.0.0-9011-applicatioName-_xx-any-4301518294514062102.dir with 0 files under it. this proved jsp pages are not getting recompiled since no  .class files are found under /tmp
2.  no issues are encountered . Yet to take call to move the changes to prod








On Wed, Sep 13, 2017 at 7:37 PM, Jan Bartel <[hidden email]> wrote:
You're confusing 2 separate but related things:  the javax.servlet.context.tempdir, and the jsp engine scratch dir.  The former is the place where the webapp will be unpacked to if necessary, and the jsp engine scratch dir is the location to which jsps will be compiled.  Jetty tells the jsp engine that the scratch dir to use is the javax.servlet.context.tempdir/jsp.  So if you set javax.servlet.context.tempdir=/tmp/embedded-jetty-jsp the scratchdir will be /tmp/embedded-jetty-jsp/jsp.  If you don't set the javax.servlet.context.tempdir it defaults to java.io.tmpdir, which on *nix systems is "/tmp", so the scratch dir would be /tmp/jsp.


Again, if you are correctly using the jspc maven plugin to generate classes from your jsps, and also populate web.xml with appropriate <servlet>s, then jsp-on-the fly compilation never happens because the JspServlet is never hit.  If you are seeing any on-the-fly compilation at all, then you have not populated web.xml correctly.

Jan


On 14 September 2017 at 09:16, upendar devu <[hidden email]> wrote:
After removing scratch dir I don't see jsps getting recompiled since embded-jetty-jsp dir not found in tmp location and not even in entire system. Conclusion is removing scratch dir helping resolve the recompilation issue. What I wanted to know is when scratch dir is enabled why only few jsps are recompiled that caused io exception and no class def errors ..

On Sep 13, 2017 7:09 PM, "Joakim Erdfelt" <[hidden email]> wrote:
"no recompilation jsps seen"
... doesn't mean its not still happening (just somewhere else on your filesystem).

Enable the debug logging and you'll see that scratchDir still exists, just not configured in a place you expect.
You'll also see events in the debug logs for when it recompiles.


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 3:50 PM, upendar devu <[hidden email]> wrote:
We are using jetty jspc maven plugin since jetty version 8; migration to jetty 9.4.6 team added scratch dir code.however no issues seen in lower env as all jsp pages are recompiled into tmp location. But only few pages are recompiled that caused errors listed in my email thread.now removed scratch dir code and no recompilation jsps seen.we added more logs but couldn't find why few pages are recompiled in prod env. 
Thank you

On Sep 13, 2017 6:43 PM, "Jan Bartel" <[hidden email]> wrote:
The recommended way to deploy for a production environment is to precompile jsps and place <servlet> definitions for them into web.xml. You can use a tool like the jetty-jspc-maven-plugin to do that for you: see https://www.eclipse.org/jetty/documentation/current/jetty-jspc-maven-plugin.html. You could also use an ant task to do the compilation, see https://tomcat.apache.org/tomcat-8.5-doc/jasper-howto.html#Production_Configuration. This way, page accesses are fast as there is no on-the-fly compilation and thus no need for a full jdk on the production machine.

When NOT using precompiled jsps defined as <servlets>, when a jsp page is requested, the jsp engine uses the scratch dir to look for a class matching the jsp. It does so iff development==true or the page is being requested for the first  time. The page will be (re)compiled iff: the class does not exist, or the modification date on the jsp page is more recent than the date on the class file.

As Joakim suggests, you should try and produce more debug logs to determine the difference between your test and production environments. But ideally, you would instead use the proper pre-compilation procedure for your production environment.

Jan


On 14 September 2017 at 07:56, upendar devu <[hidden email]> wrote:
I'm sure that we didn't get any errors removing scratch dir.

On Sep 13, 2017 5:39 PM, "Joakim Erdfelt" <[hidden email]> wrote:
Removing that scratchdir attribute just moves the jsp compilation to system temp (aka java.io.tmpdir)
Its a requirement for JSP, you cannot run without a scratch directory.
In fact, you'll get startup errors if the scratch directory is bad/invalid.

Eg:

The JSP engine is not configured with a scratch dir. \n 
Please add \"jsp.initparams=scratchdir=<dir-name>\" \n 
in the servlets.properties file for this context.

or 

The scratchDir you specified: {0} is unusable.

I believe that to use precompiled JSPs you have to put the precompiled versions into your ServletContextHandler as servlets.

Jan, do you concur?


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 2:18 PM, upendar devu <[hidden email]> wrote:
We removed below line of code then we dont see the folder embedded-jetty-jsp getting created . I believe server using the pre compiled jsp pages as I dont locate the JSPs recompiling.

context.setAttribute("javax.servlet.context.tempdir", getScratchDir());

On Wed, Sep 13, 2017 at 5:16 PM, Joakim Erdfelt <[hidden email]> wrote:
I would have expected each compiled JSP to be added as a Servlet to the ServletContextHandler via the .addServlet() call.


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 2:10 PM, upendar devu <[hidden email]> wrote:
Thanks for quick response.  I dont think we followed the example code you followed but little lines of code might match .

Attached code snippet what we are using.  Please refer the code.

I think below line of code does .
WebAppContext.setBaseResource(new ResourceCollection(validPaths.toArray(new String[0])));.
i.e 
WebAppContext.setBaseResource(new ResourceCollection("src/main/webapp", "src/main/resources", "src/main", "webapp", ".");



On Wed, Sep 13, 2017 at 4:45 PM, Joakim Erdfelt <[hidden email]> wrote:
The fact that you mention /tmp/embedded-jetty-jsp hints that you are using the example code from

Is this true?

If so, can you describe how you are adding your pre-compiled JSPs to the ServletContextHandler?


Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 1:24 PM, upendar devu <[hidden email]> wrote:
We recently upgraded from Jetty version 8 to 9.4.6  ; The embedded Jetty server recompiling the JSP pages and creating a folder /tmp/embedded-jetty-jsp despite the configuration attribute Development is set to false.

In my lower env   - the folder embedded-jetty-jsp is getting created and we see all the recompiled JSP pages .

in Production env -  the folder embedded-jetty-jsp is getting created and we see ONLY few of the JSP pages are getting recompiled . Due to this we are getting below error on clicking the page in the portal - the page associated to jSP is recompiled in that tmp folder.

We need your help to find the rootcause and fix for this issue. 

Error :

07 Sep 2017 16:26:28,153 [qtp1043351526-50615] ERROR biz.xxxx.xxxx.common.struts.ExceptionInterceptor (intercept:31) - JSPException including path '/pages/theme/xxxx.jsp'. org.apache.tiles.request.render.CannotRenderException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:399) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:238) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:103) at org.apache.tiles.impl.mgmt.CachingTilesContainer.render(CachingTilesContainer.java:126) at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:161) at org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.java:208) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277) at com.opensymphony.xwork2.interceptor.annotations.AnnotationWorkflowInterceptor.intercept(AnnotationWorkflowInterceptor.java:133) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.doIntercept(ConversionErrorInterceptor.java:139) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:133) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:88) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:174) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:171) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.PreBindInterceptor.intercept(PreBindInterceptor.java:19) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.LiteResultInterceptor.intercept(LiteResultInterceptor.java:51) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.FragmentInterceptor.intercept(FragmentInterceptor.java:35) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:246) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.NoCacheInterceptor.intercept(NoCacheInterceptor.java:39) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.SecurityInterceptor.intercept(SecurityInterceptor.java:70) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.ExceptionInterceptor.intercept(ExceptionInterceptor.java:23) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.factory.StrutsActionProxy.execute(StrutsActionProxy.java:54) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564) at org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:81) at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:143) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:64) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.ResponseUrlFilter.onDynamic(ResponseUrlFilter.java:14) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.PerformanceFilter.onDynamic(PerformanceFilter.java:17) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.SecurityContextFilter.onDynamic(SecurityContextFilter.java:18) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:564) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128) at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.request.servlet.ServletUtil.wrapServletException(ServletUtil.java:61) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:125) at org.apache.tiles.request.AbstractViewRequest.dispatch(AbstractViewRequest.java:47) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.request.render.ChainedDelegateRenderer.render(ChainedDelegateRenderer.java:68) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:108) at org.apache.tiles.template.InsertAttributeModel.renderAttribute(InsertAttributeModel.java:188) at org.apache.tiles.template.InsertAttributeModel.execute(InsertAttributeModel.java:132) at org.apache.tiles.jsp.taglib.InsertAttributeTag.doTag(InsertAttributeTag.java:299) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_tiles_005finsertAttribute_005f10(layout_jsp.java:1645) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fotherwise_005f0(layout_jsp.java:1614) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f1(layout_jsp.java:1527) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fwhen_005f0(layout_jsp.java:1010) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f0(layout_jsp.java:915) at org.apache.jsp.pages.common.layout_jsp._jspService(layout_jsp.java:255) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:833) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:203) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:73) at org.apache.tiles.request.servlet.ServletRequest.forward(ServletRequest.java:265) at org.apache.tiles.request.servlet.ServletRequest.doForward(ServletRequest.java:228) at org.apache.tiles.request.AbstractClientRequest.dispatch(AbstractClientRequest.java:57) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:397) ... 85 more Caused by: java.lang.NoClassDefFoundError: org/apache/jsp/tag/web/form_tag at org.apache.jsp.pages.theme.xxxx_jsp._jspx_meth_neu_005fform_005f0(xxxx_jsp.java:378) at org.apache.jsp.pages.theme.xxxx_jsp._jspService(xxxx_jsp.java:301) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.include(Dispatcher.java:124) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:887) at org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:679) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:673) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:123) ... 128 more


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev



--
Jan Bartel <[hidden email]>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev

_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev

_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev



--
Jan Bartel <[hidden email]>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev



--
Jan Bartel <[hidden email]>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev



--
Jan Bartel <[hidden email]>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] [jetty-users] JSP pages are recompiled at runtime

Joakim Erdfelt-8
In reply to this post by Joakim Erdfelt-8
The embedded-jetty-jsp example project uses ServletContextHandler, not WebAppContext.
No WEB-INF/web.xml is in use that way.

Joakim Erdfelt / [hidden email]

On Wed, Sep 13, 2017 at 1:24 PM, upendar devu <[hidden email]> wrote:
We recently upgraded from Jetty version 8 to 9.4.6  ; The embedded Jetty server recompiling the JSP pages and creating a folder /tmp/embedded-jetty-jsp despite the configuration attribute Development is set to false.

In my lower env   - the folder embedded-jetty-jsp is getting created and we see all the recompiled JSP pages .

in Production env -  the folder embedded-jetty-jsp is getting created and we see ONLY few of the JSP pages are getting recompiled . Due to this we are getting below error on clicking the page in the portal - the page associated to jSP is recompiled in that tmp folder.

We need your help to find the rootcause and fix for this issue. 

Error :

07 Sep 2017 16:26:28,153 [qtp1043351526-50615] ERROR biz.xxxx.xxxx.common.struts.ExceptionInterceptor (intercept:31) - JSPException including path '/pages/theme/xxxx.jsp'. org.apache.tiles.request.render.CannotRenderException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:399) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:238) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:103) at org.apache.tiles.impl.mgmt.CachingTilesContainer.render(CachingTilesContainer.java:126) at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:161) at org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.java:208) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277) at com.opensymphony.xwork2.interceptor.annotations.AnnotationWorkflowInterceptor.intercept(AnnotationWorkflowInterceptor.java:133) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.doIntercept(ConversionErrorInterceptor.java:139) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:133) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:88) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:174) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:171) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.PreBindInterceptor.intercept(PreBindInterceptor.java:19) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.LiteResultInterceptor.intercept(LiteResultInterceptor.java:51) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.FragmentInterceptor.intercept(FragmentInterceptor.java:35) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:246) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.NoCacheInterceptor.intercept(NoCacheInterceptor.java:39) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.core.web.interceptor.SecurityInterceptor.intercept(SecurityInterceptor.java:70) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at biz.xxxx.xxxx.common.struts.ExceptionInterceptor.intercept(ExceptionInterceptor.java:23) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:247) at org.apache.struts2.factory.StrutsActionProxy.execute(StrutsActionProxy.java:54) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564) at org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:81) at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:143) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:64) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.ResponseUrlFilter.onDynamic(ResponseUrlFilter.java:14) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.PerformanceFilter.onDynamic(PerformanceFilter.java:17) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at biz.xxxx.xxxx.common.filter.BaseFilter$WrappedFilterChain.doFilter(BaseFilter.java:108) at biz.xxxx.xxxx.common.filter.SecurityContextFilter.onDynamic(SecurityContextFilter.java:18) at biz.xxxx.xxxx.common.filter.BaseFilter.doFilter(BaseFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:564) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128) at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException: JSPException including path '/pages/theme/xxxx.jsp'. at org.apache.tiles.request.servlet.ServletUtil.wrapServletException(ServletUtil.java:61) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:125) at org.apache.tiles.request.AbstractViewRequest.dispatch(AbstractViewRequest.java:47) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.request.render.ChainedDelegateRenderer.render(ChainedDelegateRenderer.java:68) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.TilesContainerWrapper.render(TilesContainerWrapper.java:108) at org.apache.tiles.template.InsertAttributeModel.renderAttribute(InsertAttributeModel.java:188) at org.apache.tiles.template.InsertAttributeModel.execute(InsertAttributeModel.java:132) at org.apache.tiles.jsp.taglib.InsertAttributeTag.doTag(InsertAttributeTag.java:299) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_tiles_005finsertAttribute_005f10(layout_jsp.java:1645) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fotherwise_005f0(layout_jsp.java:1614) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f1(layout_jsp.java:1527) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fwhen_005f0(layout_jsp.java:1010) at org.apache.jsp.pages.common.layout_jsp._jspx_meth_c_005fchoose_005f0(layout_jsp.java:915) at org.apache.jsp.pages.common.layout_jsp._jspService(layout_jsp.java:255) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:833) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:203) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:73) at org.apache.tiles.request.servlet.ServletRequest.forward(ServletRequest.java:265) at org.apache.tiles.request.servlet.ServletRequest.doForward(ServletRequest.java:228) at org.apache.tiles.request.AbstractClientRequest.dispatch(AbstractClientRequest.java:57) at org.apache.tiles.request.render.DispatchRenderer.render(DispatchRenderer.java:47) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:259) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:397) ... 85 more Caused by: java.lang.NoClassDefFoundError: org/apache/jsp/tag/web/form_tag at org.apache.jsp.pages.theme.xxxx_jsp._jspx_meth_neu_005fform_005f0(xxxx_jsp.java:378) at org.apache.jsp.pages.theme.xxxx_jsp._jspService(xxxx_jsp.java:301) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:566) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.Dispatcher.include(Dispatcher.java:124) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:887) at org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:679) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:673) at org.apache.tiles.request.jsp.JspRequest.doInclude(JspRequest.java:123) ... 128 more


_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev
12