Problem with web.xml

Hello,
I have a big problem with web.xml.
i can run the servlet demos with the default web.xml, but when i try to user a costum web.xml files, i receive a 404 page not found on a link.
i have some dificulty to post here. but can somebody help my with my web.xml files?
thanks for your help.
have a nice day!

Be careful with the place of your files and folders. It's possible that you've just mentioned the cause of your problem.
My web.xml is
<?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>
<display-name>gco</display-name>
<description>gco webapplicaties</description>
<servlet>
<servlet-name>MopoController</servlet-name>
<servlet-class>org.gertcuppens.controller.MopoController</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>MopoController</servlet-name>
<url-pattern>/MOPO</url-pattern>
</servlet-mapping>
</web-app>
When I want to call my web application locally, I use the URL http://localhost:8080/gco/MOPO.
The http://localhost:8080 calls Tomcat. With /gco, Tomcat knows it should look for a folder gco inside the webapps folder. This one should contain a WEB-INF/web.xml folder for further instructions.
With /MOPO Tomcat knows, having read the web.xml files of all webapps folders at start, it should look for a servlet with the name MopoController. And this MopoController points to the class org.gertcuppens.controller.MopoController. So, Tomcat knows where to find everything.
Try to see whether your Tomcat can find everything inside the folders using your web.xml file.

Similar Messages

  • Problem with web.xml: getWebXmlParameter

    Hi,
    I've a problem with my web.xml.
    I need to work with tokens, for the different servers.
    For this, I normally use "getWebXmlParameter("...")", but now this doesn't work...
    My web.xml looks like this:
    <web-app>
       <servlet>
          <servlet-name>Faces Servlet</servlet-name>
          <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
          <init-param>
             <param-name>config</param-name>
             <param-value>/WEB-INF/faces-config.xml</param-value>
          </init-param>
          <init-param>
             <param-name>debug</param-name>
             <param-value>3</param-value>
          </init-param>
          <init-param>
             <param-name>detail</param-name>
             <param-value>3</param-value>
          </init-param>
          <init-param>
               <param-name>webapp_address</param-name>
               <param-value>@WEBAPP_ADDRESS@</param-value>
          </init-param>
          <init-param>
               <param-name>webapp_port</param-name>
               <param-value>@WEBAPP_PORT@</param-value>
          </init-param>
          <init-param>
               <param-name>webapp_schemaDb</param-name>
               <param-value>@WEBAPP_SCHEMA_DB@</param-value>
          </init-param>
          <init-param>
               <param-name>webapp_datasource</param-name>
               <param-value>@WEBAPP_DATASOURCE@</param-value>
          </init-param>
       </servlet>
       <servlet-mapping>
          <servlet-name>Faces Servlet</servlet-name>
          <url-pattern>*.faces</url-pattern>
       </servlet-mapping>
       <welcome-file-list>
          <welcome-file>Language.faces</welcome-file>
       </welcome-file-list>
    </web-app>Normally I've a servlet which extends GenericServlet. In this class, I can use getWebXmlParameter("..")...
    How can I solve this problem?
    Thx a lot...
    Ann

    Hi,
    thx for the reply, but it stil doesn't work.
    In my class I put the following lines, for receiving the properties:
    Properties     props = new Properties();
    String file = "oltb_webapp.properties";
    props.load(this.getClass().getClassLoader().getResourceAsStream(file));
    private String jndiHostName = props.getProperty("webapp.address");He doesn't finde the file.. If I change the file-name to "resources/oltb_webapp.properties", he still doesn't find it...
    What am I doing wrong? I use this code all the time, and normally this works perfect... But with my webapplication, I've a problem...
    Thx a lot
    Ann

  • Problem with web.xml, while migratig application from JBOSS 5.0 to JBOSS5.1

    Hi ,
    Earlier my application was running fine on JBOSS 5.0 .
    In that web.xml was like
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_4.xsd"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_4.xsd"
         id="WebApp_ID" version="2.4">
         <servlet>
              <servlet-name>action</servlet-name>
              <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
              <init-param>
                   <param-name>config</param-name>
                   <param-value>/WEB-INF/struts-config.xml</param-value>
              </init-param>
              <load-on-startup>1</load-on-startup>
         </servlet>
         <!-- Timer Details -->
         <servlet>
              <servlet-name>perfMonCollector</servlet-name>
              <servlet-class>com.dbag.optimise.performancemonitor.timer.PerfMonitorCollector</servlet-class>
              <load-on-startup>4</load-on-startup>
              <init-param>
                   <param-name>cronExpr</param-name>
                   <param-value>0 0 0 */1 * ?</param-value>
                   <!--<param-value>0 */10 * * * ?</param-value> -->
              </init-param>
         </servlet>
         <servlet>
              <servlet-name>TransAnalysisCollector</servlet-name>
              <servlet-class>com.dbag.optimise.performancemonitor.timer.TransAnalysisCollector</servlet-class>
              <load-on-startup>3</load-on-startup>
              <init-param>
                   <param-name>cronExprTransAnalysis</param-name>
                   <param-value>*/30 * * * * ?</param-value>
              </init-param>
         </servlet>
         <!-- Timer Details -->
         <!-- PerfMonPoints Cache Generation on Server Startup -->
         <servlet>
              <servlet-name>perfMonGenerator</servlet-name>
              <servlet-class>com.dbag.optimise.performancemonitor.timer.PerfMonPointsGenerator</servlet-class>
              <load-on-startup>2</load-on-startup>
         </servlet>
         <!-- PerfMonPoints Cache Generation on Server Startup -->
         <!-- Standard Action Servlet Mapping -->
         <servlet-mapping>
              <servlet-name>action</servlet-name>
              <url-pattern>*.do</url-pattern>
         </servlet-mapping>
         <!-- The Usual Welcome File List -->
         <welcome-file-list>
              <welcome-file>jsp/index.jsp</welcome-file>
         </welcome-file-list>
    But now i have deployed my application on JBOSS 5.1 GA version.
    Now its giving exception.
    Caused by:
    org.xml.sax.SAXException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'init-param'. One of '{"http://java.sun.com/xml/ns/javaee":run-as, "http://java.sun.com/xml/ns/javaee":security-role-ref}' is expected. @ vfsfile:/local/dubeavi/jboss-5.1.0.GA/server/default/deploy/PerformanceMonitoringISE-1.0/WEB-INF/web.xml[28,15]
    at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$MetaDataErrorHandler.error(SaxJBossXBParser.java:426)
    at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
    at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
    at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
    at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:199)
    ... 41 more

    My new web.xml is like..
    <web-app
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         id="WebApp_ID"
         version="2.5">
         <servlet>
              <servlet-name>action</servlet-name>
              <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
              <init-param>
                   <param-name>config</param-name>
                   <param-value>/WEB-INF/struts-config.xml</param-value>
              </init-param>
              <load-on-startup>1</load-on-startup>
         </servlet>

  • Problem with web.xml in jsp

    is there any api in jsp to retreive the path of web.xml

    request.getRealPath() is deprecated.
    Instead you should be using the method in ServletContext.
    In a JSP the servletContext is exposed as the implicit variable "application"
    In a Servlet you can get hold of it like:
    ServletContext application = getServletConfig().getServletContext();
    String path = application.getRealPath("/WEB-INF/web.xml");

  • Problem with the XML in Word 2007 (Word Template)

    Hi Experts,
    i am new on CRM 2007 and i have a problem with the XML Structure of the Word Template.
    First i built a Web Service Design Tool. Then i saw on the Testpage, that it works.
    So i started the Document Templates and created a new Template. Object Type was BUS2000126 - CRM Business Activity. Web Service was my created and tested Web Service Tool.
    As i opened the Word 2007 with the XML-Structure, i recognized, that there was something wrong.
    The Responce on my Testpage from the Web Service Tool had the following structure:
    response (test.types.p1.CrmostZlaWord5ReadResponse)
       Output (test.types.p1.CrmostZla010RoszlaWord5001)
            ZlaWord5 (test.types.p1.CrmostZla010Rosbtorder)
                Administrativeheaderoforder (test.types.p1.CrmostZla010Rosbtorderhea001)
                     Partiesinvolvedofheader (test.types.p1.CrmostZla010Rosbtheaderpa001)
                         Allpartiesinvolved (test.types.p1.CrmostZla010Rosbtpartnera002[]) Displaying 3 elements of 3
                              element1 (test.types.p1.CrmostZla010Rosbtpartnera002)
                                   Btpartneraddress (test.types.p1.CrmostZla010Rosbtpartnera001)
    My Problem is now, that the XML-Structure got not that point "element1".
    Instead of "element1" there is the point "item" in my XML-Structure in Word 2007.
    I guess that is the Problem why i am not getting the fields of the Btpartneraddress filled in my Word.
    Can anyone help me? Or put me in the right direction that i can change the XML?
    Thanks for your help
    André

    Hi andré, I guess the issue is coming from the fact that you selected "AllPartiesInvolved" and that may contain any numbers of entries. So when you test your webservice, you put a key and then get a result for that key, and in that case you might get "element1" until "element3" for example if there was 3 partners involved in you activity.
    But, when you design your template, you don't have a key at that moment, so in the Web Service structure, you have "items" which stands for all the possible entries you might retrieve at runtime. I guess you could use an index in your template to specify which item you need, but this is quite hasardeous, so i would be you, I would not design my web service to use "AllPartiesInvolved" but rather a specific Partner type like contact person for instance.
    Regards,
    Xavier

  • Problems with reading XML files with ISO-8859-1 encoding

    Hi!
    I try to read a RSS file. The script below works with XML files with UTF-8 encoding but not ISO-8859-1. How to fix so it work with booth?
    Here's the code:
    import java.io.File;
    import javax.xml.parsers.*;
    import org.w3c.dom.*;
    import java.net.*;
    * @author gustav
    public class RSSDocument {
        /** Creates a new instance of RSSDocument */
        public RSSDocument(String inurl) {
            String url = new String(inurl);
            try{
                DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
                Document doc = builder.parse(url);
                NodeList nodes = doc.getElementsByTagName("item");
                for (int i = 0; i < nodes.getLength(); i++) {
                    Element element = (Element) nodes.item(i);
                    NodeList title = element.getElementsByTagName("title");
                    Element line = (Element) title.item(0);
                    System.out.println("Title: " + getCharacterDataFromElement(line));
                    NodeList des = element.getElementsByTagName("description");
                    line = (Element) des.item(0);
                    System.out.println("Des: " + getCharacterDataFromElement(line));
            } catch (Exception e) {
                e.printStackTrace();
        public String getCharacterDataFromElement(Element e) {
            Node child = e.getFirstChild();
            if (child instanceof CharacterData) {
                CharacterData cd = (CharacterData) child;
                return cd.getData();
            return "?";
    }And here's the error message:
    org.xml.sax.SAXParseException: Teckenkonverteringsfel: "Malformed UTF-8 char -- is an XML encoding declaration missing?" (radnumret kan vara f�r l�gt).
        at org.apache.crimson.parser.InputEntity.fatal(InputEntity.java:1100)
        at org.apache.crimson.parser.InputEntity.fillbuf(InputEntity.java:1072)
        at org.apache.crimson.parser.InputEntity.isXmlDeclOrTextDeclPrefix(InputEntity.java:914)
        at org.apache.crimson.parser.Parser2.maybeXmlDecl(Parser2.java:1183)
        at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:653)
        at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
        at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
        at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:185)
        at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:124)
        at getrss.RSSDocument.<init>(RSSDocument.java:25)
        at getrss.Main.main(Main.java:25)

    I read files from the web, but there is a XML tag
    with the encoding attribute in the RSS file.If you are quite sure that you have an encoding attribute set to ISO-8859-1 then I expect that your RSS file has non-ISO-8859-1 character though I thought all bytes -128 to 127 were valid ISO-8859-1 characters!
    Many years ago I had a problem with an XML file with invalid characters. I wrote a simple filter (using FilterInputStream) that made sure that all the byes it processed were ASCII. My problem turned out to be characters with value zero which the Microsoft XML parser failed to process. It put the parser in an infinite loop!
    In the filter, as each byte is read you could write out the Hex value. That way you should be able to find the offending character(s).

  • Problem with generating xml and nested cursor (ora-600)

    I have a problem with generating xml (with dbms_xmlquery or xmlgen) and nested cursors.
    When I execute the following command, I get a ORA-600 error:
    select dbms_xmlquery.getxml('select mst_id
    , mst_source
    , cursor(select per.*
    , cursor(select ftm_fdf_number
    , ftm_value
    from t_feature_master
    where ftm_mstr_id = pers_master_id ) as features
    from t_person per
    where pers_master_id = mst_id ) as persons
    from f_master
    where mst_id = 3059435')
    from dual;
    <?xml version = '1.0'?>
    <ERROR>oracle.xml.sql.OracleXMLSQLException: ORA-00600: internal error code, arguments: [kokbnp2], [1731], [], [], [], [], [], []
    </ERROR>
    The problem is the second cursor (t_feature_master).
    I want to generate this:
    <master>
    <..>
    <persons>
    <..>
    <features>
    <..>
    </features>
    </persons>
    <persons>
    <..>
    <features>
    <..>
    </features>
    </persons>
    </master>
    If i execute the select-statement in sql-plus, then I get the next result.
    MST_ID MST_SOURCE PERSONS
    3059435 GG CURSOR STATEMENT : 3
    CURSOR STATEMENT : 3
    PERS_MASTER_ID PERS_TITLE PERS_INITI PERS_FIRSTNAME PERS_MIDDL PERS_LASTNAME
    3059435 W. Name
    CURSOR STATEMENT : 15
    FTM_FDF_NUMBER FTM_VALUE
    1 [email protected]
    10 ....
    I use Oracle 8.1.7.4 with Oracle XDK v9.2.0.5.0.
    Is this a bug and do somebody know a workaround?

    Very simple...Drop all type objects and nested tables and create them again. You will get no error. I'll explain the reason later.

  • Problem with web.show_document with Jinitiator and Firefox

    Not sure Firefox 2.0 is officially certified with Forms 9.0.4.1 and Jinitiatorbut regardless we have some users who want to use this combination. Everything seems to work fine except for the calls to web.show_document which opens a new browser window and displays some html etc.
    The problem is that even though the client Forms JVM is Jinitiator (1.3.1.18 or .21) when the call to web.show_document occurs somehow the Sun Java Plugin starts and having the two JVM's at once causes a fatal crash in Firefox. Can anyone suggest a way to preven the second JVM from opening?
    When the user uses the Sun Plug as the client Forms JVM there is no problem as the second JVM does not open. Unfortunately some users insist on Jinitiator with Firefox hence the problem. -quinn

    James,
    This whole applet embedded in a browser model for webforms is driving us batty at times. The list of problems includes:
    1) Users are constantly tempted by browser controls and accidentally do all sorts of things to get them in trouble. This has included but not limited to using the navigation arrows, jumping off to read their email in the same window as the form and returning to a dead forms session, minimizing, resizing, blurring off to another window and then returning back by clicking on the title bar of the browser and wondering why the form doesn't tab etc.
    Sure hobbling the browser by opening with limited functionality is a possibility but not a complete solution.
    2) New versions of browsers seem to break something. Both IE 7 and Firefox 2 have their own problems with web.show_document, especially file associations such as CSV and DBF and trying to open things in Excel in IE7.Firefox seems to have less problems for some yet some some oddities like the one that started this thread (and 2.0 opening new windows in tabs by default instead of windows).
    3) JVM jigsaw puzzle. Is it Jinit or Sun, which versions? Which combinations of browser version and JVM works.
    4) General fragility of the whole architecture. Running a client JVM in a web browser on top of a PC Operating system connectiong to a forms server over a network embedded in a Java Container server on a full blown web server running on a unix operating system is pushing the bubble. Throw in the mix that any of these components can be combined in numerous ways makes one wonder how it works as well as it does.
    Still users randomly getting dropped connections to forms server (network gltches?). General sluggishness (poorly written forms?). Periods of users with unduplicatable errors primarily network related it would appear.
    General feel that it is not rock solid stable. Perusing metalink documents on performance and tuning gives too much and too general info to troubleshoot so just shrug shoulders and say 'network problem'.
    What's the solution? Java webstart would seem to help at least with the browser realted issues but is that supported and documented how to use yet. Also we'd lose web_show_document which is critical (could it be replaced by webutil calls to open browser?).
    -quinn

  • Problem with castor xml mapping

    Hi,
    we have following problem with castor xml mapping.
    How to use references in the collections(Hashmap or vector)?
    WE have a method called getAttribute map which will return a hashmap consist different type of objects. We want to keep only the
    references of objects if that object occurs more than once,instead of keeping the whole object
    Following is the the xml mapping file.
    <mapping>
    <class name="com.opvista.ndtool.core.mos.ManagedObject" identity="Id" auto-complete="false" verify-constructable="false">
    <map-to xml="ManagedObject"/>
    <field name="Id" get-method="getId" set-method="setId" type="string">
    <bind-xml name="Id" node="attribute"/>
    </field>
    <field name="AttributeMap" type="org.exolab.castor.mapping.MapItem" collection="map" get-method="getAttributeMap">
    <bind-xml name="AttributeMap" node="element">
         <class name="org.exolab.castor.mapping.MapItem">
    <field name="key" type="java.lang.Object">
         <bind-xml name="key" node="attribute"/>
    </field>
    <field name="value" type="java.lang.Object">
         <bind-xml name="value" node="element" reference="true"/>
         </field>
    </class>
         </bind-xml>
    </field>
    </class>
    </mapping>
    we are using reference=true for the values. But it will throw below exception.
    Unable to resolve ID for instance of class 'java.lang.String' due to the following error: Unable to resolve ClassDescriptor.
         at org.exolab.castor.xml.Marshaller.getObjectID(Marshaller.java:1988)
         at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:1628)
         at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:1831)
         at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:1814)
         at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:1825)
         at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:821)
    Please help us to overcome from this problem?
    Thanks,
    Dileep

    for your ref here is what i think the basic mapping file would look like
    <class name="Person">
    <map-to xml="person"/>
    <field name="name" type="string">
    <bind-xml name="name" node="attribute" />
    </field>
    <field name="age" type="string">
    <bind-xml name="age" node="attribute" />
    </field>
    </class>
    <class name="MetaPerson">
    <map-to xml="person"/>
    <field name="dependents" type="string">
    <bind-xml name="dependents" node="attribute" />
    </field>
    <field name="presentAdd" type="string">
    <bind-xml name="present_add " node="attribute" />
    </field>
    <field name="permanentAdd" type="string">
    <bind-xml name="permanent_add " node="attribute" />
    </field>
    </class>
    however i am still not clear as to how i can use the metaperson object in the person class as well as in the mapping file.
    hope this gives a better idea abt my problem statement.
    Please help me out

  • 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/

  • Problem with web service that returns an object with a String that have som

    Hi everybody:
    I have a problem with a web service I am doing, I have made a web service that returns a collection of objects, the objects have a set of properties, there is one property that is a String,this property consists in a text fragment that could have some characters that are considered special in XML like &, <, >, " and that's why when I execute the service from a client an exception is thrown:
    {code}
    Exception in thread "main" org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Could not read XML stream.. Nested exception is com.ctc.wstx.exc.WstxParsingException: Expected a text token, got START_ELEMENT.
    at [row,col {unknown-source}]: [9,646]
    org.codehaus.xfire.fault.XFireFault: Could not read XML stream.. Nested exception is com.ctc.wstx.exc.WstxParsingException: Expected a text token, got START_ELEMENT.
    at [row,col {unknown-source}]: [9,646]
    at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)
    at org.codehaus.xfire.client.Client.onReceive(Client.java:410)
    at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:139)
    at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
    at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
    at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
    at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
    at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)
    at org.codehaus.xfire.client.Client.invoke(Client.java:336)
    at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
    at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
    at $Proxy0.search(Unknown Source)
    at cu.co.cenatav.webservices.client.Client.main(Client.java:26)
    {code}
    I know that this is happening because special characters are sent by the soap message but I don't know how to solve this problem.
    How could I avoid this exception ?
    I hope you can help me.
    Regards.
    Ariel

    Hi,
    BPEL and BPEL PM do not have a good support for SOAPENC-Array: it would be very difficult to create such an array in BPEL or to receive it and manipulate it.
    The (unfortunately very intrusive) work around is to change the WSDL of the service to use a XML type defined using XML schema. This is all the more painful that JDev 9.0.4 does not have strong support for complex types.
    In general though, I would highly recommend this best practice:
    1) Start by define the WSDL contract first
    2) Then generate the server side skeleton to implement it
    3) Use BPEL as the client to this contract.
    By starting with the contract first, you make sure that 1) your interfaces are clean and coarse grained.
    2) things like java objects, sessions, etc to not leak through the interface (which would be the worst thing that could happen because it would closely link the client and the server.
    Sorry for not being more helpful. This will get radically cleaner in Oracle AS 10.1.3.
    Edwin

  • Problem in Web.xml.........

    Hi to All,
    I installed the eval version of Crystal Reporst XI, created an example report with it and now I want to call my report from JSF Page.i followed the crxi_startup_guide_for_j2ee.i got the error in 'web.xml' file.the error is:
    "cvc-complex-type.2.4.a: Invalid content was found starting with element 'env-entry-value'. One of '{"http://java.sun.com/xml/ns/j2ee":env-entry-type}' is expected"
    here i shows my entry in web.xml file:
    <env-entry>
    <env-entry-name>jdbc/mydatabase name</env-entry-name>
    <env-entry-value>!com.microsoft.jdbc.sqlserver.SQLServerDriver!jdbc:odbc:mydatabase name</env-entry-value>
    <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>
    im unable to get what was the problem.my environment is Tomcat 5.0.28,SQL2000.
    i created that report using ODBC connection.is it correct?suppose if i have to connect using JNDI means how to achive this?
    can any one get me out of this please!!
    Thanks in Advance,
    --RK                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    This is my web.xml file........
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <env-entry>
    <env-entry-name>jdbc/IMDB</env-entry-name>
    <env-entry-value>!com.microsoft.jdbc.sqlserver.SQLServerDriver!jdbc:odbc:IMDB</env-entry-value>
    <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>
    <context-param>
    <param-name>com.sun.faces.verifyObjects</param-name>
    <param-value>false</param-value>
    </context-param>
    <context-param>
    <param-name>com.sun.faces.validateXml</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    </context-param>
    <context-param>
    <param-name>crystal_image_uri</param-name>
    <param-value>crystalreportviewers11</param-value>
    </context-param>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>
    30
    </session-timeout>
    </session-config>
    <welcome-file-list>
         <welcome-file>
    index.jsp
    </welcome-file>
    </welcome-file-list>
    </web-app>
    Thnx,
    Rk

  • Binary data problem with web services on JRockit but not Sun JDK

    I have a problem with binary data in SOAP and JRockit
    (jrrt-3.0.0-1.6.0-linux-x64.bin) . I have an set of web services based
    on EJB 3.0 which return images as byte arrays inside a SOAP envelope
    to be consumed by .NET 2 services. The host app server is Oracle
    Application Server 10.3.1 on RHEL Linux update 4, on 64 bit Xeon 5500
    series HP blade hardware.
    While most images are fine most of the time, one particular image
    gives this message when being consumed in the .NET client:
    The '■' character, hexadecimal value 0x1F, cannot be included in a
    name. Line 2, position 380038.
    The MSDN suggests that this is usually caused by non-escaping of reserved XML characters like < but this isn't one of those.
    The SOAP looks ok and for the life of me I can't see why this ought to
    be a problem, especially since the problem doesn't arise running with
    the SUN JDK 1.6_06 64 bit)
    When making the same call from the OAS Enterprise Manager, I can make the same call with no problem (but the data is just rendered as character data in a browser) which maybe suggests some incompatibility with how JRockit is serializing the data ?
    Any ideas, I would be very happy to hear - JRockit gives a 15% or so
    speed boost to the website that these services power so obviously we
    want to use it if possible.
    Edited by: RichLiv on Nov 14, 2008 4:54 AM

    Seems to be the case that using MTOM stops this problem with JRockit. Strange but apparently true (so far).

  • Strange Problem with Web Object Manager

    Hi,
    I have a very strange problem with JDev.
    When I register a servlet with the Web Object Manager, it does not work (the web server does not find the servlet). This is not the end... If I exit JDev, re-open it and return to the Web Object Manager, instead of the Web Object Manager tree appears a tree labeled JTree with leaves labeled "colors", "sports" and "food"???
    No way to recover the Web Object Manager!
    I had to re-install JDev.
    Any ideas?
    Thanks
    -David

    Thanks but I don't understand. Here is wtgapp.xml:
    <?xml version = '1.0'?>
    <workspace>
    </workspace>
    Here is webtogo.ora:
    [WEBTOGO]
    USE_SYSTEM_CLASSPATH=YES
    DEBUG=YES
    [FILESYSTEM]
    ROOT_DIR=C:\
    TYPE=OS
    [MIMES]
    html=text/html
    xml=text/xml
    xsl=text/xml
    jsp=text/html;handler=oracle.jsp.JspServlet
    xsql=text/html;handler=oracle.xml.xsql.XSQLServlet
    [APPLICATIONS]
    xmlfile=.\wtgapp.xml
    [SERVLET_PARAMETERS]
    emit_debuginfo=true
    bypass_source=true
    jspcompiler=oracle.jdeveloper.jsp.JspOjcCompiler
    page_repository_root=C:\Program Files\Oracle\JDeveloper 3.1.1.2\myclasses\_pages
    after I added my servlet (which was named Servlet1). Where is the problem exactely.
    Thanks.
    -David
    In any case, is the fixed version available?
    null

  • Linux install problems with Web Dev Pack 1.1

    Any one else having problems installing Web Services Dev Pack 1.1 for Linux that was released on 2/25 ? It gets about 55% finished in the install and then it complains about moving certain jaxp files to $JAVA_HOME/jre/lib/endorsed dir. I do put the files in the endorsed dir but the install does not continue. It also fails when starting over reporting the same issue.
    Thanks for any help and work arounds.
    eugene

    I am having the same problem installing on Red Hat 8.0....
    I receive a message like the following
    <PRE>
    Java(TM) Web Services Developer Pack 1.1 will be installed in the following
    location:
    /usr/java/jwsdp-1.1
    with the following features:
    JAXB Version 1.0 (Java Architecture for XML Binding)
    JAXM Version 1.1.1 (Java API for XML Messaging)
    JAXP Version 1.2.2 (Java API for XML Processing)
    JAXR Version 1.0_03 (Java API for XML Registries)
    JAX-RPC Version 1.0.3 (Java API for XML-based RPC)
    SAAJ Version 1.1.1 (SOAP with Attachments API for Java)
    JSTL Version 1.0.3 (JavaServer Pages(TM) Standard Tag Library)
    Java WSDP Registry Server Version 1.0_04
    Tomcat
    for a total size:
    67.7MB
    Press 1 for Next panel, 2 for Previous panel, 3 to Cancel or 4 to
    Redisplay [1] 1
    Installing Java(TM) Web Services Developer Pack 1.1... Please wait.
    Errors occurred during the installation.
    Press 1 for Next panel, 2 for Previous panel, 3 to Cancel or 4 to
    Redisplay [1] 1
    </PRE>
    then in the install directory, there is a file....log.txt containing:
    <PRE>
    (Mar 5, 2003 9:19:14 AM), Setup.product.install, com.installshield.product.service.product.PureJavaProductServiceImpl$Installer, err, ServiceException: (error code = 315; message = ""; severity = 0)
    STACK_TRACE: 24
    ServiceException: (error code = 315; message = ""; severity = 0)
         at com.ibm.wizard.platform.linux.LinuxRegistryServiceImpl.getPackageInfo(LinuxRegistryServiceImpl.java:221)
         at com.ibm.wizard.platform.linux.LinuxRegistryServiceImpl.getSoftwareObject(LinuxRegistryServiceImpl.java:142)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.installshield.wizard.service.LocalImplementorProxy.invoke(LocalImplementorProxy.java:52)
         at com.installshield.wizard.service.AbstractService.invokeImpl(AbstractService.java:51)
         at com.installshield.product.service.registry.GenericRegistryService.getSoftwareObject(GenericRegistryService.java:120)
         at com.installshield.product.service.product.PureJavaProductServiceImpl.setSoftwareObject(PureJavaProductServiceImpl.java:1582)
         at com.installshield.product.service.product.PureJavaProductServiceImpl.access$14(PureJavaProductServiceImpl.java:1578)
         at com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct.addToVPD(PureJavaProductServiceImpl.java:4662)
         at com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct.checkInstalledVersion(PureJavaProductServiceImpl.java:4632)
         at com.installshield.product.service.product.InstallableObjectVisitor.visitSoftwareObject(InstallableObjectVisitor.java:252)
         at com.installshield.product.service.product.InstallableObjectVisitor.visitProductBean(InstallableObjectVisitor.java:171)
         at com.installshield.product.service.product.InstallableObjectVisitor.visitSoftwareObject(InstallableObjectVisitor.java:208)
         at com.installshield.product.service.product.InstallableObjectVisitor.visitProductBean(InstallableObjectVisitor.java:171)
         at com.installshield.product.service.product.InstallableObjectVisitor.visitProductBeans(InstallableObjectVisitor.java:122)
         at com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct.install(PureJavaProductServiceImpl.java:4355)
         at com.installshield.product.service.product.PureJavaProductServiceImpl$Installer.execute(PureJavaProductServiceImpl.java:3590)
         at com.installshield.wizard.service.AsynchronousOperation.run(AsynchronousOperation.java:40)
         at java.lang.Thread.run(Thread.java:536)
    </PRE>

Maybe you are looking for