----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

Hi Joshua,

        There's a section on this one in Jason Hunter's book 'Java
Servlet Programming' (good book).  The section is called 'Locking
a Servlet to a Server' and is for people who have written a servlet
and don't just want it running anywhere.  Essentially what he
does is locks itself to a particular ip address and port number
using getServerName() and getServletPort().  It also uses a key
from getInitParameter("key"), which must be a 64-bit number equal
to the logical not of the 32bit ip concatenated with the 32-bit
port number.  

        It's all in the book anyway - the servlet refuses to perform
unless given the correct key.  He does warn however that the algorithm
is a little weak and you should make a stronger one.  Hope this
helps.

Dave


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Joshua
Slack
Sent: Monday, June 12, 2000 2:27 PM
To: Java Apache Users
Subject: Protecting your servlets


----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

Does anyone know of a way to protect your Java servlets (or anything
written in Java for that matter) from being redistributed without your
consent.  For example, if you want to create a demo version and a
registered version of a servlet and you don't want registered users to
distribute your work behind your back.

Thanks in advance,

-- Joshua Slack
[EMAIL PROTECTED]







--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]



--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to