简体   繁体   中英

How to use UI resources like CSS, Images and Js files which are placed inside a war into the source jsp files that are placed in a separate war?

Basically, my project has two war files. First war file contains all the source files which includes all necessary java and jsp files. The second war file contains all UI resources like CSS, Images, Fonts and Javascript files.

However both war files are placed in the same server, I need to give the path to use the particular UI resource file that means .js, .css ,... in the jsp file.

For example, I have tried to refer a css file mentioned like below, ' http://localhost:8080/myproject/resources/css/jquery-ui.css '. But it isn't work.

What is best way to refer or use these UI resources into jsp file?

Thanks in advance !

Create a constant or something in second war as String UI_PATH ="first_war_url"; This UI path can be set from a properties file or something and the same can be used in jsp of second war file as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM