Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 43229 invoked from network); 6 Nov 2010 07:15:41 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Nov 2010 07:15:41 -0000 Received: (qmail 20253 invoked by uid 500); 6 Nov 2010 07:16:12 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 19861 invoked by uid 500); 6 Nov 2010 07:16:09 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 19852 invoked by uid 99); 6 Nov 2010 07:16:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Nov 2010 07:16:08 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [98.136.44.56] (HELO smtp101.prem.mail.sp1.yahoo.com) (98.136.44.56) by apache.org (qpsmtpd/0.29) with SMTP; Sat, 06 Nov 2010 07:16:03 +0000 Received: (qmail 28710 invoked from network); 6 Nov 2010 07:15:42 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=DKIM-Signature:Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Content-Transfer-Encoding:Message-Id:References:To:X-Mailer; b=i/zRnlBwB27Lik36bJKsL7fPgTAhaRDol7/VceD7IOhLrhXOxRFT2iAju5ORVReiXjHkYZARwZMHgxN64BfL2Hjxpdaxeaum28LlK5JXO1Iu7J2CBwZWxccNI5RJqv08FDiyvx48F52p84HQ6okoGyaDyp8GRPcAj6K5bInPhNU= ; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1289027742; bh=23gkQ59eBP+S+VhCSpsFSiwEdypMYOGOi9qbIFSaWQk=; h=Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Content-Transfer-Encoding:Message-Id:References:To:X-Mailer; b=5IQ5zoWfV7rxeS4/uNq94Rk29mDO3iNc1QdgMgH/FkFvwlcC9shyMV0X0EtiMu8fFVSp/y/mJ8TGS2J6f8ELo9XHSRg+3GC6N7q17JDYcCg1SGhywMyTn5urzT7hIcpBwLz7LP7aWx+XQsZVvzorm5s0BAt62ufuVvYQPgU1ZHc= Received: from [10.0.1.147] (david_jencks@76.76.148.215 with plain) by smtp101.prem.mail.sp1.yahoo.com with SMTP; 06 Nov 2010 00:15:42 -0700 PDT X-Yahoo-SMTP: .9oIUzyswBANsYgUm_5uPui0skTnzGJXJQ-- X-YMail-OSG: 410gSaIVM1krLdzFIL0xOTK4RDcNvTchUw._M1CBGh.0M8D cVhxO4kmFqpBY8AT44aFTHV0hVai9Kw0hh4_E4hqcUurmd1qd44hDFo3ERtA zD4S0giqezVqb647P8Um4MMHiZaqs.BnklkXQJHvfmuGLOF5UE590Icku2H0 oPwuhmgqzSkzIBC5ioMNhmo9oCXVkldwCH5rP565B1wNjlQnW1aIToB5rjUS CTvuDxeIUDhgUkLAFPmc3FJagoeMy3GUPbxguAqIqq3rIoGiyeRoUSJ38tMa ndf1ID6FyhYatqKP2MbgxK9Me.3XUd9Ah37.5 X-Yahoo-Newman-Property: ymail-3 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1081) Subject: Re: JspRuntimeContext & JspServlet - Using SpringSource's Jasper 5.5.23 implementation in Http Service? From: David Jencks In-Reply-To: Date: Sat, 6 Nov 2010 00:15:37 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: "Tomcat Developers List" X-Mailer: Apple Mail (2.1081) I don't understand the diagram you show nor what you mean by bridging, = but you might want to consider looking at geronimo 3. We have tomcat = and jasper running in an osgi environment and can deploy WABs and also = EE wars as osgi bundles. I believe you can (as of a few days ago) look = up the bundle/bundle context in jndi and get it injected into your ee = components. Whether or not this is something you want to look into I'd suggest you = look into a container that supports WABs. thanks david jencks On Nov 5, 2010, at 9:02 PM, Misha Koshelev wrote: > Dear All: >=20 > My sincerest apologies if this is the wrong forum for this question. I > was unable to find a better place for Jasper API support/questions. >=20 > I am working on a ticket to make the OpenMRS medical records system > run in an OSGi environment. > http://tickets.openmrs.org/browse/TRUNK-1596 >=20 > SUMMARY: > My simple question - is there, at the very least, some clear > explanation of JspRuntimeContext and JspServlet (besides > = http://tomcat.apache.org/tomcat-5.5-doc/jasper/docs/api/org/apache/jasper/= compiler/JspRuntimeContext.html > = http://tomcat.apache.org/tomcat-5.5-doc/jasper/docs/api/org/apache/jasper/= servlet/JspServlet.html > ) or, more importantly, is there any clear guide or suggestions for > how to use these within a non-JSP aware server to have proper JSP > support, esp. with regard to > taglibs (as, at the very least, the Jsp file seems to be processed and > include directives seem to be occurring - which seems strange if > Jasper is not functioning at all, although this is the case at least > based on the logs). >=20 > Any help much appreciated >=20 > DETAILS: > We are able to use Spring Web extender > = http://static.springsource.org/osgi/docs/current/reference/html/web.html > to successfully make OpenMRS run within an OSGi environment > http://tickets.openmrs.org/secure/attachment/34857/1596-latest.patch >=20 > we would like to have a "proxy" setup, i.e., >=20 > Tomcat -> WAR -> OSGi -> OSGified OpenMRS > -> module 1 > -> module 2 > etc. >=20 > I am currently trying to thus move to using an OSGi HTTP Service > implementation, as this allows bridging as above. I have found Apache > Felix HTTP Service > http://felix.apache.org/site/apache-felix-http-service.html > to be quite nice for this purpose. >=20 > I am using SpringSource's version of Jasper for my OSGi project: > = https://s3browse.springsource.com/browse/maven.springframework.org/osgi/or= g/springframework/osgi/jasper.osgi/5.5.23-SNAPSHOT/ > (I was not able to find the source for these JARs, but based on the > output of jar tvf > = http://maven.springframework.org/osgi/org/springframework/osgi/jasper.osgi= /5.5.23-SNAPSHOT/jasper.osgi-5.5.23-20080229.204604-1.jar, > the MANIFEST.MF, and the pom.xml from that JAR - all attached; it > seems that this is more or less an unmodified Jasper (I am a Jasper > newbie and so could be _very_ wrong). >=20 > The latest update that regards Jasper can be found here: > = http://tickets.openmrs.org/browse/TRUNK-1596?focusedCommentId=3D163205&pag= e=3Dcom.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#actio= n_163205 >=20 > In brief, in the current version, index.jsp is clearly being > processed, as the mapping to /favicon.ico > DEBUG - InternalResourceView.renderMergedOutputModel(236) |2010-11-05 > 19:57:55,239| Forwarding to resource [/WEB-INF/view/index.jsp] in > InternalResourceView 'index' > WARN - DispatcherServlet.noHandlerFound(962) |2010-11-05 19:57:55,277| > No mapping found for HTTP request with URI [/favicon.ico] in > DispatcherServlet with name 'servlet_4' > is clearly coming from our file: > href=3D""> > webapp/src/main/webapp/WEB-INF/template/headerFull.jsp > which is linked in > <%@ include file=3D"headerFull.jsp" %> > ./webapp/src/main/webapp/WEB-INF/template/header.jsp > which, in turn, is linked in > <%@ include file=3D"/WEB-INF/template/header.jsp" %> > ./webapp/src/main/webapp/WEB-INF/view/index.jsp >=20 > (full files, for reference, are: > = http://svn.openmrs.org/openmrs/trunk/webapp/src/main/webapp/WEB-INF/view/i= ndex.jsp > = http://svn.openmrs.org/openmrs/trunk/webapp/src/main/webapp/WEB-INF/templa= te/header.jsp > = http://svn.openmrs.org/openmrs/trunk/webapp/src/main/webapp/WEB-INF/templa= te/headerFull.jsp > ) >=20 > However, for one thing, our taglibs are _not_ being processed at all, > as, the class referenced in > contextPath > org.openmrs.web.taglib.ContextPathTag > = http://svn.openmrs.org/openmrs/trunk/webapp/src/main/webapp/WEB-INF/taglib= s/openmrs.tld > for openmrs:contextPath never receives calls in its doStartTag() or > doEndTag() methods (class is here > = http://svn.openmrs.org/openmrs/trunk/web/src/main/java/org/openmrs/web/tag= lib/ContextPathTag.java > ). >=20 > SpringSource seems to do ClassLoader magic to somehow make Jasper > support work (by chaining a Jasper classloader to the bundle > classloader?), see, e.g., > = https://src.springframework.org/svn/spring-osgi/tags/spring-osgi-1.2.1/web= /src/main/java/org/springframework/osgi/web/deployer/jetty/JettyWarDeploye= r.java > = https://src.springframework.org/svn/spring-osgi/tags/spring-osgi-1.2.1/web= /src/main/java/org/springframework/osgi/web/deployer/internal/util/ >=20 > Notably, if I turn org.apache.jasper logging to DEBUG, I see: > DEBUG - JspRuntimeContext.(103) |2010-11-05 22:19:01,881| Parent > class loader is: Openmrsorg.openmrs.util.OpenmrsClassLoader@58d67b44 > DEBUG - JspRuntimeContext.initClassPath(344) |2010-11-05 22:19:01,889| > Compilation classpath initialized: > = /tmp/Jetty_0_0_0_0_8080_jetty-openmrs3074779251420665248.osgi__openmrs__15= 846m/jsp:null > DEBUG - JspServlet.init(103) |2010-11-05 22:19:01,890| Scratch dir for > the JSP engine is: > = /tmp/Jetty_0_0_0_0_8080_jetty-openmrs3074779251420665248.osgi__openmrs__15= 846m/jsp > DEBUG - JspServlet.init(105) |2010-11-05 22:19:01,890| IMPORTANT: Do > not modify the generated servlets > INFO - AbstractWarDeployer.deploy(94) |2010-11-05 22:19:01,989| > Successfully deployed bundle [openmrs-webapp > (org.openmrs.web.openmrs-webapp)] at [/openmrs] on server Jetty-6.1.x > (AbstractWarDeployer.java is here: > = https://src.springframework.org/svn/spring-osgi/tags/spring-osgi-1.2.1/web= /src/main/java/org/springframework/osgi/web/deployer/support/AbstractWarDe= ployer.java > and is subclassed by JettyWarDeployer.java > = https://src.springframework.org/svn/spring-osgi/tags/spring-osgi-1.2.1/web= /src/main/java/org/springframework/osgi/web/deployer/jetty/JettyWarDeploye= r.java > which does all the work). >=20 > Further, when we load index.jsp I see > DEBUG - ContentNegotiatingViewResolver.resolveViewName(386) > |2010-11-05 18:06:37,132| Returning > [org.springframework.web.servlet.view.JstlVi\ > ew: name 'index'; URL [/WEB-INF/view/index.jsp]] based on requested > media type 'text/html' > DEBUG - InternalResourceView.renderMergedOutputModel(236) |2010-11-05 > 18:06:37,136| Forwarding to resource [/WEB-INF/view/index.jsp] in > Inte\ > rnalResourceView 'index' > DEBUG - JspServlet.service(248) |2010-11-05 18:06:37,136| JspEngine > --> /WEB-INF/view/index.jsp > DEBUG - JspServlet.service(249) |2010-11-05 18:06:37,136| ServletPath: > /WEB-INF/view/index.jsp > DEBUG - JspServlet.service(250) |2010-11-05 18:06:37,137| PathInfo: = null > DEBUG - JspServlet.service(251) |2010-11-05 18:06:37,137| RealPath: > /tmp/jetty-openmrs3852173793073389964.osgi/WEB-INF/view/in\ > dex.jsp > DEBUG - JspServlet.service(252) |2010-11-05 18:06:37,137| RequestURI: > /openmrs/WEB-INF/view/index.jsp > DEBUG - JspServlet.service(253) |2010-11-05 18:06:37,138| QueryString: = null > DEBUG - JspServlet.service(254) |2010-11-05 18:06:37,138| Request = Params: >=20 > whereas JspServlet is clearly _not_ involved in the current HTTP > Service implementation. >=20 > My simple question - is there, at the very least, some clear > explanation of JspRuntimeContext and JspServlet (besides > = http://tomcat.apache.org/tomcat-5.5-doc/jasper/docs/api/org/apache/jasper/= compiler/JspRuntimeContext.html > = http://tomcat.apache.org/tomcat-5.5-doc/jasper/docs/api/org/apache/jasper/= servlet/JspServlet.html > ) or, more importantly, is there any clear guide or suggestions for > how to use these within a non-JSP aware server to have proper JSP > support, esp. with regard to > taglibs (as, at the very least, the Jsp file seems to be processed and > include directives seem to be occurring - which seems strange if > Jasper is not functioning at all, although this is the case at least > based on the logs). >=20 > Any help much appreciated >=20 > Thank you >=20 > Yours > Misha > = > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org > For additional commands, e-mail: dev-help@tomcat.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org