# url mapping in web.xml to remove the .zul to use the clean url

Naveen
42

i need to hide the .zul from the url and i tried the url mapping in the web.xml

    <servlet-mapping>
<url-pattern>/home</url-pattern>
</servlet-mapping>


but still the index.zul page is not mapped i get an blank page.

if i call the http://localhost:8080/home/ the index.zul is not mapped i am testing with an default page.

delete retag edit

## 4 Replies

matthewgo
375

Hi,
please check that a home folder is under WebContent folder

Naveen
42

yes i have an home folder and an index.zul page inside it . if i try to view http://localhost:8080/home/ the zul is displayed in the browser

<zk>
<window>
<button id="cl" label="go"></button>
</window></zk>


how can i map the home.zul in the root of the WebContent folder to make it as clean url as like http://localhost:8080/home/

matthewgo
375

Hi

       <servlet-mapping>
<url-pattern>/home</url-pattern>
</servlet-mapping>

and I can access http://localhost:8080/home/ without any problem.

You mean only text(code) displayed in the page?

  <servlet-mapping>
<url-pattern>*.zul</url-pattern>
</servlet-mapping>

<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>


if not, please provide more detail.

Naveen
42

Thank you @matthewgo it works....

[hide preview]