jQuery in Action, 3rd edition
The moose likes JSP and the fly likes Multi user program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Multi user program" Watch "Multi user program" New topic

Multi user program

raj eevan

Joined: Apr 26, 2013
Posts: 3

Can any one help me out on this code below. my requirement is to store data entered in array and later use for updating database. my issue is accessing in different browser (multi user).

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
tester dd = new tester();
<%! class tester {
ArrayList accLi = new ArrayList();
for (int i = 0; i < dd.accLi.size(); i++) {
<input type="text" name="accno"/>
<input type="button" name="btadd" value="add" onclick="submit()"/>
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63548

The use of scriptlets in JSPs has been obsolete for over 12 years. You should not be using them at all.

But in particular, your issue is the use of <%! %>. This limits your web app to a single user as the values are shared across all threads. Don't use these. Ever.

You need to refactor your web app to use the JSTL and EL, and to store user-specific values in the session.

[Asking smart questions] [About Bear] [Books by Bear]
raj eevan

Joined: Apr 26, 2013
Posts: 3
Thank you,
Any specific link for quick understading of JSTL
raj eevan

Joined: Apr 26, 2013
Posts: 3
How to store array of data in session without useing <%! %> .... iam sorry if iam asking stupid question
jQuery in Action, 3rd edition
subject: Multi user program
It's not a secret anymore!