Christopher,

Thanks for your assistance.

Here is my web.xml

<?xml version='1.0' encoding='UTF-8'?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; version="2.5" 
id="web-app_1">
  <display-name>allMATCHWeb</display-name>
  <servlet>
    <servlet-name>InitServlet</servlet-name>
    <servlet-class>com.surecomp.allMATCH.client.InitServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>InitServlet</servlet-name>
    <url-pattern>/InitServlet</url-pattern>
  </servlet-mapping>
  <welcome-file-list>
    <welcome-file>/login.html</welcome-file>
  </welcome-file-list>
</web-app>


This is the InitServlet class declaration  
        public class InitServlet extends javax.servlet.http.HttpServlet 
implements javax.servlet.Servlet, Internationalizable 
        
This is the start of init() method

    public void init() throws ServletException {
        synchronized (this) {
                if (initialized || initializing) return;
                initializing = true;
        }
                logger = new Logging();
                contextPath = getServletContext().getRealPath("/");
                contextPath = getPathWithSeparator(contextPath);
                oLoaderStatic = new LoaderStatic();
        try {
            String sLogging = Configuration.getLogging(); 
                Date date = new Date();
                SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd");
            logger.setapplicationSegment("allMATCHWeb");
            logger.setSite(Logging.Client);
                
logger.LogSetup(Configuration.getLoggingLocation().concat("//allMATCHWeb_" + 
formatter.format(date) + ".log"),sLogging);
                logger.log("Configuration loaded from the file: 
["+Configuration.getPropertiesLocation()+"]");
        } catch (Throwable th) {
                th.printStackTrace();
            System.out.println("Error initializing logger.");
            try {
                        logger.log("Error initializing logger.",th);
                        logger.close();
            }
            catch (Throwable t) {}
                return;
        }


Again, thanks for any insight or assistance...
 
Sincerely,

Robert Jenkin
Surecomp Services, Inc.
2 Hudson Place, 4th Floor
Hoboken, NJ 07030
Skype: robert.jenkin
Office: 201 217 1437 | Direct: 201 716 1219 | Mobile: 908 251 0537
http://www.Surecomp.com


-----Original Message-----
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Friday, January 28, 2011 2:54 PM
To: Tomcat Users List
Subject: Re: deploying a war file and starting the application

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert,

On 1/28/2011 1:09 PM, robert.jen...@surecomp.com wrote:
> I have downloaded and configured Tomcat 7. All appears to be working.

Glad to hear it!

> I have deployed a war file that currently works with WebSphere 7 and
> WebLogic 11g.
> 
> The first issue I had was with url-pattern. It appears that Tomcat
> requires they start with a slash (/). I made the change and I no longer
> receive any errors while starting Tomcat.

This is a spec requirement, not a Tomcat requirement. Other containers
may be more lenient.

> The following image shows the startup window and that my war is being
> deployed. Within the webapps directory a directory containing my webapp
> is created.

Images are stripped from posts to the list. Can you post it somewhere
online and give us a link? Or, just copy/paste any relevant content from
your screen?

> My initial servlet is called InitServlet and it is marked as
> load-on-startup (please see following image) .

Ditto.

> I have two questions
> 
> 1)      If I type http://localhost:7080/allMATCHWeb in to a browser
> shouldn’t see this login.html page? I don’t… however I can access it by
>  http://localhost:7080/allMATCHWeb/login.html

You'll have to provide your web.xml for us to know when you need
authentication challenges. Are you using container-managed authentication?

> 2)      The load-on-start InitServlet class is not being executed as I
> have no logs generated or any other startup items handled, any ideas?

Again, including web.xml should help. Note that using an "InitServlet"
hasn't been recommended since the addition of the ServletContextListener
interface a long time ago.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1DHsYACgkQ9CaO5/Lv0PBhSQCeNtR93FGfQecpwJ/n02ioUhpP
x2MAn2WmpQ0vzJ3YAbrMQrE9SnMmOq++
=WYyb
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


This mail was sent via Mail-SeCure System.

Reply via email to