web-inf

Two Meta-Inf folders - normal structure?

╄→尐↘猪︶ㄣ 提交于 2019-12-21 05:09:17
问题 I just "discovered" that we have two Meta-Inf folders ... In eclipse and also in the War file. The First one is (in the war): /META-INF/ The Second, and weird one ist: /WEB-INF/classes/META-INF/ In the second folder is a persistance.xml and a something.taglib.xml... If i move the files into the first meta-inf folder i get exceptions from hibernate.. What is the purpose of this second and oddly placed meta-inf folder ? Is this a normal folder structure ? 回答1: The "weird one" location is

Embedding an H2 Database within the WEB-INF Directory

橙三吉。 提交于 2019-12-21 02:42:49
问题 I have an embedded H2 Database I'd like to put in the WEB-INF directory of a web application. What is the proper way to refer to this in a JDBC url? Ideally I'd like a solution that would work both for a WAR, and an expanded WAR (If possible). Thank-you for your help! FYI, I've tried the following: jdbc:h2:/WEB-INF/data/myDB;CIPHER=AES But this results in: org.h2.jdbc.JdbcSQLException: A file path that is implicitly relative to the current working directory is not allowed in the database URL

Is it possible to submit a form that has been rendered from a JSF page location in WEB-INF?

…衆ロ難τιáo~ 提交于 2019-12-20 07:28:36
问题 The JSF 2.2 web based application I am developing makes use of various error pages which are located in the WEB-INF directory and are displayed when an HTTP error or Java exception is encountered based on the configuration in the web.xml file. On some error pages I would like to include a form which allows the user to report the issue and include various attributes that would be helpful when investigating the issue such as the request URI and the error message. The issue I've got is when the

SSM项目启动报错WEB-INF\\lib\\javax.servlet-api-4.0.1.jar) - jar not loaded. See Servlet Spec 3.0, section 10

二次信任 提交于 2019-12-19 07:37:57
错误信息: validateJarFile(D:\tomcat_ryxunit\webapps\ryx_unit\WEB-INF\lib\javax.servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class原因:Tomcat/lib下面和Web-inf/lib下面的jar包有冲突,比如servlet-api.jar这样的jar包,所以,要删除WEB-INF/lib下面的这个jar包,但是编译的时候又会报错,所以可以将这个包放在项目的某个地方,然后添加到依赖中,然后将这个包设置为只在编译时间提供(scope=Provided): 注意:部署 Artifacts 的时候,选择已经编写好的模块,但是如果模块改了名字以后,可能 Artifacts 绑定的模块还没有改变(或者是另外一个一样名字的),这样会一直出错。所以最后重新建立一个 Artifacts . 而且名字不要起一样的! 来源: https://www.cnblogs.com/qianzf/p/11180012.html

java.lang.RuntimeException: java.lang.IllegalArgumentException:

若如初见. 提交于 2019-12-19 00:44:44
java.lang.RuntimeException: java.lang.IllegalArgumentException: SQLJ programs translated with the option -codegen=oracle must be run under Oracle JDBC 9.0.0 or higher. 这个问题目前我遇到的部署的基本信息为: weblogic10.3.5 jdk1.6045 修复的步骤: 1.注释掉或者删除 weblogic.xml 中 <prefer-web-inf-classes>true</prefer-web-inf-classes> 2.在jdk中新增两个jar包: 路径一定要核对正确,否则是没有效果的 C:\Program Files\Java\jdk1.6.0_45\ jre\lib\ext 链接:https://pan.baidu.com/s/1vnF5NOXNIbfZA5pg2-Pjag 提取码:8afk 地址为jar包 希望可以帮你解决掉问题 来源: CSDN 作者: TianmingQi94 链接: https://blog.csdn.net/TianmingQi94/article/details/103603007

How to get properties file from /WEB-INF folder in JSF?

时间秒杀一切 提交于 2019-12-18 05:11:24
问题 I have some properties file in /WEB-INF . And I want to load it in a JSF managed bean. Is there any way to do that? 回答1: Use either ExternalContext#getResource() or ExternalContext#getResourceAsStream() wherein you pass the webcontent-relative path. E.g.: ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext(); Properties properties = new Properties(); // ... properties.load(externalContext.getResourceAsStream("/WEB-INF/file.properties")); This delegates under

How to get properties file from /WEB-INF folder in JSF?

自闭症网瘾萝莉.ら 提交于 2019-12-18 05:11:12
问题 I have some properties file in /WEB-INF . And I want to load it in a JSF managed bean. Is there any way to do that? 回答1: Use either ExternalContext#getResource() or ExternalContext#getResourceAsStream() wherein you pass the webcontent-relative path. E.g.: ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext(); Properties properties = new Properties(); // ... properties.load(externalContext.getResourceAsStream("/WEB-INF/file.properties")); This delegates under

JSF files inside WEB-INF directory, how do I access them?

こ雲淡風輕ζ 提交于 2019-12-17 06:46:40
问题 I want to put my JSF 2.0 xhtml files under WEB-INF\jsf. How do I access them then? I know that anything inside WEB-INF isn't exposed to the outside, so I need a controller to redirect me to the corresponding JSP, right? (This is also the model 2 pattern iirc). Can I achieve this with a parameter inside web.xml/faces-config.xml? I think the FacesServlet is the controller of my webapp so it should serve this purpose? And another question for understanding the Model 2 Pattern. Does every action

struts tomcat 中文乱码解决

大城市里の小女人 提交于 2019-12-16 22:46:26
再也不用 strRet = new String(src.getBytes("ISO_8859_1"),"UTF-8"); 配置下边 web.xml <? xml version="1.0" encoding="Shift_JIS" ?> <! DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd" > < web-app > < filter > < filter-name > Set Character Encoding </ filter-name > < filter-class > htcommoninfo.SetCharacterEncodingFilter </ filter-class > < init-param > < param-name > encoding </ param-name > < param-value > UTF-8 </ param-value > </ init-param > < init-param > < param-name > enable </ param-name > < param-value > true </ param-value

[RoarCTF 2019]Easy Java

强颜欢笑 提交于 2019-12-13 23:58:30
WEB-INF主要通过找到web.xml文件,推断class文件的路径,最后直接class文件,在通过反编译class文件,得到网站源码 首先看到一个页面,点击下help看看啥情况。 发现输出一串 java.io.FileNotFoundException:{help.docx} 可能是报错信息,打开Brup截取请求信息 GET /Download?filename=help.docx HTTP/1.1 Host: a6360be7-edf9-4caa-9461-3f2c7a89df9e.node3.buuoj.cn User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2 Accept-Encoding: gzip, deflate Connection: close Upgrade-Insecure-Requests: 1 Pragma: no-cache