Weblogic refuses my web.xml - help ! ! !

          Hi all,
          I'm trying to deploy on weblogic a war file that
          I'm built with Tomcat. I get a parse exception when
          it comes across servlets declaration:
          Mon Jul 16 11:08:33 GMT+02:00 2001:<E> <HTTP> Error parsing descriptor in Web
          aplication 'c:/weblogic/myserver/tomcat.war'
          org.xml.sax.SAXParseException: Element "web-app" does not allow "servlet" here.
          at com.sun.xml.parser.Parser.error(Parser.java:2775)
          at com.sun.xml.parser.ValidatingParser$ChildrenValidator.consume(Valida
          ingParser.java:310)
          at com.sun.xml.parser.Parser.maybeElement(Parser.java:1280)
          at com.sun.xml.parser.Parser.content(Parser.java:1498)
          at com.sun.xml.parser.Parser.maybeElement(Parser.java:1399)
          at com.sun.xml.parser.Parser.parseInternal(Parser.java:491)
          at com.sun.xml.parser.Parser.parse(Parser.java:283)
          at weblogic.xml.dom.SunDOMParser.getDocument(SunDOMParser.java:69)
          at weblogic.xml.dom.DOMParser.getDocument(DOMParser.java:102)
          at weblogic.servlet.internal.dd.DescriptorLoader.<init>(DescriptorLoade.java:132)
          My web.xml looks clean...here's a bit of it:
          <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 1.2//EN"
          "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
          <web-app>
          <servlet>
          <servlet-name>
          controller
          </servlet-name>
          <servlet-class>
          ServletController
          </servlet-class>
          </servlet>
          <servlet-mapping>
          <servlet-name>
          controller
          </servlet-name>
          <url-pattern>
          /Controller
          </url-pattern>
          </servlet-mapping>
          <servlet>
          <servlet-name>
          shopper
          </servlet-name>
          <servlet-class>
          ShopperServlet
          </servlet-class>
          </servlet>
          <servlet-mapping>
          <servlet-name>
          shopper
          </servlet-name>
          <url-pattern>
          /Shopper
          </url-pattern>
          </servlet-mapping>
          </web-app>
          Does anybody know how to solve this problem ?
          Thanks a lot in advance.
          Francesco
          

you package it all into a WAR file (zip/jar format)
          read about it in the spec
          http://java.sun.com/products/servlet/download.html#specs
          the format is
          --WEB-INF
          web.xml
          -----classes
          -----lib
          or take a look at some sample war files
          Filip
          ~
          Namaste - I bow to the divine in you
          ~
          Filip Hanik
          Software Architect
          [email protected]
          www.filip.net
          "Francesco" <[email protected]> wrote in message
          news:[email protected]...
          >
          > Hi Filip,
          > thanks for your answer, now this problem is solved
          > and jsp pages are loaded but servlets not.
          > I'm developing under "myserver" folder: could you give me
          > a hint about where should I put
          > 1) "web.xml"
          > 2) servlets classes ?
          >
          > Thanks
          > Francesco
          >
          >
          >
          > "Filip Hanik" <[email protected]> wrote:
          > >try this one instead (define all <servlet> elements first, and then
          define
          > >the <servlet-mapping> elements
          > >
          > > <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
          > >1.2//EN"
          > > "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
          > >
          > > <web-app>
          > >
          > > <servlet>
          > > <servlet-name>
          > > controller
          > > </servlet-name>
          > > <servlet-class>
          > > ServletController
          > > </servlet-class>
          > > </servlet>
          > >
          > > <servlet>
          > > <servlet-name>
          > > shopper
          > > </servlet-name>
          > > <servlet-class>
          > > ShopperServlet
          > > </servlet-class>
          > > </servlet>
          > >
          > > <servlet-mapping>
          > > <servlet-name>
          > > controller
          > > </servlet-name>
          > > <url-pattern>
          > > /Controller
          > > </url-pattern>
          > > </servlet-mapping>
          > >
          > >
          > > <servlet-mapping>
          > > <servlet-name>
          > > shopper
          > > </servlet-name>
          > > <url-pattern>
          > > /Shopper
          > > </url-pattern>
          > > </servlet-mapping>
          > >
          > > </web-app>
          > >--
          > >~
          > >Namaste - I bow to the divine in you
          > >~
          > >Filip Hanik
          > >Software Architect
          > >[email protected]
          > >www.filip.net
          > >"Francesco" <[email protected]> wrote in message
          > >news:[email protected]...
          > >>
          > >> Hi all,
          > >> I'm trying to deploy on weblogic a war file that
          > >> I'm built with Tomcat. I get a parse exception when
          > >> it comes across servlets declaration:
          > >>
          > >> Mon Jul 16 11:08:33 GMT+02:00 2001:<E> <HTTP> Error parsing descriptor
          > >in
          > >Web
          > >> aplication 'c:/weblogic/myserver/tomcat.war'
          > >> org.xml.sax.SAXParseException: Element "web-app" does not allow
          "servlet"
          > >here.
          > >> at com.sun.xml.parser.Parser.error(Parser.java:2775)
          > >> at
          > >com.sun.xml.parser.ValidatingParser$ChildrenValidator.consume(Valida
          > >> ingParser.java:310)
          > >> at com.sun.xml.parser.Parser.maybeElement(Parser.java:1280)
          > >> at com.sun.xml.parser.Parser.content(Parser.java:1498)
          > >> at com.sun.xml.parser.Parser.maybeElement(Parser.java:1399)
          > >> at com.sun.xml.parser.Parser.parseInternal(Parser.java:491)
          > >> at com.sun.xml.parser.Parser.parse(Parser.java:283)
          > >> at
          weblogic.xml.dom.SunDOMParser.getDocument(SunDOMParser.java:69)
          > >> at weblogic.xml.dom.DOMParser.getDocument(DOMParser.java:102)
          > >> at
          >
          >weblogic.servlet.internal.dd.DescriptorLoader.<init>(DescriptorLoade.java:1
          3
          > >2)
          > >>
          > >>
          > >> My web.xml looks clean...here's a bit of it:
          > >>
          > >> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
          Application
          > >1.2//EN"
          > >> "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
          > >>
          > >> <web-app>
          > >>
          > >> <servlet>
          > >> <servlet-name>
          > >> controller
          > >> </servlet-name>
          > >> <servlet-class>
          > >> ServletController
          > >> </servlet-class>
          > >> </servlet>
          > >>
          > >> <servlet-mapping>
          > >> <servlet-name>
          > >> controller
          > >> </servlet-name>
          > >> <url-pattern>
          > >> /Controller
          > >> </url-pattern>
          > >> </servlet-mapping>
          > >>
          > >> <servlet>
          > >> <servlet-name>
          > >> shopper
          > >> </servlet-name>
          > >> <servlet-class>
          > >> ShopperServlet
          > >> </servlet-class>
          > >> </servlet>
          > >>
          > >> <servlet-mapping>
          > >> <servlet-name>
          > >> shopper
          > >> </servlet-name>
          > >> <url-pattern>
          > >> /Shopper
          > >> </url-pattern>
          > >> </servlet-mapping>
          > >>
          > >> </web-app>
          > >>
          > >> Does anybody know how to solve this problem ?
          > >> Thanks a lot in advance.
          > >> Francesco
          > >>
          > >
          > >
          >
          

Similar Messages

  • Unable To lookup .... weblogic.jobscheduler  and  web-xml resource ref

    Unable To lookup .... weblogic.jobscheduler and web-xml resource ref for timer manager
    JNDI NameNotFound Exception ....
    Do, i need to configure something get that working.
    Didn't find any thing on documentation or hosted examples.

    The default timermanager can be refered to as follows:
    <resource-ref>
        <res-ref-name>tm/default</res-ref-name>
        <res-type>commonj.timers.TimerManager</res-type>
        <res-auth>Container</res-auth>
        <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>http://middlewaremagic.com/weblogic/?p=5569

  • Web.xml help

    hello people, i seem to have a hard time finding a listing of what you can put in the web.xml file. Is this a sun governed thing or can any application server create a layout as to there choosing? as an example i use tomcat for personal use but am trying to figure out websphere 5.1 for work.
    can someone point me in the proper direction to look up these specs. i'm tired of trying to find this stuff on ibms site.
    thanks in advance, graeme.

    Well the DTD is available here: http://java.sun.com/dtd/web-app_2_3.dtd
    It specifies the content and ordering of the standard web.xml.
    Order DOES matter
    <!ELEMENT web-app (icon?, display-name?, description?, distributable?,
    context-param*, filter*, filter-mapping*, listener*, servlet*,
    servlet-mapping*, session-config?, mime-mapping*, welcome-file-list?,
    error-page*, taglib*, resource-env-ref*, resource-ref*, security-constraint*,
    login-config?, security-role*, env-entry*, ejb-ref*,  ejb-local-ref*)>

  • SessionListener and web.xml help

    Hello everyone.
    I'm having trouble getting a sessionListener to work in a tomcat3.1 environment.
    Everything works okay in my win2k developer setup.
    Here's the web.xml file I am using:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>
    <web-app>
    <display-name>slp</display-name>
    <description> sessionlistener problem </description>
    <listener>
    <listener-class>headrunner.listeners.HRSessionListener</listener-class>
    </listener>
    <context-param>
    <param-name>test value</param-name>
    <param-value>hello</param-value>
    </context-param>
    <context-param>
    <param-name>test value2</param-name>
    <param-value>hello</param-value>
    </context-param>
    <servlet>
    <servlet-name>hr/servlet-name>
    <display-name>hr</display-name>
    <servlet-class>hr</servlet-class>
    </servlet>
    <session-config>
    <session-timeout>30</session-timeout>
    </session-config>
    </web-app>
    Could it be that the sessionlistener is inside a package?, or the order of the components in the web.xml ?
    Has anyone got a working web.xml file with the setup of a session-listener?
    Thanks in advance for any feedback

    The SessionListener interface is part of the 2.3 Servlet API. I may be wrong, but I believe Tomcat 4+ is required to run the 2.3 API.

  • Basic authen and web.xml help

    I'm having a few problems getting BASIC authentication working with 2 user groups. I want to restrict /admin/ to administrators and /profile/ to users and administrators:
      <security-constraint>
              <web-resource-collection>
                   <web-resource-name>My App</web-resource-name>
                   <url-pattern>/admin/*</url-pattern>
              </web-resource-collection>
              <auth-constraint>
                   <description>
                                                List of Administrators
                   </description>
                   <role-name>admin</role-name>
              </auth-constraint>
         </security-constraint>
      <security-constraint>
    <web-resource-collection>
                   <web-resource-name>My App</web-resource-name>
                   <url-pattern>/profile/*</url-pattern>
              </web-resource-collection>
              <auth-constraint>
                   <description>
                        List of members
                   </description>
                   <role-name>member</role-name>
              </auth-constraint>
      </security-constraint>
      <login-config>
              <auth-method>BASIC</auth-method>
              <realm-name>Restricted Area</realm-name>
         </login-config>
      <security-role>
              <description>list of members</description>
              <role-name>member</role-name>
      </security-role>
      <security-role>
              <description>list of administrators</description>
              <role-name>admin</role-name>
         </security-role>
         The problem is: I login with an admin account (inside the /admin/ dir) but i cant login into /profile/ with neither a user or administrator account. Any ideas?

    i'm guessing it can't be done?

  • Modifying web.xml in Weblogic

    Hi, I'm deploying an application written in JDeveloper 11.1.1.2.0 to Weblogic 10.3.2.
    I'm trying to edit the web.xml file of the application. I tried to edit it here:
    c:\Oracle\Middleware\user_projects\domains\uat_domain\servers\AdminServer\tmp\_WL_user\DrawingManagement\2ubcsw\war\WEB-INF\web.xml
    However, any changes are not reflected in the application even though I have restarted Weblogic. However, when I change the values in JDeveloper and then deploy to Weblogic, the values are reflected in the web.xml defined above.
    Is Weblogic caching this web.xml? If so, how do I modify it?
    Edited by: Sean Ong on Aug 8, 2010 9:11 PM

    Hi,
    If you will try to edit the "web.xml" from the following Location: c:\Oracle\Middleware\user_projects\domains\uat_domain\servers\AdminServer\tmp\_WL_user\DrawingManagement\2ubcsw\war\WEB-INF\web.xml
    Then it will not be reflected. Because as soon as you deploy your Application on WebLogic it Reads the "web.xml" *(At Deploy time Once)* and keeps it in Memory. So if you really want to change the Deployment descriptor then You will need to redeploy the Application after editing it inside your JDeveloper project it self.
    Or as an alternative you can use the "plan.xml" feature of weblogic to change the DDs...like: http://forums.oracle.com/forums/thread.jspa?threadID=1107834&tstart=0
    Thanks
    Jay SenSharma
    http://weblogic-wonders.com/weblogic (WebLogic Wonders Are Here)

  • Weblogic.servlet.reloadCheckSecs in web.xml not working

    Given the following web.xml file:
              <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
              1.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
              <web-app>
              <context-param>
              <param-name>weblogic.servlet.reloadCheckSecs</param-name>
              <param-value>100</param-value>
              </context-param>
              <servlet>
              <servlet-name>CookieCounter</servlet-name>
              <servlet-class>servlets.CookieCounter</servlet-class>
              </servlet>
              <servlet-mapping>
              <servlet-name>CookieCounter</servlet-name>
              <url-pattern>monster</url-pattern>
              </servlet-mapping>
              <welcome-file-list>
              <welcome-file>hello.html</welcome-file>
              </welcome-file-list>
              <error-page>
              <error-code>404</error-code>
              <location>/error.jsp</location>
              </error-page>
              </web-app>
              It seems the weblogic.servlet.reloadCheckSecs property is not taking effect.
              The
              default value of -1 is always used. I did stop and restart weblogic.
              I also trid to set the servlet classpath in the web.xml file with
              weblogic.servlet.classpath
              property and it did not change the classpath for the servlet. It seems that
              other
              items are working such as adding new servletrs to the web application. Note
              that
              this is the cookie sample application that installes with the beta 2
              download.
              Thanks,
              Dan.
              

    Hi All:
    Thanks for all your help regarding the adfAuthentication success_url. Now I am able to configure to make this work. But now I am facing another issue i.e. I am getting 401 Not authorized message when the success_url is pointed to the jspx page.
    Note: I am using custom login module similar to DBProcOraDataSourceLoginModule so my roles are stored in the custom Role class. So I am not sure how to pass this role info to the security in ADF in order to authorize the page to be viewed.
    Could you please help and can you point me to any specific link.
    Thanks & Regards
    Sridhar Doki

  • Web.xml / weblogic.xml security

    Let's say I define security constraints in the web.xml file for my web application
    using the security-constraint,auth-constraint, and security-role tags. Does this
    mean that in order to add a new user I must modify weblogic.xml and specify a
    new security-role-assignment? Can I specify a group name as a principal, or is
    there a way to programatically add new users? Any help would be greatly appreciated.
    Thank you.

    yes, you can use groups as principals in weblogic.xml. then permissions are
    managed through the user-group relationship.
    "Leonard Pham" <[email protected]> wrote in message
    news:3b657f8a$[email protected]..
    >
    Let's say I define security constraints in the web.xml file for my webapplication
    using the security-constraint,auth-constraint, and security-role tags.Does this
    mean that in order to add a new user I must modify weblogic.xml andspecify a
    new security-role-assignment? Can I specify a group name as a principal,or is
    there a way to programatically add new users? Any help would be greatlyappreciated.
    Thank you.

  • Configuring web.xml for Weblogic Server 5.1

    Hi,
    I am working on Weblogic Server (WLS) 5.1 SP 12. I have a web application running on it. At present, it does not have a web.xml file. I want to use Front Controller pattern, and therefore I need to have a web.xml file (to specify the URL Pattern for Front Controller) inside WEB-INF directory on server. I have placed the web.xml file inside WEB-INF directory of application, and have marked the URL pattern. However, the application is not taking into consideration that thing, i.e. mu front controller is not getting into picture, its entry is being ignored. How to make sure that it is not by-passed?
    My application is not in a .war format. WLS 5.1 SP12 is running on Sun Solaris.
    Is there a way to make sure that the intended thing happens?
    Plz help.
    Regards,
    Raj

    Yes, I restarted the app server after making changes to web.xml file. No effects.

  • Servlet registration in web.xml with weblogic 5.1 sp10

    I've been developing this site using one "dispatch"
              servlet as my traffic cop for my framework. i now
              have to do this charting thing and i plan to
              stream in an image from a servlet. this means adding
              another servlet to the application. i've edited the
              web.xml according to the standerd and WL still pukes
              on startup saying
              "Error parsing descriptor in Web application
              'c:/workspace/com/somthing/'
              org.xml.sax.SAXParseException: Element "web-app" does
              not allow "servlet" here."
              below is my web.xml file...
              <?xml version="1.0" encoding="ISO-8859-1"?>
              <!DOCTYPE web-app
              PUBLIC "-//Sun Microsystems, Inc.//DTD Web
              Application 2.2//EN"
              "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
              <web-app>
              <description>
              blah blah
              </description>
              <servlet>
              <servlet-name>
              WebDispatcher
              </servlet-name>
              <servlet-class>
              com.somthing.somthin.WebDispatcher
              </servlet-class>
              </servlet>
              <servlet-mapping>
              <servlet-name>
              WebDispatcher
              </servlet-name>
              <url-pattern>
              /dispatch
              </url-pattern>
              </servlet-mapping>
              <servlet>
              <servlet-name>
              AssetChartServlet
              </servlet-name>
              <servlet-class>
              com.something.somthn.charts.ChartServlet
              </servlet-class>
              </servlet>
              <servlet-mapping>
              <servlet-name>
              ChartServlet
              </servlet-name>
              <url-pattern>
              /Chart
              </url-pattern>
              </servlet-mapping>
              some jsp tags
              </web-app>
              What am I doing wrong? Do I have to register the
              servlet in the weblogic.properties file? If so do I add the line
              weblogic.httpd.register.chart=com.somthing.somthin.charts.ChartServlet
              And the the (local)url would be http://localhost:7001/Chart ? And if
              this is the case where/how do I do the url mapping bit for this?
              Any help would be greatly appreciated.
              thanks,
              -Gabe
              

    To answer Mike's follow-up question, yes. From the DTD for the web.xml
              file:
              <!ELEMENT web-app (icon?, display-name?, description?, distributable?,
              context-param*, servlet*, servlet-mapping*, session-config?,
              mime-mapping*, welcome-file-list?, error-page*, taglib*,
              resource-ref*, security-constraint*, login-config?, security-role*,
              env-entry*, ejb-ref*)>
              The ordering of elements must be followed if they are specified in the DTD.
              Move your first <servlet-mapping> element to after the second <servlet>
              element and it should work just fine.
              -chris
              "Mike Reiche" <[email protected]> wrote in message
              news:[email protected]...
              >
              >
              >
              > Hmmm... do all the <servlet> </servlet> need to come before all the
              <servlet-mapping>
              > ?
              >
              > Mike
              >
              >
              > [email protected] (gabe) wrote:
              > >I've been developing this site using one "dispatch"
              > >servlet as my traffic cop for my framework. i now
              > >have to do this charting thing and i plan to
              > >stream in an image from a servlet. this means adding
              > >another servlet to the application. i've edited the
              > >web.xml according to the standerd and WL still pukes
              > >on startup saying
              > >
              > >"Error parsing descriptor in Web application
              > >'c:/workspace/com/somthing/'
              > >org.xml.sax.SAXParseException: Element "web-app" does
              > >not allow "servlet" here."
              > >
              > >below is my web.xml file...
              > >------------------------------
              > >
              > ><?xml version="1.0" encoding="ISO-8859-1"?>
              > >
              > ><!DOCTYPE web-app
              > > PUBLIC "-//Sun Microsystems, Inc.//DTD Web
              > >Application 2.2//EN"
              > > "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
              > >
              > ><web-app>
              > >
              > > <description>
              > > blah blah
              > > </description>
              > >
              > > <servlet>
              > > <servlet-name>
              > > WebDispatcher
              > > </servlet-name>
              > > <servlet-class>
              > > com.somthing.somthin.WebDispatcher
              > > </servlet-class>
              > > </servlet>
              > > <servlet-mapping>
              > > <servlet-name>
              > > WebDispatcher
              > > </servlet-name>
              > > <url-pattern>
              > > /dispatch
              > > </url-pattern>
              > > </servlet-mapping>
              > >
              > > <servlet>
              > > <servlet-name>
              > > AssetChartServlet
              > > </servlet-name>
              > > <servlet-class>
              > > com.something.somthn.charts.ChartServlet
              > > </servlet-class>
              > > </servlet>
              > > <servlet-mapping>
              > > <servlet-name>
              > > ChartServlet
              > > </servlet-name>
              > > <url-pattern>
              > > /Chart
              > > </url-pattern>
              > > </servlet-mapping>
              > >
              > > ...
              > > some jsp tags
              > > ...
              > >
              > ></web-app>
              > >---------------------------------
              > >What am I doing wrong? Do I have to register the
              > >servlet in the weblogic.properties file? If so do I add the line
              > >
              > >weblogic.httpd.register.chart=com.somthing.somthin.charts.ChartServlet
              > >
              > >And the the (local)url would be http://localhost:7001/Chart ? And if
              > >this is the case where/how do I do the url mapping bit for this?
              > >
              > >Any help would be greatly appreciated.
              > >
              > >thanks,
              > >
              > >-Gabe
              >
              

  • Help with web.xml under WL5.1sp3

    Hello,
    I just started to explore Weblogic Server 5.1sp3 as part
    of setting it up for the JASIG uPortal project here at UBC.
    I'm unable to get web.xml to work for me. I've created the
    file, I know WL is seeing it and parsing it (through various
    typos during the installation process) but when my index.jsp page
    runs, getInitParameter() comes back with nothing.
    Any ideas what I could be missing?
    Thanks
    George
    [email protected] ITServices, UBC
    Programmer/Analyst
    phone: 604.822.4375 fax: 604.822.5116

    Please post this to the weblogic.developer.interest.servlet
    thanks
    mbg
    In article <[email protected]>, [email protected] says...
    Hello,
    I just started to explore Weblogic Server 5.1sp3 as part
    of setting it up for the JASIG uPortal project here at UBC.
    I'm unable to get web.xml to work for me. I've created the
    file, I know WL is seeing it and parsing it (through various
    typos during the installation process) but when my index.jsp page
    runs, getInitParameter() comes back with nothing.
    Any ideas what I could be missing?
    Thanks
    George
    ==================================================
    NewsGroup Rant
    ==================================================
    Rant 1.
    The less info you provide about your problem means
    the less we can help you. Try to look at the
    problem from an external perspective and provide
    all the data necessary to put your problem in
    perspective.

  • WEB.XML gives me an error while deploying a Web Application in Weblogic 5.1

    I have a Web.xml which I copied the one from their documentation and edited for my servlet specific data. When I try to deploy it I am getting the following error.
              Wed Nov 15 17:10:37 EST 2000:<E> <HTTP> Error reading Web application 'C:/tomcat
              /webapps/La/'
              java.net.UnknownHostException: java.sun.com
              Can you throw some light on this? I have included the first three lines from the WEB,XML file where weblogic is choking.
              <?xml version="1.0" encoding="UTF-8"?>
              <!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN'
              'http://java.sun.com/j2ee/dtds/webapp_2_2.dtd'>
              Thank You
              Trisula P. Siripurapu
              

              Hi Jacek,
              Thank you for your suggestion. I changed the Web App version to 1.2 instead of 2.2. It worked. Thanks once again for the timely response. I really do appreciate it.
              Trisula Pani Siripurapu.
              Jacek Laskowski <[email protected]> wrote:
              >"Trisula P. Siripurapu" wrote:
              >>
              >> I have a Web.xml which I copied the one from their documentation and edited for my servlet specific data. When I try to deploy it I am getting the following error.
              >> Wed Nov 15 17:10:37 EST 2000:<E> <HTTP> Error reading Web application 'C:/tomcat
              >> /webapps/La/'
              >> java.net.UnknownHostException: java.sun.com
              >
              >I remember having the same problem before I added the latest service
              >pack (SP 6). If you don't want to download it, just change DOCTYPE to
              >
              ><!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application
              >1.2//EN' 'http://java.sun.com/j2ee/dtds/webapp_2_2.dtd'>
              >
              >and it should work. Notice the change of Web Application version - 1.2
              >rather then 2.2. I'm (almost) sure, I saw one example - examples/webapp
              >(?) - with this header. Take a look at the accompanying examples.
              >
              >When you apply SP6, things should work as they suppose to.
              >
              >> Trisula P. Siripurapu
              >
              >Jacek Laskowski
              

  • Need help to set values from web.xml in a jsp class

    Hey :-)
    I`m trying to get value from my web.xml file into a jsp class. The problem is that the value always retur null. My web.xml file is replaced in the WEB-INF directory where should be. Here is my web.xml
    <servlet>
    <servlet-name>Html</servlet-name>
    <servlet-class>Html</servlet-class>
    <init-param>
    <param-name>html_test</param-name>
    <param-value>Value I want have in my jsp class
    </param-value>
    </init-param>
    </servlet>
    And her i my java class who don`t work:
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    import javax.servlet.ServletConfig;
    public class Html extends BodyTagSupport
    String title="";
    String html_test;
    ServletConfig config;
    public void doInitBody() throws JspException
    html_test = config.getInitParameter("html_test");
    }//End of method doInitBody()
    public int doStartTag() throws JspException
    try
    JspWriter out = pageContext.getOut();
    out.print( "<HTML>\n" );
    out.print( "<HEAD><TITLE>" + title + "</TITLE></HEAD>\n" );
    out.print( "<BODY>\n" );
    out.print( "<BR><H1>" + html_test + "</H1>" );
    And here are my html_test variable return null.
    I hope somone can help me, duke dollars will be given away for the solution answer.
    paulsep

    Nothing seems to work, have change the string and rewritten the web.xml file to:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
              <context-param>
                   <param-name>html_test</param-name>
                   <param-value>Value I want have in my jsp class</param-value>
              </context-param>
    </web-app>

  • Problem in web.xml file with weblogic server 8.1

    Hi frnds,
    I was deployed one Enterprise Application,it deploys successfully. But in server side thows Exeception in web.xml file.
    Here the actual Exception
    <HTTP> <BEA-101248> <[Application:
    'G:\bea\user_projects\domains\mydomain\myserver\upload\jasmine.ear', Module: 'Ja
    smine']: Deployment descriptor "web.xml" is malformed. Check against the DTD: or
    g.xml.sax.SAXParseException: The content of element type "web-app" must match "(
    icon?,display-name?,description?,distributable?,context-param*,filter*,filter-ma
    pping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome
    -file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-constra
    int*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)". (line 61
    , column 11).>
    My web.xml file as follws....
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.4//EN"
    "http://java.sun.com/dtd/web-app_2_4.dtd">
    <web-app>
    <display-name>Jasmine Applications</display-name>
    <description>
    Jasmine Applications
    </description>
    <servlet>
    <servlet-name>LoginServlet</servlet-name>
    <servlet-class>examples.LoginServlet</servlet-class>
    <init-param>
    <param-name>java.naming.factory.initial</param-name>
    <param-value>weblogic.jndi.WLInitialContextFactory</param-value>
    </init-param>
    <init-param>
    <param-name>java.naming.provider.url</param-name>
    <param-value>t3://localhost:7001</param-value>
    </init-param>
    </servlet>
    <servlet>
    <servlet-name>ShowQuoteServlet</servlet-name>
    <servlet-class>examples.ShowQuoteServlet</servlet-class>
    <init-param>
    <param-name>java.naming.factory.initial</param-name>
    <param-value>weblogic.jndi.WLInitialContextFactory</param-value>
    </init-param>
    <init-param>
    <param-name>java.naming.provider.url</param-name>
    <param-value>t3://localhost:7001</param-value>
    </init-param>
    </servlet>
    <servlet>
    <servlet-name>CatalogServlet</servlet-name>
    <servlet-class>examples.CatalogServlet</servlet-class>
    <init-param>
    <param-name>java.naming.factory.initial</param-name>
    <param-value>weblogic.jndi.WLInitialContextFactory</param-value>
    </init-param>
    <init-param>
    <param-name>java.naming.provider.url</param-name>
    <param-value>t3://localhost:7001</param-value>
    </init-param>
    </servlet>
    <servlet-mapping>
    <servlet-name>LoginServlet</servlet-name>
    <url-pattern>/login/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>ShowQuoteServlet</servlet-name>
    <url-pattern>/showQuote/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>CatalogServlet</servlet-name>
    <url-pattern>/catalog/*</url-pattern>
    </servlet-mapping>
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>My secure resources</web-resource-name>
    <description>Resources to be placed under security control.</description>
    <url-pattern>/private/*</url-pattern>
    <url-pattern>/registered/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <role-name>guest</role-name>
    </auth-constraint>
    </security-constraint>
    <login-config>
    <auth-method>FORM</auth-method>
    <realm-name>WebApp</realm-name>
    <form-login-config>
    <form-login-page>/login.jsp</form-login-page>
    <form-error-page>/error.jsp</form-error-page>
    </form-login-config>
    </login-config>
    <!-- Security roles referenced by this web application -->
    <security-role>
    <description>The role allowed to access our content</description>
    <role-name>guest</role-name>
    </security-role>
    </web-app>
    pls give me a good solution this exception.. I tried lot..
    Thanks in Advance
    Regards
    Priya

    Your DOCTYPE references 2.4, it should be 2.3. WLS 8.1 supports J2EE 1.3 which was servlet 2.3.
    Servlet 2.4 is part of J2EE 1.4 and is supported by WLS 9.0/9.1. Also it uses XML Schema not a DTD.
    -- Rob
    WLS Blog http://dev2dev.bea.com/blog/rwoollen/

  • Help needed in Mapping servlet in web.xml file

    Hi Can anyone please tell me what am doing wrong here. I can't see this servlet in my url. Please help.
    <servlet>
    <servlet-name>HelloWorld</servlet-name>
         <servlet-class>HelloWorld</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>HelloWorld</servlet-name>
    <url-pattern>/com/jci/fi/application/eems/HelloWorld/*</url-pattern>
    </servlet-mapping>
    package com.jci.fi.application.eems;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class HelloWorld extends HttpServlet {
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws IOException, ServletException
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    out.println("<html>");
    out.println("<body>");
    out.println("<head>");
    out.println("<title>Naveen Wants to goto TollyWood......!</title>");
    out.println("</head>");
    out.println("<body>");
    out.println("<h1>Hello World!</h1>");
    out.println("</body>");
    out.println("</html>");

    your web.xml shoould be something like this...
    <servlet>
    <servlet-name>HelloWorld</servlet-name>
    <servlet-class>com.jci.fi.application.eems.HelloWorld</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>HelloWorld</servlet-name>
    <url-pattern>HelloWorld</url-pattern>
    </servlet-mapping>
    Hope this helps..
    CK

Maybe you are looking for

  • Preview Highlight "Garbage" characters

    I have a fairly strange issue. I am using Mac BookPro 15 Retina, OS X 10.9.4 (latest update check 16.Jul.14), using Preview app version 7.0 (826.4). I use Preview for reading all my PDF'es. And I highlight the text, underline, draw speech bubbles, ar

  • Creative Cloud - Download error - stubborn error

    This seems to be inconsistency quality assurance going on with Creative Cloud using Adobe Application Manager, I always get this stubborn - darn stubborn error message "Download error. Please contact customer support." In this case, I have no idea wh

  • FCExp to PCP5 - Render Files Offline?

    I can't export a movie file that I converted from FC Express to FC Pro 5 because it keeps telling me that render files are missing...but apparently it's not the clips at fault but the transitions. Yet, try as I may to render, it will not render. Any

  • Dual Screen, missing windows ?

    Hi there I've got a second screen setup with my iMac and all is working well until the last OSX update. The issue mainly exists with both Thunderbird and Firefox (latest versions of each). For example if Thunderbird is open and located on my secondar

  • Adding to an output file

    Hi, I am looking to add lines to an output text file without over writing whats already there? do I need the outfile.newline() command somewhere? BufferedWriter outFile; try outFile = new BufferedWriter(new FileWriter("D:/members.txt", true)); outFil