deployment-descriptor

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

How to indicate one or more match in url pattern?

帅比萌擦擦* 提交于 2019-12-13 22:18:33
问题 "/*" will match zero or more characters. I want to serve request if there is a one or more characters proceeding the "/" character. Note: I am using Guice's Servlet Module to configure the request. Thanks! 回答1: I think you can just do this, assuming you mean that you want to matching anything with a / and 1 or more characters after it (so /foo and /a but not / ). serveRegex("/.+") 回答2: in general regex: /+ dont know if it works here tough ..? http://code.google.com/p/google-guice/wiki

ejb reference in deployment descriptor (without annotations )

爷,独闯天下 提交于 2019-12-13 02:23:47
问题 I try to inject dependency in EJB 3.0 using only deployment descriptor. When I deploy my app to Glassfish (v3.1) I get this exception: java.lang.RuntimeException: Warning : Unable to determine local business vs. remote business designation for EJB 3.0 ref Local ejb-ref name=ejb/Test2,Local 3.x interface =pl.Test2Local,ejb-link=Test2,lookup=,mappedName=,jndi-name=,refType=Session I have no idea what I do wrong. Can anybody help me, please? The ejb-jar.xml descriptor is: <session> <ejb-name

Tomcat 7 refuses to start on Eclipse when adding new servlet in web.xml DD

风流意气都作罢 提交于 2019-12-11 00:24:06
问题 While developing a Java EE application (school exercise), everything seem to be working properly. But since i've added a new servlet on my eclipse project, my tomcat refuses to start and the restart process runs out of time. Even extending the time limit to complete server operations doesnt help neither. This problem seem to be caused by my web.xml file because when i remove the tags , everything runs like a clockwork. Althoug I'm able to launch my servlet by right clicking on it but that is

when container call deployment descriptor (web.xml)

↘锁芯ラ 提交于 2019-12-08 04:19:10
问题 We know that whenever a request for a servlet comes, servlet container will first check web.xml file for url and corresponding servlet classes. This is fine, But the confusion comes after that. Suppose I am using load-on-startup property. SO, the servlet should be ready before first call comes in. In that case container need servlet Config object to make servlet in work. But again load-on-start up and init-parameter for servlet is defined in web.xml file. So when exactly container uses web

How to exclude/redirect certain url pattern in web.xml or Guice servlet module?

谁说我不能喝 提交于 2019-12-06 02:01:14
问题 I need to serve my main application with the url pattern "/*" so this pattern is matched to a Servlet. The problem I am having is now all the css files and images located at "/css/all.css", "/images/" etc are going through this Servlet which is undesirable. I want these files to be directly accessed. What is the better way to handle this situation? Note: I am using Guice's Servlet Module to configure the patterns. Thanks! 回答1: We need to know specifically which requests should be routed to

Unable to find web.xml in netbeans 7.0.1

徘徊边缘 提交于 2019-12-04 21:37:43
问题 I want to upload a file to a server, for which I am writing a servlet program.The location of the directory where the document would be uploaded should be fetched from a parameter in web.xml. I have not use web.xml before and only know that it makes entries for each servlet. I am not able to see this file in my web application project that i am making in netbeans. Please help me with this. Thank you. 回答1: It should be located in YOURPROJECT\web\WEB-INF folder, so the full path will be:

Unable to find web.xml in netbeans 7.0.1

杀马特。学长 韩版系。学妹 提交于 2019-12-03 13:19:03
I want to upload a file to a server, for which I am writing a servlet program.The location of the directory where the document would be uploaded should be fetched from a parameter in web.xml. I have not use web.xml before and only know that it makes entries for each servlet. I am not able to see this file in my web application project that i am making in netbeans. Please help me with this. Thank you. It should be located in YOURPROJECT\web\WEB-INF folder, so the full path will be: YOURPROJECT\web\WEB-INF\web.xml EDIT (Aug 21, 2015) Got a downvote with a comment from duffymo , that my answer is

@WebServlet annotation web.xml welcome-file

∥☆過路亽.° 提交于 2019-11-30 07:26:35
I would like to set the welcome-file of my JSP/JavaBeans project. I have a servlet named 'Controller.java' with the following @WebServlet annotation: @WebServlet(name="Controller", urlPatterns={"/login", "/show_dbs"}) and I hava a web.xml file with the following content: <?xml version="1.0" encoding="ISO-8859-1"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> <welcome-file-list> <welcome-file>Controller</welcome-file>

@WebServlet annotation web.xml welcome-file

假如想象 提交于 2019-11-29 09:35:25
问题 I would like to set the welcome-file of my JSP/JavaBeans project. I have a servlet named 'Controller.java' with the following @WebServlet annotation: @WebServlet(name="Controller", urlPatterns={"/login", "/show_dbs"}) and I hava a web.xml file with the following content: <?xml version="1.0" encoding="ISO-8859-1"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com