0

zkspringboot richlet configuration

asked 2018-10-30 03:25:41 +0800

mw88 gravatar image mw88
93 2
http://www.mw88.org

I have a little application that I want to move to spring boot with the zk springboot plugin. I followed the instructions on this page but I can't get my Richlets to work correctly.

I had this in my web.xml with the Richlets Login and Main:

<servlet-mapping>
     <servlet-name>DHtmlLayoutServlet</servlet-name>
     <url-pattern>/app/*</url-pattern>
</servlet-mapping>

I have tried various things but didn't succeed to initialize my Richlets correctly. How should the configuration be done in order to enable "/app/login" and "/app/main"?

Thx in advance

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-10-30 10:20:18 +0800

cor3000 gravatar image cor3000
6280 2 7

zkspringboot-autoconfig provides a configuration property (in your application.properties) to enable the richlet filter: https://github.com/zkoss/zkspringboot/blob/master/README.md#zkrichlet-filter-mapping

e.g. shown in this example project's application.properties

in your case that would be:

zk.richlet-filter-mapping=/app/*

For the individual Richlets still you have to define the <richlet> and <richlet-mapping> elements in your zk.xml as before:

<richlet>
    <richlet-name>login-richlet</richlet-name><!-- your preferred name -->
    <richlet-class>your.package.LoginRichlet</richlet-class>
</richlet>
<richlet>
    <richlet-name>main-richlet</richlet-name><!-- your preferred name -->
    <richlet-class>your.package.MainRichlet</richlet-class>
</richlet>
<richlet-mapping>
    <richlet-name>login-richlet</richlet-name>
    <url-pattern>/app/login</url-pattern>
</richlet-mapping>
<richlet-mapping>
    <richlet-name>main-richlet</richlet-name>
    <url-pattern>/app/main</url-pattern>
</richlet-mapping>

(also shown in the example's zk.xml)

link publish delete flag offensive 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
2 followers

RSS

Stats

Asked: 2018-10-30 03:25:41 +0800

Seen: 9 times

Last updated: Oct 30 '18

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