Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

sending data with html

  • 14-02-2001 12:37am
    #1
    Registered Users, Registered Users 2 Posts: 6,660 ✭✭✭


    I'm supposed to do this servlet where I display a number of html links. When the user clicks on a link, they go to a page where the servlet runs it's doGet method. Every link leads to the same page so I need to find a way of sending some info with the request. None of the books in the library seem to give good examples and I've just spent 4 hours looking for an example online. Anybody done this before?


Comments

  • Closed Accounts Posts: 1,651 ✭✭✭Enygma


    You need to pass parameters to the servlet from the URL in the link.
    like this ....site.com/servlet.jsp?page=page1
    ....site.com/serlvet.jsp?page=page2

    Then in your doGet method you can pic them up from the request like so:
    String page = request.getParameter("page");

    Is this what you mean?


  • Registered Users, Registered Users 2 Posts: 6,660 ✭✭✭Blitzkrieger


    I think so - Thanks.


Advertisement