I load my application from SunOne Web server to Tomcat (4.1.30).  After
starting Tomcat, I issued the URL http://localhost:8080/gmemd, I got the
first page without all the images.  Clicked the login, I got 404 error:
requested resources (/servlet/Login) is not available.

Here is part of the web.xml:
<servlet-mapping>
  <servlet-name>invoker</servlet-name>
  <url-pattern>/servlet/*</url-pattern>
</servlet-mapping>

Here is the part of the tomcat server.xml:
<Context path="/gmemd" docBase="gmemd" debug="0" reloadable="true"
crossContext="false">
  <Logger className="org.apache.catalina.logger.FileLogger"
          prefix="localhost_gmemd_log."
          suffix=".txt"
          timestamp="true"/>
</Context>

Here is the file structure:
Webapps\gmemd
Webapps\gmemd\en\home\index.jsp
Webapps\gmemd\images\
Webapps\gmemd\web-inf\classes\Login.class
Webapps\gmemd\web-inf\lib\.....

Under gmemd, there is a welcome page (index.jsp) which forwards the request
to en\home\index.jsp.

Here is part of the en\home\index.jsp that references the images and calls
the login servelet:
<td>
  <a href="/en/company/careers/index.htm">
     <img name="toolbar_c2" src="/images/c2.gif" width="57" height="20"
border="0">
  </a>
</td>
<td>
  <a href="/servlet/Login"><img name="toolbar1" src="/images/toolbar1.gif"
width="45" height="20" border="0"></a>
</td>
<td>
  <img src="/images/spacer.gif" width="1" height="20" border="0"
name="undefined_2">
</td>

By the way, the application runs under SunOne Web Server 6.0 without
problems. I am sure I must have missed something.  When I checked the
Tomcat examples, whatever examples are clicked, on the query string URL, I
can see "localhost:8080/examples" be prefixed to all the URLs. Not in my
application. I did not see "localhost:8080/gmemd" be any part of the URL.

I manually prefixed the href and src attributes in the jsp with /gmemd/, my
page now displays the images, but servlet still not being found.

Even though my gmemd context (folder) has the same properties as examples
context (folder), when I stopped the tomcat, and checked the log file, I
got this:
2004-04-23 10:34:25 StandardContext[/gmemd]: Resources start failed:
java.lang.IllegalArgumentException: Document base ..\webapps\gmemd does not
exist or is not a readable directory
      at
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:193)
      at
org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:3349)
      at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3479)
      at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:754)
      at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
      at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363)
      at
org.apache.catalina.core.StandardService.start(StandardService.java:497)
      at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2190)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
      at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
      at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
      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 org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)

Please help!

Qin


----------------------------------------------------------------------------------------

This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.
----------------------------------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to