Fill doGet, doPost in servlet

B

bigbinc

Is it possible to run doGet and doPost from an application and
basically is it possible to call doGet, doPost directly... it seems
like the only thing that is needed is filling in the method
arguements..


For example fill in request and response?

public void doGet (HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException {

doPost(request, response);

} // end of the function
 
O

Oscar kind

bigbinc said:
Is it possible to run doGet and doPost from an application and
basically is it possible to call doGet, doPost directly... it seems
like the only thing that is needed is filling in the method
arguements..

For example fill in request and response?

public void doGet (HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException {

doPost(request, response);

} // end of the function

Yes you can, provided you implement the interfaces HttpServletRequest and
HttpServletResponse. The question I'd ask is why I would want to emulate
a webserver, because it is so cumbersome. Are you sure this is the way to
go?


Oscar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top