0% found this document useful (0 votes)
308 views3 pages

CS506 GDB Solution Fall 2022 by VU Answer

An e-commerce website is facing an issue where users' cart information is lost if their session ends unexpectedly, such as due to a power outage. The task is to save session data to prevent this. There are two options: URL rewriting or HTTP sessions. HTTP sessions should be used because it allows setting objects as attributes that can be retrieved later, fulfilling the need to pass shopping cart objects between requests. Additionally, client data is stored on the server and not in requests, improving security compared to URL rewriting.

Uploaded by

Zee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
308 views3 pages

CS506 GDB Solution Fall 2022 by VU Answer

An e-commerce website is facing an issue where users' cart information is lost if their session ends unexpectedly, such as due to a power outage. The task is to save session data to prevent this. There are two options: URL rewriting or HTTP sessions. HTTP sessions should be used because it allows setting objects as attributes that can be retrieved later, fulfilling the need to pass shopping cart objects between requests. Additionally, client data is stored on the server and not in requests, improving security compared to URL rewriting.

Uploaded by

Zee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

VISIT ANY MORE SOLUTIONS FREE

VUAnswer.com

CS506 GDB SOLUTION FALL 2022


Provide by VU Answer

Opening Date: 23-Feb-2022


Closing Date: 24-Feb-2022

Topic:

An online E-commerce website is using non-persistent cookies to store the sessions


of its visitors. The sessions are currently stored on user’s computer locally. The
website is facing a severe issue that before placing the order if light goes off, user’s
cart information get lost and user has to add products again in the cart.
You are given a task to save the information stored in a session if the user
accidently leaves the website due to any reason. You have to select one session
tracking technique from following to resolve this issue.
1. URL Rewriting
2. Http Session
Now which technique you will prefer to resolve this issue.
Justify you answer with solid arguments.

SUBSCRIBE OUR CHANNEL


https://www.youtube.com/channel/UCvFS8fAv4bvZsOmWu
WMIg3Q

WHATSAPP GROUP JOIN


https://chat.whatsapp.com/HGu2lvOWPsi0tpPGc4IGDZ
VISIT ANY MORE SOLUTIONS FREE

VUAnswer.com

GDB Idea 1 Solution:

In URL rewriting, we can append a session identifier parameter with every request
and response to keep track type of the session.
So, we will suggest HTTP session over the URL rewriting due to the following
reason.
This is very tedious because we need to keep track of this parameter in every
response and make sure it is not clashing with other parameters. In contrast Http
session interface, we can get session from HttpServletRequest object HttpSession
allows us to set objects as attributes that can be retrieved in future. As per
requirement that customer will doing purchases from site so he/she will send many
objects to other servlet like shopping cart so only Http session fulfill this
requirement.
The advantages of Http session over the URL rewriting are client data across the
multiple requests will be stored attributes of session objects on the server.
Another main benefit is the client data will not travel along with request and
response over the network during session tracking this gives data secrecy.

SUBSCRIBE OUR CHANNEL


https://www.youtube.com/channel/UCvFS8fAv4bvZsOmWu
WMIg3Q

WHATSAPP GROUP JOIN


https://chat.whatsapp.com/HGu2lvOWPsi0tpPGc4IGDZ
VISIT ANY MORE SOLUTIONS FREE

VUAnswer.com

REGARD - SARIM
WHATSAPP +923162965677

PLEASE NOTE:
Don't copy-paste the same answer.
Make sure you can make some changes to your solution file
before submitting copy paste solution will be marked zero.
If you found any mistake then correct yourself and inform me.
Before submitting check your GDB requirement.
If you need some help and question about file and solutions.

SUBSCRIBE OUR CHANNEL


https://www.youtube.com/channel/UCvFS8fAv4bvZsOmWu
WMIg3Q

WHATSAPP GROUP JOIN


https://chat.whatsapp.com/HGu2lvOWPsi0tpPGc4IGDZ

You might also like