Hi am fairly new to using eclipse for designing
jsp and
servlet based Web applications , I have noticed that it has basically two sections a JavaResources Section and a WebContent section. Webcontent contains all the jsps and the "Java Resources" section contains all the servlets or the .java files. Now my question is basically about cookies.
The web browser returns the cookies by default to the original directory that sent the cookie and to all sub directories in that directory. Now you could create a directory within a direcory in the webcontent section as such
Now it can be seen from the above diagram that if a jsp in FolderA say "File_in_FolderA.jsp" creates a cookies and sets it to the response object all the jsp files in FolderA and FolderB will be able to access that cookie.
This is pretty straight forward and clearly understood
Now i am confused about who (which servlets and jsps) would be able to access the cookie if a servlet from JavaResource creates it and attaches it to the response object since you cant add subfolders in JavaResource section
The JavaResource structure looks something like this
Now suppose servletA creates a cookie and attaches it to the response object which jsps will be able to access the cookie ?? I know I could make the entire applications access all the cookies by using setpath("/") but thats not the point.How do we understand the access limitations of a cookie deployed by a servlet. ??