设计/实现问题——Java/JSP/Servlet

发布于 2024-09-11 21:10:41 字数 475 浏览 3 评论 0原文

请耐心等待,以便我可以解释我的问题的布局。我正在开发一个网站/网络应用程序,涉及客户搜索房地产信息。网站上的一项功能涉及客户在一个页面(我们称之为页面 A)上执行搜索,随后的页面(页面 B)会返回一个订单项列表,这些订单项代表房地产信息(代理商、房屋等)。

客户能够查看此信息列表后,他们可以选择“查看个人资料”来查看房地产信息的这些行项目之一。然后,他们将进入一个页面以查看所选信息的个人资料(页面 C)。

我遇到的问题是设计/实现此功能的规范之一。要求规定,一旦客户进入页面 B,他们就会在其中查看信息。如果他们不选择转到页面 C,则需要发送一封电子邮件。他们可以在 AB 之间来回任意多次,但如果他们未能选择进入下一步,则需要发送一封电子邮件发送。

如果这是一个错误的描述,我深表歉意,但遗憾的是我无法对问题进行更详细的描述。我希望我能够很好地解释这一点以供理解。

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

失去的东西太少 2024-09-18 21:10:41
  • 维护每个 http 会话的状态。有 3 个会话状态 - 'VisitedA''VisitedB''VisitedC'。用户登陆 PageA 时的开始状态是“VisitedA”。用户移动到 PageB 后,将状态更改为“VisitedB”,而用户移动到 PageC 后,将状态更改为“VisitedC”。
  • 保留上次活动的时间
    通过记录每个 http 会话
    GET、POST 或其他的时间戳
    网站上的活动。
  • 决定
    在不活动的阈值持续时间上,例如“ThresholdTime”
    之后用户将
    被认为已放弃该网站。例如,如果'ThresholdTime'为 30 分钟,则如果 http 会话的上次活动时间早于 30 分钟,则关联的用户将被视为已放弃该站点。
  • 使用调度程序 API,例如 Quartz
    并安排一个作业来查看存储的数据
    所有http会话并找出其周期的会话
    不活动大于
    'ThresholdTime',其状态为'VisitedB'。然后,它将向与这些 http 会话关联的用户发送电子邮件。

请注意,您需要维护每个 http 会话的上次活动时间和状态。您必须寻找合适的位置来存储此数据,例如在 HttpSession 表中。

  • Maintain a state for each http session. Have 3 session states - 'VisitedA', 'VisitedB' and 'VisitedC'. The start state when the user lands on PageA is 'VisitedA'. Once the user moves to PageB, change the state to 'VisitedB' and Once the user moves to PageC, change the state to 'VisitedC'.
  • Maintain the time of last activity
    for each http session by recording
    the timestamps for GET, POST or other
    events on the site.
  • Decide
    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.
  • Use a scheduler API e.g. Quartz
    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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文