Idris Pathan

Greenhorn
+ Follow
since Feb 16, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Idris Pathan

Hi Ulf, thanks for the reply, yes adding the HTML in to the webapps/ROOT directory fixed the problem.

Thanks for that.

I am now trying to set up a applet that calls servlets to work.

I am not quite sure about what needs to be included in my web.xml.
17 years ago
Hi, I have installed Apache/Tomcat
Apache 2.2.4(Win32)
Tomcat Version - Apache Tomcat/6.0.9
JVM Version 1.5.0_10-b03
JVM Vendor Sun Microsystems Inc.
OS Name Windows XP

I am trying to run a simple applet - Hello.html, I can run this by just clicking on the html file and this is then displayed in my browser. There are no classes associated with this. The Hello.html file is located in tomcat\webapps\Hello.html.

When entering http://localserver:8080/Hello.html
I see the following error on the web browser

HTTP Status 404 - /Hello.html
type Status report
message /Hello.html
description The requested resource (/Hello.html) is not available.
Apache Tomcat/6.0.9

Can I run an applet that does not call a servlet in my Apache/Tomcat server ?


I am trying this out to make sure
1.)I can call a simple applet,
My next step would be to
2)call an applet that has classes
and then to
3)call an applet that uses servlets that have database access.

Any ideas as to why this is not working ? or any help would be greatly appreciated.

For the simple Servlet I have not changed anything in my server.xml file and I have not created a web.xml file either (am I right in thinking the web.xml file is only required for servlets ?)

thanks
17 years ago
Thanks for the reply Bear Bibeault,

Yes changed my setup to
C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\webapps\MyFirstApp
so that it is the same as my Context path in server.xml

Context path="/MyFirstApp" docBase="MyFirstApp" crossContext="true" debug="0" reloadable="true" trusted="false"></Context>



But still getting the error

java.lang.IllegalArgumentException: Document base C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\webapps\MyFristApp does not exist or is not a readable directory.

I am not sure where this path is coming from, I have checked the server.xml
The web.xml is as follows.

<?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>
<servlet>
<servlet-name>

</servlet-name>
<servlet-class>

</servlet-class>
<init-param>
<param-name>
Log
</param-name>
<param-value>
C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin
</param-value>
</init-param>
<param-name>
Path
</param-name>
<param-value>
C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\MyFristApp
</param-value>
</init-param>
<init-param>
<param-name>
Port
</param-name>
<param-value>
1998
</param-value>
</init-param>

</servlet>
<servlet>
<servlet-name>

</servlet-name>

</servlet-class>
<init-param>
<param-name>
Log
</param-name>
<param-value>
C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\MyFirstApp\Logs
</param-value>
</init-param>
<init-param>
<param-name>
Path
</param-name>
<param-value>
C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\MyFirstApp
</param-value>
</init-param>
<init-param>
<param-name>
Port
</param-name>
<param-value>
2001
</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>

</servlet-name>
<url-pattern>
/patcher.html
</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>
Manager
</servlet-name>
<url-pattern>
/Manager.html
</url-pattern>
</servlet-mapping>
</web-app>


Any ideas as to where its picking this path up from?
C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\webapps\MyFristApp
[ February 16, 2007: Message edited by: Idris Pathan ]
17 years ago
I am having problems trying to get a simple servlet to run on Tomcat6.0 on WinXP
I am seeing the following error

SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\webapps\MyFristApp does not exist or is not a readable directory
at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:141)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:3941)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4112)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
16-Feb-2007 22:48:59 org.apache.catalina.core.StandardContext start


My set up is as follows

C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\MyFristApp
C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\MyFristApp\Images
C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\MyFristApp\META-INF
C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\MyFristApp\WEB-INF\classes
C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\MyFristApp\WEB-INF\lib
C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\MyFristApp\WEB-INF\web.xml

In my server.xml file I have added the following

<Context path="/MyFirstApp" docBase="MyFirstApp" crossContext="true" debug="0" reloadable="true" trusted="false"></Context>


any one know whey I am seeing the error

java.lang.IllegalArgumentException: Document base C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\webapps\MyFristApp does not exist or is not a readable directory.


Thanks in advance for any help.

[ February 16, 2007: Message edited by: IdrisK ]

[ February 16, 2007: Message edited by: IdrisK ]
[ February 16, 2007: Message edited by: Bear Bibeault ]
17 years ago