aspose file tools*
The moose likes Servlets and the fly likes Servlet Specification compatibility Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet Specification compatibility " Watch "Servlet Specification compatibility " New topic
Author

Servlet Specification compatibility

tej ko
Greenhorn

Joined: Jul 11, 2008
Posts: 9
Hello,

I am using struts 1.1, jdk 1.4, servlet specification 2.3. Something is going wrong when i am deploying the application in WAS 6.0. Websphere says error loading D.D. web.xml has some errors.

There is nothing wrong with the structure or syntax there but my question is that is struts 1.1 compatible with servlet spec 2.3 and how exactly 2.3 different than servlet spec 2.4?

Or am i wasting my time looking at wrong things?

Regards,
Tej
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4181
    
  21

Originally posted by tej ko:
Hello,

I am using struts 1.1, jdk 1.4, servlet specification 2.3. Something is going wrong when i am deploying the application in WAS 6.0. Websphere says error loading D.D. web.xml has some errors.

There is nothing wrong with the structure or syntax there but my question is that is struts 1.1 compatible with servlet spec 2.3



Struts documents say 1.1 is compatible with Servlets 2.2 or higher. I would guess they are still compatible.

Originally posted by tej ko:
and how exactly 2.3 different than servlet spec 2.4?



If you look at the specs for 2.4 (see the download page) there are about 6 pages of changes between 2.3 and 2.4.

Originally posted by tej ko:
Or am i wasting my time looking at wrong things?


Could be.

Why don't you give more details about the error loading the deployment descripto?


Steve
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61437
    
  67

Adding to what Steve said: if the deployment descriptor is declared as 2.4, it cannot work in a 2.3 environment. A 2.3 deployment descriptor, on the other hand, will work in a 2,4 environment (though it will place the app into "compatibility mode" and revert to 2.3 and JSP 1.2)


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
tej ko
Greenhorn

Joined: Jul 11, 2008
Posts: 9
These are the two errors which are pretty vague and general in nature. The EAR file might be corrupt or incomplete.
com.ibm.etools.j2ee.commonarchivecore.exception.DeploymentDescriptorLoadException: WEB-INF/web.xml


errors in log are

[8/12/08 14:57:27:422 EDT] 0000002e R UOW= source=SystemErr org=IBM prod=WebSphere component=Application Server thread=[WebContainer : 0]
com.ibm.etools.j2ee.commonarchivecore.exception.DeploymentDescriptorLoadException: WEB-INF/web.xml
!Stack_trace_of_nested_exce!
com.ibm.etools.j2ee.commonarchivecore.exception.EmptyResourceException: WEB-INF/web.xml
at com.ibm.etools.j2ee.commonarchivecore.util.ArchiveUtil.getRoot(ArchiveUtil.java:372)


I have inspected the web.xml thoroughly and getting worried that this error may not be the root cause.

Thank you,
Tej
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4181
    
  21

Check for other silliness, like mis-spelled context names/EAR/WAR files, and you might try passing your web.xml through a validator which checks it for being well-formed XML (I like validome myself). Same goes with any other configuration file your application depends on.
tej ko
Greenhorn

Joined: Jul 11, 2008
Posts: 9
Ok one question. In servlet spec 2.3, in web.xml should there be <jsp-config> enclosing <tag-lib> I am sure in 2.4 we need this. Does 2.3 has a problem with it?

The specification doesnt say NO to it. But doesnt say there should be jsp-config enclosing tag lib declarations!
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4181
    
  21

Originally posted by tej ko:
Ok one question. In servlet spec 2.3, in web.xml should there be <jsp-config> enclosing <tag-lib> I am sure in 2.4 we need this. Does 2.3 has a problem with it?

The specification doesnt say NO to it. But doesnt say there should be jsp-config enclosing tag lib declarations!


If it doesn't say there is a jsp-config then having one would break the XML Schema, and would cause the DD not to be read properly.

That is why I like Validome, it will check both that the XML is well formed at that it matches the schema it declares.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

In servlet spec 2.3, in web.xml should there be <jsp-config> enclosing <tag-lib>

The jsp-config comes from the Servlets 2.4 spec. If you're using Servlets 2.3, you must not enclose <taglib> with it.


[My Blog]
All roads lead to JavaRanch
 
Don't get me started about those stupid light bulbs.
 
subject: Servlet Specification compatibility