This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet Specification compatibility

 
tej ko
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4181
21
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64683
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
tej ko
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4181
21
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4181
21
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic