Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1019155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:58:04+00:00 2026-05-16T10:58:04+00:00

Still learning JSP Web Applications here. I have been doing this for a while

  • 0

Still learning JSP Web Applications here.

I have been doing this for a while in my web application but I would like to know a more secured solution.

Imagine a Table that displays certain Book Information. When user clicks one of the rows in the table,
I basically send the BookID together with the url.

Example URL. http://locathost:8080/myapp/editbook.htm?bookID=3

in my servlet.

String strBookID = request.getParameter("bookID");

I think this is a little weak, is there a way where I could provide a more secure way other than this.
Its quite easier for hacker to edit the URL if I send the BookID together with the URL.

Can you share me some link on how to do this in both the Client Side and Server Side?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T10:58:05+00:00Added an answer on May 16, 2026 at 10:58 am

    I think this is a little weak, is there a way where I could provide a more secure way other than this.

    You have to define “secure” on the basis of your application. The requirements are totally different for a public website selling books v/s a private library hosting confidential volumes v/s anything other application in between.

    At a minimum, you should do the following –

    1. Verify that bookID is in fact an Integer and is within an expected range.
    2. Ensure that you bind bookid in a parameterized SQL Query – this is to prevent SQL Injection.
    3. Show a ‘Book not found’ page if the book cannot be found

    For a public website, the above is enough. You actually want people to discover your books, so if someone modifies the bookID, you shouldn’t care.

    For a secure library, you have to do a lot more.

    1. Ensure that the URL is protected in web.xml, so only authenticated and authorized users can get to the URL
    2. Verify the current user has access to the bookID. You can store the list of books available to a user in the session object.
    3. If the user does not have access, return a 403 error page.

    There are several other strategies to protect URLs; some use tokens to ensure the URL hasn’t been manipulated. Others don’t send bookID to the client, and instead rely on number {1 through n} where only the server knows that 1 corresponds to Book A and so on. But the idea is to ensure that a user doesn’t get access to a book he doesn’t have permissions to.

    If you are using Spring, I’d highly recommend Spring Security. Otherwise look into JAAS.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 500k
  • Answers 500k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Kindly visit the Q&A section in [http://visualstudiogallery.msdn.microsoft.com/en-us/99468ece-689b-481c-868c-19e00e0a4e69]. There are steps… May 16, 2026 at 1:59 pm
  • Editorial Team
    Editorial Team added an answer I got the problem. I was setting the observer wrongly.… May 16, 2026 at 1:59 pm
  • Editorial Team
    Editorial Team added an answer Scottgu posted how to do this a while ago: http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library.aspx May 16, 2026 at 1:59 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Still learning Objective-C / iPhone SDK here. I think I know why this wasn't
i have some knowledge of css,jQuery,Grails,django,servlets and jsp still i can't see me designing
Building decent RIA data-intensive crud-like application is still hard. In spite of existence tons
I've been trying to no avail to set up a simple Struts2 application so
Sorry for asking this question, but I searched all Java-related questions, but I got
I have a very simple page that is displaying canned data. I experienced this
Still learning asp.net and mvc, please be gentle :) Currently setting up an MVC
Still learning lxml. I discovered that sometimes I cannot get to the text of
I start using matplotlib a month ago, so I'm still learning. I'm trying to
I am learning objective C.I like to know about client/server(socket) programming for iphone. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.