Java HttpCookie getPath() MethodThe getPath() method of HttpCookie class is used to return the path on the server for which the browser return the cookie. The cookie will be visible to all the sub paths on the given server. SyntaxParameterN.A. ReturnThe above method is used to return a string which specifies the path which contains the servlet name. For e.g. - /catalog Example 1Test it NowOutput: The path is given as: 189.144.22.5/user/index.html Example 2Test it NowOutput: The first path is given as: 189.144.22.5/user/index1.html The second path is given as: 145.132.19.6/client/index2.html Example 3Test it NowOutput: The path is given as: null Next TopicgetPortList() Method |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India