My favorites | Sign in
Project Logo
                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
================================================================================
WizTools.org--URL Shortening Servlet
================================================================================

This is a small servlet to redirect to the actual URL. The URL information is
maintained in a separate text files (UTF-8 encoded).

--------------------------------------------------------------------------------
Requirement
--------------------------------------------------------------------------------

1. JSP 2.0 compatible container

2. This application is most useful when hidden behind mod-jk--Apache or
ProxyPass: for super-short URLs. But this is not mandatory.

--------------------------------------------------------------------------------
Source Code and Download
--------------------------------------------------------------------------------

http://wiztools.googlecode.com/

--------------------------------------------------------------------------------
Installation
--------------------------------------------------------------------------------

1. Create folder for data storage.

2. Change the 'configFolder' property in this file to map to the data storage
directory created in step 1:

WEB-INF/classes/folder.properties

3. Create data files in the pattern '<shortened-url>.url'. The '<shortened-url>'
is the shortened URL. The file's first line should be the actual URL.

Go through the next section to understand the procedure in detail.

--------------------------------------------------------------------------------
Example
--------------------------------------------------------------------------------

Purpose:
To shorten the URL:
http://wiztools.org/code/text-encoding-util/README.txt
To:
http://localhost/r/a

Steps:

1. Create the data directory '/opt/redir-data'.
2. Create the file 'a.url' inside '/opt/redir-data'. The content of this file
should be the actual URL.
3. Change the property 'configFolder' in WEB-INF/classes/folder.properties.
4. Reload the web-application 'r' (redir builds as r.war).
5. Access the URL: http://localhost/r/a.
You will be redirected to the actual URL.

--------------------------------------------------------------------------------
License
--------------------------------------------------------------------------------

This project is covered by Apache 2.0 License:

http://www.apache.org/licenses/LICENSE-2.0

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
By
Subhash Chandran
http://WizTools.org/

Show details Hide details

Change log

r8 by subwiz on Apr 26, 2009   Diff
module name redir changed to redir-servlet
Go to: 
Project members, sign in to write a code review

Older revisions

r6 by subwiz on Apr 26, 2009   Diff
importing bazaar based projects
All revisions of this file

File info

Size: 2563 bytes, 71 lines

File properties

svn:mergeinfo
Hosted by Google Code