-----------------------------
Please read the FAQ!
<http://java.apache.org/faq/>
-----------------------------

Mike Engelhart wrote:

> -----------------------------
> Please read the FAQ!
> <http://java.apache.org/faq/>
> -----------------------------
>
> Is there a way to allow JServ 1.0 to work with any part of the JSDK 2.1 at
> least for development purposes until Jakarta becomes available.  Someone on
> the JSP-INTEREST mailing list mentioned a hack that incorporate the JSDK 2.1
> into JServ but I was unable to find the message.   I need 2.1 functionality
> so that I can use RequestDispatchers but apparently this doesn't work with
> JServ.    Any other options?
>

Apache JServ 1.0 (as delivered) cannot even be compiled against the 2.1
servlet.jar classes (let alone run against them) because the 2.1 classes have
created several new methods that are not present in the Apache JServ 1.0
implementation classes.  RequestDispatcher is one of those new features.

>
> Also, someone added to the FAQ that he had succesfully used JSDK2.1 with
> JServ 1.0 so I tried it and it sort of works but as soon as i tried to use a
> RequestDispatcher to forward and object it spit out lots of errors and
> didn't work so this person must not have tried very hard to break it :-)
>

You can make things compile, if you want, by adding empty methods that have the
right calling sequences into the appropriate classes (like JServServletManager,
JServConnection, and so on).  But to actually implement the *functionality*
required to make a RequestDispatcher work, you have to do quite a bit more
surgery.

>
> BTW, I realize that I could use another servlet engine, but I really want to
> build the application using the load balancing features built into JServ.
>

Substantial work has been done towards 2.1 support in the JSERV1_1DEV branch
(in CVS).  It supports the 2.1 API and a whole bunch of other features
(including session persistence across restarts, swapping active but idle
sessions to disk or database tables, plug-replaceable component architecture,
and so on).  The biggest single piece that's missing (but it is being worked
on) is the connector to Apache so that you can run the new version of Apache
JServ instead of, or alongside, your existing zones running in Apache JServ 1.0
JVMs.  In addition, there's no installer or documentation yet.

I am the principal author of the 1.1 development branch code (contributions,
testing, and improvements are more than welcome!)  I originally intended to
just modify the existing classes for 2.1 compatibility, but I found that the
underlying architecture was not going to scale up to support later servlet API
versions in a clean, easy-to-understand architecture.  Therefore, I chose to
take the functionality bits out of 1.0 that worked well, but package them in a
completely new component oriented framework that will be easier to enhance and
modify in the future.

Midway through this work, Sun announced that they were going to contribute
Tomcat and Jasper (the new name for the JSP engine) to the Apache group, under
the auspices of the Jakarta project.  This is still going to happen (no, not
fast enough to satisfy anyone, but it's gonna happen), and the best ideas of
the two servlet engine implementations will be merged.  Like every other open
source project, the pace of these changes will be determined by how many people
roll up their sleeves and get to work.  Obviously, the integration cannot start
until the Tomcat and Jasper source is released, but you can start planning
ahead and saying to yourself "I'm going to get involved and help make this tool
better".

In the mean time, I just put up an application (currently in beta) running on
top of the JSWDK engine.  It's a 100% dynamic app implemented in JSP 1.0
+ Servlets 2.1 technologies.  It will transition to the Jakarta technologies as
soon as they are available and tested.

Unlike Jon :-), I like JSP quite a lot.  I use an application design where the
business logic is implemented in servlets, who pass required results to
JSP pages for display via RequestDispatcher.forward().  The only Java
scriptlets in my JSP pages are things like "for" loops and some
presentation-level logic type stuff.  When JSP 1.1 support is available (it
probably will be in Jasper by the time we get our hands on it), I can replace
all this with custom tag libraries and have zero Java code in my JSP pages, but
complete portability onto any standards-compliant platform (of course, this
benefit is also available to any other development approach based on servlets,
but there's going to be LOTS of vendors contributing cool JSP tag libraries to
the mix).

Personally, I don't ever intend to generate HTML directly in a servlet
(out.println() or using an object oriented library like ECS) ever again.


>
> Mike
>

Craig McClanahan




--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to