To understand web.xml, first let us uderstand what is xml?
Web.xml defines mapping between URL paths and servlets that handle requests with those paths. The web.xml file provides configuration and deployment deployment information for the Web components that comprise a Web application. The web.xml descriptor files represents the core of the java application. The web.xml file is located in WEB-INF directory of web application.
Example of web.xml File:
Elements in Web.xml
Description of elements Used in web.xml file:
Web.xml Tags
Tags used in web.xml file are:
Advantages of web.xml file
Previous Tutorial : Servlet Example || Next Tutorial : Servlet Context
Related posts:
The web.xml Deployment Descriptor Elements in Oracle's BEA WebLogic Server 8.1 Documentation pretty much sums up each element in a web.xml file. But I am also curious about points below:
What else should I know about web.xml apart from element names and their usage?
Ravi GuptaRavi Gupta
1,7231111 gold badges4242 silver badges8080 bronze badges
8 Answers
What is web.xml file and what all things can I do with it ?
The
/WEB-INF/web.xml file is the Web Application Deployment Descriptor of your application. This file is an XML document that defines everything about your application that a server needs to know (except the context path, which is assigned by the Application Deployer and Administrator when the application is deployed): servlets and other components like filters or listeners, initialization parameters, container-managed security constraints, resources, welcome pages, etc.
Gori tere jiya mp3 song download free. Note that reference you mentioned is pretty old (Java EE 1.4), there have been few changes in Java EE 5 and even more in Java EE 6 (which makes the
web.xml 'optional' and introduces Web Fragments).
Is there any configuration parameter which should be avoided like plague?
No.
Any parameters related to performance or memory usage?
No, such things are not configured at the application level but at the container level.
Security related risk due to common mis-configuration ?
Well, if you want to use container-managed security constraints and fail at configuring them properly, resources won't obviously be properly protected. Apart from that, the biggest security risks come from the code you'll deploy IMO.
Pascal ThiventPascal Thivent
493k118118 gold badges970970 silver badges10721072 bronze badges
What all should I know about web.xml apart from element name and their usage ?
The SINGLE most important JSP configuration parameter of ALL TIME is in your web.xml. Ladies and gentlemen, I give you.. the TRIM-DIRECTIVE-WHITESPACES option!
This removes all the hundreds or thousands of lines of white space that you'll get in your generated HTML if you use any tag libraries (loops are particularly ugly & wasteful).
The other big one is the default web page (the page you get automatically sent to when you don't enter a web page in the URL):
Civil DisobedientCivil Disobedient
499k112112 gold badges971971 silver badges10831083 bronze badges
I am trying to figure out exactly how this works too. This site might be helpful to you. It has all of the possible tags for web.xml along with examples and descriptions of each tag.
sixtyfootersdudesixtyfootersdude
10.9k3535 gold badges118118 silver badges194194 bronze badges
If using Struts, we disable direct access to the JSP files by using this tag in web.xml
JoseKJoseK
28.8k1111 gold badges9191 silver badges118118 bronze badges
Kalaiselvan VelmuruganKalaiselvan Velmurugan
Deployment descriptor file 'web.xml' : Through the proper use of thedeployment descriptor file, web.xml, you can control many aspects ofthe Web application behavior, from preloading servlets, to restrictingresource access, to controlling session time-outs.
web.xml : is used to control many facets of a Web application.Using web.xml, you can assign custom URLs for invoking servlets, specify initializationparameters for the entire application as well as for specific servlets, controlsession timeouts, declare filters, declare security roles, restrict access to Webresources based on declared security roles, and so on.
Web Xml File
A_BOSSA_BOSS
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd' version='3.0'>
mohanmohan
protected by Community♦Oct 4 '17 at 16:02
Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead? Not the answer you're looking for? Browse other questions tagged web-applicationsweb.xml or ask your own question.
Any one succeeded in deploying OFBiz on external application server Tomcat/ Jboss.
I tried to install ofbiz on Tomcat and Jboss in both cases i am facing issues.I used the following configurations to install ofbiz on appservers:
OFBiz Version: 10.04
Tomcat:6
JBoss 5.0.1
If any one having idea on deploying ofbiz on external app server, please reply to me..
tr9sh
1,16411 gold badge1111 silver badges2727 bronze badges
user1006585user1006585
3 Answers
Restore manager dr 4000 downloads. I just managed to deploy ofbiz in Tomcat 7. Following were the steps that i followed.
And Success. Hope this helps someone!
arajashearajashe
i succeeded to deploy both OFBiz 9.04 and 10.04 to external tomcat v6.0.16please, view this postdeploying OFBIz 10.04 to tomcat 6
Tamer MohamedTamer Mohamed
I have reported it in JIRA https://issues.apache.org/jira/browse/OFBIZ-4682
With this issue unresolved, you need to deploy any webapp you under ofbiz. A user on the mailing list suggested I use two tomcat instances and just change the port.
There seems no interest in fixing it. Maybe if this issues receives more votes, it will be considered for fixing.
sorry not much help !
MansourMansour
49011 gold badge33 silver badges1212 bronze badges
Not the answer you're looking for? Browse other questions tagged tomcatdeploymentjbossofbiz or ask your own question.Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |