R
RigasMinho
Hello,
I have a java application where i have this source code in the JSP
file.
<input type="submit" name="add" value="Add User">
<input type="text" name="newadmin" size="30"
onChange="javascript:fillSubs(this.form)"><br>
I want it so that when you put in an e-mail address it adds the text
in the box to become a member of an administrator of the application.
The guy did it pretty bad before me - he hard coded in source code to
make administrators work by using this function:
TreeSet admins = new TreeSet();
admins.add("(e-mail address removed)");
And that basically adds the admin to the application. The application
then realized that user is logged in and gives admin rights to the
user.
So at the end basically i'm trying to make it so that we can add
admins to the application with out changing the source code manually
and then saving it - then creating a war file - then deploying it to
websphere.
I thought about making it read from a text file but no idea how to
start that. Unless you guys think its easier - he does have this in a
java file...
public static synchronized String[] getLdapToolAdmins()
{
int _LTAdminCount =
Integer.parseInt(_inifile.getProperty("AdminCount"));
String temp[] = new String[_LTAdminCount];
for(int i = 0; i < _LTAdminCount; i++)
{
temp =
_inifile.getProperty("LTAdmin".concat(String.valueOf(String.valueOf(i))));
}
return temp;
}
BUt somehow that doesnt really add admins to the application because
the file i have lists the admins to the app but doesnt get loaded in
somehow.
Any ideas?
I have a java application where i have this source code in the JSP
file.
<input type="submit" name="add" value="Add User">
<input type="text" name="newadmin" size="30"
onChange="javascript:fillSubs(this.form)"><br>
I want it so that when you put in an e-mail address it adds the text
in the box to become a member of an administrator of the application.
The guy did it pretty bad before me - he hard coded in source code to
make administrators work by using this function:
TreeSet admins = new TreeSet();
admins.add("(e-mail address removed)");
And that basically adds the admin to the application. The application
then realized that user is logged in and gives admin rights to the
user.
So at the end basically i'm trying to make it so that we can add
admins to the application with out changing the source code manually
and then saving it - then creating a war file - then deploying it to
websphere.
I thought about making it read from a text file but no idea how to
start that. Unless you guys think its easier - he does have this in a
java file...
public static synchronized String[] getLdapToolAdmins()
{
int _LTAdminCount =
Integer.parseInt(_inifile.getProperty("AdminCount"));
String temp[] = new String[_LTAdminCount];
for(int i = 0; i < _LTAdminCount; i++)
{
temp =
_inifile.getProperty("LTAdmin".concat(String.valueOf(String.valueOf(i))));
}
return temp;
}
BUt somehow that doesnt really add admins to the application because
the file i have lists the admins to the app but doesnt get loaded in
somehow.
Any ideas?