You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Eugen Kuleshov <an...@hco.kollegienet.dk> on 2000/01/11 23:00:02 UTC

Migrating from Apache to standalone Tomcat

Hello!

  We have used big web site with many html documents based on Apache
XSSI (includes, "if", regexp's). Then we would like migrate to pure java
web server. Tomcat is good, but have no replacement for SSI. In fact, it
is not so good idea if convert all .shtml (SSI) to .jsp, because our
documents not so small and after this conversion we will have .java and
.class files for each document. It is not good.
  Some time ago I saw JSSI at java.apache.org, but now this project no
more developed and have not enought functionality comparing to XSSI.

  Do someone have any ideas for simply migrating Apache XSSI documents
to Tomcat?
  Or maybe it must be request for new Tomcat web server functionality?

  Thank you.

  Eugen Kuleshov.

Re: Migrating from Apache to standalone Tomcat

Posted by Eugen Kuleshov <an...@hco.kollegienet.dk>.
"Craig R. McClanahan" wrote:

> >   I would like migrate to Tomcat without changing of source documents
> > used with Apache XSSI. Because otherwise we must change all of our old
> > documents for use new scripting and it is wery hard work. :(
> That's quite understandable.

  sure.
 
> But you're also paying the price for the initial design choice to use Apache XSSI.

  Hmm. This design for web publishing framework maked 2 years ago. Do
you know better design for those time? Really this design require less
resources, need only Apache server with mod_include and don't need other
scripting languages i.e. perl.

> >   Of course the best way - is migrating to XML publishing system and we
> > will do it in future.
> >   Also what do you think, help users to simply migrate from Apache to
> > Tomcat is a good tast for Jakarta project or not?
> What you're asking for is not just help -- you're asking for a piece of functionality
> (an XSSI-interpreting servlet) that does not exist in Tomcat at the moment.
> 
> Anyone who wants to create such a servlet can do so -- and I'm pretty confident that
> the Jakarta project would welcome the addition of such code.  Until that happens,
> though, there's nothing anyone can do to help you move XSSI pages -- to Tomcat or to
> anywhere else that does not already have an XSSI capability.

  I see.
  Thank you for answer.

  Eugen Kuleshov.

Re: Migrating from Apache to standalone Tomcat

Posted by "Craig R. McClanahan" <cm...@mytownnet.com>.
Eugen Kuleshov wrote:

>   I would like migrate to Tomcat without changing of source documents
> used with Apache XSSI. Because otherwise we must change all of our old
> documents for use new scripting and it is wery hard work. :(

That's quite understandable.

But you're also paying the price for the initial design choice to use Apache XSSI.

>
>   Of course the best way - is migrating to XML publishing system and we
> will do it in future.
>
>   Also what do you think, help users to simply migrate from Apache to
> Tomcat is a good tast for Jakarta project or not?
>

What you're asking for is not just help -- you're asking for a piece of functionality
(an XSSI-interpreting servlet) that does not exist in Tomcat at the moment.

Anyone who wants to create such a servlet can do so -- and I'm pretty confident that
the Jakarta project would welcome the addition of such code.  Until that happens,
though, there's nothing anyone can do to help you move XSSI pages -- to Tomcat or to
anywhere else that does not already have an XSSI capability.

>
>   Eugen Kuleshov.
>

Craig



Re: Migrating from Apache to standalone Tomcat

Posted by Eugen Kuleshov <an...@hco.kollegienet.dk>.
"Craig R. McClanahan" wrote:

> >   Maybe it is not bad idea to continue JSSI development in Jakarta
> > project? It will help for migration from Apache to Tomcat.
> Sorry ... I didn't read your message carefully enough to recognize that you needed
> more than what JSSI had to offer.

  Maybe it's my fault
 
> Rather than trying to find a solution to make XSSI work under Tomcat, have you
> considered translating your pages like this into JSP instead?  Then you'd have the
> advantage of being able to run on any servlet engine that supports JSP, instead of
> using a non-standard scripting language that is harder to get support for.

  As I said in first message. JSP is not so good idea. Because most of
documents is a static html and not so small (about 10..30k each) and if
I will use JSP I've got .java and also compilled .class for every JSP
page. It's need more space at web server and not effective, because
scripting using only for make presentation templates.
 
> The pages you quoted can be translated almost line for line into JSP if you are
> willing to use a few Java scriptlets along the way (not my favorite development
> style, but that's a completely separate discussion).  If you spend some time on
> it, you could even create custom tags for the logic things (like the "if"
> statement) and do it all without scriptlets -- which means you would not need to
> understand Java to do the translations.
> 
> If you don't like JSP, there are several other scripting solutions that might work
> -- you could look at http://www.webmacro.org for example.

  I would like migrate to Tomcat without changing of source documents
used with Apache XSSI. Because otherwise we must change all of our old
documents for use new scripting and it is wery hard work. :(
  Of course the best way - is migrating to XML publishing system and we
will do it in future.

  Also what do you think, help users to simply migrate from Apache to
Tomcat is a good tast for Jakarta project or not?

  Eugen Kuleshov.

Re: Migrating from Apache to standalone Tomcat

Posted by "Craig R. McClanahan" <cm...@mytownnet.com>.
Eugen Kuleshov wrote:

> "Craig R. McClanahan" wrote:
>
> > >   We have used big web site with many html documents based on Apache
> > > XSSI (includes, "if", regexp's). Then we would like migrate to pure java
> > > web server. Tomcat is good, but have no replacement for SSI. In fact, it
> > > is not so good idea if convert all .shtml (SSI) to .jsp, because our
> > > documents not so small and after this conversion we will have .java and
> > > .class files for each document. It is not good.
> > >   Some time ago I saw JSSI at java.apache.org, but now this project no
> > > more developed and have not enought functionality comparing to XSSI.
> > >
> > >   Do someone have any ideas for simply migrating Apache XSSI documents
> > > to Tomcat?
> > >   Or maybe it must be request for new Tomcat web server functionality?
> > >
> >
> > The JSSI servlet is a pure servlet, so it ought to run on top of Tomcat as
> > well.  You would need to adapt the instructions for configuring the ".shtml"
> > extension to the JSSI servlet (via a <servlet-mapping> element in the
> > deployment descriptor for Tomcat) but it should run.
>
>   Shure it's will work.
>   But JSSI have not enought functionality for real using it for
> migration from Apache XSSI. In fact, now JSSI not usable for it. Of
> course JSSI provide good functionality if you start publishing
> preparaation of your documents spetially for JSSI. But if you have so
> much documents prepared for XSSI it is not so simple to use JSSI now.
>
>   Maybe it is not bad idea to continue JSSI development in Jakarta
> project? It will help for migration from Apache to Tomcat.
>

Sorry ... I didn't read your message carefully enough to recognize that you needed
more than what JSSI had to offer.

>
>   For example.
>   This is our error 404 page:
> [snip]

Rather than trying to find a solution to make XSSI work under Tomcat, have you
considered translating your pages like this into JSP instead?  Then you'd have the
advantage of being able to run on any servlet engine that supports JSP, instead of
using a non-standard scripting language that is harder to get support for.

The pages you quoted can be translated almost line for line into JSP if you are
willing to use a few Java scriptlets along the way (not my favorite development
style, but that's a completely separate discussion).  If you spend some time on
it, you could even create custom tags for the logic things (like the "if"
statement) and do it all without scriptlets -- which means you would not need to
understand Java to do the translations.

If you don't like JSP, there are several other scripting solutions that might work
-- you could look at http://www.webmacro.org for example.

Craig McClanahan



Re: Migrating from Apache to standalone Tomcat

Posted by Eugen Kuleshov <an...@hco.kollegienet.dk>.
"Craig R. McClanahan" wrote:

> >   We have used big web site with many html documents based on Apache
> > XSSI (includes, "if", regexp's). Then we would like migrate to pure java
> > web server. Tomcat is good, but have no replacement for SSI. In fact, it
> > is not so good idea if convert all .shtml (SSI) to .jsp, because our
> > documents not so small and after this conversion we will have .java and
> > .class files for each document. It is not good.
> >   Some time ago I saw JSSI at java.apache.org, but now this project no
> > more developed and have not enought functionality comparing to XSSI.
> >
> >   Do someone have any ideas for simply migrating Apache XSSI documents
> > to Tomcat?
> >   Or maybe it must be request for new Tomcat web server functionality?
> >
> 
> The JSSI servlet is a pure servlet, so it ought to run on top of Tomcat as
> well.  You would need to adapt the instructions for configuring the ".shtml"
> extension to the JSSI servlet (via a <servlet-mapping> element in the
> deployment descriptor for Tomcat) but it should run.

  Shure it's will work.
  But JSSI have not enought functionality for real using it for
migration from Apache XSSI. In fact, now JSSI not usable for it. Of
course JSSI provide good functionality if you start publishing
preparaation of your documents spetially for JSSI. But if you have so
much documents prepared for XSSI it is not so simple to use JSSI now.

  Maybe it is not bad idea to continue JSSI development in Jakarta
project? It will help for migration from Apache to Tomcat.

  For example. 
  This is our error 404 page:

------
<!--#include virtual="redirect.html" -->
<!--#set var="RU2_TITLE" value="Error 404" -->
<!--#include virtual="/include/begin.html" -->

<table border=0 width=120 hspace=10 align=right><tr><td>
<!--#include virtual="/search.jsp" -->
</td></table>

<!--#if expr="\"$HTTP_REFERER\" != \"\"" -->
You followed the link from <A HREF="<!--#echo var="HTTP_REFERER"
-->"><!--#echo var="HTTP_REFERER" --></A>.<br>
<p>
<!--#endif -->

Document <b><!--#echo var="REQUEST_URI" --></b> not found.<br>

<!--#if expr="\"$NEW_URL\" != \"\" && $NEW_URL\" != /none/ " -->
Maybe you are looking for <a href="<!--#echo var="NEW_URL" -->">this
page</a>.<br>
Your browser will open this page automatically in 10 seconds.
<!--#endif -->

<p>
Maybe this document moved to another place. Try to find it at the <a
href="/ru2map.html">site map</a>.
<br clear=all>

<!--#include virtual="/include/end.html?E" -->

------

and here is a part of redirect.html

----
<!--#if expr="\"$REQUEST_URI\" = /emtex.html/" -->
<!--#set var="NEW_URL" value="/guru/tex/emtex.html" -->
<!--#elif expr="\"$REQUEST_URI\" = /os2tex.htm/" -->
<!--#set var="NEW_URL" value="/guru/tex/os2tex.htm" -->
[...cut...]
<!--#elif expr="\"$REQUEST_URI\" = /ipsec.html/" -->
<!--#set var="NEW_URL" value="/guru/tcpip/index.html" -->
<!--#endif -->
------

  here is begin.html

----
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>RU/2: <!--#echo var="RU2_TITLE" --></TITLE>
<!--#if expr="\"$NEW_URL\"!=\"\" && $NEW_URL\"!=/none/" --><meta
http-equiv="Refresh" content="10;
URL=<!--#echo var="NEW_URL" -->"><!--#endif -->
</HEAD>

<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#000080">
----

  here is end.html

----
<!--#if expr="$QUERY_STRING = E" -->
<!--#include virtual="/include/navigatore.html" -->
<!--#else -->
<!--#include virtual="/include/navigatorr.html" -->
<!--#endif -->

</BODY>
</HTML>
----

  These constructions can produce different documents depend on user
request.

  Eugen Kuleshov.

Re: Migrating from Apache to standalone Tomcat

Posted by "Craig R. McClanahan" <cm...@mytownnet.com>.
Eugen Kuleshov wrote:

> Hello!
>
>   We have used big web site with many html documents based on Apache
> XSSI (includes, "if", regexp's). Then we would like migrate to pure java
> web server. Tomcat is good, but have no replacement for SSI. In fact, it
> is not so good idea if convert all .shtml (SSI) to .jsp, because our
> documents not so small and after this conversion we will have .java and
> .class files for each document. It is not good.
>   Some time ago I saw JSSI at java.apache.org, but now this project no
> more developed and have not enought functionality comparing to XSSI.
>
>   Do someone have any ideas for simply migrating Apache XSSI documents
> to Tomcat?
>   Or maybe it must be request for new Tomcat web server functionality?
>

The JSSI servlet is a pure servlet, so it ought to run on top of Tomcat as
well.  You would need to adapt the instructions for configuring the ".shtml"
extension to the JSSI servlet (via a <servlet-mapping> element in the
deployment descriptor for Tomcat) but it should run.

>
>   Thank you.
>
>   Eugen Kuleshov.
>

Craig McClanahan