Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Converting to JSP

0 views
Skip to first unread message

Roedy Green

unread,
Oct 15, 2009, 9:49:32 PM10/15/09
to
A question about converting to JSP.

As part of converting a website to JSP, I would imagine that every
internal link would have to be renamed from *.html to *.jsp.

This is not a good thing for several reasons:

1. the world at large has bookmarks and links into your website with
the *.html names.

2. the jsp names don't look as safe and friendly.

3. I want to create a downloadable offline website image. It should
just link statically to pages. Logically these should be plain *.html
with plain *.html links. This means a special pass every time a
snapshot is generated to convert all the links since most are not
generated by tags.

How do people handle this? Or do they simply not provide downloadable
snapshots?

Is it possible using just some sort of configuration file to use
*.html links in the text and have them automatically invoke the
corresponding *.jsp file? For now I am thinking Tomcat, but I suppose
that could change.
--
Roedy Green Canadian Mind Products
http://mindprod.com

When you lose interest in a program, your last duty to it is to hand it off to a competent successor.
~ Eric S. Raymond (born: 1957-12-04 age: 51) The Cathedral and the Bazaar

Donkey Hottie

unread,
Oct 16, 2009, 1:15:30 PM10/16/09
to
16.10.2009 4:49, Roedy Green kirjoitti:
> A question about converting to JSP.
>
> As part of converting a website to JSP, I would imagine that every
> internal link would have to be renamed from *.html to *.jsp.
>
> This is not a good thing for several reasons:
>
> 1. the world at large has bookmarks and links into your website with
> the *.html names.
>
> 2. the jsp names don't look as safe and friendly.
>
> 3. I want to create a downloadable offline website image. It should
> just link statically to pages. Logically these should be plain *.html
> with plain *.html links. This means a special pass every time a
> snapshot is generated to convert all the links since most are not
> generated by tags.
>
> How do people handle this? Or do they simply not provide downloadable
> snapshots?
>
> Is it possible using just some sort of configuration file to use
> *.html links in the text and have them automatically invoke the
> corresponding *.jsp file? For now I am thinking Tomcat, but I suppose
> that could change.

This probably is not what you want, but you could create a html
'version' of the .jsp page and include this in it

<meta HTTP-EQUIV="REFRESH" content="0;
url=http://www.example.com/jsppage.jsp">

The offline loading is not served with this anyway. But it would provide
something to the changed links.

Roedy Green

unread,
Oct 16, 2009, 8:38:26 PM10/16/09
to
On Fri, 16 Oct 2009 20:15:30 +0300, Donkey Hottie <don...@fred.pp.fi>
wrote, quoted or indirectly quoted someone who said :

>
>This probably is not what you want, but you could create a html
>'version' of the .jsp page and include this in it
>
><meta HTTP-EQUIV="REFRESH" content="0;
>url=http://www.example.com/jsppage.jsp">
>
>The offline loading is not served with this anyway. But it would provide
>something to the changed links.

I was hoping to avoid that. That means anther round trip. Thanks for
your suggestion. It seemed odd I would be the first person to want to
do this. I drew a blank on Google. Sometimes the trick is knowing
the official name for what I am trying to do.

--
Roedy Green Canadian Mind Products
http://mindprod.com

No flying machine will ever fly from New York to Paris.
~ Orville Wright (born: 1871-08-19 died: 1948-10-30 at age: 77) 1908 We see that same conservative pessimism in those crafting today�s computers and computer tools. They are overwhelmed by the details of producing even today�s solutions. You need young, over-confident people who don�t know too much to chart the course ahead. This is especially true of global warming where the current generation has entirely given up hope of a green planet and sustainable human survival.

Donkey Hottie

unread,
Oct 16, 2009, 9:51:21 PM10/16/09
to
17.10.2009 3:38, Roedy Green kirjoitti:
> On Fri, 16 Oct 2009 20:15:30 +0300, Donkey Hottie<don...@fred.pp.fi>
> wrote, quoted or indirectly quoted someone who said :
>
>>
>> This probably is not what you want, but you could create a html
>> 'version' of the .jsp page and include this in it
>>
>> <meta HTTP-EQUIV="REFRESH" content="0;
>> url=http://www.example.com/jsppage.jsp">
>>
>> The offline loading is not served with this anyway. But it would provide
>> something to the changed links.
>
> I was hoping to avoid that. That means anther round trip. Thanks for
> your suggestion. It seemed odd I would be the first person to want to
> do this. I drew a blank on Google. Sometimes the trick is knowing
> the official name for what I am trying to do.
>

Well. Currently you do have a static html database. You once have
decided to offer a copy of that to your customers. It was easy.

Now you have a dynamic server. The easyest solution to that is to
require an application server from your customers and upload the .war

Anything besides that gets complicated! You can't have a cake and eat
it, after all.

--
Beware of low-flying butterflies.

Roedy Green

unread,
Oct 16, 2009, 11:27:07 PM10/16/09
to
On Sat, 17 Oct 2009 04:51:21 +0300, Donkey Hottie <don...@fred.pp.fi>

wrote, quoted or indirectly quoted someone who said :

>Now you have a dynamic server. The easyest solution to that is to

>require an application server from your customers and upload the .war

Hmm. I that is a Gordian knot sort of solution. If the user manages
to get the whole thing installed, it then behaves just like the real
thing.

David Segall

unread,
Oct 17, 2009, 6:28:19 AM10/17/09
to
Roedy Green <see_w...@mindprod.com.invalid> wrote:

>A question about converting to JSP.
>
>As part of converting a website to JSP, I would imagine that every
>internal link would have to be renamed from *.html to *.jsp.
>
>This is not a good thing for several reasons:
>
>1. the world at large has bookmarks and links into your website with
>the *.html names.
>
>2. the jsp names don't look as safe and friendly.
>
>3. I want to create a downloadable offline website image. It should
>just link statically to pages. Logically these should be plain *.html
>with plain *.html links. This means a special pass every time a
>snapshot is generated to convert all the links since most are not
>generated by tags.
>
>How do people handle this? Or do they simply not provide downloadable
>snapshots?
>
>Is it possible using just some sort of configuration file to use
>*.html links in the text and have them automatically invoke the
>corresponding *.jsp file? For now I am thinking Tomcat, but I suppose
>that could change.

I think a custom error page would be a satisfactory solution for your
first problem but I don't think that it is adequate for the others.

Donkey Hottie

unread,
Oct 17, 2009, 11:05:04 AM10/17/09
to
17.10.2009 6:27, Roedy Green kirjoitti:
> On Sat, 17 Oct 2009 04:51:21 +0300, Donkey Hottie<don...@fred.pp.fi>
> wrote, quoted or indirectly quoted someone who said :
>
>> Now you have a dynamic server. The easyest solution to that is to
>> require an application server from your customers and upload the .war
>
> Hmm. I that is a Gordian knot sort of solution. If the user manages
> to get the whole thing installed, it then behaves just like the real
> thing.

I have never installed any of your html pages to my local disk. Why
would I want to do that? They are available and updated daily in the net.

You new system would make no difference for me, and I guess, most of
your users.

--
You could live a better life, if you had a better mind and a better body.

Roedy Green

unread,
Oct 18, 2009, 6:51:27 AM10/18/09
to
On Sat, 17 Oct 2009 18:05:04 +0300, Donkey Hottie <don...@fred.pp.fi>

wrote, quoted or indirectly quoted someone who said :

>I have never installed any of your html pages to my local disk. Why

>would I want to do that? They are available and updated daily in the net.

I have a tool called the Replicator to maintain a local mirror.

There are four reasons to use it:

1. for faster access.

2. for local searching

3. for use when either my site is down or your link to it is down.

4. for off-net access. You can propagate it to machines without
Internet access.

Wojtek

unread,
Oct 19, 2009, 11:30:01 AM10/19/09
to
Roedy Green wrote :

> A question about converting to JSP.
>
> As part of converting a website to JSP, I would imagine that every
> internal link would have to be renamed from *.html to *.jsp.
>
> This is not a good thing for several reasons:
>
> 1. the world at large has bookmarks and links into your website with
> the *.html names.

I think that providing web.xml with definitions which contain:

<servlet-mapping>
<servlet-name>myhello</servlet-name>
<url-pattern>/hello.html</url-pattern>
</servlet-mapping>

I do not know Tomcat's (I assume it is Tomcat) interpretation order,
but if the web.xml definitions are parsed first, then this will work.

> 2. the jsp names don't look as safe and friendly.

What?

> 3. I want to create a downloadable offline website image. It should
> just link statically to pages. Logically these should be plain *.html
> with plain *.html links. This means a special pass every time a
> snapshot is generated to convert all the links since most are not
> generated by tags.
>
> How do people handle this? Or do they simply not provide downloadable
> snapshots?

I have never provided down-loadable snapshots. And, even having used
your site, I do not think I will ever use them. Why would I? Your site
is a click away with the latest information.

I know you have a syncronization tool, but that is one more piece of
software which I need to install, get updates for, etc.

--
Wojtek :-)


David Segall

unread,
Oct 20, 2009, 2:18:05 AM10/20/09
to
David Segall <da...@address.invalid> wrote:

It occurred to me that this could be interpreted as simply showing the
user a custom error page. I should have added that I expected the
servlet behind the page to change the extension from .html to .jsp and
redirect the request.

0 new messages