This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Servlets and the fly likes retrieving parameters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Servlets
Bookmark "retrieving parameters" Watch "retrieving parameters" New topic

retrieving parameters

jacob deiter
Ranch Hand

Joined: Apr 02, 2008
Posts: 580
In sent a Link :http://localhost:8080/sampleapp1/someservlet?event=1

at serve I have receive the events' value,how it can be retrieved??
Vijitha Kumara

Joined: Mar 24, 2008
Posts: 3899

Use, request.getParameter("event") in the servlet (assuming request, refers to the HttpServletRequest provided by the container).

[How to ask questions] [Twitter]
I agree. Here's the link:
subject: retrieving parameters
It's not a secret anymore!