Sorry Jim, I have to agree with the other posters...this is a really unclear question.
I think what you are asking is this: When a user logs in, i want to put the user id and password somewhere that i can always find it easily. If so, put it in session scope. It will be there until the session expires, and you can get to it from a JSP or servlet. If you need it available from everything in the web app, you could use something like a filter in conjunction with ThreadLocal to do that...but I do not think that is such a great idea. IMO, keeping it in session, and passing it to your model is a cleaner and more maintainable design. Larry On Sat, 08 Jan 2005 19:25:15 +0000, Jim Douglas <[EMAIL PROTECTED]> wrote: > I have an LogonForm, LogonAction and when a user successfully logs on, I set > Attributes for "userID" and "userName". > > How would be the best way to make this information available to the Web App > regardless of whether I need the data from within a JSP, servlet or class > file(for example, building a dynamic query) > > This is what I was trying to do and raised this issue(I can't get it to > work) > > public class SQL92FormDetailDAO implements FormDetailDAO { > > private Connection connection; > public SQL92FormDetailDAO(Connection connection) { > this.connection = connection; > } > > public List listFormDetail() { > List items = new ArrayList(); > Statement statement =null; > try { > statement = connection.createStatement(); > String userID = session.getAttribute("userID"); > String query = "select name, formdetail from " > + "forms where userID = " + userID; > > Thanks, > Jim > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]