• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

Error in deploying web application

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am getting below error while deploying the application -

Deployment descriptor "web.xml" is malformed. Check against the DTD: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'web-app'

below is my xml file -


please let me know what is missing above as below xml is running fine -



Thanks
 
Ranch Hand
Posts: 874
Android VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is this your complete web.xml ? Did you have needed DTD or xsd in place at teh start of the file ?

What version of weblogic is it ? depending on the Servlet container use


 
Balu Sadhasivam
Ranch Hand
Posts: 874
Android VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just noticed context-pattern and init-patterm , is it valid DD elemet ? I think you have wrongly given for context-param and init-param
Check out valid elements here web.xml
 
Manoj Garg
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi Balu,
I am using weblogic8.1.
interestingly my small app with below web.xml is running fine ..



I am not giving any specification here. Do you think its not correct?
Also when i checked the server logs its still throwing an exception which i mentioned before.

But when i am using init/context-param its not even running.

Thanks

 
Balu Sadhasivam
Ranch Hand
Posts: 874
Android VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Weblogic 8.1 supports servlet 2.3. Yes its most recommended to give DTD at the top. This is ensure that you can use correct elements and particularly the order to be defined.. So add those DOCTYPE lines and see if you still get error.


But when i am using init/context-param its not even running.



Thats exactly what i meant. You can check for the example web.xml inside your weblogic domain examples.
 
Manoj Garg
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I tried it.. and that error is no more alive. Thanks a lot.
My app is runnig but its returing the null values for context/init param.
I am getting SAX.parse.exception.. init-param/context-param must be declared. But they are already.

I have checked few examples but couldn't find any clue. they have declared it same as i did.

 
Balu Sadhasivam
Ranch Hand
Posts: 874
Android VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check out the weblogic web.xml documentation link which is sent before.. The ordering of element is important,

init-param should be inside servlet element and context-param should be declared at the top inside web-app.. post your web.xml otherwise..
 
Manoj Garg
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Balu, Here is my web.xml -



Thanks
 
Balu Sadhasivam
Ranch Hand
Posts: 874
Android VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Manoj,

I m not sure if you read the link i pointed out. Is this elemnts <context-pattern> and <init-pattern> are valid ? Its "param" and not pattern , where did you get that ? Please take time to read the links offered and post anything if not working out..
 
Manoj Garg
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Oh my God.... what i was doing..
So i have written pattern inplace of param...
I checked the links but actual mistake is that you stated.
Its working now my friend.... Thanks a lot for all your help!!!
 
Balu Sadhasivam
Ranch Hand
Posts: 874
Android VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are welcome..sometimes we need a third eye to look on for finding these silly errors.
 
Manoj Garg
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
absolutely right... i will keep this eye always active now..
 
There's a city wid manhunt for this tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic