0

How to redirect to specific page for specific URL

asked 2015-02-01 19:08:38 +0800

Bhushanngage gravatar image Bhushanngage
59 6

I have following directory structure for project

WebContent
 |
 -- zk
     |
     -- app1
         |
         -- app1Index.zul
     -- app2
         |
         -- app2Index.zul

     zkAppIndex.zul

Now, I want to acess

  1. zkAppIndex.zul file on url localhost:port/projectName/zk
  2. app1Index.zul file on url localhost:port/projectName/zk/app1
  3. app2Index.zul file on url localhost:port/projectName/zk/app2
    Any idea, how can I do this ?
    PS:- I can't use 'welcome-file' of web.xml for this.
delete flag offensive retag edit

3 Answers

Sort by ยป oldest newest most voted
0

answered 2015-02-12 04:54:53 +0800

Bhushanngage gravatar image Bhushanngage
59 6

Hello @Darksu, after spending few hours to work it out unsuccessfully, I decide to write Java filter which do same. Thank for your suggestion.

link publish delete flag offensive edit
1

answered 2015-02-08 17:59:54 +0800

Darksu gravatar image Darksu
1991 1 4

Hello Bhushanngage,

Following please check out some examples that can be included into the urlrewrite.xml file that could be of use to you:

    <rule>
        <from>/login</from>
        <to>/index.zul</to>
    </rule>
    <rule>
        <from>/dashboard</from>
        <to>/ui/internal-operations-dashboard.zul</to>
    </rule>

Also please recheck your configuration.

Best Regards,

Darksu

link publish delete flag offensive edit
0

answered 2015-02-01 22:51:40 +0800

Darksu gravatar image Darksu
1991 1 4

Hello Bhushanngage,

You can use a java web filter such as UrlRewrite:

http://tuckey.org/urlrewrite/

Best Regards,

Darksu

link publish delete flag offensive edit

Comments

Hello Darksu, Strange thing is that on localhost:port/projectName/zk, I am getting "HTTP Status 404 - /zk/index.zul". It means that it trying to find index.zul file in zk directory. How is this happening ? In such a case, I want it to go for 'zk/zkAppIndex.zul' instead of 'zk/index.zul'.

Bhushanngage ( 2015-02-02 05:42:33 +0800 )edit
Your answer
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
1 follower

RSS

Stats

Asked: 2015-02-01 19:08:38 +0800

Seen: 88 times

Last updated: Feb 12 '15

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