This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Hi: following is from sample code: <html> <head> <BASE HREF="<%= request.getScheme() %>://<%= request.getServerName() %>:<%= request.getServerPort() %><%= request.getContextPath() %>/"> </head> <body> </body> </html> request is a interface, how could it be used without any inplemetation. I did not find any implementation of interface request. sorry about this question and thanks for help! tom gong
The implementation of the interface request is left to the implementors of the Servlet container. So you can always treat it as a "class". According to Sun: "The servlet container creates an HttpServletRequest object and passes it as an argument to the servlet's service methods (doGet, doPost, etc)." Implementing an Interface in Java is not always the responsibility of the user of an application.
Tony Alicea Senior Java Web Application Developer, SCPJ2, SCWCD
Joined: Jul 15, 2000
Thanks a lot, Tony your help is appreciated. tom gong