File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes Mind Boggling Question about dynamic web application in Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Mind Boggling Question about dynamic web application in Eclipse" Watch "Mind Boggling Question about dynamic web application in Eclipse" New topic
Author

Mind Boggling Question about dynamic web application in Eclipse

Rajesh Khan
Ranch Hand

Joined: Oct 16, 2011
Posts: 230
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. ??

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Mind Boggling Question about dynamic web application in Eclipse