5 Replies Latest reply on Sep 7, 2008 8:03 AM by Jose Alvarez de Lara

    Load index.jsp as welcome file

    Jose Alvarez de Lara Novice

      Hi all again,

      I am working with an application that counts then number of total entries on the server as well as the number entries of those in my DB.

      I use a JSP as welcome file (index.jsp) that is included into the web.xml.

      To count the total entries in the server I use a Session Bean and for any particular entry of the members of the application I use an Entity Bean

      I control all from a Servlet that call both Session and Entity Bean and response to the index.jsp entry.

      The index.jsp is a form with a textbox and a submit button.

      It is working but does not doing what I want. It is just a question of debugging. My problem is when I write the URL on the browser, I mean,


      the browser shows me the response of the servlet. The application passes over the index.jsp going to the servlet response.

      Any idea?

      Thank you in advance,

      I guess the problem is in any of the descriptors: web.xml or aplication.xml

        • 1. Re: Load index.jsp as welcome file
          jaikiran pai Master

          Post the contents of your web.xml.

          While posting the xml content or code or logs, remember to wrap it in a code block using the Code button in the message editor window and please hit the Preview button to make sure your post is correctly formatted

          • 2. Re: Load index.jsp as welcome file
            Jose Alvarez de Lara Novice

            This is my web.xml file,

            <?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">

            And this is my application.xml file,

            <?xml version="1.0" encoding="UTF-8"?>
            <!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application_1_2.dtd'>
             <description>This is the implementaion of the EntradasUsuario application</description>

            • 3. Re: Load index.jsp as welcome file
              mark spencer Newbie

              not sure if I have understood clearly, but why do you have your
              servlet mapped as "/*" ?


              I think it will intercept all requests this way.....
              shouldn't you rather define an endpoint "/myservlet" and recall it from the jsp action ?

              • 4. Re: Load index.jsp as welcome file
                Jose Alvarez de Lara Novice

                Thank you Francis,

                You have had a good idea.
                Now my application works ok.

                Thank you again,

                • 5. Re: Load index.jsp as welcome file
                  Jose Alvarez de Lara Novice


                  Following with my application UserEntries I have took out the connection to my DB from the Entity EJB and I leave it alone in a package es.deusto.dbaccessor with my connection class DBConnection.class.

                  My problem is that when I create my ear, it seems as if the application does not find up this class. When I call this class, on the first line of code, the server return me a NullPointerException.

                  I think that I am not building right my ear because when I deploy it on JBoss 4.2.2 GA
                  appears on the console my ejb.jar, my servlet.war, but nothing about dbaccessor-client.jar

                  Thanking in advance,