My mail client seams to make trouble, so I repost my mail. SORRY if you get it twice! -----Ursprüngliche Nachricht----- Von: Oliver Thiel [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 5. Februar 2004 17:06 An: '[EMAIL PROTECTED]' Betreff: Global Variable - SetupServlet Hi all, I wrote a struts app with database ‘driven’ forms using iBatis. For this purpose I wrote a ‘SetupServlet’ which creates some LinkedHashMaps e.g. register == {username=, password=, ….} and sets them into the Servlet Context servletContext.setAttribute("register", register); In the reset() Methode of my RegisterForm.java I do something like that:
public class RegisterForm extends ActionForm { Map register = new LinkedHashMap(); : public void reset(ActionMapping arg0, HttpServletRequest arg1) { register = servletContext.getAttribute("register"); arg1.setAttribute("regiser",fields); } } And in my register.jsp: <logic:iterate id="field" name="fields"> <TR> <TD width="40%"><bean:write name="field" property="key"/>:</TD> <TD><input type="text" name="field(<bean:write name="field" property="key" />)" value="<bean:write name="field" property="value" />" class="Feld"></TD> </TR> </logic:iterate> Until this point anything works fine I see the form and I can insert data … BUT I can also see the INSERTED data from another machine – as if they where written into the ServletContext?!? What am I doing wrong? OR: What can I do against this really BAD effect? Oliver