You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by Haris Berbic <ha...@hermes.si> on 2000/08/18 08:15:50 UTC

HelloWorld

I am new with Apache and Java Servlets and I have a problem with simple
example.
Please help me how to run HelloWord example

In my sysedit I have made  classpath
SET CLASSPATH= C:\HARIS\PROGRAM
FILES\TOMCAT\JAKARTA-ANT\LIB\JAXP.JAR;PARSER.JAR;ANT.JAR;LCP.BAT;C:\PROGRA~1
\J2EE\LIB\J2EE.JAR;EJB10DEPLOYMENT.JAR;JHALL.JAR;C:\PROGRA`1\JDK1.1.2\JAWS.J
AR;I18N.JAR;PLUGPROV.JAR;C:\PROGRA~1\J2EE\LIB\CLOUDSPACE\RMIJDBC.JAR;CLIENT.
JAR;CLOUDSPACE.JAR;TOOLS.JAR;C:\JDK1.2.2\JRE\LIB\EXT\SERVLET.JAR;

I have to copy myself  servlet.jar to C:\JDK1.2.2\JRE\LIB\EXT\
Did I do correct?
Where do I have to copy it?

I have made Index.html and I get him to server. I got code (HTML) attached.
I have compiled HelloWorld wit no errors.

My purpose is to get a efect from HelloWorld when I press button Query in
Index.html.

Tomcat runs without problem and I get Index.html on server, but I can't get
HelloWorld...


Please help me!


Haris <<index.html>>  <<HelloWorld.java>> 

Re: HelloWorld

Posted by Markus Colombo <ma...@customercare.ch>.
servlet.jar should be in the tomcat\lib directory (if it is in the classpath, it
can also reside where you have it now).
On NT you need to specify the classpath for each .jar in the lib directory.
Here's an extract of my tomcat.bat:

set CLASSPATH=.
set CLASSPATH=%TOMCAT_HOME%\classes
set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\webserver.jar
set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\jasper.jar
set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\xml.jar
set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\servlet.jar
set CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\tools.jar

What do you see when you type servername:8080 in your browser ?
Did the examples that came with the Tomcat distribution work ?

Haris Berbic wrote:

> I am new with Apache and Java Servlets and I have a problem with simple
> example.
> Please help me how to run HelloWord example
>
> In my sysedit I have made  classpath
> SET CLASSPATH= C:\HARIS\PROGRAM
> FILES\TOMCAT\JAKARTA-ANT\LIB\JAXP.JAR;PARSER.JAR;ANT.JAR;LCP.BAT;C:\PROGRA~1
> \J2EE\LIB\J2EE.JAR;EJB10DEPLOYMENT.JAR;JHALL.JAR;C:\PROGRA`1\JDK1.1.2\JAWS.J
> AR;I18N.JAR;PLUGPROV.JAR;C:\PROGRA~1\J2EE\LIB\CLOUDSPACE\RMIJDBC.JAR;CLIENT.
> JAR;CLOUDSPACE.JAR;TOOLS.JAR;C:\JDK1.2.2\JRE\LIB\EXT\SERVLET.JAR;
>
> I have to copy myself  servlet.jar to C:\JDK1.2.2\JRE\LIB\EXT\
> Did I do correct?
> Where do I have to copy it?
>
> I have made Index.html and I get him to server. I got code (HTML) attached.
> I have compiled HelloWorld wit no errors.
>
> My purpose is to get a efect from HelloWorld when I press button Query in
> Index.html.
>
> Tomcat runs without problem and I get Index.html on server, but I can't get
> HelloWorld...
>
> Please help me!
>
> Haris <<index.html>>  <<HelloWorld.java>>
>
>   ------------------------------------------------------------------------
>
>    index.htmlName: index.html
>              Type: Hypertext Markup Language (text/html)
>
>    HelloWorld.javaName: HelloWorld.java
>                   Type: application/x-unknown-content-type-java_auto_file
>
>   ------------------------------------------------------------------------
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: general-help@jakarta.apache.org