aspose file tools
The moose likes Servlets and the fly likes newbie question Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "newbie question" Watch "newbie question" New topic
Author

newbie question

tom gong
Ranch Hand

Joined: Jul 15, 2000
Posts: 36
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
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3219
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
tom gong
Ranch Hand

Joined: Jul 15, 2000
Posts: 36
Thanks a lot, Tony
your help is appreciated.
tom gong
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: newbie question
 
Similar Threads
Update User's Session with AJAX tip
STRUTS2 Tabbed interface problem with Tiles tag in IE6
_jspService methiod calarification
How to use the include() command in JSP
set Border color