Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to prevent users from bypassing the flow of the pages?  RSS feed

Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let's say I have 3 jsp pages

the person keys in the parameters for page1.jsp

page2.jsp authenticates whether the person is allowed to get data from database, if not it will throw exception message displayed in error page.

page3.jsp will then display the data in database.

Note: no servlet is used, authentication server code is on page2.jsp, there is some server code (if else ), but with functions imported from class.

Currently, it is using a session previous url to prevent from bypassing the flow of pages
This means when a user is at page1.jsp (Session data: previousurl='page1.jsp')
and is trying to access page3.jsp, there will be an error message.

However, I am not very sure session data can be easily manipulated, which might cause some security issues.

One suggestion is servlet with filters, but I am not able to find some examples on the web for preventing bypassing of pages.
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!