在WEB-INF目录下移动JSP的问题 [英] Problem with moving JSPs under WEB-INF directory

查看:142
本文介绍了在WEB-INF目录下移动JSP的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我将JSP文件与WEB-INF / web /目录下的CSS和JS文件一起移动时,我遇到了问题。问题是,当JSP页面加载时,它不会加载CSS和JS文件。如果您对此有任何疑问,请提供帮助。

I am facing a problem when I move my JSP files along with CSS and JS files under WEB-INF/web/ directory. The problem is that, when a JSP page loads, it does not load CSS and JS files. Please help if you have any idea about it.

谢谢

Umar

推荐答案

除非你想编写控制器来为WEB-INF文件夹中的css / js文件提供服务,否则你需要将这些文件从WEB-INF中移出来应用服务器可以将它们作为静态文件提供。

Unless you want to write controllers to serve the css/js files in the WEB-INF folder, you will need to move those files out of WEB-INF so that they can be served as static files by the app server.

这篇关于在WEB-INF目录下移动JSP的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆