0

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

asked 2011-07-15 01:54:00 +0800

Naveen gravatar image Naveen
42

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

    <servlet-mapping>
      	<servlet-name>zkLoader</servlet-name>
      	<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 flag offensive retag edit

4 Replies

Sort by ยป oldest newest

answered 2011-07-17 21:14:27 +0800

matthewgo gravatar image matthewgo
375

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

link publish delete flag offensive edit

answered 2011-07-18 00:03:41 +0800

Naveen gravatar image 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/

link publish delete flag offensive edit

answered 2011-07-22 05:00:35 +0800

matthewgo gravatar image matthewgo
375

Hi

I try your setting

       <servlet-mapping>
      	<servlet-name>zkLoader</servlet-name>
      	<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?
if yes, please check the following code in your web.xml.

  <servlet-mapping>
  	<servlet-name>zkLoader</servlet-name>
  	<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.

link publish delete flag offensive edit

answered 2011-07-24 03:39:41 +0800

Naveen gravatar image Naveen
42

Thank you @matthewgo it works....

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2011-07-15 01:54:00 +0800

Seen: 424 times

Last updated: Jul 24 '11

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More