| |
|
No cookie due to java.net.ConnectException: Connection refused
|
|
Cookie provided by
www.update.uu.se
|
Small Servlet Hacks on Franks Internet Playground.
Find here a few small, but maybe handy servlets.
If you find s.th. interesting for you, enjoy!
- Sometimes you need to be backward compatible:
The Cgi-Servlet2
lets you run CGI's within a Servlet Environment (successfully
used to host the Mailman lists on this page).
The code is essentially a mess, but ...
For jdk's prior to 1.2 (no Collections) use
the older CgiServlet.
Thank you to David W. Yutzy for pointing out the useless
crossreferences to a long gone Util class.
- Sometimes you need to masquerade s.th.,
The Proxy Servlet
lets you pass thru requests from one HTTP server to another
(also successfull to hide a
Mailman server). This Servlet is currently
acvtive, e.g.
HTtp://frank.spieleck.de/reweb/?tab=1&link=1&id=713015&name=dufns
shows you (approximately) the same page like
http://v1.nedstatbasic.net/s?tab=1&link=1&id=713015&name=dufns. The
latter is the Doris & Frank
homepage counter and nedstatbasic is on the killfile of my employers
squid :-( Currently this is a fixed redirection to a site, one
day I'd like to improve that and make a real rewebber from it.
This proxy servlet is lazy. A real proxy had to rewrite all
links in the passed through stream to point to itself. Not done,
not currently needed by me, won't happen soon. There once
used to be a much more fully featured (but also much heavier) version
at tigris.org.
- Sometimes you need to masquerade a file as s.th. different:
The Fetchlet
lets you download from a different url, from a different file
name and different mime type.
- Sometimes you need a download via e-Mail
The Maillet
lets you send a url via e-mail to a mail account.
- This ultratiny
Trampolin Servlet
is useful for example if you want to track, which links visitors use
to leave your web site: Don't place a link, place an indirect link
via the trampolin! E.g. replace links like
<A HREF="http://spieleck.de">
with something like
<A HREF="YOUR-CONFIGURED-TRAMPOLIN-PATH?http://spieleck.de">
an the you can see in your access.log, how many people use that
particular link.
- The
Voting Servlet
on the other hand is relatively complex. It implements a very
simple vote for your website.
At least it needs lots of configuration data.
Ask me if you need information.
- Not a Servlet, but a Servlet Spec 2.3 HttpSessionListener which
allows a Servlet to look into all Sessions running in the current
ServletContext (Application): SessionAccountingListener.java. This class contains some usefull
JavaDoc about class usage.
- Need to make something strange? With the RandomLinkServlet you can forward a visitor to a random link from a
set of links you configure.
-
When you are fluent in German, there is more stuff to download
in another space of this server,
Patrick's Spieleck
Of course I know the above servlets are not very useful without any
documentation. So either you are an advanced hacker and know what they are good
for or you ask me and I'll be happy to help you!
spieleck.de.
| Franks Internet Playground
| Send email
Access count: 5133, gener
ated Sun Feb 05 13:05:50 CET 2012; prev access=Sun Feb 05 07:35:43 CET 2012; s
ervlet up since Fri Jan 13 20:21:11 CET 2012