<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Nachricht</TITLE>
<META content="MSHTML 6.00.2713.1100" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=058051709-26032002>Hi
Jozef,</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=058051709-26032002></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=058051709-26032002>Velocity support is something that I have thought
about, too. It seems JSP is in more popular demand, though. However, since I am
working on JSP already I will also try to add Velocity support along the way. I
am not really sure jet if this is easier or more difficult.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=058051709-26032002></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=058051709-26032002>Regards,</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=058051709-26032002>Alex.</SPAN></FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=de dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
owner-opencms-dev@www.opencms.com [mailto:owner-opencms-dev@www.opencms.com]
<B>On Behalf Of </B>Jozef Hribik<BR><B>Sent:</B> Monday, March 25, 2002 2:05
PM<BR><B>To:</B> opencms-dev@www.opencms.com<BR><B>Subject:</B> Re:
[opencms-dev] Re: JSP Support in 4.6.0<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>Hi Alex,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I have been also thinking about the JSP
integration.</FONT></DIV>
<DIV><FONT face=Arial size=2>But what about to integrate some servlet-based
templating engine e.g. Jakarta Velocity?</FONT></DIV>
<DIV><FONT face=Arial size=2>Could it be easier?</FONT></DIV>
<DIV><FONT face=Arial size=2>Of course, i would like to have JSP with Struts
MVC integrated in OpenCMS to be able to integrate our e-commerce
apps, but it seems to be impossible.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Best Regards</FONT></DIV>
<DIV><FONT face=Arial size=2>Jozef Hribik</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=alex@opencms.com href="mailto:alex@opencms.com">Alexander
Kandzior</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=opencms-dev@www.opencms.com
href="mailto:opencms-dev@www.opencms.com">opencms-dev@www.opencms.com</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, March 25, 2002 1:35
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> RE: [opencms-dev] Re: JSP
Support in 4.6.0</DIV>
<DIV><BR></DIV>Dear Patrick,<BR><BR>I was the one mentioning the "proof of
concept". You are right in<BR>assuming that currently no one is working on
the integration of JSP in<BR>OpenCms. I would very much like to change that
and I also can commit<BR>some time to this project. <BR><BR>Here's an
overview about what the issues of integrating JSP are:<BR><BR>1. JSP in the
VFS<BR>First point is that usually all resources of OpenCms are residing in
the<BR>VFS (virtual file system). However, the JSP engine usually expects
the<BR>JSP pages to be files in or below a certain directory of the "real"
FS.<BR>It would be preferable to use the existing engine (e.g. Tomcats)
to<BR>process the JSP. Therefore, all JSP in the VFS must be synchronized
to<BR>the "real" FS, so that the JSP engine can process them. <BR><BR>2.
Online / Offline Projects<BR>In the OpenCms project mechanism, a resource
can exist twice: In the<BR>"Online" project and in all offline projects that
you might have<BR>created. To keep this working, there must also be 2
versions of the JSP<BR>- pages that get synchronized to the "real" FS.
<BR><BR>3. Access to the OpenCms object<BR>When a JSP gets processed, you
want to have access to the OpenCms<BR>resources and user - related
information. Which User is currently logged<BR>in? What are his permissions?
Which files can he access? <BR><BR>4. Output - caching<BR>OpenCms has a
sophisticaed caching mechanism. It would be preferable if<BR>the JSP output
is also cachable using that mechanism.<BR><BR>5. Static export<BR>This new
feature in OpenCms 4.6 makes use of of URL rewriting. To enable<BR>this
feature with JSP, this URL rewriting has somehow to be integrated.
<BR><BR><BR>My "proof of concept" solves issues 1-3. Here's how I think it
should be<BR>done:<BR><BR>In the web application directory e.g.
{$TOMCAT-HOME}\webapps\opencms<BR>there should be a directory "jsp" with
subdirectories "online" and<BR>"offline". Whenever a JSP page in an offline
project is changed, it gets<BR>copied from the VFS to this "offline"
directory. If it gets published,<BR>it is copied to the "online" directory.
So the file exists in the<BR>OpenCms VFS and the real FS. If a request is
made to a JSP page<BR>resource, this first is routed through the opencms
servlet, as usual.<BR>Here, permissions get checked. If permission to the
requested JSP page<BR>is granted, the opencms servlet (that knows which
project is active and<BR>in which directory of the "real" FS the
corrosponding JSP files reside)<BR>just calls the JSP, which processes and
returns the output to the<BR>servlet through standard Java servlet chaining.
This approach solves<BR>issues 1 + 2 from above. This BTW is also a valid
model of<BR>Model-View-Controller (MVC) programming for JSP pages, with the
opencms<BR>servlet being the controller. Now accessing the OpenCms object
(see 3<BR>above) could be easily handled by just placing the current
CmsObject in<BR>the request context that the JSP of course will have access
to. <BR><BR>This approach is, of course, just a DRAFT PROPOSAL from my side.
I would<BR>be happy to exchange some ideas around this topic. <BR><BR>Best
Regards,<BR>Alex.<BR><BR><BR>Alexander Kandzior<BR>OpenCms
Group<BR><BR><BR><BR><BR><BR>-----Original Message-----<BR>From: <A
href="mailto:owner-opencms-dev@www.opencms.com">owner-opencms-dev@www.opencms.com</A><BR>[<A
href="mailto:owner-opencms-dev@www.opencms.com">mailto:owner-opencms-dev@www.opencms.com</A>]
On Behalf Of Patrick Pyette<BR>Sent: Sunday, March 24, 2002 10:46 PM<BR>To:
Opencms-Dev (E-mail)<BR>Subject: [opencms-dev] Re: JSP Support in
4.6.0<BR><BR><BR>About three weeks ago, I asked about the status of the JSP
support in<BR>openCMS. I didn't get any responses so I'm assuming that
no one is<BR>working<BR>on it. If that's the case, I'm going to
try to get something to work<BR>myself.<BR><BR>What I'd really appreciate
that someone let me know what "proof of<BR>concept" (as is mentioned on the
website) has been performed, so that I<BR>don't have to reinvent the
wheel. Any helpful pointers would
be<BR>appreciated.<BR><BR>Thanks,<BR>Pat<BR><BR><BR></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>