Servlet Collaboration means how one servlet can communicate with other. Sometimes servlets are to pass the common information that is to be shared directly by one servlet to another through various invocations of the methods. To perform these operations,...
Home » Posts filed under j2ee
How to get client machine name and Ip address from Httpservlet?
in
j2ee,
java interview
- on March 04, 2016
- No comments
In HttpServletRequest there are two methods
a. getRemoteAddr()
b. getRemoteHost()
which will provide the necessary information.
Actually in request header following information is stored.
Ip address of client m/c = request.getRemoteAddr();
Hostname...
What is difference between include action and include directive in JSP?
in
j2ee,
java interview
- on March 04, 2016
- No comments
Before starting the difference discussion, first, we have to understand the JSP life cycle. when a request first comes to a JSP it will translate into servlet then compile and load into web container for further use. Subsequent requests ...