问题描述
我有一个小问题.是否可以删除" index.html并创建(以替换index.html)index.jsp?怎么样?
I have a little problem.Is it possible 'delete' index.html and create (to replace index.html) index.jsp? How?
我没有找到要更改其主页(index.html)地址(针对index.jsp)的文件(web.xml,glassfish-resource.xml).我没有在互联网上找到答案...
I don't find any files (web.xml, glassfish-resource.xml) with the address to the home page (index.html) to change it (for index.jsp).I have not found an answer on the Internet...
感谢您的回复!
推荐答案
您需要为应用程序配置欢迎文件列表".默认情况下,它是index.html,这就是为什么您找不到定义它的原因.
What you need is to configure the welcome-file-list for your application. By default, it's index.html, which is why you don't find anything defining it.
看看 web.xml部署描述符元素您基本上需要
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
这篇关于将index.html更改为index.jsp(JavaEE + Glassfish)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!