Re: config 302 redirect ?

2003-11-27 Thread Luke Vanderfluit
Hi P.,

There are a number of ways:
1. using the Refresh header,
2. using the Location header,

these you can do using META tags
as in 
meta http-equiv=Refresh Content=3;http://mydomain.com/gohere;

or using the servlet API as in
response.setHeader(Refresh, 3;http://mydomain.com/gohere;);
response.setHeader(Location, http://mydomain.com/gohere;);
response.sendRedirect(http://mydomain.com/gohere;);

or when redirecting to another resource you can do:
ServletContext context = getServletContext();
RequestDispatcher rd =
   context.getRequestDispatcher(otherServletOrJSPOrHtml);
rd.forward(request, response);

hope this helps,

kind regards,
Luke

On Fri, 2003-11-28 at 01:10, P.vanKemenade wrote:
 Hi
 
 what is the correct way to redirect users to a completely different
 server when they try to acces some address ? I'm looking for a
 config option (in server.xml or web.xml) that will return a http
 redirect header, like apache's Redirect directive.
 
 when people ask for
   http://mydomain.com/gohere/
 or
   http://mydomain.com/gohere/bla/bla
 
 I want them to go
   http://yourdomain.com/gosomewhereelse
 and
   http://yourdomain.com/gosomewhereelse
 
 thanks,
 *pike
 
 I wasted time, and now doth time waste me
 
 http://framework.v2.nl/archive/archive/node/text/default.py/nodenr-67731
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 

when my computer smiles, I'm happy
===.~ ~,
Luke Vanderfluit   |'/']
Mobile: 0421 276 282\~/`


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



Re: config 302 redirect ?

2003-11-27 Thread Luke Vanderfluit
Hi,

Sorry but I don't understand what you are trying to do,
could you be more explicit, then maybe we can help :-)

kind regrards,
Luke


 my real problem is, I have two different
 tomcats looking at the same folders.
 for each tomcat, I would like
   folder A to redirect to tomcat A
   folder B to redirect to tomcat B
 that's why I was looking for config options.
 
 I'll just have to change the setup.
 
 thanks,
 *-pike
 
 http://www.fogscreen.com/
 
   .. tv in thin air ..
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 

when my computer smiles, I'm happy
===.~ ~,
Luke Vanderfluit   |'/']
Mobile: 0421 276 282\~/`


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



database connection in web.xml

2003-10-16 Thread Luke Vanderfluit
Hi,
I want to specify a database connection in the web.xml file for an
application. 
How do I do this?
Where can I find docs to describe it,

Thanks,
kind regards,
Luke
-- 

when my computer smiles, I'm happy
===.~ ~,
Luke Vanderfluit   |'/']
Mobile: 0421 276 282\~/`


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



RequestDispatcher and getServletContext() don't work when using init()

2003-10-15 Thread Luke Vanderfluit
Hi, 

I found that using the init() method to set up a database connection
then trying to instantiate a ServletContext object and forward to a jsp
page didn't work. 

If placed the database connection code in the doPost() then it DID,

The 2 code sets are attached,

can anyone tell me why?

thanks,
kind regards,
Luke

-- 

when my computer smiles, I'm happy
===.~ ~,
Luke Vanderfluit   |'/']
Mobile: 0421 276 282\~/`

/* A servlet to display the contents Bookmarks database */

import java.io.*;
import java.sql.*;
import java.text.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class CodeSet1 extends HttpServlet 
{
	Connection dbcon;  // Connection 
   public String getServletInfo()
   {
  return Servlet connects to PostgreSQL;
   }
   // init sets up a database connection
   public void init(ServletConfig config) throws ServletException
   {
String loginUser = luke;
String loginPasswd = ;
String loginUrl = jdbc:postgresql:bookmarks;

// Load the PostgreSQL driver
   try 
		{
  Class.forName(org.postgresql.Driver);
  dbcon = DriverManager.getConnection(loginUrl, loginUser, loginPasswd);
  }
   catch (ClassNotFoundException ex)
  {
  System.err.println(ClassNotFoundException:  + ex.getMessage());
  throw new ServletException(Class not found Error);
  }
   catch (SQLException ex)
  {
  System.err.println(SQLException:  + ex.getMessage());
  }
   } // end init()

// == POST ==

   public void doPost(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException
   {
String loginUser = luke;
String loginPasswd = ;
String loginUrl = jdbc:postgresql:bookmarks;

/*// Load the PostgreSQL driver
   try
  {
  Class.forName(org.postgresql.Driver);
  dbcon = DriverManager.getConnection(loginUrl, loginUser, loginPasswd);
  }
   catch (ClassNotFoundException ex)
  {
  System.err.println(ClassNotFoundException:  + ex.getMessage());
  throw new ServletException(Class not found Error);
  }
   catch (SQLException ex)
  {
  System.err.println(SQLException:  + ex.getMessage());
  }
*/
	String title =	request.getParameter(title);
	String url = request.getParameter(url);
	String descr = request.getParameter(descr);
   try
		{
  // Declare statement
  Statement statement = dbcon.createStatement();
  String query = insert into bookmark values(' 
+ title + ', ' + url + ', ' + descr + ');
  // Perform update
  statement.executeUpdate(query);
		statement.close();
		}
	catch(Exception ex){}
	try{ dbcon.close(); } catch(SQLException ignored) {} 
	ServletContext context = getServletContext();
	RequestDispatcher rd = context.getRequestDispatcher(/marksMain.jsp);
	rd.forward(request, response);
	} //end doPost
}


/* A servlet to display the contents Bookmarks database */

import java.io.*;
import java.sql.*;
import java.text.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class CodeSet2 extends HttpServlet 
{
	Connection dbcon;  // Connection 
   public String getServletInfo()
   {
  return Servlet connects to PostgreSQL;
   }
/*   // init sets up a database connection
   public void init(ServletConfig config) throws ServletException
   {
String loginUser = luke;
String loginPasswd = ;
String loginUrl = jdbc:postgresql:bookmarks;

// Load the PostgreSQL driver
   try 
		{
  Class.forName(org.postgresql.Driver);
  dbcon = DriverManager.getConnection(loginUrl, loginUser, loginPasswd);
  }
   catch (ClassNotFoundException ex)
  {
  System.err.println(ClassNotFoundException:  + ex.getMessage());
  throw new ServletException(Class not found Error);
  }
   catch (SQLException ex)
  {
  System.err.println(SQLException:  + ex.getMessage());
  }
   } // end init()

*/// == POST ==

   public void doPost(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException
   {
String loginUser = luke;
String loginPasswd = ;
String loginUrl = jdbc:postgresql:bookmarks;

// Load the PostgreSQL driver
   try
  {
  Class.forName(org.postgresql.Driver);
  dbcon = DriverManager.getConnection(loginUrl, loginUser, loginPasswd);
  }
   catch (ClassNotFoundException ex)
  {
  System.err.println(ClassNotFoundException:  + ex.getMessage());
  throw new ServletException(Class not found Error);
  }
   catch (SQLException ex)
  {
  System.err.println(SQLException:  + ex.getMessage());
  }

	String title =	request.getParameter(title);
	String url = request.getParameter(url);
	String descr = request.getParameter(descr);
   try
		{
  // Declare statement

Re: Jsp's compiling

2003-10-03 Thread Luke Vanderfluit
Hi,

No, Not that I'm an expert but, 
JSPs compile only on the first request and then every time they are
changed.,

knd rgrds,

Luke


On Fri, 2003-10-03 at 20:08, [EMAIL PROTECTED] wrote:
 Hi everyone,
  Is it possible to compile all of the jsp pages of a given context when it
 starts ?
  ( As far as I know they are compiled each time the server get a request
 for that particular jsp page ).
 Many thanks,
  Gianluca
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 

when my computer smiles, I'm happy
===.~ ~,
Luke Vanderfluit   |'/']
Mobile: 0421 276 282\~/`


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



RE: sloppy English

2003-09-22 Thread Luke Vanderfluit
Hi,

If you are a programmer or in any way write code you must be accustomed
to case sensitivity. So it can't be that hard to use the shift key.
I don't believe anyone just types on the keyboard without using a shift
key. Nah. sorry.

On another note:
Imagine all programming code was in Latvian and we all had to write our
programs in Latvian. 
This wouldn't mean I had to become proficient in the Latvian language,
no, just the Latvian constructs used in programming.

eg. 

public class ThisClass   |semo  lacsis TemorLacsis
{|{
public static void main  |semo conseva driad emin
(String[] args)  |(Glest[] dovargi)
{}   |{}

Now, imagine having to use a different character set to program

I acknowledge that the english centric nature of programming and the web
does not mean that everyone is totally versed in the english language
and it's by no means required for everyone to have perfect english
spelling and grammatical skills in order to post to this list.
I have no problem with that at all.

hope this contributes to an inclusive all welcome approach,
kind regards,
Luke

On Tue, 2003-09-23 at 02:40, Kannan Sundararajan wrote:
 Please do not think the programmers are using lazy English or moron(watch
 you before you  put like these kind of words). They are hard working, their
 backbone is fingers and they  are very tired of doing shift key, coz they
 are keen on typing technical stuff not on fancy grammatical. 
 
 If you do not like our fellow programmers typo, then just don't read it. 
 
 Looks like you are in non typo in IT business, that is why you are
 commenting like these programmers. 
 
 Regards, 
 
 Kannan
 
 -Original Message-
 From: Christopher Williams [mailto:[EMAIL PROTECTED]
 Sent: Monday, September 22, 2003 12:48 PM
 To: [EMAIL PROTECTED]
 Subject: OT: sloppy English
 
 
 A lot of posts to this mailing list seem to use really lazy English: I
 consistently in lowercase, missing punctuation, missing capital letters at
 the start of sentences, etc.
 
 Two things:
 1. A sentence which goes something like must i do x or can i do y is hard
 to read.
 2. Writing like this makes you sound like a moron.
 
 We're all educated people or otherwise we wouldn't be computer programmers.
 So let's maintain some reasonable standards.
 
 Chris Williams.
 
 
 
 -
 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]
-- 

when my computer smiles, I'm happy
===.~ ~,
Luke Vanderfluit   |'/']
Mobile: 0421 276 282\~/`


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



tomcat won't read classes unless in explicit packages

2003-09-21 Thread Luke Vanderfluit
Hi,

Does anyone have a solution or workaround for the following problem.

I'm running an application under /tomcat/webapps. The application
consists of a number of JSPs, servlets and bean classes,

The package structure looks like this

/tomcat/tutorialbeans
  |
 ---
 | |
  WEB-INF JSPs(.jsp files)
 |
   
   |   |
web.xml(file)   classes(dir)
   |
  tutorialbeans
   |
  tb(dir)
   |
    
||
  classes(src and class files)   tbbeans(dir)
 | 
 -
 |   |
  classes(files)tb2(dir)
 |
  classes(files)



Initially with tomcat 4.0 it was possible to have all the class
files(servlets and beans) in one directory, namely WEB-INF/classes,
however trying to run the exact same application with tomcat 4.1.x
results in compilation errors.
It seems 4.1.x needs explicitly stipulated packages in order to work.

I've had to devise the above package structure to get the application to
run under 4.1.x

QUESTION:
Is there any workaround or other way to get tomcat 4.1.xx to run the
application with all classes in one directory, be it the default package
or explicitly specified?

I've read about this problem, but not to the extent that a solution or
workaround or has been presented.

Any input is appreciated,
kind regards,
Luke

-- 

when my computer smiles, I'm happy
===.~ ~,
Luke Vanderfluit   |'/']
Mobile: 0421 276 282\~/`


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



Re: Some help with jk2

2003-09-20 Thread Luke Vanderfluit
Hi,

It wasn't that hard:
you will need the file 'jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz'

unzip/tar then.

these are my notes,
Hope they help:


I compiled tomcat connectors
with
./configure --with-apxs2=/usr/local/apache2/bin/apxs \
--with-tomcat41=/usr/local/tomcat\
--with-apache2-lib=/usr/local/apache2/lib \
--with-apr-lib=/usr/local/apache2/lib \
--with-jni

===
with apr lib because on loading tomcat I had an  error:

INFO: APR not loaded, disabling jni components: java.io.IOException: no
jkjni in java.library.path,

after configure you do:

make

then you copy
cp build/jk2/apache2/mod_jk2.so /usr/local/apache2/modules/
cp build/jk2/apache2/jkjni.so /usr/local/apache2/modules/

then you create the simplest version of 'workers.properties' and
'jk2.properties' mentioned in the documentation.

kind regards,
Luke


===
n Sun, 2003-09-21 at 06:26, Timothy wrote:
   Hello all.
 
   I'm trying to setup jk2.  Well, actually, I'm trying to acquire  build
 jk2. This is proving to be more than a little difficult.  After going over
 the docs at
 http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/doc/index.html
 I think I'm more puzzled than when I started.  And that's even discounting
 the broken document links, and the link to the mailing list archive that
 hasn't been accurate in more than a year!
 
   So I have some questions.
 
 1) Is there anywhere where I can actually download a full version of the
 source, with required libraries, or at least a list of what else needs to
 be downloaded.  Because the link to the src from the FAQ sure doesn't meet
 these requirements.  
 
 2) Whereas I know the difference between jk  jk2, I don't know the
 difference between jakarta-tomcat-connectors-jk-1.2.4-src.tar.gz and
 jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz.  I would assume that as
 jk2 is what the documentation recommends, that the second tar.gz file
 would be what I need, but it is close to a year older than the former
 file.
 
 3) Is there in existence anywhere an actual document on how successfully
 to build jk(2)?  Because trying to follow the instructions in the above
 two tar.gz files would never actually get anything in the source files to
 build.
 
   Any help appreciated.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 

when my computer smiles, I'm happy
===.~ ~,
Luke Vanderfluit   |'/']
Mobile: 0421 276 282\~/`


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



Re: vertial host apache/tomcat

2003-09-18 Thread Luke Vanderfluit
   #Order deny,allow
   #Deny from all
   #Allow from .example.com
   #/Location
  
   #
   # Bring in additional module-specific configurations
   #
   IfModule mod_ssl.c
   Include conf/ssl.conf
   /IfModule
  
   ### Section 3: Virtual Hosts
   #
   # VirtualHost: If you want to maintain multiple domains/hostnames on
 your
   # machine you can setup VirtualHost containers for them. Most
 configurations
   # use only name-based virtual hosts so the server doesn't need to worry
   about
   # IP addresses. This is indicated by the asterisks in the directives
 below.
   #
   # Please see the documentation at
   # URL:http://httpd.apache.org/docs-2.0/vhosts/
   # for further details before you try to setup virtual hosts.
   #
   # You may use the command line option '-S' to verify your virtual host
   # configuration.
  
   #
   # Use name-based virtual hosting.
   #
   NameVirtualHost *
  
   #
   # VirtualHost example:
   # Almost any Apache directive may go into a VirtualHost container.
   # The first VirtualHost section is used for requests without a known
   # server name.
   #
   #VirtualHost *
   #ServerAdmin [EMAIL PROTECTED]
   #DocumentRoot /www/docs/dummy-host.example.com
   #ServerName dummy-host.example.com
   #ErrorLog logs/dummy-host.example.com-error_log
   #CustomLog logs/dummy-host.example.com-access_log common
   #/VirtualHost
  
   # 17-09-2003 Johan Louwers -- [EMAIL PROTECTED]
   # virtualhost www.verder.fr
   # france website verder www.verder.fr
   VirtualHost *
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /export/home/webroot/www.verder.fr
ServerName www.verder.fr
ErrorLog /export/home/weblog/error-log_www.verder.fr
CustomLog /export/home/weblog/common-log_www.verder.fr common
   /VirtualHost
  
   # 17-09-2003 Johan Louwers -- [EMAIL PROTECTED]
   # virtualhost mnt.verder.fr
   # mnt part of the france verder website.
   VirtualHost *
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /export/home/webroot/mnt.verder.fr
ServerName mnt.verder.fr
ErrorLog /export/home/weblog/error-log_mnt.verder.fr
CustomLog /export/home/weblog/common-log_mnt.verder.fr common
   /VirtualHost
  
   # 16-09-2003. Johan Louwers [EMAIL PROTECTED]
   # LoadModule mod_jk2.so inserted and activated to make apache http
 deamon
   # with jakarta tomcat both on port 80.
   LoadModule jk2_module modules/mod_jk2.so
  
   # --END HTTPD.CONF--
   - Original Message -
   From: Luke Vanderfluit [EMAIL PROTECTED]
   To: Johan Louwers [EMAIL PROTECTED]
   Sent: Wednesday, September 17, 2003 10:31 PM
   Subject: Re: vertial host apache/tomcat
  
Hi Johan,
   
I don't know what your httpd.conf looks like,
When using VirtualHost the first block must be the main domain,
then your virtual domains.
   
post your full httpd.conf
   
kind regards,
Luke
   
   
On Wed, 2003-09-17 at 20:54, Johan Louwers wrote:
 Ok, finaly have apache and tomcat running both on port 80.

 I have created the following dir's
 /export/home/www.someserver.com
 /export/home/mnt.someserver.com

 This will be the location of http://www.someserver.com  and
 http://mnt.someserver.com

 To test I have placed a document named info_www.txt in
 /export/home/www.someserver.com and placed info_mnt.txt in
 /export/home/mnt.someserver.com I have created 2 vertiualhosts like
 this
   in
 my httpd.conf:
 _
 NameVirtualHost *

 VirtualHost *
 ServerAdmin [EMAIL PROTECTED]
 DocumentRoot/export/home/www.someserver.com
 ServerName www.someserver.com
 ErrorLog /export/home/log/errorlog-2
 CustomLog /export/home/log/customlog-2 custom
 /VirtualHost

 VirtualHost *
 ServerAdmin [EMAIL PROTECTED]
 DocumentRoot /export/home/mnt.someserver.com
 ServerName mnt.someserver.com
 ErrorLog /export/home/log/errorlog-1
 CustomLog /export/home/log/customlog-1 custom
 /VirtualHost
 _

 If  open www.someserver.com/www.txt this is correct and working Then
 I
   open
 www.someserver.com/info_mnt.txt and this also opend. This should not
 be
 possible info_mnt.txt should only be availabale true the domain
 mnt.someserver.com. How is it possible I also can open it true
 www.someserver.com ?

 I also like to run jsp files under www.someserver.com and
   mnt.someserver.com
 ... people are not allowd to open documents from mnt in the www
   part..
 How do I change the webapps dirs and make them available under
 http://mnt.someserver.com and http://www,someserver.com ?

 Thanks already,
 Regards. Johan.


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

Re: vertial host apache/tomcat

2003-09-17 Thread Luke Vanderfluit
Hi Johan,

I don't know what your httpd.conf looks like, 
When using VirtualHost the first block must be the main domain,
then your virtual domains.

post your full httpd.conf 

kind regards,
Luke


On Wed, 2003-09-17 at 20:54, Johan Louwers wrote:
 Ok, finaly have apache and tomcat running both on port 80.
 
 I have created the following dir's
 /export/home/www.someserver.com
 /export/home/mnt.someserver.com
 
 This will be the location of http://www.someserver.com  and
 http://mnt.someserver.com
 
 To test I have placed a document named info_www.txt in
 /export/home/www.someserver.com and placed info_mnt.txt in
 /export/home/mnt.someserver.com I have created 2 vertiualhosts like this in
 my httpd.conf:
 _
 NameVirtualHost *
 
 VirtualHost *
 ServerAdmin [EMAIL PROTECTED]
 DocumentRoot/export/home/www.someserver.com
 ServerName www.someserver.com
 ErrorLog /export/home/log/errorlog-2
 CustomLog /export/home/log/customlog-2 custom
 /VirtualHost
 
 VirtualHost *
 ServerAdmin [EMAIL PROTECTED]
 DocumentRoot /export/home/mnt.someserver.com
 ServerName mnt.someserver.com
 ErrorLog /export/home/log/errorlog-1
 CustomLog /export/home/log/customlog-1 custom
 /VirtualHost
 _
 
 If  open www.someserver.com/www.txt this is correct and working Then I open
 www.someserver.com/info_mnt.txt and this also opend. This should not be
 possible info_mnt.txt should only be availabale true the domain
 mnt.someserver.com. How is it possible I also can open it true
 www.someserver.com ?
 
 I also like to run jsp files under www.someserver.com and mnt.someserver.com
 ... people are not allowd to open documents from mnt in the www part..
 How do I change the webapps dirs and make them available under
 http://mnt.someserver.com and http://www,someserver.com ?
 
 Thanks already,
 Regards. Johan.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 

when my computer smiles, I'm happy
===.~ ~,
Luke Vanderfluit   |'/']
Mobile: 0421 276 282\~/`


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



RE: Tomcat 4.1.27 not reloading classes even after applying hotfix

2003-09-15 Thread Luke Vanderfluit
Hi Neil,

I installed the same hotfix successfully as follows,

I did  'tar zxvf hotfixFile' in a temporary directory somewhere, then I
created the directories manually under tomcat (jakarta 4.1.27) 
namely:

server/classes/org/apache/catalina/core

after that I placed the classfile (StandardContext.class) in the 'core'
directory.

hope this helps,

Luke


On Tue, 2003-09-16 at 03:36, Neil Aggarwal wrote:
 Paul:
 
 When I modify a class and put it in my webapp, I don't
 get the changes loaded.
 
 There is also usually a message in the catalina.out stating
 that the class was reloaded.
 
 Thanks,
   Neil
 
 
 --
 Neil Aggarwal, JAMM Consulting, (972)612-6056, www.JAMMConsulting.com
 FREE! Valuable info on how your business can reduce operating costs by 
 17% or more in 6 months or less! = http://newsletter.JAMMConsulting.com
 
  -Original Message-
  From: Paul [mailto:[EMAIL PROTECTED] 
  Sent: Monday, September 15, 2003 12:06 PM
  To: Tomcat Users List
  Subject: Re: Tomcat 4.1.27 not reloading classes even after 
  applying hotfix
  
  
  how would i know if tomcat is not reloading classes?
  
  - Original Message - 
  From: Neil Aggarwal [EMAIL PROTECTED]
  To: 'Tomcat-User' [EMAIL PROTECTED]
  Sent: Monday, September 15, 2003 11:35 AM
  Subject: RE: Tomcat 4.1.27 not reloading classes even after 
  applying hotfix
  
  
   Yoav:
   
   Did you get my answer that my tar is gnu tar?
   
   Has anyone else had a problem with Tomcat 4.1.27 not 
  reloading classes?
   
   Thanks
   Neil
   
   
Your tar is GNU tar, right?
   
   
I have a server running tomcat 4.1.27 and it is not reloading
classes for my webapp even after applying the hotfix.
   
   --
   Neil Aggarwal, JAMM Consulting, (972)612-6056, 
 www.JAMMConsulting.com
  FREE! Valuable info on how your business can reduce operating costs by
 
  17% or more in 6 months or less! =
 http://newsletter.JAMMConsulting.com
  
  
  -
  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]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 

when my computer smiles, I'm happy
===.~ ~,
Luke Vanderfluit   |'/']
Mobile: 0421 276 282\~/`


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



jsp:usebean how to?

2003-09-13 Thread Luke Vanderfluit
Hi,

I'm using tomcat 4.1.27.

I'm trying to get a jsp page to call a bean.

Is there something I need to enter in web.xml or server.xml?

I have tried the examples that come with tomcat, namely the date.jsp
example.
When I move the JspCalendar.class file that it calls to a different
directory and modify the date.jsp file to call it from that directory,
it doesn't work.
Why is that?


I have a jsp file: /TC/webapps/tutorialbeans/loginPage.jsp
it calls a bean: /TC/webapps/tutorialbeans/WEB-INF/classes/LoginBean
I have stripped it down to the minimum. 

When I load my jsp file into the browser I get the following error:

##
org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
Project base dir set to: /usr/local/tomcat/jakarta-tomcat-4.1.27
Detected Java version: 1.4 in: /usr/local/j2sdk1.4.2/jre
Detected OS: Linux
[javac] studentMenuPage_jsp.java added as studentMenuPage_jsp.class doesn't exist.
[javac] Compiling 1 source file
[javac] Using modern compiler
[javac] Compilation arguments:
[javac] '-classpath'
[javac] 
'/usr/local/j2sdk1.4.2/lib/tools.jar:/usr/local/tomcat/jakarta-tomcat-4.1.27/bin/bootstrap.jar:/usr/local/tomcat/jakarta-tomcat-4.1.27/webapps/tutorialbeans/WEB-INF/classes:/usr/local/tomcat/jakarta-tomcat-4.1.27/shared/classes:/usr/local/tomcat/jakarta-tomcat-4.1.27/common/classes:/usr/local/tomcat/jakarta-tomcat-4.1.27/common/endorsed/xercesImpl.jar:/usr/local/tomcat/jakarta-tomcat-4.1.27/common/endorsed/xmlParserAPIs.jar:/usr/local/tomcat/jakarta-tomcat-4.1.27/common/lib/servlet.jar:/usr/local/tomcat/jakarta-tomcat-4.1.27/common/lib/mail.jar:/usr/local/tomcat/jakarta-tomcat-4.1.27/common/lib/commons-logging-api.jar:/usr/local/tomcat/jakarta-tomcat-4.1.27/common/lib/commons-collections.jar:/usr/local/tomcat/jakarta-tomcat-4.1.27/common/lib/jdbc2_0-stdext.jar:/usr/local/tomcat/jakarta-tomcat-4.1.27/common/lib/commons-pool.jar:/usr/local/tomcat/jakarta-tomcat-4.1.27/common/lib/jasper-compiler.jar:/usr/local/tomcat/jakarta-tomcat-4.1.27/common/lib/naming-factory.jar:/usr/local/tomcat/jakarta-tomcat-4.1.27/common/lib/jndi.jar:/usr/local/tomcat/jakarta-tomcat-4.1.27/common/lib/activation.jar:/usr/local/tomcat/jakarta-tomcat-4.1.27/common/lib/jasper-runtime.jar:/usr/local/tomcat/jakarta-tomcat-4.1.27/common/lib/naming-resources.jar:/usr/local/tomcat/jakarta-tomcat-4.1.27/common/lib/naming-common.jar:/usr/local/tomcat/jakarta-tomcat-4.1.27/common/lib/commons-dbcp.jar:/usr/local/tomcat/jakarta-tomcat-4.1.27/common/lib/ant.jar:/usr/local/tomcat/jakarta-tomcat-4.1.27/common/lib/jta.jar'
[javac] '-sourcepath'
[javac] 
'/usr/local/tomcat/jakarta-tomcat-4.1.27/work/Standalone/localhost/tutorialbeans'
[javac] '-encoding'
[javac] 'UTF8'
[javac] '-g'
[javac] 
[javac] The ' characters around the executable and arguments are
[javac] not part of the command.
[javac] File to be compiled:
[javac] 
/usr/local/tomcat/jakarta-tomcat-4.1.27/work/Standalone/localhost/tutorialbeans/studentMenuPage_jsp.java

/usr/local/tomcat/jakarta-tomcat-4.1.27/work/Standalone/localhost/tutorialbeans/studentMenuPage_jsp.java:7:
 '.' expected
import LoginBean;
^
1 error
#

Can someone help out?
thanks,
kind regards,
Luke

-- 

when my computer smiles, I'm happy
===.~ ~,
Luke Vanderfluit   |'/']
Mobile: 0421 276 282\~/`


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



RE: jdbc servlets and jsp

2003-09-08 Thread Luke Vanderfluit
Hi Francisco and Colin,

You were right!
I placed the devpgjdbc3.jar in /tomcat/common/lib and restarted tomcat. 

All this time I did have devpgjdbc3.jar in CLASSPATH, which apparently
makes things work for the regular java classes but not for servlets or
JSPs. To me it should in theory. Anyway, to avoid redundancy I'll delete
devpgjdbc3.jar from its old location and change the CLASSPATH to reflect
the new.

Thanks greatly for your help :-)

kind regards,
Luke

 Is the postgres jar locate somewhere the app have access to? Good
 places are: commons/lib in $CATALINA_BASE or WEB-INF/lib in the
 application directory.

On Tue, 2003-09-09 at 01:32, Madere, Colin wrote:
 What's your error and do you have the PostgreSQL JDBC jar file in
 tomcat_home/common/lib ?
 
 -Original Message-
 From: Luke Vanderfluit [mailto:[EMAIL PROTECTED] 
 Sent: Sunday, September 07, 2003 5:53 PM
 To: Tomcat Users List
 Subject: jdbc servlets and jsp
 
 
 Hi,
 
 I'm having a few probs (fun) getting jdbc to work in servlets and jsp,
 tomcat in other words.
 
 I've successfully got jdbc working with postgresql in a regular java class. 
 
 I have tried using the same code adapted to a servlet and jsp to get a
 database connection happening from there, however no luck,
 
 Is there anything I need to set up in server.xml or web.xml before it can
 work?
 
 here is my jsp and servlet code:  jsp file
 -=-=-=-= html head /head %@ page language=java import=java.sql.*
 % body %
 
 Class.forName(org.postgresql.Driver);
 Connection myConn=DriverManager.getConnection(jdbc:postgresql:mboard,
 luke, );
 
 %
 /body
 /html
 =-=-=-=-=-=-=-=-=-=-=-=-=-=
 servlet code
 =-=-=-=-=-=-=-=-=-=-=-=-=-=
 import javax.servlet.*;
 import javax.servlet.http.*;
 import java.io.*;
 import java.sql.*;
 import java.text.DateFormat;
 
 /**
  * ShowEmployees creates an HTML table containing a list of all
  * employees (sorted by last name) and the departments to which
  * they belong.
  */
 public class ShowEmployees extends HttpServlet
 {
   Connection dbConn = null;
 
   /**
* Establishes a connection to the database.
*/
   public void init() throws ServletException
   {
 String jdbcDriver = org.postgresql.Driver;
 String dbURL = \jdbc:postgresql:mboard\, \luke\, \\;
 
 try
 {
   Class.forName(org.postgresql.Driver).newInstance(); //load driver
   dbConn = DriverManager.getConnection(jdbc:postgresql:megaboard,
 luke, ); //connect
 }
 catch (ClassNotFoundException e)
 {
   throw new UnavailableException(JDBC driver not found: +
 jdbcDriver);
 }
 catch (SQLException e)
 {
   throw new UnavailableException(Unable to connect to:  +
 dbURL);
 }
 catch (Exception e)
 {
   throw new UnavailableException(Error:  + e);
 }
   }
 
   /**
* Displays the employees table.
*/
   public void service(HttpServletRequest request,
 HttpServletResponse response) throws ServletException,
 IOException
   {
 response.setContentType(text/html);
 
 PrintWriter out = response.getWriter();
 
 try
 {
   //join EMPLOYEE and DEPARTMENT tables to get all data
   String sql = select * from message;;
 
   Statement stmt = dbConn.createStatement();
   ResultSet rs = stmt.executeQuery(sql);
 
   out.println(HTML);
   out.println(HEADTITLEShow Employees/TITLE/HEAD);
   out.println(BODY);
   out.println(TABLE BORDER=\1\ CELLPADDING=\3\);
   out.println(TR);
   out.println(THName/TH);
   out.println(THDepartment/TH);
   out.println(THPhone/TH);
   out.println(THEmail/TH);
   out.println(THHire Date/TH);
   out.println(/TR);
 
   while (rs.next())
   {
 out.println(TR);
 
 out.println(TD + rs.getString(resusername) + /td);
 
 out.println(/TR);
   }
 
   out.println(/TABLE);
   out.println(/BODY/HTML);
 
   rs.close();
   stmt.close();
 }
 catch (SQLException e)
 {
   out.println(H2Database currently unavailable./H2);
 }
 
 out.close();
   }
 }
 
 any help would be greatly appreciated.
 thanks,
 kind regards
 Luke
-- 

when my computer smiles, I'm happy
===.~ ~,
Luke Vanderfluit   |'/']
Mobile: 0421 276 282\~/`


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



using xml in jsp files

2003-09-08 Thread Luke Vanderfluit
Hi,

I'm a student learning about JSP and servlets,
I currently have some example JSP files that run OK using the % %
tags, but won't run when using jsp:expression/jsp:expression tags

I have 2 files taken from a book by Dustin Callaway, 
simple.jsp -- works fine
-=-=-=-=-=-=-=-=-=-=-=-=-
HTML
HEAD
TITLESimple JSP Page/TITLE
/HEAD
BODY
H2Request Origin/H2
Host Name: %= request.getRemoteHost() %
BR
IP Address: %= request.getRemoteAddr() %
/BODY
/HTML
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
simple_xml.jsp -- doesn't work
error: org.apache.jasper.JasperException: jsp.error.data.file.read
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE root PUBLIC -//Sun Microsystems Inc.//DTD Java Server Pages
Version 1.1//EN
http:/java.sun.com/products/jsp/dtd/jspcore_1_0.dtd

jsp:root xmlns:jsp=http://java.sun.com/products/jsp/dtd/jsp_1_0.dtd;
version=1.2

%@ page errorPage=simple.jsp %

HTML
HEAD
TITLESimple JSP Page/TITLE
/HEAD
BODY
H2Request Origin/H2
Host Name:
jsp:expressionrequest.getRemoteHost()/jsp:expression
BR
IP Address:
jsp:expressionrequest.getRemoteAddr()/jsp:expression
/BODY
/HTML
/jsp:root
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

any ideas why the XML is not working?
I'm using 
Redhat 9, tomcat 4.1.27, java sdk 1.4.2
Apparently tomcat 4.x complies with jsp spec 1.2, which as far as I can
see includes the XML syntax used above. 

thanks,
kind regards,
Luke

-- 

when my computer smiles, I'm happy
===.~ ~,
Luke Vanderfluit   |'/']
Mobile: 0421 276 282\~/`


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



Re: Problem building mod_jk2 on Freebsd 4.8-RELEASE

2003-09-07 Thread Luke Vanderfluit
-connectors-4.1.27-src/jk/build/class
 es/META-INF
   [jar] Building jar:
 /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/build/lib/j
 kant.jar
 
 detect:
  [echo]  jakarta-tomcat-connectors 
 
 report:
  [echo] Tomcat33: ${tomcat33.detect}
 ./../jakarta-tomcat/build/tomcat
  [echo] Tomcat40:  ${tomcat40.detect} ../../jakarta-tomcat-4.0/build
  [echo] Tomcat41: true /usr/local/jakarta-tomcat4.1
  [echo] Tomcat5:  ${tomcat5.detect} ../../jakarta-tomcat-5/build
  [echo] Apache13: ${apache13.detect} /opt/apache13
  [echo] Apache2: true /usr/local
  [echo] iPlanet:  ${iplanet.detect} /opt/iplanet6
  [echo] IIS:  ${iis.detect} ${iis.home}
 
 native:
 
 init:
  [echo] /root
 [mkdir] Created dir:
 /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/build/jk
 
 apache20:
 [mkdir] Created dir:
 /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/build/jk/ap
 ache2
[so] Compiling 19 out of 19
 Compiling
 /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/native/comm
 on/jk_msg_buff.c
 Compiling
 /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/native/comm
 on/jk_ajp13_worker.c
 Compiling
 /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/native/comm
 on/jk_md5.c
[so] Compile failed 1
 /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/native/comm
 on/jk_md5.c
[so] Command:libtool --mode=compile cc -c -o
 /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/build/jk/ap
 ache2/common/jk_md5.o
 -I/usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/native/co
 mmon -I/usr/local/include -I/usr/local/jdk1.4.1/jre/../include -g -W
 -D_REENTRANT -DCHUNK_SIZE=4096 -DREUSE_WORKER -DUSE_APACHE_MD5
 /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/native/comm
 on/jk_md5.c
[so] Output:
[so]  cc -c
 -I/usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/native/co
 mmon -I/usr/local/include -I/usr/local/jdk1.4.1/jre/../include -g -W
 -D_REENTRANT -DCHUNK_SIZE=4096 -DREUSE_WORKER -DUSE_APACHE_MD5
 /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/native/comm
 on/jk_md5.c  -fPIC -DPIC -o
 /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/build/jk/ap
 ache2/common/.libs/jk_md5.o
[so] StdErr:
[so]
 /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/native/comm
 on/jk_md5.c:477: httpd.h: No such file or directory
[so]
 /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/native/comm
 on/jk_md5.c:478: http_config.h: No such file or directory
[so]
 /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/native/comm
 on/jk_md5.c:490: ap_md5.h: No such file or directory
 
 BUILD FAILED
 file:/usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/native
 /build.xml:134: Compile failed
 /usr/ports/distfiles/jakarta-tomcat-connectors-4.1.27-src/jk/native/comm
 on/jk_md5.c
 
 Total time: 7 seconds
 
 
 ---END SNIPPET---
 
 Am I missing something here or have I done something completely wrong?
 
 I apologize for the length of this email.
 
 Any help is appreciated. If you require more information please let me
 know.
 
 Thank you in advance.
 
 Dean Searle
 Computing Oasis
 989.245.7369 (p)
 989.921.3904 (f)
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 

when my computer smiles, I'm happy
===.~ ~,
Luke Vanderfluit   |'/']
Mobile: 0421 276 282\~/`


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



jdbc servlets and jsp

2003-09-07 Thread Luke Vanderfluit
Hi,

I'm having a few probs (fun) getting jdbc to work in servlets and jsp,
tomcat in other words.

I've successfully got jdbc working with postgresql in a regular java
class. 

I have tried using the same code adapted to a servlet and jsp to get a
database connection happening from there, however no luck,

Is there anything I need to set up in server.xml or web.xml before it
can work?

here is my jsp and servlet code:

jsp file
-=-=-=-=
html
head
/head
%@ page language=java import=java.sql.* %
body
%

Class.forName(org.postgresql.Driver);
Connection myConn=DriverManager.getConnection(jdbc:postgresql:mboard,
luke, );

%
/body
/html
=-=-=-=-=-=-=-=-=-=-=-=-=-=
servlet code
=-=-=-=-=-=-=-=-=-=-=-=-=-=
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.sql.*;
import java.text.DateFormat;

/**
 * ShowEmployees creates an HTML table containing a list of all
 * employees (sorted by last name) and the departments to which
 * they belong.
 */
public class ShowEmployees extends HttpServlet
{
  Connection dbConn = null;

  /**
   * Establishes a connection to the database.
   */
  public void init() throws ServletException
  {
String jdbcDriver = org.postgresql.Driver;
String dbURL = \jdbc:postgresql:mboard\, \luke\, \\;

try
{
  Class.forName(org.postgresql.Driver).newInstance(); //load
driver
  dbConn = DriverManager.getConnection(jdbc:postgresql:megaboard,
luke, ); //connect
}
catch (ClassNotFoundException e)
{
  throw new UnavailableException(JDBC driver not found: +
jdbcDriver);
}
catch (SQLException e)
{
  throw new UnavailableException(Unable to connect to:  +
dbURL);
}
catch (Exception e)
{
  throw new UnavailableException(Error:  + e);
}
  }

  /**
   * Displays the employees table.
   */
  public void service(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException
  {
response.setContentType(text/html);

PrintWriter out = response.getWriter();

try
{
  //join EMPLOYEE and DEPARTMENT tables to get all data
  String sql = select * from message;;

  Statement stmt = dbConn.createStatement();
  ResultSet rs = stmt.executeQuery(sql);

  out.println(HTML);
  out.println(HEADTITLEShow Employees/TITLE/HEAD);
  out.println(BODY);
  out.println(TABLE BORDER=\1\ CELLPADDING=\3\);
  out.println(TR);
  out.println(THName/TH);
  out.println(THDepartment/TH);
  out.println(THPhone/TH);
  out.println(THEmail/TH);
  out.println(THHire Date/TH);
  out.println(/TR);

  while (rs.next())
  {
out.println(TR);

out.println(TD + rs.getString(resusername) + /td);

out.println(/TR);
  }

  out.println(/TABLE);
  out.println(/BODY/HTML);

  rs.close();
  stmt.close();
}
catch (SQLException e)
{
  out.println(H2Database currently unavailable./H2);
}

out.close();
  }
}

any help would be greatly appreciated.
thanks,
kind regards
Luke

-- 


when my computer smiles, I'm happy
===.~ ~,
Luke Vanderfluit   |'/']
Mobile: 0421 276 282\~/`


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



setting the field focus with a servlet

2003-09-03 Thread Luke Vanderfluit
Hi,

I am working on a servlet that checks a form content without using
javascript.

Does anyone know if there is a way to set the focus to a particular
field using java?

thanks for any help :-)

kind regards,
Luke
-- 

when my computer smiles, I'm happy
===.~ ~,
Luke Vanderfluit   |'/']
Mobile: 0421 276 282\~/`


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



jsp:include

2003-08-27 Thread Luke Vanderfluit
Hi,

I want to include the output of a sevlet in my html page.
I have the following:

BlockOfHTMLCODE

jsp:include page=/servlet/foo flush=true/

BlockOfHTMLCODE

in my html file,
The first block of HTML is output, 
then the server output is output
but the last block of html is not output,

can someone help and tell me why that is,

thanks,
kind regards,

Luke

-- 

when my computer smiles, I'm happy
==.~ ~,=
Luke Vanderfluit   |  |'/']
Mobile: 0421 276 282   |   \~/`


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



Re: Servlet re-load question - install fix

2003-08-26 Thread Luke Vanderfluit
Hi,

There's a bug in 4.1.27

there's a fix at the tomcat site,
4.1.27-hotfix-22096.tar.gz
I unzipped the fix somewhere neutral then created the directories by
hand and copied the class file in (otherwise tomcat would complain a bit
when starting)

Also you can use the manager app,
from the startup page of tomcat 
http://localhost:8080/index.jsp
choose manager 
if you can't get in you'll have to edit /$CATALINA/conf/tomcat-users by
adding admin,manager to one of the roles (it's in the documentation)
restart tomcat for this to take effect

then when in manager, you can easily stop and start webapps, which is
much faster than restarting tomcat,

but with the above fix tomcat detects the changed classes.

hope this helps
kind regards,
Luke

On Tue, 2003-08-26 at 14:43, Atreya Basu wrote:
 I'm having trouble reloading servlets on Tomcat 4.1.27.
 
 The log files indicate that Tomcat notices that the servlet has 
 changed.  First time, after updating the servlet, I hit up the servlet I 
 get a 500 error and a stack trace.  Every time after that I get a 
 resource not available error.
 My context looks something like this:
 Context docBase= docRoot= reloadable=true
 
 Can anyone please tell me what I can do?  This is pretty serious because 
 I have to re-start Tomcat each time somone changes a servlet.
 
 Thanks in advance.
 
 
 Atreya
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 

when my computer smiles, I'm happy

Luke Vanderfluit 
Mobile: 0421 276 282


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



SSI includes

2003-08-26 Thread Luke Vanderfluit
Hi,
I'm running Java 1.4.2 on RedHat 9
I have enabled SSI in tomcat 4.1.27 
SSI directives work, 
for example:
!--#echo var=DATE_LOCAL --


but apparently you can call a servlet from a servlet block.
I can't get the 
servlet code=ServletName /servlet 
block to work,

any ideas on what I might be doing wrong

kind regards,
Luke

-- 

when my computer smiles, I'm happy

Luke Vanderfluit 
Mobile: 0421 276 282


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



Re: Total Linux Newbie Question

2003-08-24 Thread Luke Vanderfluit
Hi Mike,

Good move!

 Could someone please help me with a very basic question when running Tomcat under 
 Linux:  When I
 start Tomcat in the Linux terminal using ./startup.sh I don't get to see any of 
 the Tomcat
 output.In Windows I would get to see a scrolling DOS Window.  

open the startup.sh in an editor and change the last line where is says
'start' to 'run'

alternatively, simply do
'catalina.sh run' 

same thing,

kind regards,
Luke

  
 
 when my computer smiles, I'm happy
 
 Luke Vanderfluit 
 Mobile: 0421 276 282


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



Re: Tomcat Userdatabase

2003-08-20 Thread Luke Vanderfluit
Hi Sjoerd,

It's in /tomcat/conf/tomcat-users.xml

should look like this:
##
?xml version='1.0' encoding='utf-8'?
tomcat-users
  role rolename=tomcat/
  role rolename=role1/
  role rolename=manager/
  role rolename=admin/
  user username=tomcat password=tomcat
roles=tomcat,admin,manager/
  user username=role1 password=tomcat roles=role1/
  user username=both password=tomcat roles=tomcat,role1/
/tomcat-users
###
then restart tomcat and voila! you're in :-)

kind regards,
Luke

On Thu, 2003-08-21 at 05:15, Sjoerd van Leent wrote:
 I installed the last binary build on my system, however, I need access
 to the manager web application, but I don't know the username/password.
 Where can I find this, or what is this password in general?
 
 Sjoerd van Leent
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 

when my computer smiles, I'm happy

Luke Vanderfluit 
Mobile: 0421 276 282


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



tomcat console

2003-08-19 Thread Luke Vanderfluit
Hi,

I'm using tomcat 4.1.27. on Redhat 9.
In some documentation it tells me to use the console window extensively
during development, 
how do I do that?

If I start tomcat from the console with startup.sh I don't get a lot of
feedback about what is happening.

Is the only way I can get that feedback by using System.out.println?

thanks,
kind regards,


-- 

when my computer smiles, I'm happy

Luke Vanderfluit 
Mobile: 0421 276 282


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



Re: Use catalina.sh run

2003-08-19 Thread Luke Vanderfluit
Hi Peter,

Thanks,
I replaced the line in startup.sh

exec $PRGDIR/$EXECUTABLE start $@
with:
exec $PRGDIR/$EXECUTABLE run $@

kind regards,




On Wed, 2003-08-20 at 03:11, Peter Harrison wrote:
 Rather than startup.sh which will start a new process, use catalina.sh run 
 which will put all output to the console.
 
 Regards,
 Peter
-- 

when my computer smiles, I'm happy

Luke Vanderfluit 
Mobile: 0421 276 282


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



tomcat console

2003-08-19 Thread Luke Vanderfluit
Hi,

I'm using tomcat 4.1.27. on Redhat 9.
In some documentation it tells me to use the console window extensively
during development, 
how do I do that?

If I start tomcat from the console with startup.sh I don't get a lot of
feedback about what is happening.

Is the only way I can get that feedback by using System.out.println?

thanks,
kind regards,


-- 

when my computer smiles, I'm happy

Luke Vanderfluit 
Mobile: 0421 276 282


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



changing class file and reloading question

2003-08-19 Thread Luke Vanderfluit
Hi,

I'm running tomcat 4.1.27 standalone on Redhat 9

I have a class that I'm changing (development) and don't want to have to
restart tomcat each time I make a change.

It wouldn't be so bad to do that if it wasn't for the fact that
tomcat takes ages to read my servlet every time it's restarted.

I have got the following entry in my server.xml file

#
DefaultContext reloadable=true/

!-- Tomcat Root Context --

Context path= docBase=ROOT debug=0 reloadable=true
/Context
#

The class I'm changing is in the ROOT/WEB-INF/classes directory

the console message when I hit 'reload' on the browser is:

WebappClassLoader:   Resource '/WEB-INF/classes/Topic3x4.class' was
modified; Date is now: Wed Aug 20 05:53:59 CST 2003 Was: Wed Aug 20
05:44:04 CST 2003

How do I get tomcat to indeed reload the classes without having to
restart each time?

Thanks,
kind regards,
-- 

when my computer smiles, I'm happy

Luke Vanderfluit 
Mobile: 0421 276 282


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



tomcat won't reload my servlets!

2003-08-19 Thread Luke Vanderfluit
Hi,

I've done what you suggest:
This is my servlet:

##
import javax.servlet.http.*;
import javax.servlet.ServletException;
import java.io.PrintWriter;
import java.io.IOException;

public class Test extends HttpServlet
{

public void init() throws ServletException
{
System.out.println(loading);
}
/**
* Returns an HTML form to the client prompting for
their name
* and e-mail address.
*/
public void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException
{
//set MIME type for HTTP header
response.setContentType(text/html);

//get a handle to the output stream
PrintWriter out = response.getWriter();

out.println(HTMLHEAD);
out.println(TITLETopic 3 Exercise 4 p. 14 Study
Guide/TITLE);
out.println(/HEAD);
out.println(BODY);
out.println(H1Hello 2 changes/H1);
out.println(/BODY/HTML);
out.close(); //always close the output stream
}
public void destroy()
{
System.out.println(get rid of);
}
}
#
I compile it and place in ROOT/WEB-INF/classes

I run catalina.
it loads the servlet fine
I change some text in the servlet recompile

then in the console window I get:
#
WebappClassLoader: Resource
'/WEB-INF/classes/Test.class' was modified; Date is now:
Wed Aug 20 13:24:30 CST 2003 Was: Wed Aug 20 13:21:45 CST
2003
get rid of
##
where 'get rid of' the text in my destroy() method,
but no reloading.

in fact in the browser window when I do a reload I get:
HTTP Status 503 - Servlet
org.apache.catalina.INVOKER.Test is currently unavailable

and I can't invoke any more servlets at all.

what am I doing wrong?

my servlet.xml file is as follows (relevant part):
##
!-- Define properties for each web application.
This is only needed
if you want to set non-default properties,
or have web application
document roots in places other than the
virtual host's appBase
directory. --

DefaultContext reloadable=true/

!-- Tomcat Root Context --

Context path= docBase=ROOT debug=0
reloadable=true
/Context



I really need to get tomcat to reload those servlets
otherwise it's useless!

thanks,

kind regards,
-- 

when my computer smiles, I'm happy

Luke Vanderfluit 
Mobile: 0421 276 282


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



tomcat console

2003-08-18 Thread Luke Vanderfluit
Hi,

I'm using tomcat 4.1.27. on Redhat 9.
In some documentation it tells me to use the console window extensively
during development, 
how do I do that?

If I start tomcat from the console with startup.sh I don't get a lot of
feedback about what is happening.

Is the only way I can get that feedback by using System.out.println?

thanks,
kind regards,


-- 

when my computer smiles, I'm happy

Luke Vanderfluit 
Mobile: 0421 276 282


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