• Post Reply Bookmark Topic Watch Topic
  • New Topic

session token is not matching with request token

 
sakraj gupta
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have one serious problem with matching the same token. Actually i have one class which generate the token and assign to session.
then same session token i am storing in jsp file(see below code). after that this jsp file i use to include as directive to another jsp.
later when i call request.getparameter in our java class to get request token and match with session token. it failed randomly like 2-3 times out of 1000 user token.
jsp file code
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %>
<%@ page import="com.util.constants.Constants" %>
<%if(session.getAttribute(Constants.TOKEN_UUID)!=null){%>
<input type="hidden" name="<%=Constants.FTOKEN_NAME %>" value="<%=session.getAttribute(Constants.TOKEN_UUID)%>
<%}%>
token uuid for example - Z#7mL)%vs3ihWKdPx3ky0Pym2y)oqp

Please suggest
Thanks in advance
Saket">
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35707
407
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sakraj,
Could there be a special character in the token when it fails? For example a quote would clearly mess things up.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!