jakarta-ee

Where can I find the full documentation of deployment descriptor(web.xml)

可紊 提交于 2020-01-15 04:52:26
问题 Is there a full documentaion of the deployment descriptor that describes each element and each sub-element? I realy can't find it. P.S. I ask because I found the way to set maxAge of session cookies by adding <session-config> <session-timeout>525600</session-timeout> <cookie-config> <max-age>31536000</max-age> </cookie-config> </session-config> into DD. But I cannot find any official documentation that describes <cookie-config> element. 回答1: For the standard Java EE deployment descriptor

Glassfish/Wildfly not failing if @Resource cannot be resolved?

吃可爱长大的小学妹 提交于 2020-01-15 04:50:12
问题 I am experimenting with @Resource in a servlet to see if we can use it to inject configuration parameters easily (this is servlet 3.0 webapp in Glassfish 4.1.1). I was told in https://stackoverflow.com/a/45715196/53897 that the behavior I saw of a @Resource String userName being null when used if it could not be resolved if the env-entries in web.xml were not present, to be wrong according to the specification, but that the behavior of WildFly was the same. Question is: Is this a known bug?

Creating file and intermediate directories if does not exist

依然范特西╮ 提交于 2020-01-15 04:45:08
问题 I want to create a file if and only if that file does not exist. As an example file location is referring to "C:\user\Desktop\dir1\dir2\filename.txt" if (!file.exists()) { try { file.createNewFile(); } catch(IOException ioe) { ioe.printStackTrace(); return; } } Unfortunately the above code is failing, as the dir1 and dir2 does not exist. For my case Sometime the dir1 and dir2 may exist and sometime they may not exist. I do not want to overwrite the contents of these intermediate directories

Security domain not found in WildFly Elytron

我与影子孤独终老i 提交于 2020-01-15 04:23:26
问题 In Wildfly 14.0.1, I have configured a security realm ProxyRealm in the console, I have used the CLI to configure a security domain ProxyDomain that uses the ProxyRealm , and then I have even created an Undertow application security domain ProxyDomain that uses Elytron's ProxyDomain . I have a simple ear with only one jar that contains an EJB, and to that ear META-INF folder I have added a jboss-app.xml with the following content: <?xml version="1.0" encoding="UTF-8"?> <jboss-app> <security

Java EE 6 release date [closed]

╄→尐↘猪︶ㄣ 提交于 2020-01-15 04:20:11
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 7 years ago . Java EE 6 looks exciting. It will include the Servlet 3.0 spec, EJB3.1 Lite, Profiles, JSF2.0 Restful API, JPA2.0 and the WebBeans. I tried to google the

Unable to run app-client that is accessing an EJB on GlassFish v3

时光总嘲笑我的痴心妄想 提交于 2020-01-15 03:53:05
问题 Environment : GlassFish 3.0.1, NetBeans 6.9, JDK 6u21 Problem : Unable to run app-client that is accessing an EJB A bugreport can be found under http://netbeans.org/bugzilla/show_bug.cgi?id=183488 with the corresponding tutorial http://netbeans.org/kb/docs/javaee/entappclient.html . I understand now how the Remote interface has to be in a Java Class Library. I walked through the steps of the tutorial, but still, it does not work. Errors: http://pastebin.com/k8ARGKbX. According to http://docs

Invalid URL Pattern When Deploying To Glassfish 4.1

…衆ロ難τιáo~ 提交于 2020-01-14 17:01:12
问题 I had a web filter to redirect from the login and index page if the user was already authenticated. Originally I had an invalid URL pattern. I fixed the invalid pattern and attempted to redeploy only to receive this: java.lang.IllegalArgumentException: Invalid URL Pattern: [{0}] at org.glassfish.web.deployment.node.WebResourceCollectionNode.setElementValue(WebResourceCollectionNode.java:136) I checked around in my application to see if I was missing something or had typed something else wrong

How to pass parameters through Java Validator messages?

最后都变了- 提交于 2020-01-14 14:37:11
问题 Currently, I have something like @NotNull(message="{err.required}") @Size(min=1, message="{err.required}") private String firstName; In my messages.properties , I have err.required={0} is required. It works but it prints out firstName is required. which is ugly. It passed the variable name firstName as parameter in {0} . How do I pass in something like " First name " instead? So it will become First name is required. 回答1: You could do something like this: @NotNull(message="First name {err

“File open failure” compiling java class to glassfish autodeploy

末鹿安然 提交于 2020-01-14 14:31:06
问题 I'm trying to deploy java class as a webservice on GlassFish. javac -d C:\glassfish3\glassfish\domains\mydomain\autodeploy grWrapper/HelloWorld.java No errors during compilation, but i have server_deployFailed file in autodeploy folder and "file open failure" in server.log [#|2011-11-30T00:21:05.616+0400|INFO|glassfish3.1.1|javax.enterprise.system.tools.deployment.org.glassfish.deployment.common|_ThreadID=41;_ThreadName=Thread-2;|[AutoDeploy] Selecting file C:\glassfish3\glassfish\domains

org.hibernate.lazyinitialization exception

帅比萌擦擦* 提交于 2020-01-14 14:20:53
问题 org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: pojo.Person.address, no session or session was closed. I am getting this exception and I'm using Spring 3.0 and Hibernate 3.6. 回答1: It looks like you have an Entity called Person which has a lazily loaded mapped collection of Addresses? You have loaded the Person and the session it was loaded in has now been closed. After the session was closed you then attempted to access that collection of address