You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Matt Pease <ma...@fullscreen.com> on 2001/09/01 03:57:37 UTC
howto mirror a jsp site.. convert ?/= to .do/param1/param2?
Hi all -
I'd like to mirror my jsp generated website, in an effort to
reduce the memory / hardware requirements of the site. My site's
content won't change so often that it needs to see immediate updates.
I plan on using wget -m to mirror the site. This works but for
one problem... wget creates these kind of files:
preview_ss.jsp?id=65
But apache doesn't want to serve them... requests to this link
are 404 b/c apache looks for preview_ss.jsp
I'm wondering if there is a way to switch jsp into a mode where
using:
preview_ss.do/id/65
will still automatically place parameters into the request parameters
hashtable?
Or am I going to have to add a call to do this to each page? I guess I
could use a custom tag...
Thank you-
Matt
RE: howto mirror a jsp site.. convert ?/= to .do/param1/param2?
Posted by Matt Pease <ma...@fullscreen.com>.
Hi Pier --
Sorry I guess I wasn't clear...
getting the file with wget works fine..
all I do is: wget -m fullscreen.com
But, what I get is a bunch of myfile.jsp?param=value
files.
moving this directory into apache doesn't work, b/c
when the user requests the file /myfile.jsp?param=value
apache looks for myfile.jsp, doesn't find it & returns
a 404.
So, I'm wondering, is there some way to rewrite the
param / values so that JSP understands them & so
that apache doesn't attempt to strip them away as
parameters?
I've seen struts apps & other pages use this format:
myfile.jsp;param=value
I know that I can use servlet mapping to do something
like
myfile.do;/pathto/myfile.jsp;param=val;param2=value
& have the servlet servicing myfile.do rewrite the URLs into standard
format. Perhaps thats what I'll do.
I was just wondering if there is some way to get tomcat to do
this automatically for a webapp.
Thanks again-
Matt
FullScreen
Delicious downloadable desktop delights
> WGET works for me... Just be sure to escape that "?" character in
> the query
> string... Do something like (quoted)
>
> # wget "http://mysite.com/myfile.jsp?param=value"
>
> Or escaped:
>
> wget http://mysite.com/myfile.jsp\?param=value
Re: howto mirror a jsp site.. convert ?/= to .do/param1/param2?
Posted by Pier Fumagalli <pi...@betaversion.org>.
"Matt Pease" <ma...@fullscreen.com> wrote:
> Hi all -
>
> I'd like to mirror my jsp generated website, in an effort to
> reduce the memory / hardware requirements of the site. My site's
> content won't change so often that it needs to see immediate updates.
>
> I plan on using wget -m to mirror the site. This works but for
> one problem... wget creates these kind of files:
>
> preview_ss.jsp?id=65
>
> But apache doesn't want to serve them... requests to this link
> are 404 b/c apache looks for preview_ss.jsp
>
>
> I'm wondering if there is a way to switch jsp into a mode where
> using:
>
> preview_ss.do/id/65
>
> will still automatically place parameters into the request parameters
> hashtable?
>
>
> Or am I going to have to add a call to do this to each page? I guess I
> could use a custom tag...
WGET works for me... Just be sure to escape that "?" character in the query
string... Do something like (quoted)
# wget "http://mysite.com/myfile.jsp?param=value"
Or escaped:
wget http://mysite.com/myfile.jsp\?param=value
Pier