| Author |
How to Request Object
|
Shivangi Joshi
Greenhorn
Joined: Jun 01, 2007
Posts: 23
|
|
|
How to get request object in Servlet If I am not using any HTML or JSP page.So in this case How doGet() will understand what is request coming from browser.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56529
|
|
An HTTP request really has nothing to do with an HTML page or a JSP. It can be generated by any number of tools. As long as it conforms to the HTTP rules, a servlet can deal with it just fine.
Perhaps you can add some context to your question?
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
adil qureshi
Ranch Hand
Joined: Jul 11, 2008
Posts: 48
|
|
This way you can handle whether request is a get or post ...
public void doGet(HttpServletRequest request, HttpServletResponse response) {doPost(request,response);}
public void doPost(HttpServletRequest req, HttpServletResponse res) {}
Secondly as you can see that doGet() / doPost() already has the request parameters so you can always get whatever you want from incoming request to the servlet....also can you please discuss in detail what you want to know
|
SCJP 1.5,SCWCD 1.5
|
 |
 |
|
|
subject: How to Request Object
|
|
|