Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

migrate struts1 to struts2 --> some struts1 pre-defined constants  RSS feed

 
Raymond Chiu Wing Hing
Ranch Hand
Posts: 86
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,

I find below code are for struts1. First of all, does it need to convert to struts2 or it handle automatically in struts2?
If not, is there any example show how to code in struts2 or I can create custom functions to replace them?

saveToken(request);
resetToken(request);
isTokenValid(request)

<%@ page import="org.apache.struts.Globals" %> ---> Globals.TRANSACTION_TOKEN_KEY
<%@ page import="org.apache.struts.taglib.html.Constants" %> 
---> org.apache.struts.taglib.html.Constants.TOKEN_KEY
 
Joe Ess
Bartender
Posts: 9425
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This functionality is implemented by using the Token Tag in conjunction with the Token Interceptor or Token Session Interceptor
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!