>>> <input type="submit" name="add" value="Add User">
>>> <input type="text" name="newadmin" size="30"
[quoted text clipped - 5 lines]
>>> and then saving it - then creating a war file - then deploying it to
>>> websphere.
Lew <l...@nospam.lewscanon.com> wrote:
>> Typically one would do this with a database or LDAP / JNDI interface.
>>
[quoted text clipped - 3 lines]
>> Then go into the authorization mode, where the system looks up the (possibly
>> just entered) information to decide authorization.
> Awww man that sucks - i have no idea what you're talking about too :-)
I am sorry. Let me attempt this from a different angle, and if I don't make it
clear perhaps others will nail it better than I. Also, if you have a specific
question about something I said, let me know. It will help me to make my
explanation clearer.
You say you want to take input from a JSP (i.e., HTML) text field and put it
into your system in a way that lets the system refer to that input. In this
case, you want to take the identifier (name, email address, Top Gun nickname)
of an administrator and add it to some sort of knowledge base (source code,
the way you described it). Later, the application should recognize that
identifier as an administrator, and grant the user the authorization to do
magical administrator things.
Is that right?
Source code is a *terrible* place to store data. As you point out, it causes
you to rewrite the application every time the data change, in this case, the
list of administrator identifiers. This sin is called "hard coding" the data.
So if source code is the wrong place to base your data, where should you base
your data? Base it in some data place, perhaps, oh, like, say, a data base.
Or a text file. Or a special kind of text file, like an XML file. Or a
spreadsheet. Or a special kind of data storage called "LDAP".
(Lightweight Directory Access Protocol,
<http://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol>
)
The point is, the storage place for data, also called a "data store", is in
some storage medium that is not the Java code (neither source nor byte). Then
your Java code, which is a set of instructions, can instruct the computer to
accept the information sent by the browser, notice that the command is to
"Add" an administrator, and store the data in the data store. No code rewrite
needed.
- Lew