设计/实现问题——Java/JSP/Servlet
请耐心等待,以便我可以解释我的问题的布局。我正在开发一个网站/网络应用程序,涉及客户搜索房地产信息。网站上的一项功能涉及客户在一个页面(我们称之为页面 A)上执行搜索,随后的页面(页面 B)会返回一个订单项列表,这些订单项代表房地产信息(代理商、房屋等)。
客户能够查看此信息列表后,他们可以选择“查看个人资料”来查看房地产信息的这些行项目之一。然后,他们将进入一个页面以查看所选信息的个人资料(页面 C)。
我遇到的问题是设计/实现此功能的规范之一。要求规定,一旦客户进入页面 B,他们就会在其中查看信息。如果他们不选择转到页面 C,则需要发送一封电子邮件。他们可以在 A 和 B 之间来回任意多次,但如果他们未能选择进入下一步,则需要发送一封电子邮件发送。
如果这是一个错误的描述,我深表歉意,但遗憾的是我无法对问题进行更详细的描述。我希望我能够很好地解释这一点以供理解。
Bear with me so I can explain the layout of my problem. I am working on a website/web application that involves customers searching for real estate information. One feature on the website involves the customer performing a search on one page(well call this page A) and the following page(Page B) returns a list of line items that represent real estate information(agents,homes,etc).
Following the customer being able to view this list of information, they can select "View Profile" to view one of these line items of real estate information. This will then bring them to a page to view a profile(Page C) of the selected information.
The problem I am having is in designing/implementing one of the specifications for this feature. The requirements state that once a customer has proceeded to Page B where they are viewing the information. If they do not choose to go to Page C then an email needs to be sent. They can go back and forth between A and B as many times as they want, but if they fail to choose to go to the next step, then an email needs to be sent.
I apologize if this is a bad description, but I am unfortunately unable to give a more detailed description of the problem. I hope I was able to explain this well enough to understand.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通过记录每个 http 会话
GET、POST 或其他的时间戳
网站上的活动。
在不活动的阈值持续时间上,例如“ThresholdTime”,
之后用户将
被认为已放弃该网站。例如,如果'ThresholdTime'为 30 分钟,则如果 http 会话的上次活动时间早于 30 分钟,则关联的用户将被视为已放弃该站点。
并安排一个作业来查看存储的数据
所有http会话并找出其周期的会话
不活动大于
'ThresholdTime',其状态为'VisitedB'。然后,它将向与这些 http 会话关联的用户发送电子邮件。
请注意,您需要维护每个 http 会话的上次活动时间和状态。您必须寻找合适的位置来存储此数据,例如在 HttpSession 表中。
for each http session by recording
the timestamps for GET, POST or other
events on the site.
on a threshold duration of inactivity, say 'ThresholdTime',
after which the user will be
considered to have abandoned the site. For example, if 'ThresholdTime' is 30 minutes, then if the times of last activity for an http session is older than 30 minutes, the associated user will be considered to have abandoned the site.
and schedule a job that will look at the stored data for
all http sessions and find out the sessions whose period of
inactivity is greater than
'ThresholdTime' and whose state is 'VisitedB'. It will then sends emails to the users associated with those http sessions.
Note that you'd need to maintain the time of last activity and state for each http session. You will have to look for the suitable place to store this data e.g. in a HttpSession table.