jsf - How to change index.html in every folder to / when we access it on browser -
i've unique problem, think not problem, want optimize url website have.
so want change
index.html
on every folder example
culture
folder, if want access
index.html
in culture folder can type
culture/index.html
right? want access type
culture/
is possible that? if so, how produce? i'm using jsf 2
programming language.
maybe misunderstand problem, can done configuring welcome files in web.xml
file:
web application developers can define ordered list of partial uris called welcome files in web application deployment descriptor. purpose of mechanism to allow deployer specify ordered list of partial uris container use appending uris when there request uri corresponds directory entry in war not mapped web component. feature can make site easier use, because user can type url without giving specific filename.
note: welcome files can jsps, static pages, or servlets.
just:
<welcome-file-list> <welcome-file>index.jsf</welcome-file> <welcome-file>index.html</welcome-file> </welcome-file-list>
i've tested on wildfly 11 , works, project structure is:
+ webcontent - index.xhtml + folder_a - index.xhtml + folder_b - index.html + folder_c - other_name.xhtml - some_name.html
when enter:
http://localhost:8080/myproject/
contentwebcontent/index.xhtml
http://localhost:8080/myproject/folder_a
contentwebcontent/folder_a/index.xhtml
http://localhost:8080/myproject/folder_b
contentwebcontent/folder_b/index.html
does .xhtml file contain jsf content? parsed? thought defining jsf/facelets file welcome file did not work , needed http redirects via 'meta-inf'
.jsf' extension using in my
web.xml` file:
<servlet-mapping> <servlet-name>faces servlet</servlet-name> <url-pattern>*.jsf</url-pattern> </servlet-mapping>
please read answers below question learn is:
Comments
Post a Comment