Questions tagged [deployment-descriptor]

A configuration file that describes how a web application should be deployed.

A configuration file that describes how a web application should be deployed. There are two types of deployment descriptors: Java EE deployment descriptor and vendor specific runtime deployment descriptor. The first is defined by the language specification. The second is provided by the vendor of the application server. For example, the web.xml file is a standard Java EE deployment descriptor, specified in the Java Servlet specification, but the sun-web.xml file contains configuration data specific to the Sun GlassFish Enterprise Server implementation.

For web applications written using the Java programming language, the web application deployment descriptor is written using the EXtensible Markup Language (XML) syntax. The web application deployment descriptor is named web.xml and if included with web application, it should reside in the WEB-INF folder under the web application root folder. The contents of this file direct a deployment tool to deploy a module or application with the specified settings, and describes other specific configuration requirements and/or container options.

For Java EE applications, the deployment descriptor must be named application.xml and must be placed directly in the META-INF folder at the top level of the application .ear file.

References:

60 questions
29
votes
2 answers

Getting the init parameters in a servlet

I am new to servlets. I got the init parameters in DD within the init() method using getInitParameter("name"). I tried a lot from within doGet() method to access the init parameters, but it always returns null. I tried with…
Shameer
  • 351
  • 2
  • 5
  • 11
27
votes
2 answers

Difference b/w and

DD elements and both can be retrieved by the getInitParameter() method, in the servlet code. Now the question is, how does it differentiate and ?
giri
  • 26,773
  • 63
  • 143
  • 176
15
votes
3 answers

How can I catch all errors to same page from web.xml?

I tried to use java.lang.Exception /errors/error.jsp but i dosen't catch 404 errors. How can I catch also 404 etc. errors to that same page ? I want to…
newbie
  • 24,286
  • 80
  • 201
  • 301
8
votes
5 answers

No web.xml in Eclipse + Glassfish v3?

I created a simple "hello world" servlet in Eclipse (helios) + Glassfish v3. I am using Glassfish's plugin for eclipse It seems there is no web.xml but a sun-web.xml in the WEB-INF/ folder. This is my first time with glassfish but was a bit…
PhD
  • 11,202
  • 14
  • 64
  • 112
8
votes
6 answers

Unable to find web.xml in netbeans 7.0.1

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…
Saumyaraj
  • 1,220
  • 3
  • 15
  • 37
8
votes
5 answers

@WebServlet annotation web.xml welcome-file

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…
konze
  • 859
  • 2
  • 11
  • 30
6
votes
2 answers

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

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…
user_1357
  • 7,766
  • 13
  • 63
  • 106
4
votes
2 answers

Dart web app environmental variables

It would be nice to allow my Dart web app to hit different servers depending on what environment it was deployed on: DEV: http://dev.myapp.com/someService QA: http://testing.myapp.com/someService LIVE: http://myapp.com/someService In Java,…
3
votes
2 answers

Is it possible to configure OpenSessionInViewFilter in Spring application context so that context:property-placeholder is useable?

Initial situation My web application consists of the Maven modules myapp-persistence(.jar), myapp-model(.jar), myapp-service(.jar) and myapp-web(.war) to get a conventional, loosely coupled, multi-tiered architecture. All modules are joined together…
2
votes
1 answer

Glassfish doctype description files missing

In the glassfish-web.xml you have the doctype description file linked, like http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd. This is downloaded and parsed by glassfish, when our application is deployed. glassfish.org is not available anymore…
hFonti
  • 187
  • 1
  • 4
  • 11
2
votes
1 answer

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

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
Vitalii Vitrenko
  • 9,763
  • 4
  • 43
  • 62
2
votes
2 answers

What should the JCA deployment descriptor (ra.xml) character encoding be?

Looking through JCA 1.7 specification I could only find in one of their examples on the Resource Adapter Deployment Descriptor the following (Chapter 13: Message Inflow P 13-50): This example is showing the usage of UTF-8 encoding, however there is…
2
votes
0 answers

Was there an app that actually used , elements of web.xml java ee?

I'm studying web.xml elements and I see the description group (icon, description, display-name) and I was just wondering were these guys ever used like they were supposed to be, like Is there that fancy deployment application that is used to deploy…
Ismail Marmoush
  • 13,140
  • 25
  • 80
  • 114
2
votes
1 answer

How to configure JNDI connection pooling for more than one database?

I have one database JNDI connection pooling setup context.xml JNDI resources and web.xml env-ref and initial context. It is working good. But I need to build two more database for my application. So do I have to configure two more JNDI resources and…
user2848031
  • 187
  • 12
  • 36
  • 69
2
votes
2 answers

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

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…
AchillesVan
  • 4,156
  • 3
  • 35
  • 47
1
2 3 4