This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
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


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
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. ??

 
wood burning stoves
 
subject: Mind Boggling Question about dynamic web application in Eclipse