我的 Web 应用程序中有我的 MVC 架构。现在流程如下:
starter.jsp -> SERVLET ->view.jsp
现在 view.jsp 期望某些请求参数出现在请求对象中。
当使用上述工作流程调用 view.jsp 时,一切正常。但是如果直接调用 view.jsp 则它不会在请求中获得预期的属性并转发到 error.jsp
现在搜索引擎会直接调用view.jsp吗?还是会从 starter.jsp 传输到 view.jsp?
详细示例:
main page has a href to a article.
href ="servlet?id=xyz"
Now servlet gets the id from request.
Servlet gets details for id from DB , puts the Object obtained from DB as request attribute
idDetails
And forwards to view.jsp
View.jsp gets request attribute idDetails
So view.jsp expects idDetails to be present as request attribute