[opencms-dev] Re: JSP Support in 4.6.0
Patrick Pyette
ppyette at perimind.com
Tue Mar 26 05:06:22 CET 2002
Hi Alex,
Thanks for your reply. This sounds pretty feasible, but I do have a couple
of questions.
The implication that I'm picking up from your description is that we would
create the JSP from the Explorer view, so that the JSP itself is fairly
static, but at least it's managed via openCMS and will allow GUI designers
to continue to operate within openCMS and still use the workflow mechanism.
I'm assuming then, that the idea would be to create a tag library that would
allow JSP developers to access the openCMS templating mechanism and dynamic
content?
Does this sound like what you had in mind?
I'm not exactly sure about the URL rewriting that you were talking about. I
know that the servlet container normal handles it if the client has cookies
turned off, or you can set Tomcat up to do that automajically. Another
mechanism is a fairly simple tag that wraps the JSP and perform the URL
rewriting if necessary. I think I'm must be missing the point with this
one, so perhaps you could explain the issues particular to openCMS?
I'll have to think about the caching some more. If we implement the dynamic
part of this in tags, then the tags can load and access dynamic content from
the cache. The entire page wouldn't be there, but the majority of what we
need would be.
Anyway, that's about as far as my thinking has gone so far. Looking
forward to your (and anyone else's) feedback.
Cheers,
Pat
> -----Original Message-----
> From: owner-opencms-dev at www.opencms.com
> [mailto:owner-opencms-dev at www.opencms.com]On Behalf Of Alexander
> Kandzior
> Sent: March 25, 2002 7:36 AM
> To: opencms-dev at www.opencms.com
> Subject: RE: [opencms-dev] Re: JSP Support in 4.6.0
>
>
> Dear Patrick,
>
> I was the one mentioning the "proof of concept". You are right in
> assuming that currently no one is working on the integration of JSP in
> OpenCms. I would very much like to change that and I also can commit
> some time to this project.
>
> Here's an overview about what the issues of integrating JSP are:
>
> 1. JSP in the VFS
> First point is that usually all resources of OpenCms are
> residing in the
> VFS (virtual file system). However, the JSP engine usually expects the
> JSP pages to be files in or below a certain directory of the
> "real" FS.
> It would be preferable to use the existing engine (e.g. Tomcats) to
> process the JSP. Therefore, all JSP in the VFS must be synchronized to
> the "real" FS, so that the JSP engine can process them.
>
> 2. Online / Offline Projects
> In the OpenCms project mechanism, a resource can exist twice: In the
> "Online" project and in all offline projects that you might have
> created. To keep this working, there must also be 2 versions
> of the JSP
> - pages that get synchronized to the "real" FS.
>
> 3. Access to the OpenCms object
> When a JSP gets processed, you want to have access to the OpenCms
> resources and user - related information. Which User is
> currently logged
> in? What are his permissions? Which files can he access?
>
> 4. Output - caching
> OpenCms has a sophisticaed caching mechanism. It would be
> preferable if
> the JSP output is also cachable using that mechanism.
>
> 5. Static export
> This new feature in OpenCms 4.6 makes use of of URL
> rewriting. To enable
> this feature with JSP, this URL rewriting has somehow to be
> integrated.
>
>
> My "proof of concept" solves issues 1-3. Here's how I think
> it should be
> done:
>
> In the web application directory e.g. {$TOMCAT-HOME}\webapps\opencms
> there should be a directory "jsp" with subdirectories "online" and
> "offline". Whenever a JSP page in an offline project is
> changed, it gets
> copied from the VFS to this "offline" directory. If it gets published,
> it is copied to the "online" directory. So the file exists in the
> OpenCms VFS and the real FS. If a request is made to a JSP page
> resource, this first is routed through the opencms servlet, as usual.
> Here, permissions get checked. If permission to the requested JSP page
> is granted, the opencms servlet (that knows which project is
> active and
> in which directory of the "real" FS the corrosponding JSP
> files reside)
> just calls the JSP, which processes and returns the output to the
> servlet through standard Java servlet chaining. This approach solves
> issues 1 + 2 from above. This BTW is also a valid model of
> Model-View-Controller (MVC) programming for JSP pages, with
> the opencms
> servlet being the controller. Now accessing the OpenCms object (see 3
> above) could be easily handled by just placing the current
> CmsObject in
> the request context that the JSP of course will have access to.
>
> This approach is, of course, just a DRAFT PROPOSAL from my
> side. I would
> be happy to exchange some ideas around this topic.
>
> Best Regards,
> Alex.
>
>
> Alexander Kandzior
> OpenCms Group
>
>
>
>
>
> -----Original Message-----
> From: owner-opencms-dev at www.opencms.com
> [mailto:owner-opencms-dev at www.opencms.com] On Behalf Of Patrick Pyette
> Sent: Sunday, March 24, 2002 10:46 PM
> To: Opencms-Dev (E-mail)
> Subject: [opencms-dev] Re: JSP Support in 4.6.0
>
>
> About three weeks ago, I asked about the status of the JSP support in
> openCMS. I didn't get any responses so I'm assuming that no one is
> working
> on it. If that's the case, I'm going to try to get something to work
> myself.
>
> What I'd really appreciate that someone let me know what "proof of
> concept" (as is mentioned on the website) has been performed,
> so that I
> don't have to reinvent the wheel. Any helpful pointers would be
> appreciated.
>
> Thanks,
> Pat
>
>
>
More information about the opencms-dev
mailing list