0

ZK WEBJARS

asked 2017-11-07 01:20:12 +0800

minibota gravatar image minibota
0

Hi, I would like to know if anyone could tell me how to integrate webjars with zk in No Maven project.

Best Regards.

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-11-07 10:07:59 +0800

cor3000 gravatar image cor3000
6280 2 7

updated 2017-11-07 10:09:14 +0800

Hi Minibota,

I am surprised you are asking in the ZK Forum since the answer would be the same for any other servelt web application.

If want to add a webjar manually (without maven) you can simply download it and add it to your WEB-INF/lib folder.

e.g. bootstrap

  1. download the jar https://mvnrepository.com/artifact/org.webjars/bootstrap/3.3.7-1 http://central.maven.org/maven2/org/webjars/bootstrap/3.3.7-1/bootstrap-3.3.7-1.jar
  2. add it to your war file: test.war:/WEB-INF/lib/bootstrap-3.3.7-1.jar
  3. deploy your war file into a servlet container container supporting webfragments (e.g. tomcat 8.5)
  4. access resources via URL (to test that it's working): image description http://localhost:8080/test/webjars/bootstrap/3.3.7-1/css/bootstrap.min.css

  5. in a zul-file you can add a stylesheet/script using the respective markup

As you can see there's hardly anything special from the ZK side

link publish delete flag offensive edit

Comments

somehow the code to include a css file is not shown: <?style src="/webjars/bootstrap/3.3.7-1/css/bootstrap.min.css"?>

cor3000 ( 2017-11-07 10:10:47 +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

RSS

Stats

Asked: 2017-11-07 01:20:12 +0800

Seen: 14 times

Last updated: Nov 07 '17

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