Home
About Us
Contact Us
Bookmark
Saved Bookmarks
Current Affairs
General Knowledge
Chemical Engineering
UPSEE
BSNL
ISRO
BITSAT
Amazon
ORACLE
Verbal Ability
→
Servlet Interview Questions
→
General in Servlet Interview Questions
→
Compare CGI Environment Variables and the Correspo...
1.
Compare CGI Environment Variables and the Corresponding Servlet Methods.
Answer»
CGI
ENVIRONMENT
Variable
HTTP
SERVLET
Method
SERVER_NAME
req.getServerName()
SERVER_SOFTWARE
getServletContext().getServerInfo()
SERVER_PROTOCOL
req.getProtocol()
SERVER_PORT
req.getServerPort()
REQUEST_METHOD
req.getMethod()
PATH_INFO
req.getPathInfo()
PATH_TRANSLATED
req.getPathTranslated()
SCRIPT_NAME
req.getServletPath()
DOCUMENT_ROOT
req.getRealPath("/")
QUERY_STRING
req.getQueryString()
REMOTE_HOST
req.getRemoteHost()
REMOTE_ADDR
req.getRemoteAddr()
AUTH_TYPE
req.getAuthType()
REMOTE_USER
req.getRemoteUser()
CONTENT_TYPE
req.getContentType()
CONTENT_LENGTH
req.getContentLength()
HTTP_ACCEPT
req.getHeader("
ACCEPT
")
HTTP_USER_AGENT
req.getHeader("User-Agent")
HTTP_REFERER
req.getHeader("
REFERER
")
Show Answer
Discussion
No Comment Found
Post Comment
Related InterviewSolutions
How does a servlet examine all its init parameters?
How does a servlet get access to its init parameters?
Compare CGI Environment Variables and the Corresponding Servlet Methods.
How is retrieving information different in Servlets as compared to CGI?
Define ‘init’ and ‘destroy’ methods in servlets.
Explain the server-side include expansion.
What do you mean by server-side include (SSI) functionality in Servlets?
Explain the Servlet API.
What are some of the advantages of Servlets?
How do you write a servlet that is part of a web application?
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply
Your experience on this site will be improved by allowing cookies. Read
Cookie Policy
Reject
Allow cookies