[英]How to Map home page to “root of application” in Java EE?
Set-Up- I have a JSP - index.jsp and a servlet indexController. 设置-我有一个JSP-index.jsp和一个servlet indexController。 indexController forwards request to index.jsp.
indexController将请求转发到index.jsp。 Execution of index.jsp without execution of indexController is not desired.
不执行indexController而不执行index.jsp是不希望的。
Requirements- 要求-
My Solution - 我的解决方案-
I think, everyone wants to achieve same functionality for their home screen and there are many questions at stackoverflow with similar problems. 我认为,每个人都希望为自己的主屏幕实现相同的功能,并且在stackoverflow上存在很多类似问题。
Is there any standard solution which solves problem for once and for all. 是否有任何标准解决方案可以一劳永逸地解决问题。
Edit:- There were only 7 views in more than 30 mins. 编辑:-在超过30分钟内只有7个视图。 Removed GAE tag, to attract more views.
删除了GAE标签,以吸引更多观看次数。
Simply put a web server before your app server and you can map any URL to any application/page. 只需将Web服务器放在您的应用服务器之前,您就可以将任何URL映射到任何应用程序/页面。 Also don't publish an app server directly.
另外,请勿直接发布应用服务器。 Are you using Tomcat I presume, so you probably deployed ROOT application, right?
我假设您正在使用Tomcat,因此您可能已部署了ROOT应用程序,对吗? (you should go with the web server anyway)
(无论如何,您都应该使用网络服务器)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.