Web.xml 123

17 dAmerica/New_York June dAmerica/New_York 2011 Envía este artículo a un amigo

With Allah’s name, Benevolent, Merciful, peace and blessing upon our noble Prophet.

I am spending time researching standards. You have to spend the time since people tend to ignore standards as often as they follow them. However, “things work better” when you know the standards.

So I got in deep to standards around everyone’s favorite - well, one of mine anyway - deployment descriptor: web.xml.

So here is a 123 of how to use one.

One (1) In Java 2 Platform, Enterprise Edition applications, XML is used for the syntax of the Deployment Descriptor file. It must be called web.xml, and it must be placed in a sub directory called WEB-INF, directly under the web application root.

Two (2) Here is an example. Your web.xml may have more or less elements as required.


<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" 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_2_5.xsd">

	<servlet>
		<servlet-name>ourServe</servlet-name>
		<servlet-class>app.OurServlet</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>ourServe</servlet-name>
		<url-pattern>/serveit</url-pattern>
	</servlet-mapping>

	<welcome-file-list>
		<welcome-file>index.htm</welcome-file>
	</welcome-file-list>	

</web-app>

Three (3) Schema: every one is well defined within j2ee. Here are the big three you may use: web-app_2_5.xsd, javaee_5.xsd, jsp_2_1.xsd.

Good luck! And all praise is due to Allah.

Ajax 123

17 dAmerica/New_York June dAmerica/New_York 2011 Envía este artículo a un amigo

With Allah’s name, Benevolent, Merciful, peace and blessings upon our holy Prophet.

I like to keep things simple. Here is an AJAX 123. When I need an AJAX application fast, this is how I spin one up.

One (1) Make a *servlet* to do something good. This servlet needs to return text/xml at a minimum on the response.

Two (2) Build **web.xml** to utilize your servlet in a web server.

Three (3) Write an HTML page calling ***XMLHTTPRequest*** (that’s javascript, dude). This call goes to the path you have in web.xml.

That’s all. Each step can be done one at a time.

And all praise is due to Allah.

For Asmaa

28 dAmerica/New_York December dAmerica/New_York 2009 Envía este artículo a un amigo

Reaching reaching reaching as the mountain cries
Bowing bowing as the desert lies
We grow with Allah

Sing out free as the winter cherry blooms
The night still as the morning looms
We call to Allah

Cautious as the child
Strong as the lion wild
We wait on Allah

The rain as the crone weeps
To the bedrock wash and seeps
We run for Allah

Love is

For Asmaa

22 dAmerica/New_York October dAmerica/New_York 2009 Envía este artículo a un amigo

In the name of Allah, Benevolent, Merciful
A note every day
To serve Allah we work
To serve Allah we play
Praise be to the One

The sun does rise
The moon does shine
Large is mountain
Tall is pine
Allah loves

Star breaks night
Fire burns black
Clear the day so clear
Freedom calls us back
True guidance

To grandmother

29 dAmerica/New_York July dAmerica/New_York 2009 Envía este artículo a un amigo

Days come
And I run
Praise God
Created the sun

Gives life
Eternal
Gives earth
Temporal

Praise be to the One

Dirección

31 dAmerica/New_York March dAmerica/New_York 2009 Envía este artículo a un amigo

Viento
Y fuego
Corazones
Desieron
El Dio da
El Dia entro

LLuvia
Venga
Reino
Viene
El Dio guía
El camino derecho

Direction

31 dAmerica/New_York March dAmerica/New_York 2009 Envía este artículo a un amigo

Wind
And fire
Hearts
Desire
God gives
Through each day

Rain,
Do come
Kingdom
Come
God guides
The straight way