• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Mind Boggling Question about dynamic web application in Eclipse

 
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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. ??

 
reply
    Bookmark Topic Watch Topic
  • New Topic