JSP taglibs show information from other sessions

L.S.,

I’ve created a JSP page using the JSP taglibs of Domino 6.5.1. The JSP page works fine for a single user, but when a second user starts to use the web application, things go wrong.

Error messages start appearing on the wrong browser, item values set with one browser appear in the other browser, …

Any idea what might be causing this? What am I doing wrong? The application server is Tomcat, web server is IIS.

Gert

Subject: JSP taglibs show information from other sessions

I have not heard of this problem in the JSP tags, so my guess is that your web application is making an assumption somewhere that it should not make.

If you want to solve the problem yourself, the place to start would be to carefully examine how each Domino session is created in your JSPs - are you always using the same username/password, or sso? If you ommit those, the session will default to anonymous - ok when 1 user if your security settings permit it, not so good with 2 or more users…

If you want help, code would be most useful - if you don’t want to post it here, you can email it to me - sleland@us.ibm.com.

Subject: RE: JSP taglibs show information from other sessions

L.S.,

Here is a snippet of the code I’m using. I’m trying to set the value of the ‘ticket_originator’ item to the name attribute of the UserPrincipal. The <%= fullName %> part shows the output I’m expecting, the <domino:item name=“ticket_originator”/> tag shows the value of the first user who accessed this page. When clicking the link, the document gets created correctly in the database (except the ticket_originator field, which gets the wrong value). What am I doing wrong?

Gert

BTW: A nice feature for a next release would be to allow the use of EL in the value part of the setitem tag (e.g. ${principal.name} in this case)

	<% String fullName = ((UserPrincipal) request.getSession(true).getAttribute("principal")).getName(); %>

	<domino:session host="..." user="..." password="...">

		<domino:db dbname="Issue tracking.nsf">

			<domino:form name="ticket" schema="ticket" validhref="index.jsp" clientvalidate="true">

				<%= fullName %>

				<domino:setitem name="ticket_originator" value="<%= fullName %>"/>

				<h3>Aanvrager</h3>

				<domino:item name="ticket_originator"/>

				<h3>Korte beschrijving</h3>

				<domino:input name="ticket_summary"/>

				<h3>Volledige beschrijving (voorbeeld, schermnummer, ...)</h3>

				<domino:textarea name="ticket_description"/>

				<domino:validaterequired name="ticket_summary" message="Korte beschrijving is een verplicht veld"/>

				<domino:validaterequired name="ticket_description" message="Uitgebreide beschrijving is een verplicht veld"/>

				<domino:saveclosedoc text="Aanvragen"/>

			</domino:form>

		</domino:db>

	</domino:session>

Subject: RE: JSP taglibs show information from other sessions

I do not see from this code snippet where the username and password values that you pass into the domino:session come from. Could it be that they don’t have a value and so you are starting anonymous sessions?

Why do you use request.getSession(true) instead of request.getSession(false)? If the request object actually created an HttpSession for a user here, would your code do what you want or die on a null pointer exception?

Take care!

-sl