RE: JSP config question from a newbie

2004-01-06 Thread Steve Carson-Rowland
Hi Schalk,

Do I need to install J2EE as well? I thought if I was using Tomcat, this
was handling the server side instead. I have the latest J2SE - 1.4.2 and
have set JAVA_HOME and CLASSPATH.

Thanks
Steve

-Original Message-
From: Schalk [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 30 December 2003 1:26 AM
To: 'Tomcat Users List'
Subject: RE: JSP config question from a newbie

Steve

First off, ensure that you have both the latest J2SE and J2EE packages
installed. Then in your CLASSPATH point to both your J2SE as well as
J2EE
installation directories.
ex. C:\j2sdk1.4\lib\tools.jar;c:\j2sdkee\lib

You should also set your JAVA_HOME and J2EE_HOME i.e. 
JAVA_HOME = c:\j2sdk1.4.2\
J2EE_HOME = c:\j2sdkee1.4\ 

This should solve all of your problems.

Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.CEO
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.com
 
This message contains information that is considered to be sensitive or
confidential and may not be forwarded or disclosed to any other party
without the permission of the sender. If you received this message in
error,
please notify me immediately so that I can correct and delete the
original
email. Thank you. 

:: -Original Message-
:: From: Steve Carson-Rowland [mailto:[EMAIL PROTECTED]
:: Sent: Wednesday, December 31, 2003 5:09 AM
:: To: [EMAIL PROTECTED]
:: Subject: JSP config question from a newbie
:: 
:: I am just trying to get up and running with JSP, and have installed
:: Tomcat 5.0. I am using Sams Teach Yourself JavaServer Pages. The
code
:: in the book, and the instructions are all based on Tomcat 4.0.3.
:: 
:: (I am running Windows XP Professional).
:: 
:: When I try and compile the following:
:: ---
:: import java.io.*;
:: import javax.servlet.*;
:: import javax.servlet.http.*;
:: 
:: public class ch01_06 extends HttpServlet
:: {
:: public void doGet(HttpServletRequest request,
::   HttpServletResponse response)
:: throws IOException, ServletException
:: {
:: response.setContentType(text/html);
:: PrintWriter out = response.getWriter();
:: 
:: out.println(HTML);
:: out.println(HEAD);
:: out.println(TITLE);
:: out.println(A Web Page);
:: out.println(/TITLE);
:: out.println(/HEAD);
:: out.println(Hello there!);
:: out.println(/BODY);
:: out.println(/HTML);
:: }
:: }
:: 
:: ---
:: I get the following errors:
:: 
:: --
:: C:\Program Files\Apache Software Foundation\Tomcat
:: 5.0\webapps\ch01javac ch01_06.java
:: ch01_06.java:2: package javax.servlet does not exist
:: import javax.servlet.*;
:: ^
:: ch01_06.java:3: package javax.servlet.http does not exist
:: import javax.servlet.http.*;
:: ^
:: ch01_06.java:5: cannot resolve symbol
:: symbol  : class HttpServlet
:: location: class ch01_06
:: public class ch01_06 extends HttpServlet
::  ^
:: ch01_06.java:7: cannot resolve symbol
:: symbol  : class HttpServletRequest
:: location: class ch01_06
:: public void doGet(HttpServletRequest request,
::   ^
:: ch01_06.java:8: cannot resolve symbol
:: symbol  : class HttpServletResponse
:: location: class ch01_06
::   HttpServletResponse response)
::   ^
:: ch01_06.java:9: cannot resolve symbol
:: symbol  : class ServletException
:: location: class ch01_06
:: throws IOException, ServletException
:: ^
:: 6 errors
:: ---
:: 
:: I am guessing it is because my book tells me to set CLASSPATH to the
:: path for 'servlet.jar', but when I look in the 'lib' directory I only
:: see a 'servlet-api.jar' file. So I set the CLASSPATH to
servlet-api.jar.
:: (When this didn't work I did try changing the path to 'servlet.jar'
just
:: to check but same result).
:: 
:: But the code is written with import javax.servlet.*  - is this the
:: problem?
:: 
:: Because I am totally new to Java I can't figure out what to change. I
:: also can't find a 'what's changed from Tomcat 4.0 to 5.0' file to
help
:: me understand.
:: 
:: Anyone offer any advice?
:: 
:: Thanks
:: 
:: Steve Carson
:: Brisbane
:: Australia



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


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



RE: JSP config question from a newbie

2004-01-06 Thread Shapira, Yoav

Howdy,
You don't need to install J2EE, that's wrong advice.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Steve Carson-Rowland [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 07, 2004 4:51 AM
To: 'Tomcat Users List'
Subject: RE: JSP config question from a newbie

Hi Schalk,

Do I need to install J2EE as well? I thought if I was using Tomcat,
this
was handling the server side instead. I have the latest J2SE - 1.4.2
and
have set JAVA_HOME and CLASSPATH.

Thanks
Steve

-Original Message-
From: Schalk [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 30 December 2003 1:26 AM
To: 'Tomcat Users List'
Subject: RE: JSP config question from a newbie

Steve

First off, ensure that you have both the latest J2SE and J2EE packages
installed. Then in your CLASSPATH point to both your J2SE as well as
J2EE
installation directories.
ex. C:\j2sdk1.4\lib\tools.jar;c:\j2sdkee\lib

You should also set your JAVA_HOME and J2EE_HOME i.e.
JAVA_HOME = c:\j2sdk1.4.2\
J2EE_HOME = c:\j2sdkee1.4\

This should solve all of your problems.

Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.CEO
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.com

This message contains information that is considered to be sensitive or
confidential and may not be forwarded or disclosed to any other party
without the permission of the sender. If you received this message in
error,
please notify me immediately so that I can correct and delete the
original
email. Thank you.

:: -Original Message-
:: From: Steve Carson-Rowland [mailto:[EMAIL PROTECTED]
:: Sent: Wednesday, December 31, 2003 5:09 AM
:: To: [EMAIL PROTECTED]
:: Subject: JSP config question from a newbie
::
:: I am just trying to get up and running with JSP, and have installed
:: Tomcat 5.0. I am using Sams Teach Yourself JavaServer Pages. The
code
:: in the book, and the instructions are all based on Tomcat 4.0.3.
::
:: (I am running Windows XP Professional).
::
:: When I try and compile the following:
:: ---
:: import java.io.*;
:: import javax.servlet.*;
:: import javax.servlet.http.*;
::
:: public class ch01_06 extends HttpServlet
:: {
:: public void doGet(HttpServletRequest request,
::   HttpServletResponse response)
:: throws IOException, ServletException
:: {
:: response.setContentType(text/html);
:: PrintWriter out = response.getWriter();
::
:: out.println(HTML);
:: out.println(HEAD);
:: out.println(TITLE);
:: out.println(A Web Page);
:: out.println(/TITLE);
:: out.println(/HEAD);
:: out.println(Hello there!);
:: out.println(/BODY);
:: out.println(/HTML);
:: }
:: }
::
:: ---
:: I get the following errors:
::
:: --
:: C:\Program Files\Apache Software Foundation\Tomcat
:: 5.0\webapps\ch01javac ch01_06.java
:: ch01_06.java:2: package javax.servlet does not exist
:: import javax.servlet.*;
:: ^
:: ch01_06.java:3: package javax.servlet.http does not exist
:: import javax.servlet.http.*;
:: ^
:: ch01_06.java:5: cannot resolve symbol
:: symbol  : class HttpServlet
:: location: class ch01_06
:: public class ch01_06 extends HttpServlet
::  ^
:: ch01_06.java:7: cannot resolve symbol
:: symbol  : class HttpServletRequest
:: location: class ch01_06
:: public void doGet(HttpServletRequest request,
::   ^
:: ch01_06.java:8: cannot resolve symbol
:: symbol  : class HttpServletResponse
:: location: class ch01_06
::   HttpServletResponse response)
::   ^
:: ch01_06.java:9: cannot resolve symbol
:: symbol  : class ServletException
:: location: class ch01_06
:: throws IOException, ServletException
:: ^
:: 6 errors
:: ---
::
:: I am guessing it is because my book tells me to set CLASSPATH to the
:: path for 'servlet.jar', but when I look in the 'lib' directory I
only
:: see a 'servlet-api.jar' file. So I set the CLASSPATH to
servlet-api.jar.
:: (When this didn't work I did try changing the path to 'servlet.jar'
just
:: to check but same result).
::
:: But the code is written with import javax.servlet.*  - is this the
:: problem?
::
:: Because I am totally new to Java I can't figure out what to change.
I
:: also can't find a 'what's changed from Tomcat 4.0 to 5.0' file to
help
:: me understand.
::
:: Anyone offer any advice?
::
:: Thanks
::
:: Steve Carson
:: Brisbane
:: Australia



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


-
To unsubscribe, e-mail: [EMAIL PROTECTED

RE: JSP config question from a newbie

2003-12-30 Thread Schalk
Steve

First off, ensure that you have both the latest J2SE and J2EE packages
installed. Then in your CLASSPATH point to both your J2SE as well as J2EE
installation directories.
ex. C:\j2sdk1.4\lib\tools.jar;c:\j2sdkee\lib

You should also set your JAVA_HOME and J2EE_HOME i.e. 
JAVA_HOME = c:\j2sdk1.4.2\
J2EE_HOME = c:\j2sdkee1.4\ 

This should solve all of your problems.

Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.CEO
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.com
 
This message contains information that is considered to be sensitive or
confidential and may not be forwarded or disclosed to any other party
without the permission of the sender. If you received this message in error,
please notify me immediately so that I can correct and delete the original
email. Thank you. 

:: -Original Message-
:: From: Steve Carson-Rowland [mailto:[EMAIL PROTECTED]
:: Sent: Wednesday, December 31, 2003 5:09 AM
:: To: [EMAIL PROTECTED]
:: Subject: JSP config question from a newbie
:: 
:: I am just trying to get up and running with JSP, and have installed
:: Tomcat 5.0. I am using Sams Teach Yourself JavaServer Pages. The code
:: in the book, and the instructions are all based on Tomcat 4.0.3.
:: 
:: (I am running Windows XP Professional).
:: 
:: When I try and compile the following:
:: ---
:: import java.io.*;
:: import javax.servlet.*;
:: import javax.servlet.http.*;
:: 
:: public class ch01_06 extends HttpServlet
:: {
:: public void doGet(HttpServletRequest request,
::   HttpServletResponse response)
:: throws IOException, ServletException
:: {
:: response.setContentType(text/html);
:: PrintWriter out = response.getWriter();
:: 
:: out.println(HTML);
:: out.println(HEAD);
:: out.println(TITLE);
:: out.println(A Web Page);
:: out.println(/TITLE);
:: out.println(/HEAD);
:: out.println(Hello there!);
:: out.println(/BODY);
:: out.println(/HTML);
:: }
:: }
:: 
:: ---
:: I get the following errors:
:: 
:: --
:: C:\Program Files\Apache Software Foundation\Tomcat
:: 5.0\webapps\ch01javac ch01_06.java
:: ch01_06.java:2: package javax.servlet does not exist
:: import javax.servlet.*;
:: ^
:: ch01_06.java:3: package javax.servlet.http does not exist
:: import javax.servlet.http.*;
:: ^
:: ch01_06.java:5: cannot resolve symbol
:: symbol  : class HttpServlet
:: location: class ch01_06
:: public class ch01_06 extends HttpServlet
::  ^
:: ch01_06.java:7: cannot resolve symbol
:: symbol  : class HttpServletRequest
:: location: class ch01_06
:: public void doGet(HttpServletRequest request,
::   ^
:: ch01_06.java:8: cannot resolve symbol
:: symbol  : class HttpServletResponse
:: location: class ch01_06
::   HttpServletResponse response)
::   ^
:: ch01_06.java:9: cannot resolve symbol
:: symbol  : class ServletException
:: location: class ch01_06
:: throws IOException, ServletException
:: ^
:: 6 errors
:: ---
:: 
:: I am guessing it is because my book tells me to set CLASSPATH to the
:: path for 'servlet.jar', but when I look in the 'lib' directory I only
:: see a 'servlet-api.jar' file. So I set the CLASSPATH to servlet-api.jar.
:: (When this didn't work I did try changing the path to 'servlet.jar' just
:: to check but same result).
:: 
:: But the code is written with import javax.servlet.*  - is this the
:: problem?
:: 
:: Because I am totally new to Java I can't figure out what to change. I
:: also can't find a 'what's changed from Tomcat 4.0 to 5.0' file to help
:: me understand.
:: 
:: Anyone offer any advice?
:: 
:: Thanks
:: 
:: Steve Carson
:: Brisbane
:: Australia



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



Re: JSP config question from a newbie

2003-12-30 Thread Riaan Oberholzer
You have to compile and include the j2ee.jar in the
classpath, eg:

javac -classpath c:/java/libs/j2ee.jar ch01_06.java

(You can also use Tomcat's servlet.jar and other jars
in the /common/lib directory that implement the
standard J2EE features. Probably recommended if you
are deploying to Tomcat)

From the looks of it, I would suggest you also first
attempt the standard Java tutorial before ettempting
J2EE stuff. You'll be better off if you have a solid
Java base first.

See the java.sun.com pages for that.



--- Steve Carson-Rowland
[EMAIL PROTECTED] wrote:
 I am just trying to get up and running with JSP, and
 have installed
 Tomcat 5.0. I am using Sams Teach Yourself
 JavaServer Pages. The code
 in the book, and the instructions are all based on
 Tomcat 4.0.3.
  
 (I am running Windows XP Professional).
 
 When I try and compile the following:
 ---
 import java.io.*;
 import javax.servlet.*;
 import javax.servlet.http.*;
  
 public class ch01_06 extends HttpServlet 
 {
 public void doGet(HttpServletRequest request,
   HttpServletResponse response)
 throws IOException, ServletException
 {
 response.setContentType(text/html);
 PrintWriter out = response.getWriter();
  
 out.println(HTML);
 out.println(HEAD);
 out.println(TITLE);
 out.println(A Web Page);
 out.println(/TITLE);
 out.println(/HEAD);
 out.println(Hello there!);
 out.println(/BODY);
 out.println(/HTML);
 }
 }
 
 ---
 I get the following errors:
 
 --
 C:\Program Files\Apache Software Foundation\Tomcat
 5.0\webapps\ch01javac ch01_06.java
 ch01_06.java:2: package javax.servlet does not exist
 import javax.servlet.*;
 ^
 ch01_06.java:3: package javax.servlet.http does not
 exist
 import javax.servlet.http.*;
 ^
 ch01_06.java:5: cannot resolve symbol
 symbol  : class HttpServlet
 location: class ch01_06
 public class ch01_06 extends HttpServlet
  ^
 ch01_06.java:7: cannot resolve symbol
 symbol  : class HttpServletRequest
 location: class ch01_06
 public void doGet(HttpServletRequest request,
   ^
 ch01_06.java:8: cannot resolve symbol
 symbol  : class HttpServletResponse
 location: class ch01_06
   HttpServletResponse response)
   ^
 ch01_06.java:9: cannot resolve symbol
 symbol  : class ServletException
 location: class ch01_06
 throws IOException, ServletException
 ^
 6 errors
 ---
 
 I am guessing it is because my book tells me to set
 CLASSPATH to the
 path for 'servlet.jar', but when I look in the 'lib'
 directory I only
 see a 'servlet-api.jar' file. So I set the CLASSPATH
 to servlet-api.jar.
 (When this didn't work I did try changing the path
 to 'servlet.jar' just
 to check but same result).
 
 But the code is written with import javax.servlet.*
  - is this the
 problem?
 
 Because I am totally new to Java I can't figure out
 what to change. I
 also can't find a 'what's changed from Tomcat 4.0 to
 5.0' file to help
 me understand.
 
 Anyone offer any advice?
 
 Thanks
 
 Steve Carson
 Brisbane
 Australia
 


__
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003

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



Re: JSP config question from a newbie

2003-12-30 Thread Ben Souther
Add servlet.jar to your classpath.
It can be found in TOMCAT_HOME/common/lib/



On Tuesday 30 December 2003 10:09 pm, Steve Carson-Rowland wrote:
 I am just trying to get up and running with JSP, and have installed
 Tomcat 5.0. I am using Sams Teach Yourself JavaServer Pages. The code
 in the book, and the instructions are all based on Tomcat 4.0.3.

 (I am running Windows XP Professional).

 When I try and compile the following:
 ---
 import java.io.*;
 import javax.servlet.*;
 import javax.servlet.http.*;

 public class ch01_06 extends HttpServlet
 {
 public void doGet(HttpServletRequest request,
   HttpServletResponse response)
 throws IOException, ServletException
 {
 response.setContentType(text/html);
 PrintWriter out = response.getWriter();

 out.println(HTML);
 out.println(HEAD);
 out.println(TITLE);
 out.println(A Web Page);
 out.println(/TITLE);
 out.println(/HEAD);
 out.println(Hello there!);
 out.println(/BODY);
 out.println(/HTML);
 }
 }

 ---
 I get the following errors:

 --
 C:\Program Files\Apache Software Foundation\Tomcat
 5.0\webapps\ch01javac ch01_06.java
 ch01_06.java:2: package javax.servlet does not exist
 import javax.servlet.*;
 ^
 ch01_06.java:3: package javax.servlet.http does not exist
 import javax.servlet.http.*;
 ^
 ch01_06.java:5: cannot resolve symbol
 symbol  : class HttpServlet
 location: class ch01_06
 public class ch01_06 extends HttpServlet
  ^
 ch01_06.java:7: cannot resolve symbol
 symbol  : class HttpServletRequest
 location: class ch01_06
 public void doGet(HttpServletRequest request,
   ^
 ch01_06.java:8: cannot resolve symbol
 symbol  : class HttpServletResponse
 location: class ch01_06
   HttpServletResponse response)
   ^
 ch01_06.java:9: cannot resolve symbol
 symbol  : class ServletException
 location: class ch01_06
 throws IOException, ServletException
 ^
 6 errors
 ---

 I am guessing it is because my book tells me to set CLASSPATH to the
 path for 'servlet.jar', but when I look in the 'lib' directory I only
 see a 'servlet-api.jar' file. So I set the CLASSPATH to servlet-api.jar.
 (When this didn't work I did try changing the path to 'servlet.jar' just
 to check but same result).

 But the code is written with import javax.servlet.*  - is this the
 problem?

 Because I am totally new to Java I can't figure out what to change. I
 also can't find a 'what's changed from Tomcat 4.0 to 5.0' file to help
 me understand.

 Anyone offer any advice?

 Thanks

 Steve Carson
 Brisbane
 Australia

-- 
Ben Souther
F.W. Davison  Company, Inc.



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