Re: Tomcat memory-leak problem

2001-07-11 Thread Sam Newman



I too have been having some problems with Tomcat + 
memory. I put it down to me running win98 and win98 not properly being able to 
address memory over 128MB. I normally have dreamweaver, netbeans and tomcat 
running, and reguarly run out of memory (I have 384MB Ram). I haven't 
noticed any similar problems running tomcat on linux (with a lower spec 
machine). Windows does have memory management issues however, and it might be 
the way tomcat threads means it causes problems with memory on win32 platforms. 
I downloaded Tweakall in the end, as this comes with a niffty utility which can 
free leaked memory.

sam

  - Original Message - 
  From: 
  BJ 
  
  To: [EMAIL PROTECTED] 
  
  Sent: Wednesday, July 11, 2001 9:50 
  AM
  Subject: Tomcat memory-leak problem
  
  Hi!
  
  I'm using apache, tomcat jakarta 3.2.1, 
  jdk1.2.2on a linux 6.2 and a MS SQL server on a Nt4 with sp 
  6a.
  
  Having some trouble with memory-leak. After the 
  server has been running for a couple of days, it has eaten up all 512MB of 
  RAM. It is a server with some customers on and it handles about 1000 visitors 
  a day. We use JSP pages and servlets to show webpages. Servlets primary for 
  showing images from database or generating menues...
  
  So... what shall i do? It doesnt help to restart 
  tomcat. I need to reboot the server and start tomcat all over before we can 
  get in contact with the sites again.
  
  
  Thanks in adv. 
  /)-._ 
  Y. ' 
  _] 
  Greetings 
  ,.._ |`--"= Bjarne Jørgensen / 
  Bigf00t 
  / "-/ 
  `.\ 
  /) | |_ 
  `\|___ Email : [EMAIL PROTECTED] \:::\___/_\__\___\ 
  


Re: Remote logging?

2001-07-04 Thread Sam Newman

You might want to consider using log4j (another jakarta project). Its manual
has brief converage of using it with tomcat, although I must admit up to now
I've only used Log4j in standalone applications.

sam
- Original Message -
From: Kimmo Hovi [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 04, 2001 10:41 AM
Subject: Remote logging?


 I was wondering if it is possible to use a logging method
 other than append to file, which seems to be the format
 favored by tomcat and server.xml.

 direct syslogd interface would be the most appropriate. I
 have a configuration where a log.host computer is running
 syslog-ng (Thus logging incoming udp datagrams on port 514),
 and ideally all remote computers would be set up to use
 just their own syslog, using it to forward the required
 parts of the local logs to this log.host.

 So, is it possible to somehow configure tomcat to use
 either a pipe to logger, or directly talking to syslogd?

 --
 Kimmo Hovi (Email policy: http://www.hovi.org/mail/)
 Network Specialist

 CRF Box Ltd. - for Wireless Clinical RD
 Lonnrotinkatu 19 A
 FIN-00120 Helsinki
 Finland - Europe

 Mobile +358 40 767 8610





List traffic et al

2001-07-03 Thread Sam Newman

Given the huge amount of traffic this list generates, I can rarely get
involved with the discussions that take place. It occurs to me that there
sems to be three major discussion themes on the list as a whole:

1.) General servlet/jsp development issues and how tomcat affects them
2.) General tomcat configuration issues
3.) Webserver integration issues

I guess as documentation improves (e.g. tomcat book, work by people like
Mike Slinn) points 23 will become less of an issue. I'm just wondering if
there is any millage in perhaps splitting the list into 2 or 3 lists?
Personally, I've got no issues with getting tomcat up and running and so
don't care too much about that end of things, however the servlet/jsp
development issues is more interesting to me.

I don't have too strong an opinion on it, its just that I worry I'm missing
some interesting topics because I don't have the time to work though all the
posts

sam




Re: List traffic et al

2001-07-03 Thread Sam Newman

Emir wrote:

 List is tomcat-user and not java-server-development; thus, issues such
 as getting Tomcat up and running (i.e. Tomcat configuration) ARE the
purpose
 of this list.

 Methinks you should get invovled into discussion more often, given as you
 say that getting Tomcat up and running is no issue to you: could you
 perchance share your knowledge with us?

 The lists are there to provide convenient ways of GIVING to the community,
 not only TAKING...

 My 2 cents.
snip

I have no problem with giving to the community - its just that I've got
tired of answering the same questions again and again, and if I answered
every question that I had an answer for I wouldn't get any work done (like
most/all of us here I do have a full time job). Because I saw the same
questions coming up again and again I decided to get involved with the
tomcat-book project (which has had to take a back-burner for me at the
moment due to things going mental at work).  The fact remains that general
discussion as to servlet development DOES take place here, which leads me to
believe that there may be a place for a decent developmnet mailing list. Now
this (jakarta) might not be the best place to host it I'd admit, and if
anyone knows of a decent list which already exists that covers
servlet/jsp/taglib development, please let me know. On a related note I know
for a fact that the jakarta-taglib list contains probably 50% general taglib
discussion as opposed to specific stuff about the jakarta taglibs.
As to the general config issues for tomcat, there still might be some scope
for splitting the list - perhaps one for general issues, and one covering
integration with other tools (webservers, EJB containers etc). Its just that
given the volume of traffic I think the things that interest me (and the
things I could mostly helpfully contribute to) are getting lost. Also the
generla configuration issues are typically for the newer users, whilst more
advanced issues (SSL, working with IIS/Apache etc) concern those people who
are more familiar with Tomcat.
By splitting the list, you would reduce traffic for those people only
intersted in one side of it or the other, and those that still care about
both will recieve the same number of posts (bar some potential
cross-posting). This would reduce the amount of people (probably with
something to say) who leave the list because of the amount of daily posts..

sam




Re: List traffic et al

2001-07-03 Thread Sam Newman


Paul Wrote:


 well there's already [EMAIL PROTECTED] and
 [EMAIL PROTECTED]

 there's also [EMAIL PROTECTED]

 perhaps ppl with more development specific questions should use these?


Thanks for that Paul. I kind of stopped using the Sun Java forums because
they weren't much use, but after looking at the archives these look pretty
good. Incidently  I found a good archive of them (and others) at
http://www.servlets.com/lists/index.html

sam





Re: I need help in tomcat configuration with Oracle 8.1.7

2001-07-03 Thread Sam Newman



I don't know anything too specific about use with 
Oracle, but I've certainly used servlets/JSP's to access DB's via JDBC in the 
past (read: maintained code which did it, not developed it!), so its certainly 
possible. Firstly, could you give the exact error you are getting from tomcat? 
Also, you might want to try using 3.2.2, which is the current stable release and 
might contain fixes to your problems already.

sam

  - Original Message - 
  From: 
  Internet Total 
  Solutions LLC - Customer Liaisons Department - 
  To: [EMAIL PROTECTED] 
  
  Sent: Tuesday, July 03, 2001 11:37 
  AM
  Subject: I need help in tomcat 
  configuration with Oracle 8.1.7
  
  
  Hello,
  
  I would like to know whether anyone is able togive me 
  a hinttowards solving the following scenario. If anyone is available on 
  consultation basis, it is fine too.
  
  I have developed website personalization engine in 
  javathat comes with it's own kind of application server to handle the 
  client access requests to the oracle 8.1.7 db through the use of tomcat 3.1 I 
  am using the oracle thin driver and classes111.zip in order to handle the 
  requests through the jdbc. However tomcat giving me serious errors and my 
  client application can't login to the database. Would anyone be able to help 
  me on that matter? 
  
  Thanks
  
  Tobias Hansen
  


Re: List traffic et al

2001-07-03 Thread Sam Newman

Sounds good. Aren't there online tools for creating FAQ's via a web-front
end?
Of course, there are always going to be the people who ask first, read the
documents later :-)

sam
- Original Message -
From: Emir Alikadic (ADNOC IST) [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 03, 2001 11:38 AM
Subject: RE: List traffic et al


 Why don't we then monitor the list for a while and figure out the exact
 questions that keep on coming up.  We can then create an FAQ for the list
 and post it somewhere (maybe Jakarta Project would host it) and we can
then
 direct all newbies there.

 We can then retain [what I perceive is] the purpose of this list, while
 reducing (dramataically) the volume of correspondence.

 How's that?



 Emir.






Re: List traffic et al

2001-07-03 Thread Sam Newman

 I think tomcat is a really good product, but for me it did take time to
 figure out how the various config files, and their (initially) unwieldy
 syntax works.

 I no longer consider the tomcat configuration syntax unwieldy, but for a
 newbie it can be hard to understand.

My single bigest complaint is that when there is a problem with the syntax
(e.g. in web.xml) the error is typically not very informative. This in
itself leads to allot of problems.

sam




Re: List traffic et al

2001-07-03 Thread Sam Newman

Milt wrote:

 This idea has come up before, and I think it's one of the best for
 dealing with the high volume on this list (I guess it's one of the two
 or three highest volume apache lists).  I even volunteered to take the
 lead in doing this.  So I sent a note to the list owner explaining the
 idea.  Unfortunately, I never heard anything back.  Without the list
 owner's cooperation/participation (or someone who can modify the
 apache/jakarta mailing lists), it won't be possible to do this.  So,
 we could do some work on this (i.e. figuring out what separate lists
 to have), but unless we know that it's going to come to something, it
 doesn't make sense to do too much work on it.

perhaps if we came up with a general consensus as to how to split the lists,
we might get more of a response? As a first draft proposal, what about the
following division:

tomcat-config - for deploying webapps (web.xml, war files), working with
server.xml, running on various platforms etc
tomcat-integration - for working with other webservers, EJB containers,
databases etc.

Please feel free to comment

sam




Re: out of environment space

2001-06-29 Thread Sam Newman

Right, this has nothing to do with tomcat. Windows console applications use
their environment space to store environment variables. Whats happening is
that when you run tomcat, you're filling this space up so some of variables
won't get saved - this could really screw tomcat up. You need to increase
your default environment size. You can do it by creating a shortup to a dos
program and change its properties, but probably the better way to do it is
to add an entry to your config.sys file - can't remember exactly what you
have to do though. Changing config.sys means all console apps will inherit
this value. Try searching microsofts site with the out of environment space
error.

sam
- Original Message -
From: Gabriel Marti [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 29, 2001 12:55 AM
Subject: out of environment space


 Hello, after scaling back to tomcat 3.2.2 from tomcat 4.0 beta 5, after i
 was informed that my jsp pages wouldnt refresh in the winX plat due to a
 bug, my jsp page no longer works. when i enter the command tomcat run it
 says out of environment space.  Here is what i currently have in my
 autoexec:

 PATH=D:\jdk1.3.0_02\bin;%PATH%
 SET TOMCAT_HOME=D:\tomcat_3
 SET CATALINA_HOME=D:\tomcat_4
 SET CLASSPATH=

%CLASSPATH%;D:\jdk1.3.0_02\jre\classes;%TOMCAT_HOME%\common\lib\servlet.jar;
 %CATALINA_HOME%\common\lib\servlet.jar
 SET JAVA_HOME=D:\jdk1.3.0_02

 I was able to view the page before, but ive seemed to have messed
something
 up and i cant fig out what it is: Here is the error that is generated:

 Error: 500
 Location: /clan/roster.jsp
 Internal Servlet Error:

 javax.servlet.ServletException: [Microsoft][ODBC Microsoft Access Driver]
 '(unknown)' is not a valid path.  Make sure that the path name is spelled
 correctly and that you are connected to the server on which the file
 resides.






Re: FORM submission POST to a server

2001-06-28 Thread Sam Newman



hmm, I think you probably want to use the URL 
connection program. There is a javaworld tip about posting from an applet - its 
more about the security considerations, but should contain the sample code you 
want. I seem to remeber the O'Reilly java network programming book also contains 
an example use of the UrlConnection - try downloading the examples for the 
book.

The javaworld tip: http://www.javaworld.com/javatips/jw-javatip41.html, 
and the earlier tip: http://www.javaworld.com/javaworld/javatips/jw-javatip34.html/

sam

  - Original Message - 
  From: 
  pascal GEND 
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, June 28, 2001 3:30 
  PM
  Subject: FORM submission POST to a 
  server
  
  Hi,
  
  I'd like to POST data to an http server with a 
  java program (in the same way a www browser does it), in order to parse the 
  response and do something with it. I have an example with the GET method but 
  not POST.
  
  For instance, consider the example 
  below:
  
  form action="http://host/cgi-bin/program" 
  method=post
  input type="hidden" name="field1" 
  value="valuefield1"
  
  input type="text" name="field2" 
  value="valuefield2"
  input type="submit" name="submit" value="submit"
  
  What is the corresponding JAVA code (I use the JDK 117B)?
  
  Many thanks,
  
  Pascal


Re: FORM submission POST to a server

2001-06-28 Thread Sam Newman



I meant URLConnection class, not 
program!

  - Original Message - 
  From: 
  Sam 
  Newman 
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, June 28, 2001 4:19 
  PM
  Subject: Re: FORM submission POST to a 
  server
  
  hmm, I think you probably want to use the URL 
  connection program. There is a javaworld tip about posting from an applet - 
  its more about the security considerations, but should contain the sample code 
  you want. I seem to remeber the O'Reilly java network programming book also 
  contains an example use of the UrlConnection - try downloading the examples 
  for the book.
  
  The javaworld tip: http://www.javaworld.com/javatips/jw-javatip41.html, 
  and the earlier tip: http://www.javaworld.com/javaworld/javatips/jw-javatip34.html/
  
  sam


Re: XML parser: old version

2001-06-22 Thread Sam Newman

Someone said he managed to get Xerces work without too mich bother. He
simply wedited the tomcat.bat/tomcat.sh startup script to put the xerces xml
parser in the classpath instead of the standard one. My only guess as to why
xerces is not used by default is Tomcat's history as being Suns reference
implementation?

sam
- Original Message -
From: Sergey V. Udaltsov [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 22, 2001 9:31 AM
Subject: XML parser: old version


 Hi all

 With Tomcat 3.2.2 RPMS, I got some XML parser.
 I suspect it is sun's JAXP implementation 1.0. It DOES NOT support
 namespaces (I found it from the error messages:) so it is not possible
 to use XSL in JSPs/Beans/servlets.

 Will it be any problem to use JAXP 1.1? Or Xerces? What is the current
 policy of using XML parsers in tomcat? Why tomcat does not use Xerces
 having the same Apache licence?

 Thanks for any comments

 Sergey





JSP class compilation error

2001-06-20 Thread Sam Newman

I have a JSP page which has suddenly stopped working. I've found a single
tag which, when included gives the stack trace found at the bottom of the
email. With the tag removed, everything works fine - even when I leave the
other tags in. I have tried this file on Linux  win98. The tag in question
doesn't do anything - the tag handler doAfterBody method simply returns
SKIP_BODY. I'm assuming I must of caused a problem with the XML files
somewhere, but can't for the life of me see where. Anyone get any ideas? I'm
currently using 3.2.1 and so am going to download 3.2.2 and try this version
to see if I can get a better error. I can compile the JSP page under
netbeans using the same libraries with or without the tag being in.

sam

Stack Trace when JSP access (with tag):

Internal Servlet Error:

org.apache.jasper.JasperException: Unable to compile class for JSP
 at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:476)
 at org.apache.jasper.servlet.JasperLoader12$1.run(JasperLoader12.java:160)
 at java.security.AccessController.doPrivileged(Native Method)
 at
org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:156)
 at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433)
 at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
rvlet.java:152)
 at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:164)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
 at org.apache.tomcat.core.Handler.service(Handler.java:286)
 at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
 at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
 at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
 at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
 at java.lang.Thread.run(Thread.java:484)

Root cause:
java.lang.NullPointerException
 at java.util.Hashtable.get(Hashtable.java:320)
 at java.beans.Introspector.getBeanInfo(Introspector.java:79)
 at
org.apache.jasper.compiler.TagCache.setTagHandlerClass(TagCache.java:104)
 at
org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerator.java:136
)
 at
org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.init(JspPa
rseEventListener.java:761)
 at
org.apache.jasper.compiler.JspParseEventListener.addGenerator(JspParseEventL
istener.java:138)
 at
org.apache.jasper.compiler.JspParseEventListener.handleTagBegin(JspParseEven
tListener.java:911)
 at
org.apache.jasper.compiler.DelegatingListener.handleTagBegin(DelegatingListe
ner.java:194)
 at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:813)
 at org.apache.jasper.compiler.Parser.parse(Parser.java:1077)
 at org.apache.jasper.compiler.Parser.parse(Parser.java:1042)
 at org.apache.jasper.compiler.Parser.parse(Parser.java:1038)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:182)
 at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:462)
 at org.apache.jasper.servlet.JasperLoader12$1.run(JasperLoader12.java:160)
 at java.security.AccessController.doPrivileged(Native Method)
 at
org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:156)
 at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433)
 at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
rvlet.java:152)
 at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:164)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
 at org.apache.tomcat.core.Handler.service(Handler.java:286)
 at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
 at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
 at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
 at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
 at java.lang.Thread.run(Thread.java:484)






Re: Tomcat 3.2.2 and Xerces

2001-06-19 Thread Sam Newman

If it was an inbuilt limitation of Tomcat, I wouldn't expect to see a
ClassDefNotFoundExceptionare you sure you've put your xerces parser .jar
file in the WEB-INF/lib directory of your webapp?
Also Mail Archive does have a search facility for this list. Its pretty crap
but its better than nothing :-)

sam
- Original Message -
From: Ben Rometsch [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 19, 2001 3:08 PM
Subject: Tomcat 3.2.2 and Xerces


 Hi There,

 I'm new to the group - apologies if this has been asked 100 times before.

 I'm writing a web application that parses an XML file with SAX in order to
 retrieve database connection details. The beans responsible for this make
 use of the xerces XML parser. Testing the beans in JBuilder, everything
 works fine.

 When I compile the class files and attempt to invoke the methods through a
 jsp page in Tomcat, it throws a java.lang.NoClassDefFoundError error.

 I've been scouring Deja and the tomcat documentation. It sounds like I
can't
 use another XML parser on top of the one tomcat uses to parse its
 configuration information. Is this correct? If this is the case, is the
only
 solution to re-write the SAX parser bean to make use of JAXP?

 Thanks in advance,
 Ben
snip




Re: Define the /var/www to serve .jsp ?

2001-06-19 Thread Sam Newman



When using tomcat and apache, you simply set up a 
new document root and mapping within httpd.conf for each webapp you want 
accessable via Apache. When you run tomcat, it automatically generates the 
Apache directives required to use Apache and Tomcat together uising mod_jk - 
look at the file mod_jk.conf-auto. This file is overwritten whenever tomcat is 
restarted, so don't edit it directly.
For more info check the mod_jk-howto included with 
the tomcat distro.

sam
- Original Message - 

  From: 
  Dino Ming 
  
  To: TomCat User 
  Sent: Tuesday, June 19, 2001 3:13 
PM
  Subject: Define the /var/www to serve 
  .jsp ?
  
  Dear All,
  
   Sorry for my stupid question, 
  and I'm new to JSP  Servlet.
  
   Hereare my 
  questions.
  
   Is it good to set the Apache's 
  document root to pass .jsp to Tomcat ? Or I need to define a folder under 
  $TOMCAT_HOME/webapps/"my new folder" , and putting all of my.jsp inside 
  ?
   
   It look like Tomcat 
  treatfolders inside $TOMCAT_HOME/webapps/ as an application 
  ?
  
  Rgds,
  Dino


Re: Logging

2001-06-18 Thread Sam Newman

Tomcat 4 supports filters, which may do exactly what you want. They are
defined on the 2.3 spec IIRC. Basically, its a bit of code that gets
accessed before the requested page. There was an article about the use of
filters i think either on javaworld or servlets.com. Assuming you want a 3.2
anwser, then you could direct all traffic through a servlet (or several)
which does the logging, and then have that servlet forward on to the
original page, e.g.:

http://myserver.com/LogAccess?page=userpage.jsp

Would log access from the client, and forward the user to userpage.jsp. Of
course, you could equally develop some tags to automatically log the
request.

sam
- Original Message -
From: Roland Carlsson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 18, 2001 9:44 AM
Subject: Logging


 Hi!
 I wonder if it's possible to put a servlet or bean to pre-process all or
some of the requests that a tomcat-server will serv? The use I'm thinking of
is customized logging to be able to track sessions much closer than the
apache common log does without have put logging-code on every page that is
requested.

 Regards
 Roland Carlsson






Re: Tomcat.log

2001-06-18 Thread Sam Newman

Or it errored before the log got createdbut yes, its just letting you
know where the log will be if you get errors. On a related note, does anyone
know of a good tail program for M$ which doesn't get defeated by win32 file
locking? I'd like to be able to keep an eye on my tomcat logs without having
to shut tomcat down - I HATE the file locking on windows :-(

sam
- Original Message -
From: David DELGRANCHE [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 18, 2001 11:07 AM
Subject: RE: Tomcat.log


 This file is under the logs only if there are problems during start. If
this file does not exist, there is no error!

 -Message d'origine-
 De: Rajeshwar Rao.V [SMTP:[EMAIL PROTECTED]]
 Date: lundi 18 juin 2001 10:58
 A: '[EMAIL PROTECTED]'
 Objet: Tomcat.log

 Hi all,
 when start Tomcat, on the console I came across mthis message.

 *Starting tomcat. Check logs/tomcat.log for error messages*

 But in the Tomcat environment, i did not find file called tomcat.log.
 where it is going?
 please clarify

 -raj-





Re: Formatting Apache+Tomcat Java stack output errors: how?

2001-06-18 Thread Sam Newman

Well, IIRC the stack outputs simply get sent to Stderr (e.g. when you do
excp.printStackTrace()). You could make stderr point to a different stream
(can do it via the System object) and then have that output stream do the
formatting. The exception reporting provided by Alphaworks JLog can
certainly do some decent formatting (by-the-by, Jlog is NOT log4j, although
they were both originally written by IBM). If you decide to use JLog, please
check the license - it may still be under one of IBM's dodgy ones, as it was
last time I looked (e.g. free to use, but if you use it in your code IBM can
ask for your source code. And believe me, they've done it in the past!).
Personally, I found JLog a little easier to use that Log4j (if less powerful
in some regards), and would still be using it now if not for the shitty
license :-(

sam
- Original Message -
From: Michael 'Mickey' Sattler [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 18, 2001 10:52 AM
Subject: Formatting Apache+Tomcat Java stack output errors: how?


 I apologize if this is covered somewhere, but I've spent the last few
 hours searching the Apache, Tomcat, and Java realms without success.
 There's just *too much* stuff out there :-|

 I want to tweak the Java stack output. Specifically, I'd like to (at
 a minimum) make the whole damn thing get word-wrapped so I can see
 everything without moving horizontally. If I could get tighter
 control over the main error line, etc., I'd do more formatting...

 Where is this controlled? Is there something which grabs all
 subshell-generated output, or is it more detailed as all that?

 Clueless and sleepy, I thank you for a helping hand...

 --
 Michael Mickey Sattler, Geek Times
mailto:[EMAIL PROTECTED]
 San Francisco, California, USAhttp://www.GeekTimes.com/michael/

 I was born not knowing and have had only a little time to change that here
 and there. -- Richard Feynman (1918 - 1988)





Re: What are EJB

2001-06-18 Thread Sam Newman

The only real similarity between EJB's and normal JavaBeans is that they are
both based on component models. EJB's provide a java representation of some
data in a database - e.g. 1 EJB will equal 1 row in the table, 1 EJB class
is tied to one table. XML is used to tie an EJB and its data to a database.
There is a bit of a problem with this approach, in that a typical OO  design
for such a system can result in a good OO system on the surface, but a real
mess of a database

EJB's need a compliant EJB server, and a database. There are a few free
versions around - try JBoss. They work fine with Servlets/Tomcat given that
they are also part of the j2ee. I personally use Cape Connect (previosly
Orcas) with tomcat without too many problems (there are a couple of class
loader issues in some circumstances however). Orcas actually bundles Tomcat
with it, and they pre-configure it to work with their ejb container.

sam
- Original Message -
From: Alexandre Bouchard [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, June 17, 2001 6:07 PM
Subject: What are EJB


 I've got a simple question: What are Enterprise Java Beans. I mean, what's
 the difference between EJB and the beans I develop with JDK and run with
 Tomcat?

 Thx





Re: Tomcat-Apache configuration

2001-06-18 Thread Sam Newman

Read the mod_jk howto included with the documentation. Its fairly
straightforward. If you have problems after following the docs, post to the
list - loads of us have done this so there will be plenty of people around
who can help.

sam
- Original Message -
From: Shicheng TIAN(CMS) [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 18, 2001 2:33 PM
Subject: Tomcat-Apache configuration



 Hello there,
 We have installed Tomcat 4.0 on our PC running Win2000;
 Tomcat works fine itself.

 We have the following two queries and would like to get advice from the
list:

 1. How to configure Tomcat so that it can work together
 with the Web server running at the same PC, which is Apache 1.3,
 i.e. Apache would pass servlet calls to Tomcat which would process the
calls
 and then return the result bact to Apache?

 2. Tomcat is installed on the PC at: C:\tomcat and its doc root at:
 C:\tomcat\webapps\ROOT;
 we wonder how to configure a remote mapping so that we can put some test
 files/code on
 another drive of the same PC, e.g. on the D drive at: D:\Test

 Thanks,

 Shicheng





Re: What are EJB

2001-06-18 Thread Sam Newman

Problem is all the containers we've used up till now have had real problems
with bean managed persistance...as a result we had to avoid it. They seem
better now, but its a bit late for us. The single biggest headache I've had
developing/designing EJB's is trying to make the OO centric java (e.g.
encapsulation of data and process) work with the non-OO databases without
sacrificing too many of the advantages of the two (databases speed, Javas
flexibility).
I'm looking forward to the new message beans which are in the new EJB 2.0
spec. Would of made my current project a whole lot easier... Sending
messages/setting state of beans via JMS could be very cool - if it works :-)

sam

- Original Message -
From: Luba Powell [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 18, 2001 4:38 PM
Subject: Re: What are EJB


  but a real mess of a database

 You are right here.  Because of it I stopped using Entity beans all
 together...


 - Original Message -
 From: Sam Newman [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, June 18, 2001 9:26 AM
 Subject: Re: What are EJB


  The only real similarity between EJB's and normal JavaBeans is that they
 are
  both based on component models. EJB's provide a java representation of
 some
  data in a database - e.g. 1 EJB will equal 1 row in the table, 1 EJB
class
  is tied to one table. XML is used to tie an EJB and its data to a
 database.
  There is a bit of a problem with this approach, in that a typical OO
 design
  for such a system can result in a good OO system on the surface, but a
 real
  mess of a database
 
  EJB's need a compliant EJB server, and a database. There are a few free
  versions around - try JBoss. They work fine with Servlets/Tomcat given
 that
  they are also part of the j2ee. I personally use Cape Connect (previosly
  Orcas) with tomcat without too many problems (there are a couple of
class
  loader issues in some circumstances however). Orcas actually bundles
 Tomcat
  with it, and they pre-configure it to work with their ejb container.
 
  sam
  - Original Message -
  From: Alexandre Bouchard [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Sunday, June 17, 2001 6:07 PM
  Subject: What are EJB
 
 
   I've got a simple question: What are Enterprise Java Beans. I mean,
 what's
   the difference between EJB and the beans I develop with JDK and run
with
   Tomcat?
  
   Thx
  
 





Re: What are EJB

2001-06-18 Thread Sam Newman

Hmm...I can certainly send you the config files Orcas uses to work with
Tomcat. I'll try and dig them out (off site at the moment - back next week).
One way to communicate with an EJB container without any config problems at
all, is to use RMI.You bind an RMI object at your EJB container's machine,
which will act as a proxy to the EJB (mine is in fact called
CentralServerProxy). Your servlets then act as an RMI client. All you have
to do to get this to work is run tomcat with a security manager (so you'll
need java 2, and you have to uncomment the relevent line out of your
server.xml), start an RMI security manager before retrieving the reference
to the object, and tailor your tomcat.policy file to allow access (I ended
up granting everything full permissions because I couldn't be bothered to do
it properly :-) ). The beauty of this approach is that:
1.)Tomcat doesn't have to be on the same machine as your EJB container as
the communication is RMI (wouldn't be that secure though). It could even
work over the web (RMI is simply a Java specific layer on Corba).
2.) You abstract the underlying EJB container. Different containers might
require different configuration's for tomcat and the container itself to get
communication to work.
I can go into more detail if you want (I have the code here). It doesn't
take too long to setup, and you can easily protoype the system without an
EJB container behind your Proxy RMI object - you could equally just use JDBC
to connect to MySql or something. Using servlets as an RMI client is
outlines in the Servlet Programming book, in the odds and ends chapter I
think (left my copy at the office!).
Obviously you could use other communication mechanisms to abstract the
communication - we also use 1024 bit encrypted secure pipes to communicate
over the web between out central EJB server and client processes.

sam
- Original Message -
From: Luba Powell [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 18, 2001 5:31 PM
Subject: Re: What are EJB


 You think so?  I will give in another chance.
 Can you send to me configurations for Tomcat/EJB?

 thank you.





Re: JSP CUSTOM TAGS

2001-05-31 Thread Sam Newman

The taglib sutff provided by the apache taglib project can do this - I think
there is one specifically for session information retrieval. Check the
taglibs project on the apache.org webpage.

sam
- Original Message -
From: Peter Giannopoulos [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 31, 2001 4:01 PM
Subject: JSP CUSTOM TAGS


 Hello all,

 Can anyone show me an example of accesing a session variable in a custom
 tag?
 Or at least point me towards documentation that explains it?

 (I have an object that I store in a session variable, I need to retrieve
in
 one of my custom tags)


 --
  Peter Giannopoulos,Software Designer
  Gemplus Software,  Advanced Projects Group

  Phone: +15147322434
  Fax:   +15147322401
  Gemplus Canada Inc., Http://www.gemplus.com





Tomcat 3.2.2 vs 3.2.1

2001-05-04 Thread Sam Newman



I just wondered on the benifits of using tomcat 
3.2.2 over 3.2.1? I know that 3.2.2 is in beta right now, but what advantages 
does it give over 3.2.1? Does it simply contain bug fixes (I'm assuming its 
still the 2.2 spec)?


sam


Re: Still trying to configure mod_jk

2001-05-03 Thread Sam Newman

Lots of people have this problem. The downloadable mod_jk seems to work for
some people, but not all. I'd suggest downloading the mod_jk source and
build it yourself. Give your system, this shouldn't be too hard.

sam
- Original Message -
From: Laurence Mayer [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 03, 2001 1:10 PM
Subject: Still trying to configure mod_jk



 Redhat 6.2
 Apache -1.3.6-1

 httpd start gives the following error

 Syntax error on line 214 of /etc/httpd/conf/httpd.conf:
 API module structure 'jk_module' in file /user/libexec/apache/mod_jk.so is
 garbled - perhaps
 this is not an apache module DSO?

 How do I fix?

 Can anyone shed some light, pleeeaaassse?

 Desperate
 Laurence





Re: virtualHosting of apache

2001-05-03 Thread Sam Newman



err..I'm not an Apache expert or something, but I 
think for a name based virtual server you want:
VirtualHost virtual.host.com
instead?

sam

  - Original Message - 
  From: 
  Guninder 
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, May 03, 2001 12:31 
  PM
  Subject: virtualHosting of apache
  
  Hi Everybody,
   I just installed 
  the apache server and changed the port to 8181.I can access it using http://192.9.203.178:8181/ .Now i want 
  that it should be accessible by using http://myname.com .If anyone can suggest how it 
  can be done, it will be a great help.I tried editing the httpd.conf file in 
  following way:
  
  
  NameVirtualHost 192.9.203.178:8181
  
  VirtualHost 192.9.203.178
  # ServerAdmin [EMAIL PROTECTED]
  # DocumentRoot /www/docs/host.some_domain.com
  ServerName guninder.com
  # ErrorLog logs/host.some_domain.com-error_log
  # CustomLog logs/host.some_domain.com-access_log common
  /VirtualHost
  
  what else should i do to access it by name.
  Thanks and Regards 
   Guninder


Re: Please urgent : Why french accentual characters (like à è) not display

2001-04-26 Thread Sam Newman

Hmm, in which case  if that solved it I'd guess i could be down to java not
loading the right locale information. ISn't there some java code that can do
this on the fly?

sam
- Original Message -
From: Stefan Busse [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, April 26, 2001 9:54 AM
Subject: Re: Please urgent : Why french accentual characters (like à è) not
display


 Are you using jdk 1.3 on unix ? I had the same problem with
 special characters and solved it by setting the system
 variable LC_CTYPE correctly. (must be set and exported
 before the jvm with tomcat is started) In my case, the
 correct value was de_DE, in your case it probably would
 be fr_FR ...

 * stefan






Re: Problem with Javamail

2001-04-26 Thread Sam Newman

I would guess the relevent jar (the ajva mail jar file) isn;t in the
WEB-INF/lib directory of your webapp.

sam
- Original Message -
From: Gustavo Comba [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, April 26, 2001 12:17 PM
Subject: Problem with Javamail


 Hello,

 I'm trying Apache-SOAP Version 2.1 over Tomcat 3.2.1.

 I've written a simple Servlet that send e-mails using the Sun's
JavaMail
 implementation without any problem, but I cant get the SOAP running (even
 the sample servlets included with the implementation).

 I'm getting the following error:

 java.lang.NoClassDefFoundError: javax/mail/MessagingException
  at pruebas.Correo.doPost(Correo.java:71)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:401)
  at org.apache.tomcat.core.Handler.service(Handler.java:286)
  at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
  at

org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
 7)
  at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
  at

org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
 onnectionHandler.java:210)
  at
 org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
  at
 org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
  at java.lang.Thread.run(Thread.java:484)

 I've checked the Apache SOAP documentation about the install using
 Tomcat. I'm running Tomcat as NT Service, and I've modified the class path
 in wrapper.properties as following.

 wrapper.class_path=$(wrapper.java_home)\jre\lib\ext\xerces.jar
 wrapper.class_path=$(wrapper.java_home)\jre\lib\ext\xml4j.jar
 wrapper.class_path=$(wrapper.java_home)\jre\lib\ext\soap.jar
 wrapper.class_path=D:\Utils\JAVA\Sun\javamail-1.2\mail.jar
 wrapper.class_path=D:\Utils\JAVA\Sun\jaf-1.0.1\activation.jar

 (the first three lines are useless, I think)

 Then, I've tried running Tomcat from the command line, using
 startup.bat. I've modified tomcat.bat as following:

 set

CLASSPATH=C:\jdk1.3\jre\lib\ext\xerces.jar;D:\Utils\JAVA\Sun\javamail-1.2\ma
 il.jar;D:\Utils\JAVA\Sun\jaf-1.0.1\activation.jar;%CP%

 in place of set CLASSPATH=%CP%

 And nothing!!! What I'm doing wrong?

 If is some usefull information missing in my message, please let me
 know.

 Thanks in advance, and please forgive my horrible English! ;-)

 Gustavo Comba






Re: Problem at mod_jk.conf-auto

2001-04-25 Thread Sam Newman



Unfortunatley you cannot change this file. It would 
be nice if the contents of this file were based partyl on some meta file so you 
could change stuff like this, or for example which prootocl to use for the 
apache/tomcat connection.
If you want to change this file just paste its 
contents into your httpd.conf. I'd surround the block with some comments so its 
easy to find again. 
If you create new contexts in tomcat you can then 
paste the new sections from the mod_jk.conf-auto into httpd.conf

sam

  - Original Message - 
  From: 
  Chonsiu208 
  To: [EMAIL PROTECTED] 
  
  Sent: Wednesday, April 25, 2001 8:59 
  AM
  Subject: Problem at 
mod_jk.conf-auto
  
  hi there,
  
  Does anybody know how to change the configuration of 
  mod_jk.confg-auto ? I want to instruct Apache to load the jk module from 
  location other than the default libexec/mod_jk.so.
  Thanks
  
  chonsiu.


Re: urgent

2001-04-25 Thread Sam Newman

I don't know of anyone getting tomcat to work with Personal Web Server
myselfyou might have more luck (and get more support) if you just
download Apache for win32.

sam
 Jignasha Raval wrote:

  i want to know how to configure tomcat with pws 4.0...
  as the earliest
 
  pls send me the step by step method
 
 
_
  Get Your Private, Free E-mail from MSN Hotmail at
http://www.hotmail.com.





Re: Adding modules

2001-04-25 Thread Sam Newman

You simply get tomcat workig via apache, and it should work. Consult the
Apache/Tomcat howto, located on the doc directory of your tomcat install

sam
- Original Message -
From: Manuel Melle Ocariz [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 25, 2001 10:02 AM
Subject: Adding modules


 Hi there,

 I m an Apache Web/Jserv user trying to migrate to Tomcat. I already have
Tomcat running on my system, but I use a database that requires a special
module to be loaded on the server. With Apache this was easy, I just had to
add the following portion of code to the httpd.conf file:

 LoadModule  ino_module modules/ApacheModuleIno.dll

 If possible, what is the way of doing that in Tomcat?

 Thanks and regards,

 Manuel Melle Ocáriz
 Software AG - E-Business Competence Center
 [EMAIL PROTECTED]






Re: Adding modules

2001-04-25 Thread Sam Newman

The module your trying to load is a module created to enhance the
capabilities of the Apache webserver. That is, the module is specific to
Apache. Tomcat is really only designed to serve .jsp and servlets although
it can also serve static content. For tomcat to be able to use Apache
modules would make it basically Apache - which is why mod_jk exists to allow
you to use tomcat and apache together to get the capabilities of both.

regards,
sam
- Original Message -
From: Manuel Melle Ocariz [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 25, 2001 10:40 AM
Subject: Re: Adding modules


 Thanks Sam, I ve already tried that way and it works, maybe my question
wasn't clear, sorry. I m trying to do it without Apache. Actually Tomcat
doesn't need Apache for serving static content as HTML so why can't I also
load my module without Apache?. Maybe I don't have concepts clear enough,

 Thanks again,




 Manuel Melle Ocáriz
 Software AG - E-Business Competence Center
 [EMAIL PROTECTED]






Re: Tomcat and IIS

2001-04-25 Thread Sam Newman

Do you get any error in servlet.log in the tomcat/log directory? It looks
like your trying to connect to a port but failing - is anything else on port
2380?
Also, have you confirmed that Tomcat runs ok in standalone mode?

sam
- Original Message -
From: Nottebrok, Guido [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 25, 2001 3:47 PM
Subject: Tomcat and IIS


 Hallo,

 we have installed Tomcat Version 3.2.1 to run with IIS.
 The setup is done according to the tomcat documentation.

 In IIS we have the green arrow telling that everything should be o.k.

 When trying to access the tomcat examples with
 http://localhost/examples/jsp/index.html
 we get the error that the requested page can not be shown.

 isapi logfile:
 -
 [jk_isapi_plugin.c (408)]: HttpFilterProc started
 [jk_isapi_plugin.c (429)]: In HttpFilterProc test redirection of
/examples/jsp/index.html
 [jk_uri_worker_map.c (344)]: Into jk_uri_worker_map_t::map_uri_to_worker
 [jk_uri_worker_map.c (406)]: jk_uri_worker_map_t::map_uri_to_worker, Found
a match ajp12
 [jk_isapi_plugin.c (439)]: HttpFilterProc [/examples/jsp/index.html] is a
servlet url - should redirect to ajp12
 [jk_isapi_plugin.c (461)]: HttpFilterProc check if
[/examples/jsp/index.html] is points to the web-inf directory
 [jk_isapi_plugin.c (408)]: HttpFilterProc started
 [jk_isapi_plugin.c (429)]: In HttpFilterProc test redirection of
\jakarta\isapi_redirect.dll
 [jk_uri_worker_map.c (344)]: Into jk_uri_worker_map_t::map_uri_to_worker
 [jk_uri_worker_map.c (430)]: In jk_uri_worker_map_t::map_uri_to_worker,
wrong parameters
 [jk_uri_worker_map.c (434)]: jk_uri_worker_map_t::map_uri_to_worker, done
without a match
 [jk_isapi_plugin.c (452)]: HttpFilterProc [\jakarta\isapi_redirect.dll] is
not a servlet url
 [jk_isapi_plugin.c (461)]: HttpFilterProc check if
[\jakarta\isapi_redirect.dll] is points to the web-inf directory
 [jk_isapi_plugin.c (517)]: HttpExtensionProc started
 [jk_worker.c (123)]: Into wc_get_worker_for_name ajp12
 [jk_worker.c (127)]: wc_get_worker_for_name, done  found a worker
 [jk_isapi_plugin.c (539)]: HttpExtensionProc got a worker for name ajp12
 [jk_ajp12_worker.c (223)]: Into jk_worker_t::get_endpoint
 [jk_ajp12_worker.c (121)]: Into jk_endpoint_t::service
 [jk_connect.c (108)]: Into jk_open_socket
 [jk_connect.c (115)]: jk_open_socket, try to connect socket = 2380
 [jk_connect.c (124)]: jk_open_socket, after connect ret = -1
 [jk_connect.c (143)]: jk_open_socket, connect() failed errno = 61
 [jk_ajp12_worker.c (134)]: In jk_endpoint_t::service, sd = -1
 [jk_ajp12_worker.c (152)]: In jk_endpoint_t::service, Error sd = -1
 [jk_isapi_plugin.c (554)]: HttpExtensionProc error, service() failed
 [jk_ajp12_worker.c (163)]: Into jk_endpoint_t::done

 winnt\system32\LogFiles\W3SVC1:
 -
 #Software: Microsoft Internet Information Server 4.0
 #Version: 1.0
 #Date: 2001-04-25 14:41:12
 #Fields: time c-ip cs-method cs-uri-stem sc-status
 14:41:11 164.28.39.80 GET /examples/jsp/index.html 500
 14:42:10 164.28.39.80 GET / 404
 14:42:21 164.28.39.80 GET /postinfo.html 302
 14:42:21 164.28.39.80 GET /postinfo.html/ 403
 14:42:28 164.28.39.80 GET / 404
 14:43:05 164.28.39.80 GET / 404
 14:45:48 164.28.39.80 GET /examples/jsp/index.html 500
 14:48:23 164.28.39.80 GET /examples/jsp/index.html 500

 Any ideas?

 Guido Nottebrok






Re: iis tomcat virtual host

2001-04-25 Thread Sam Newman

There is an example virtual host config in the server.xml that comes with
tomcat. Looking at that should give you a good start.

sam
- Original Message -
From: George Sinclair [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 25, 2001 3:53 PM
Subject: iis  tomcat  virtual host


 Hello,

 I was trying to find a way to set up virtual host for tomcat and I am
 using iis 5.0. If you could give me a link to some documentation or an
 example that would be appreciated very much.

 Thanks,
 George





Re: Please urgent : Why french accentual characters (like à è) not display

2001-04-25 Thread Sam Newman

you mean in the browser? Have you tried using another browser, or can you
see the character in a normal static page?

sam
- Original Message -
From: iscnet isc [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 25, 2001 4:26 PM
Subject: Please urgent : Why french accentual characters (like à è) not
display


 Hello,
 I use tomcat, I wrote a servlet which works fine, but i have a problem in
 the french accentual characters, they always are replaced by ? character
 Can some one help me?

 Thank you
 _
 Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.





Re: apache and tomcat not working

2001-04-25 Thread Sam Newman

Do you get any output in the servlet.log file?
- Original Message - 
From: Alejandro Arredondo [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 25, 2001 4:38 PM
Subject: apache and tomcat not working


 Hello,
 
I installed tomcat in my system. It works fine when
 I run it as stand alone server in the 8080 port. I 
 followed the steps to configure it with apache that are
 in the Working with mod_jk documentation. The 
 server restarts whithout trouble. I can see the 
 examples subdirectory, but I can not run the servlets
 and JSP's. They always throw an 500 Internal Server
 Error. I am using win 2000 with apache 1.3.19 and
 tomcat 3.2.1. I will also install it in my linux
 system, after making it work on windows. I added the
 mod_jk.conf-auto configuration to my httpd.conf. I
 copied the mod_jk.dll to the modules subdirectory.
 Can anybody help me?
 Thanks in advance
 
 _
 Free E-mail ---
 http://letodesigns.mail.everyone.net
 Letodesigns  Programming Free e-mail
 6MB limit
 http://letodesigns.8k.com
 




Re: mod_jk default protocol in Tomcat-3.2.1

2001-04-25 Thread Sam Newman

Fraid not. What I really want is some kind of meta file in the conf
directory which tomcat uses to create the mod_jk.conf-auto file. I might
suggest it to the development team

sam
- Original Message -
From: Maring, Steve [EMAIL PROTECTED]
To: Tomcat List (E-mail) [EMAIL PROTECTED]
Sent: Wednesday, April 25, 2001 7:45 PM
Subject: mod_jk default protocol in Tomcat-3.2.1


 Is there a way to specify the default protocol that will be used when
 creating mod_jk.conf-auto?  It always uses AJP12 and I think AJP13 would
 probably be better.

 -Steve
 Tarpon Springs, FL





Re: Problem with session tracking

2001-04-24 Thread Sam Newman

There is a difference between the way HttpSessions arew created and handled,
and the Cookie objetc. The cookie object creates a persistant cookie on the
clients machine. The HttpSession is just a memory cookie, and as such is
non-persistant and doesn't sit on disk. Looking at your code,
request.getSession() will return either the current session, or will create
a new one if none exists. I would expect that your servlet is the first one
to create the session. Try accessing another servlet after this one - have
that servlet get the session and see if its new. You could just put a link
to itself on the servlets page. The example servlets include a session
example which does just this.  Basically, there are several ways of tracking
sesions, and to make matters really complicated you can use allot of them at
once. It doesn't actually mean they share the data though :-)
It depends on circumstances and personal tastes as to which one you use.

sam
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 24, 2001 9:36 AM
Subject: Problem with session tracking


 Hi there,

 I'm having trouble with session tracking in a servlet in that the session
always appears to be new. When exercising the following code fragment:

 HttpSession session = request.getSession();
 if (session.isNew())
 {
   // Some stuff here
 }

 the isNew() call always evaluates to true. I also have noticed that no
cookies are being written since if I try:

 Cookie[] cookies = request.getCookies();
 System.out.print(Number of cookies is );
 System.out.println(cookies.length);

 it is always zero. However, if I write cookies myself by calling
response.addCookie(), I get a cookie next time round.

 I'm finding this confusing since my understanding is that the session
tracking is by default implemented using cookies. I'm guessing that the lack
of cookies and the always-new-session are not unconnected but I've failed so
far to find a solution or a reference to this problem in the Tomcat FAQ.

 btw, I do have cookies turned on in my browser and the noCookies
parameter in server.xml is set to false.

 I would appreciate any ideas you might have.

 Regards,
 Alan Goulding.
 __
 Get your own FREE, personal Netscape Webmail account today at
http://webmail.netscape.com/





Re: Mission Impossible: Tomcat + Apache ???

2001-04-24 Thread Sam Newman



Have you read the Apache-Tomcat howto in the docs 
(comes with tomcat)? If so, can you give us more specific info on your 
problems?

regards,
sam

  - Original Message - 
  From: 
  Yoav 
  To: [EMAIL PROTECTED] 
  
  Sent: Tuesday, April 24, 2001 10:58 
  AM
  Subject: Mission Impossible: Tomcat + 
  Apache ???
  
  Hiya all,
  
  We're trying to migrate from running JSP's and servlets 
  under JWS2.0 to Apache+Tomcat.
  
  
  It seems like the simplest and most basic 
  configuration, yet I could find nowhere a way to make this 
  work!!
  
  
  The same way JWS works, (and Apache-Jserv+GnuJsp) 
  also:
  1) Apache serves all static content.
  2) Tomcat serves servlets/JSP's (through apj12)
  3) They both share the same directory structure. 
  (C:\apache\htdocs) and *.jsp files can be anywhere in that directory tree - 
  not *ONLY* in the /examples dir or /jsp dir(!@!@#???)
  
  Did someone actually made this work? 
  how, exactly ?
  
  
  H E L P !!


Re: Problem with session tracking

2001-04-24 Thread Sam Newman

Hmm.
I guess its because your forwarding the context wholesale. I'd guess the
sesion is new within that given context, and because your effectively
recreating the context when you forward in that manner, it still counts as
new. I use sendRedirect  instead and this works fine - what do you loose my
using sendRedirect rather than forwarding?

sam
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 24, 2001 11:21 AM
Subject: Re: Problem with session tracking


 Sam wrote:

 
  There is a difference between the way HttpSessions arew created and
handled,
  and the Cookie objetc. The cookie object creates a persistant cookie on
the
  clients machine. The HttpSession is just a memory cookie, and as such is
  non-persistant and doesn't sit on disk.

 Interesting. Would you expect to see the session cookie when you call the
getCookies() method then or not?

 Since my last mail, I've made some progress and can get isNew() to return
false if I comment out the last few lines of the servlet method which
forward to a jsp page:

 ServletContext servletContext = getServletConfig().getServletContext();
 RequestDispatcher requestDispatcher =
servletContext.getRequestDispatcher(/myapp/jsp/hello.jsp);
 requestDispatcher.forward(request, response);

 Why would this screw up my session?





 __
 Get your own FREE, personal Netscape Webmail account today at
http://webmail.netscape.com/





Re: Mission Impossible: Tomcat + Apache ???

2001-04-24 Thread Sam Newman



the mod_jk.conf-auto tomcat creates authomatically 
generates the apache directives so apache can see the contexts setup under 
tomcat. Whilst they use different document roots, you can easily make them look 
the same my tweaking the generated directives. The .jsp files  servlets 
have to sit under the tomcat webapps directory for them to get picked up by the 
tomcat classloader. The jsp file actually gets compiled at runtime to a servlet 
before being viewed.

sam

  - Original Message - 
  From: 
  Yoav 
  To: [EMAIL PROTECTED] 
  
  Sent: Tuesday, April 24, 2001 12:51 
  PM
  Subject: Re: Mission Impossible: Tomcat + 
  Apache ???
  
  Yes, I've read the apache-tomcat howto, and followed it's 
  instructions step by step.
  
  BUT
  
  When I've put (as a test...) snoop.jsp in the 
  c:\apache\htdocs directory - it couldn't find it!
  Only once I've put it in the c:\jakarta-tomcat\webapps\ROOT 
  it was found and compiled.
  So, I figured out that by default they (Apache vs. Tomcat ) 
  have different "DocumentRoot" structure.
  That's my question.
  
  I've also tried to point in the mod_jk.conf and server.xml 
  the "/" dir of the tomcat to use c:\apache\htdocs - but still no 
  luck...
  


Re: Catch me for writing a 'Never Before' BOOK on Tomcat!!!

2001-04-24 Thread Sam Newman

What would the scope of the book be? Will it be developing a webapp with jsp
and servlets under tomcat, or will it just be about configuring and setting
up tomcat? In either case, I'd guess given the posts I see day in day out on
this list, these following things are essential:

Tomcat  Apache using mod_jk - covering the ajpv12  ajpv13 differences, and
why NOT to use JServ
Tomcat with SSL via Apache (perhaps including getting apache to use
mod_ssl?)
Deployment using ANT
Tomcat  IIS

Should of course cover both *nix setups and win32 setups. The first two I
know a fair bit about. I know nothing about the second two.

I would guess the book would have to be targeted at tomcat 4.0 to stand a
chance of being up to date when released.

sam




Re: Multiple Unique Instances WITHOUT multiple JVM?

2001-04-24 Thread Sam Newman

I think there is a simpler solution. Firstly, have one web app. Secondly,
have a database (could even be an encyrpted text file) containing user
information.
When a user logs in. You check him against the database to confirm password
etc. You asertain from this which company he works for and you load those
properties. Each servlet's behaviour would depend on the company the user
works for. e.g.servlet A displays page bob.jsp for company bob, but fred.jsp
for company fred. The company properties would be stored in the session
info.
This relies on some decent authentication and session handling stuff, but
makes your life allot simpler. If you want more specific info on tailoring
the content for specific customers, let me know - its a subject close to my
heart (currently anyway!)

sam
- Original Message -
From: Will England [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 24, 2001 4:42 PM
Subject: Multiple Unique Instances WITHOUT multiple JVM?


 Greetings!

 Here's what we want to do:

 We want to host our new servlet product as an ASP.  Each customer of ours
 would get a unique configuration for the product.  However, all of the
 servlets would run from one code base.

 We'd have the classes here:

 /webhome/classes/com/ourcompany/server/product

 and each customer would have their own WEB-INF:

 /webhome/customer1/WEB-INF/

 Each customers servlets would be mapped like this:

 /servlet/customer1/user
 /servlet/customer1/inventory
 /servlet/customer1/checkout

 And the second customer:

 /servlet/customer2/user
 /servlet/customer2/inventory
 /servlet/customer2/checkout

 user, inventory and checkout would all point to the same set of classes up
 in /webhome/classes.

 I know this is simple to do, if you are willing to spin up a new JVM for
 each customer / virtual host.  However, with one box and 30 customers,
 that'd be right memory intensive.

 Questions:

 1) Will this even work?  Has anyone done this before?

 2) How can we get different config files for each customer without
 explicitly referring to them as init-params in the web.xml file?  (we need
 to be able to get the config from non-servlet aware classes).

 Thanks in advance for any tips; ask me if you need any clairification.

 Will

 --
   If Al Gore invented the Internet, then I invented spellcheck!
   Dan Quayle, quoted at the National Press Club, 8/3/1999
   [EMAIL PROTECTED]
   Recovery  : http://will.mylanders.com/ PCS:  316-371-FOAD





Re: Maybe rights problem, exception thrown by Catalina core

2001-04-24 Thread Sam Newman

I'm guessing its a catalina specific error as I've not seen a tomcat error
like that before except in my code. Have you looked at the sourcecode?

sam
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 24, 2001 5:59 PM
Subject: Maybe rights problem, exception thrown by Catalina core


 Hi,

 I have solved my security problem, jndi.jar was under
 $CATALINA_HOME/server/lib and as soon I removed it, Tomcat/Catalina is
 working correctly. I decided to link it to /usr/local, but since then if
 I try to use it from there, I get HTTP Status 503 - This application is
 not currently available. Looking into it, I find in
 localhost_log.2001-04-24.txt:
 2001-04-24 18:51:42 StandardLoader[/examples]: Reloading checks are
enabled for this Context
 2001-04-24 18:51:42 Manager[/examples]: Seeding random number generator
class java.security.SecureRandom
 2001-04-24 18:51:42 Manager[/examples]: Seeding of random number
 generator has b een completed
 2001-04-24 18:51:45 ContextConfig[/examples]: Configured an authenticator
for method FORM
 2001-04-24 18:51:46 StandardContext[/examples]: Exception starting filter
Compression Filter
 java.lang.ClassCastException: compressionFilters.CompressionFilter
 at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilter
Config.java:250)

 Anyone can give me an idea what can be wrong? If I switch back to
 /usr/local/encap/catalina-4.0b3 then it works. The files are the same
 under /usr/local, as they are symlinked to the first directory.

 Thanks,
 Laszlo





Re: Tomcat SSL

2001-04-24 Thread Sam Newman

The ajpv12 protocol is still used to stop tomcat. As such even if you just
use ajpv13 you should still start the ajpv12 connector to allow easy
restarting of tomcat. I guess that eventually ajpv13 will be capable of
handling a tomcat restart and ajpv12 can be removed completely.

sam
 Wasn't there something about tomcat being more difficult to restart
 when using ajp13?  Like apache had to be restarted as well?  If true,
 I think that's too big an inconvenience to warrant switching.

 Milt Epstein
 Research Programmer
 Software/Systems Development Group
 Computing and Communications Services Office (CCSO)
 University of Illinois at Urbana-Champaign (UIUC)
 [EMAIL PROTECTED]





Re: Tomcat SSL

2001-04-24 Thread Sam Newman

You might have problems detecting if you are working over a secure
connection. See if the isSecure() method works in a servlet when working
over SSL.

sam
  mod_jserv didn't support SSL neither ajp12. You must use mod_jk
  with ajp13 to get SSL info forwarded from Apache to Tomcat.
 [ ... ]

 Can you clarify what you mean bu this?  Because I'm using Apache with
 mod_ssl, and Tomcat with mod_jserv, and things are working just fine.
 Perhaps there's some functionality I don't have, but I guess I haven't
 needed it yet.






SSL detection

2001-04-23 Thread Sam Newman

I have Apache and Tomcat running together under SSL. I now want to create a
page which only run under SSL. I want http and https to share the same
documents however. My first idea is to simply have a tag handler, which
detects the protocol, and if not SSL is simply redirects to a page explaning
why they cannot view the requested document.
By problem is that I'm not sure on the correct way to retrieve what type of
protocol is being used. There is a getAuthType method in HttpServletRequest,
but the return type is simply a string (e.g. BASIC or SSL). My concern
is that this return could vary from browser to browser. Can I assume that if
using SSL the return will always be the string SSL? Also, how can I detect
which level of encryption is being used? Ideally, I'd like to restrict users
to connecting using 128bit only, or at least issue a warning when its at
40bit.

Thanks in advance,

Sam




Re: SSL detection

2001-04-23 Thread Sam Newman

Many thanks for that. I was looking under get methods in the index so I
missed the isSecure one, d'oh!
Now all I have to do is to try and get the encryption strength.I think I
could do that with some client side java script though.

sam
- Original Message -
From: Wolle [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 23, 2001 12:34 PM
Subject: Re: SSL detection


 Hello,
 you can check it with the methode request.isSecure,.
 that will give you true or false, make shure you use the ajp13 protocol
with
 mod_jk.
 I don't know how to get the detailed information about the protocol and
the key.

 Greetings,
 Wolle






Re: SSL detection

2001-04-23 Thread Sam Newman

I should of thought of that myself. The page will now actually behave
differently depending on whether the page is accessed securely now - aint
goal post moving a wonderful thing? I just hope I can finish the work before
they decide they want it done in ASP instead.

sam
- Original Message -
From: Jan Labanowski [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: Jan Labanowski [EMAIL PROTECTED]
Sent: Monday, April 23, 2001 2:31 PM
Subject: Re: SSL detection


 The simpler way would be to put into httpd.conf the block


 Directory /my/directory
 Limit
Order deny,allow
Deny from all
 /Limit
 /Directory

 In the HTTP section (before the SSL section in the httpd.conf)

 and the block
 Directory /my/directory
 Limit
Order deny,allow
Allow from all
 /Limit
 /Directory

 within the HTTPS section (within the SSL section of httpd.conf).
 You may also need to define Alias, and to it by Location,
 but try this first.





Re: SSL detection

2001-04-23 Thread Sam Newman

I'm not sure if this is different on winNT, as I did it on Linux, and so
these instructions are really for that. All the packages mentioned here i
think also come with win32 instructions. First, get Apache using mod_ssl.
Easiest way to do this is to download openssl 0.9.6a (www.openssl.org), the
latest apache source (www.apache.org) and the mod_ssl source (search
google - can't remember the url - maybe www.modssl.org  ) The mod_ssl
install file then explains how to build all 3 packages and get them running.
Then get Apache serving .jsp and servlets via tomcat using the ajpv13
protocol (look at the Apache-Tomcat howto in the docs). The older ajpv12
protocol has some issues with SSL. The servlets and jsps should work equally
well under https or http, with the exception (perhaps) of URL rewritting
when the client has cookies disabled (search the archive for recent posts
for more info).

As I said, this worked for me on Linux, more specifically under SuSE 7.0.

sam
- Original Message -
From: subbu [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 24, 2001 3:27 AM
Subject: Re: SSL detection


 Hello SAM could U please tell me How to configure apache to support SSL
 (winnt)
 with love
 subbu.
 - Original Message -
 From: Sam Newman [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, April 23, 2001 3:59 AM
 Subject: SSL detection


  I have Apache and Tomcat running together under SSL. I now want to
create
 a
  page which only run under SSL. I want http and https to share the same
  documents however. My first idea is to simply have a tag handler, which
  detects the protocol, and if not SSL is simply redirects to a page
 explaning
  why they cannot view the requested document.
  By problem is that I'm not sure on the correct way to retrieve what type
 of
  protocol is being used. There is a getAuthType method in
 HttpServletRequest,
  but the return type is simply a string (e.g. BASIC or SSL). My
concern
  is that this return could vary from browser to browser. Can I assume
that
 if
  using SSL the return will always be the string SSL? Also, how can I
 detect
  which level of encryption is being used? Ideally, I'd like to restrict
 users
  to connecting using 128bit only, or at least issue a warning when its at
  40bit.
 
  Thanks in advance,
 
  Sam






Re: seems as though a servlet engine would have a little clearer documentation on getting servlets running

2001-04-23 Thread Sam Newman

Go back to first prinicples. Try accessing the servlet directly via tomcat
rather than worying about apache - try looking at
http://youmachine:8080/yourcontext/servlet/YourServlet
The port 8080 reefres to the port tomcat is running on. With no port
specified, it means you are trying to access via the standard http port of
80, which is where Apache (or some other webserver) is running.
If that works, its an Apache/mod_jk issue. If not, its a web.xml issue. Just
to reassure you, tomcat does work - I wouldn't be at all suprised if it has
the largest user base of all servlet engines currently on the market.
If you find that doesn't work, please post your web.xml so we can have a
look. If not, can you post the directives you use to get Apache running with
mod_jk (probably the mod_jk.conf-auto file generated in tomcat/conf).

regards,
sam
- Original Message -
From: Dan  Sharon [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, April 23, 2001 6:55 PM
Subject: seems as though a servlet engine would have a little clearer
documentation on getting servlets running


 ok,
 install tomcat,
 jsps are workin,
 made new context,
 jsps are workin in it,
 write a servlet(5 min),
 try to get servlet working(5 hr),
 read documentation,
 it says put servlets in WEB-INF/classes dir, did that
 it says add servlet to WEB-INF/web.xml, did that
 web-app
 servlet
 servlet-nameservtest.class/servlet-name
 servlet-classservtest.class/servlet-class
 /servlet
 /web-app
 restart tomcat(can't believe this has to be done everytime a servlet
 gets added or changed), did that
 it says call your servlet with
 http://thehost/WEB-APP/servlet/theservletname;
 did that
 response: 404
 there's no servlet directory, kinda makes sense, but i thought mod_jk
 was taking care of that.  HMM.
 so now that i've followed the instructions and that didn't work, i make
 a servlet directory and add my servlet there.  web browser tries to
 download and save it to my disk, no display.
 i'm sure that this being a servlet engine, it would probably serve
 servlets, otherwise that would be really embarrasing for the
 programmers, so, anyone got any suggestions?






Re: mod_jk - DEAD END! [POSTSCRIPT]

2001-04-19 Thread Sam Newman

Whilst the mod_jk worked for me, I aggree that it could be more clearly
marked as to what platforms its currently supported on. As the the number
one issue raised on the list, over the last week or so it seems to be people
either not reading or getting confused by the howto docs

sam
- Original Message -
From: "Jeff Kilbride" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 18, 2001 7:25 PM
Subject: Re: mod_jk - DEAD END! [POSTSCRIPT]


 Forgive the expression, but bullshit. :)

 The mod_jk compilation *is* trivial and since they don't list on the
website
 what version of Apache or Linux the binary is compiled for, it's pretty
much
 useless. I'd say the number one problem post I have seen since joining
this
 list relates to the fact that the binary doesn't work on most people's
 systems. If you give somebody with relatively little experience a binary
 that's supposed to work and it doesn't, it only confuses the matter that
 much more.

 By the way, I'd be interested in hearing what your config is, since it
 worked for you.

 Thanks,
 --jeff






Re: getInputStream

2001-04-19 Thread Sam Newman

I'm pretty sure that if you use this package in a commerical product, you
have to make sure that each developer using the package has a copy of the
latest O'Reilly book. Check the license carefully.

sam
- Original Message -
From: "Jeff Kilbride" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 18, 2001 7:43 PM
Subject: Re: getInputStream


 Hi Georges,

 There is a very easy to use class for doing file uploads available from
 Jason Hunter, who wrote the original oreilly book on servlets, at his
 website:

 http://www.servlets.com/

 Look for the com.oreilly.servlet package. I think it will greatly simplify
 what you are trying to do. There's a good deal of documentation available
on
 the site.

 Thanks,
 --jeff






Re: WML and JSP

2001-04-19 Thread Sam Newman



Its possible, but not trivial. It will inevitably 
result in the use of some kind of MVC setup. I would guess the quickest way to 
go would be to abstract the business login into taglibs (e.g. most of the Java 
code in the jsp pages). Then code 2 different jsp files - one for WML, and one 
for HTML, both using the same taglib, just displaying the information in a 
different way. You could then get a servlet to handle the request and direct the 
user to the correct .jsp file.
The O'Reilly Java Server Pages book has a good 
chapter on taglibs  MVC stuff. It also touches on the use of JSP and XML 
specifically for WML, although I preferer the use of taglibs to their proposed 
method.

sam

  - Original Message - 
  From: 
  Paul Yoon 
  To: [EMAIL PROTECTED] 
  
  Sent: Wednesday, April 18, 2001 8:13 
  PM
  Subject: WML and JSP
  
  

  
  
  Hello, 
  
  I am an user of Tomcat.
  I would like to make a few page for mobile 
  user.
  Is it possible that HTTPusers 
  andWAP users can access same URL and get their own 
  services?
  If it is, how it can be possible? How tomcat 
  server know the difference?
  Thank you in advance.
  
  Paul 


Re: Code Q.

2001-04-19 Thread Sam Newman

You kight want to get some decent example code,then edit that to get you
started. If you have either of the O'Reilly books (servlet programming or
JSP) then download thier example code. The JSP code certainly works just by
unpacking under tomcat. You can then just edit/view thier simple examples to
start getting to know it.
For basic Java tutorial, Bruce Eckels has an online book called Thinking In
Java - which you can download for free.

sam
- Original Message -
From: "Purcell, Scott" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 18, 2001 10:21 PM
Subject: Code Q.


 Hello,
 I am learning JSP and have done quite a few examples from the Core
Servlets
 and JSP book.
 I apologize for asking this q here, but I am trying to learn Tomcat and
put
 my whole picture together, and I figured that
 the people on this line, would probably know what these lines mean.
 Anyway, I keep typing these few lines but really don't have a grasp of
what
 they are doing.
 I would really like to understand in a 'Laymans' fashion what I am doing
and
 what these lines do.
 public class Hello extends HttpServlet {
 //I am assuming that the class Hello, that I am creating
 // is extending HttpServlet class?
 // but what does the extends really mean?
 public void doGet(HttpServlet request,
 HttpServlet response)
 throws ServletException, IOExcedption;
 // It looks like I am creating? or calling? a method here. And am I
passing
 it the HttpServlet class?
 I am very confused on this, and would enjoy hearing from someone that
 wouldn't mind going over that with me.
 Thanks very much,
 Sincerely
 Scott







Re: newbie

2001-04-19 Thread Sam Newman

Let me guess, these servlets are using sessions? When a session is first
used, there is alarge lag whilst tomcat generates a list of large primes (I
assume) to maintain unique sesion identifiers.
This will happen once and once only, when the first session is accessed
after tomcat starts. Afterwards session access for everyone will see no
delay. It would be nice if you could get tomcat to do this at startup

sam
- Original Message -
From: "Chris Nolte" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, April 19, 2001 2:46 AM
Subject: Re: newbie


 This happens to me with my servlets--some of the time
 they take up to 30 seconds to load the first time.
 Is this normal behavior also?






Re: Cleaning up servlets

2001-04-19 Thread Sam Newman

Well, the servlet will get destroyed when the servelet is garbage collected
I think. The JVM has a garbage collection thread which starts up
automatically, and its its job to  cleanup unused objects. I'm not sure if
this behaviour changes in tomcat. You can explicitly call the garbage
collector by calling System.gc(),or something similar.
Note that something will only be garbage collected when nothing holds any
references to it (an  oversimplification I know). If you simply want to free
some resources up after a servlet is used, do this in your doPost/doGet
methods.

sam
- Original Message -
From: "H.F.N. den Boer" [EMAIL PROTECTED]
To: "Tomcat users group" [EMAIL PROTECTED]
Sent: Thursday, April 19, 2001 10:42 AM
Subject: Cleaning up servlets


 When a servlet is destroyed, I log a number of things.
 From the log I conclude that servlets are only destroyed when the NT
service is
 shut down manually.

 Do I need to run a separate process (thread) to monitor how long a servlet
is
 not used and from that process destroy it or is there some other way to
keep my
 environment clean ? Maybe a Tomcat setting ?






Re: Tomcat vs JServ

2001-04-19 Thread Sam Newman



I'm not sure which "issues" you 
mean
I think that fact that JServ has been in bug fixing 
for a while now is more down to the fact that no more development is being done 
with it. Tomcat supports the latest standards and works fine with Apache via 
mod_jk. And its being actively developed. I for one would be eager to see more 
empahasis being placed on using mod_jk and apache rather than 
JServ.

sam

  - Original Message - 
  From: 
  Eric Mosley 
  
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, April 19, 2001 10:59 
  AM
  Subject: Tomcat vs JServ
  
  Hi,
  
  I'm trying to 
  evaluate whether to use Tomcat or JServ. The system will be freeBSD and I know 
  that Tomcat has some "issues" with that - but I'm willing to take the 
  chance.
  
  However, if speed 
  and memory are issues which would be best for basic servlet 
  functionality?
  
  Surely it would be 
  JServ as it has been in bug fixing mode for so long it will have matured and 
  is quite fast anyway?
  
  Any insights 
  appreciated,
  
  Eric
  
  


Re: Tomcat vs JServ

2001-04-19 Thread Sam Newman

I guess it comes down to if it aint broke, don't fix it. If your happy with
the old 2.0 spec, and the fact your unlikely to get much support if things
do go wrong, I guess there isn't much reason to change.
At the end of the day, tomcat is more uptodate than JServ, and using mod_jk
is easier to integrate with Apache.

sam
- Original Message -
From: "Eric Mosley" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, April 19, 2001 2:54 PM
Subject: RE: Tomcat vs JServ


  I have a jServ box that has run with no problems of any kind for over a
  year and a half. To me that says a lot of jServ. Does the latest release
  of Tomcat finally support the automatic starting up of Tomcat (not
  manual)? What about speed? In some casual tests my jServ system runs
  faster than Tomcat. Has anyone done any real benchmarks?

 Actually this is the essence of what I was enquiring about! I also have an
 old JServ machine which has been running for two years with zero problems.
 The crucial issue (for me anyway) is which is faster and less memory
 intensive for basic servlets (where you would be happy with 2.0 servlet
 functionality)...

 Anybody!?





Re: mod_jk - DEAD END!

2001-04-18 Thread Sam Newman

Apache seems to identify servlets, b assuming that anything in a servlet
directory is handled by tomcat, so servlets will always appear in a servlet
directory. As for the docs, I'd aggree that given JServ is no longer the
prefered route all references to it should perhaps be moved elsewhere. To be
honest I'd concentrate on the mod_jk howto rather than the Apache-Tomcat
howto - its probably a little less confusing.
Basically, mod_jk and jserv do the same thing, but jserv is old and has some
issues. It also takes more work to get configured. Using mod_jk on its own
is the way to go. As I said, check the mod_jk howto (included in the tomcat
distro under docs).

sam
- Original Message -
From: "Raj Subramani" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 17, 2001 7:38 PM
Subject: mod_jk - DEAD END!


 Hi,

 I have been trying to get mod_jk to integrate with my Apache/Tomcat
 environment.

 The documentation talks endlessly about jserv and how to use it even
 though right at the top there is a line saying if you use "mod_jk"
 disable "jserv".

 Fantastic.

 Finally I reached this archive list to find that I was not alone. Thank
 god for that else I would have jumped off this floor that I am on.

 Since Apache cannot seem to resolve /example/servlet to /example
 (apparently that directive is in toncat-apache.conf which iis NOT TO BE
 USED if using mod_jk), what is the solution?

 Any takers?

 Cheers
 -raj





Re: ServletOutputStream

2001-04-18 Thread Sam Newman

Couldn't you try creating the jpg on the server side, then supply an IMG
link to it when you provide the page?

sam
- Original Message -
From: "Georges Boutros" [EMAIL PROTECTED]
To: "Tomcat (E-mail)" [EMAIL PROTECTED]
Sent: Tuesday, April 17, 2001 7:42 PM
Subject: ServletOutputStream


 hi,

 i want to use the ServletOutputStream to send the data of a JPG image to
the
 browser.
 ServletOutputStream ServletOut = response.getOutputStream();

 it's working good but i can't write any text before or after the image.
 if i set  response.setContentType("text/html");
 i see the text that i wrote and the data of the image as text
 (which is normal)
 and if i set  response.setContentType("image/jpeg");
 i don't see the text neither the Image

 i use ServletOut.Print("hello"); to write my text

 if i include a file with:
 request.getRequestDispatcher("/jsp/web/test.jsp").include(request,
 response);

 i got an error that OutputStream is already being used for this request

 can anyone help me

 thanks

 Georges





Re: Hiding JSPs from Public Access

2001-04-18 Thread Sam Newman

I would guess you'd want to stick an action in that checks the current
session ID for user authentication info. If its not found, the rest of the
page isn't displayed (e.g. get a TagHandler to skip the rendering of the
rest of the page). Ideally you could do this via a Taglib and stick it at
the top of each page.

sam
- Original Message -
From: "Tim Coultas" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 17, 2001 11:42 PM
Subject: Hiding JSPs from Public Access



 Folks -

 I have run into the common problem where visitors can get at my jsp files
 even though I have set up log-in system of security using a central
"traffic
 circle" servlet that forwards users to jsp pages.

 I have the servlets residing in a directory named jsp under the main
context
 directory.

 However, a visitor can get the jsp pages by going to:

 http://www.website.com/context/jsp/filename.jsp

 I have tried to cut off access by placing this directory in the WEB-INF
 directory, but I can still get to it at the URL above.  Also, I have tried
 to just dump all of the .jsp's into the WEB-INF directory (and not place
 them in a sub-directory) and I can STILL get to them by at the URL above.

 I have also tried to edit the web.xml security section by entering
something
 like "url-pattern/jsp/*/url-pattern" and
 "url-pattern/jsp/filename.jsp/url-pattern" but this does not have any
 effect.

 How the heck do I do this?

 Has anyone been able to do it?

 Thanks.

 Tim Coultas






Re: Apache-SSL or Mod-ssl

2001-04-18 Thread Sam Newman

Yep - never had a problem with RedHat rpms on SuSE. The only difference is
that SuSE tends to stick stuff under /opt, whereas allot of RedHat RPM's
i've used in the past seem to put software under /sw. SuSE 7.0 currently
comes with 6CDs, 1DVD and 1500 apps. Not to mention over 600 pages of
documentation.

sam
- Original Message -
From: "GOMEZ Henri" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 17, 2001 11:20 PM
Subject: RE: Apache-SSL or Mod-ssl


 We're deploying on SuSE 7.0 anyway. I prefer SuSE purely because:
 a) you get shedloads of apps on the source cd's (less downloading)
 b) yast is brilliant for admin stuff
 c) They release new versions pretty frequently

 Redhat, Suse, Mandrake are all great distribs. You allways get
 binaries and sources. And all use RPM packaging.

 RPMs built on Redhat must works on Suse and Mandrake, at least
 the .noarch since they depend on java JVM and have nothing to
 do with kernel or glibc.

 Just test my RPMs under Suse, and if necessary send me the
 corrections to apply to have them works under Suse :)





Re: Servlet jar files

2001-04-18 Thread Sam Newman

You should bundle servlets in a .WAR file. This is the same as a jar file.
It contains the WEB-INF directory for your webapp. See the docs for details
on deplolyment. This .WAR file will sit directly in the webapps directory.

sam
- Original Message -
From: "David DELGRANCHE" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 18, 2001 9:50 AM
Subject: Servlet jar files


 Hi all,

 I would like to put all my servlet files in a jar file and then put the
 jar file in the classes/ directory. By doing this, Tomcat doesn't find my
 servlet and send me a HTTP 404 error. Does anyone how to specifiy to
Tomcat
 that the servlets are in a jar file?
 Thanks a lot
 David.





Re: Tomcat and RMI

2001-04-18 Thread Sam Newman

I've done it with servlets. First ly uou need to make sure your using a
SecurityManager before accesing the RMI object (i'll dig the code out of you
need it) - try searching for RMISecurityManager or something in the jdk API
docs. You may also want to change the tomcat.policy file in conf to allow
RMI access for your webcontext.

sam
- Original Message -
From: "David Cummins" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 18, 2001 8:55 AM
Subject: Tomcat and RMI


 Has anyone had to build a tomcat application (or any J2EE app server for
 that matter) that requires RMI client code to be executed in the JSP?

 We have an app that talks to an APS (Jacobs Rimmell All-Purpose
Serviceware)
 directory server (sits on top of an iPlanet LDAP server).






Re: Tomcat with Apache/URLRewritting and mod_rewrite

2001-04-18 Thread Sam Newman

It can (see the Apache-tomcat readme in the tomcat distro), but it is
strongly suggested that you use mod_jk  tomcat instead of using JServ as it
has less bugs, is faster, and I believe is also better maintained.

sam
- Original Message -
From: "Tassilo Pilati" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 18, 2001 11:03 AM
Subject: AW: Tomcat with Apache/URLRewritting and mod_rewrite


 Do you know if the mod_jserv can be used with tomcat ?







Re: TOMCAT 3.2.1 and mod_jserv for FreeBSD

2001-04-18 Thread Sam Newman

I'm skipping the jserv build issues - not sure this is the place for
problems with it. JServ was the old method for serving servlets via Apache.
It has been superceded by mod_jk which is much easier to setup and use. the
mod_jk.so is for mod_jk, the mod_jserv.so file is for mod_jserv. For a
comparison of mod_jk and mod_jserv have a look at the Apache-tomcat  mod_jk
howto's.

sam
- Original Message -
From: "Detlev Schlereth" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 18, 2001 11:16 AM
Subject: TOMCAT 3.2.1 and mod_jserv for FreeBSD


 Hi !

 Im a new user of the TOMCAT 3.2.1 system and
 Ive some problems:


snip

 second:

 in the prebuild binaries for TOMCAT 3.2.1 there are two .so files in
 x86/Linux

 mod_jk.so
 mod_jserv_tomcat.so

 why exists two files ?
 why not mod_jserv.so ?
 maybe,work these files on a FreeBSD 4.2 System ?



 with thanks

 Detlev Schlereth








Re: WEB-INF/lib vs. TOMCAT_HOME/lib

2001-04-18 Thread Sam Newman

I'm afraid to say its not a problem I've seen here. Which platform are you
running on?

sam
 -Original Message-
 From: Chris Bailey [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, April 17, 2001 7:32 PM
 To: [EMAIL PROTECTED]
 Subject: WEB-INF/lib vs. TOMCAT_HOME/lib


 The Tomcat automatic setting of a classpath for a given webapp is not
 seeming to work for me.  I have my various jar files in .../WEB-INF/lib,
 for my web app.  But, that fails.  If I however, put them in
 $TOMCAT_HOME/lib, then they get added to the generic classpath (which is
 displayed on startup of Tomcat), and things work fine.

 How do I fix this?

 --
 Chris Bailey[EMAIL PROTECTED]
 Wego Systemshttp://www.wego.com


 **
 Information in this email is confidential and may be privileged.
 It is intended for the addressee only. If you have received it in error,
 please notify the sender immediately and delete it from your system.
 You should not otherwise copy it, retransmit it or use or disclose its
 contents to anyone.
 Thank you for your co-operation.
 **





Re: Very Basic question about Apache-Tomcat configuration

2001-04-18 Thread Sam Newman

If you access file://localhost:8080/examples you are completely
circumventing Apache and going straight to tomcat. Assuming this is not what
your doing to get the jsp's to work, I'd hazard a guess that your web
context defined in server.xml under tomcat isn't correctly set. I would
suggest you try temporarily removing the use of JServ, and instead look at
using mod_jk. Tomcat automatically creates a configuration file for
inclusion in httpd.conf which configires apache to use Tomcat in line with
the server.xml file. As a minimum on a clean tomcat install, this will
automatically let you access the example servlets via apache with the
minimum effort. I take it you have consulted the Apache-tomcat howto?

sam
- Original Message -
From: "Gerry Duhig" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 18, 2001 12:11 PM
Subject: Very Basic question about Apache-Tomcat configuration


 Help please!

 I have Apache running with ApacheJServ  and working fine!

 I want to test tomcat and consider it as a replacement for JServ.

 I downloaded Tomcat and edited the Apache httpd.conf to include the
 apache-tomcat.conf file, instead of the JServ file.

 I start tomcat and I start Apache, Apache serves static html as expected,
it
 passes jsp requests to tomcat fine (the examples work), but it doesn't
pass
 servlet requests through at all.

 I can test the servlet examples by using file://localhost:8080/examples,
but
 I cannot make Apache pass the requests across unless that port number is
 explicitly used.

 Am I supposed to find and use a special mod_jserv.so?

 Am I supposed to create zone property files as in ApacheJserv?

 What am I supposed to do?

 Gerry





Re: IE problem or tomcat bug?

2001-04-18 Thread Sam Newman

I've not seen this before. You might want to try contacting the developers
of mod_jk (I take it your using this if your using ajpv13?) directly. Its
always a pain when you can't reproduce these kind of problems. Are all of
the problems based around the same version of IE? Which browser do you
yourself use?

sam
- Original Message -
From: "Michael Stacey" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 18, 2001 12:15 PM
Subject: IE problem or tomcat bug?


 We've recently moved to a tomcat/apache server under linux using the
 most recent release builds.  Some of our clients are experiencing
 strange behavior, like getting the following stack trace to their
 browser:

 Tomcat.core.ContextManager.internalService(ContextManager.java:797) at
 org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at

org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection
(Ajp13ConnectionHandler.java:160)
 at
 org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
 org.apache.tomcat.util.ThreadPool$ControlRunnable.run(THreadPool.java:498)
 at java.lang.Thread.Run(Thread.java:484)


 (may be incomplete; sent by a client in email since we cannot duplicate
 the problem)

 The common thread seems to be that they're using IE as the browser.  Is
 this a known problem (thought I couldn't find it in the archives)?  Is
 there some workaround?  Would backing off to ajp12 fix it (we never had
 the problem with apache/jserv on NT)?

 Thanks for any suggestions.

 -- Michael






Re: IE problem or tomcat bug?

2001-04-18 Thread Sam Newman

We've seen the same version of MS products working very differently on
different OS's. Because allot of the abilities of win32 programs are
fullfilled by the inderlying win32 API's, ther're often subject to change
between different operating systems due to slightly different underlying
API's

The only way I could see the client causing a problem is byscrewing up the
request somehow, and it isn't being properly handled. You might want to
check the Apache logs and well as the tomcat logs. See if there are any
strange messages in access.log for example. I take it the problem context
hash debuing turned on? I would still suggest droping the mod_jk developers
a line, at least they can add it to thier bug database.

sam
- Original Message -
From: "Michael Stacey" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 18, 2001 1:04 PM
Subject: Re: IE problem or tomcat bug?


 At 07:59 AM 4/18/01, you wrote:
 I've not seen this before. You might want to try contacting the
developers
 of mod_jk (I take it your using this if your using ajpv13?) directly. Its
 always a pain when you can't reproduce these kind of problems. Are all of
 the problems based around the same version of IE? Which browser do you
 yourself use?
 
 sam

 Looks like different versions of IE all have the same problem.  To make
 matters worse, the same version of IE works fine on some computers but
 not others.  We have tested IE versions from 4.0 up and none have the
 problem in our tests.  We're assuming it may be an interaction between
 various MS programs (outlook, etc) on the client end.  Netscape users
 never experience the problem.

 Thanks for the response.


 -- Michael






Re: Tomcat with Apache/URLRewritting and mod_rewrite

2001-04-18 Thread Sam Newman


- Original Message -
From: "Tassilo Pilati" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, April 18, 2001 1:27 PM
Subject: AW: Tomcat with Apache/URLRewritting and mod_rewrite


 But SSL has nothing to do with my problem. The problem I have is that when
 using Tomcat in standalone mode URL rewritting works, however, running
 Tomcat in combination with Apache does not, because Apache does not hand
the
 request over to Tomcat. I think is is stange that there is nothing
mentioned
 about this in the tomcat user guide - section Setting Tomcat up with
Apache.
 I think so many people are using Tomcat with Apache that it is really a
very
 important issue ?! I mean session tracking is fundamental and it should
work
 using URL rewritting. I guess many people use cookies for session tracking
 instead of URL rewritting. Probably with cookies it should work, so maybe
 that`s why this issue hasn`t really come to the attention to the tomcat
 developers ? What do you think ?

Just to clarify, are you using jserv or mod_jk? And if you are using mod_jk,
are you using the ajpv13 protocl for connection? I'm using mod_jk and
ajpv13, and am session tracking using the HttpSesession class and it works
fine, as does parameter passing. I don't know too much about URL reqritting
though.

sam




Re: worker.properties

2001-04-18 Thread Sam Newman

The workers.properties file configures the worker threads that take requests
for servlets/jsp's from apache and processes them appropirately. As such,
when running Tomcat without Apache it will have no effect. You only need to
edit this file when you run Apache and Tomcat together. Infact you'll get a
syntax error on a non-PC platform if you forget to edit this file and try
and include it in the Apache directives. See the workers.properties howto
for more information (its in the Tomcat docs somewhere).

sam
- Original Message -
From: "Tassilo Pilati" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 18, 2001 1:47 PM
Subject: worker.properties


 Hello,

 i did not edit my worker.properties file at all. I`m using Tomcat 3.2.1.
It
 is working with Apache and in standalone mode (besides that session
 tracking, using URL rewritting is not working, which is another issue).
 Anyway, I was wondering if I have to edit this file. For example I see in
 the file that the workers.tomcat_home and the workers.java_home is not set
 correclty, as it is configured for the windows plattform. Nevertheless,
 tomcat is starting up and working, so I was just wondering if that is
normal





Re: Servlet jar files

2001-04-18 Thread Sam Newman
Title: RE: Servlet jar files



You mean that you deploy servlets on customers 
machines? I'm not sure how easy it is to access files outside of the WAR file. I 
suspect you'd have to edit the tomcat.policy file to relax the security sandbox 
that servlets run it. Byd efault I don't think you can access anything outside 
the servlets web context. Alternatively you could deply the webapp unpacked 
(e.g. not use the WAR file). As far as I can see the only benifits of using a 
.WAR file is it looks a little neater, hides some of the internals and makes 
deployment a little easier.

sam

  - Original Message - 
  From: 
  Rida Ligurs 
  
  To: '[EMAIL PROTECTED]' 
  
  Sent: Wednesday, April 18, 2001 1:56 
  PM
  Subject: RE: Servlet jar files
  
  I was also thinking of using WAR files, but didn't know where 
  to put my properties files. I don't think I wan't them in the WAR 
  because the customer will need to edit them. Where should they 
  go?


Re: How to read property files?

2001-04-18 Thread Sam Newman

I suspect getResourceAsStream can only locate property files in your
classpath. You will probably have to search the classpath yourself to do it.
Check the sorucecode for getResourceAsStream (assuming its not in native
code) and see how its done

sam
- Original Message -
From: "Jim Willeke" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 18, 2001 2:25 PM
Subject: Re: How to read property files?


 Thanks, this helps me.
 I was wondering though, can you determine where it found the properties
 file at?
 Thanks.
 -jim

 Samson, Lyndon [IT] wrote:

  This works a treat for me
 
InputStream is =
this.getClass().getResourceAsStream("myapp.properties");
Properties p = new Properties();
try {
  p.load(is);
} catch ( java.io.IOException e ) {
  // Can't load props file
}
 
  That way the properties file can be anywhere in the classpath.
 
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, April 17, 2001 9:27 PM
  To: [EMAIL PROTECTED]
  Subject: How to read property files?
 
 
  I would like to put a myapp.properties file in the top level directory
  of my webapp. But I can't figure out what filepath to give the
  Properties.load() method in order to load my servlet property object.
  Can someone help me?
 
  Thanks
 
  =eas=
 
 
 





Re: How to read property files?

2001-04-18 Thread Sam Newman

You'll want to use getResource when your in a jar file. I've found the
safest way is just to know where the property file will be in relation to
the class loading it, and get the URL resource for the class itself. This
URL will differ for a class in a jar, but its still doable.

sam
- Original Message -
From: "Mark" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 18, 2001 3:08 PM
Subject: Re: How to read property files?


 
InputStream is =
 this.getClass().getResourceAsStream("myapp.properties");
Properties p = new Properties();
try {
  p.load(is);
} catch ( java.io.IOException e ) {
  // Can't load props file
}
 
  That way the properties file can be anywhere in the classpath.
 
 

 Have you tried doing this from a class inside a .jar file?   I have
 and it didn't work.







Re: Problem with connection pool

2001-04-18 Thread Sam Newman

I suspect that the servlet is trying to open aoscket or something to talk to
the other server to access the database? If so, the servlet security manager
may be stopping it. Make sure the security settings in tomcat.policy allow
you to open sockets for the servlet codebase.

sam
- Original Message -
From: "David DELGRANCHE" [EMAIL PROTECTED]
To: "Liste de diffusion TomCat (Adresse de messagerie)"
[EMAIL PROTECTED]
Sent: Wednesday, April 18, 2001 4:10 PM
Subject: Problem with connection pool


 Hi all,

 I'm using tomcat 3.2.1 with Apache. When I try running a servlet which
 makes an Oracle access, I have a 503 error telling me that it's impossible
 to create the connection pool.  My DB is on another server. Does this can
 be the problem? Does anyone already had this type of problem?
 thanks for help
 David.





Re: Accesslog in the style of Apache

2001-04-18 Thread Sam Newman

I think if you change the debug setting for the app in question and redirect
output of tomcat you should get this displayed. Try setting the debug level
to 9 and redirect the stdout and stderr of the tomcat process and have a
look. It might also go to a file in the tomcat/logs directory

sam
- Original Message -
From: "Jochen Wiedmann" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 18, 2001 3:14 PM
Subject: Accesslog in the style of Apache



 Hi,

 I would like to have some access logfile in the style of
 Apache's "AccessLog".

 More precise, I want a file where any request is logged
 in the following style:

   192.168.5.152 - - [17/Apr/2001:08:29:25 +0200] "GET
/tm/client/index.html
 HTTP/1.1" 200 1072
   192.168.5.152 - - [17/Apr/2001:08:29:25 +0200] "GET
/tm/client/format.css
 HTTP/1.1" 200 536
   192.168.5.171 - - [17/Apr/2001:08:43:53 +0200] "GET /tm/client HTTP/1.1"
 302 0

 However, I don't know how to do this with TomCat. Any hints?

 Thanks,

 Jochen





Sorry for double posting

2001-04-18 Thread Sam Newman

Our mailserver is currently playing up, and as a result is sometimes double
posting. I applogies for this and am currently trying to work out whats
wrong. How I wsh we could afford a system admin!

sam




Getting the query string in a tag handler

2001-04-18 Thread Sam Newman

Does anyone know how I can access the Query String in a tag handler? I can
access the context of the page, and frm this get a ServletRequest. However
the queryString is normally accessed from a HttpServletRequest, a
ServletRequest subclass. Do I jsut try casting the request I get to a
HttpServletRequest object and get the query string that way?

sam




Re: setting up tomcat and apache to run together

2001-04-18 Thread Sam Newman



The document you want to consult is the 
Tomcat-Apache howto which should be under the tomcat/doc directory of the tomcat 
install. Basically you end up including a file generated by tomcat in your 
apache's httpd.conf, and sticking mod)jk.so where apache can load it from (e.g. 
libexec). The online version of this doc is at:

http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/tomcat-apache-howto.html

Although your best of going straight 
to:

http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/mod_jk-howto.html

as the Tomcat-Apache how-to confuses things by 
saying "Don't use Jserv. Heres how you use Jserv"

sam

  - Original Message - 
  From: 
  Greg Chakmakian 
  
  To: [EMAIL PROTECTED] 
  
  Sent: Wednesday, April 18, 2001 4:48 
  PM
  Subject: setting up tomcat and apache to 
  run together
  
  Bear with me, I 
  know you all have probably already been through this one before. I have 
  Apache (for Darwin/Mac OS X) and Tomcat 3.2.1. They both run great by 
  themselves; apache on port 80 and tomcat on 8080. I want to setup the 
  two so that if I go to a jsp page on Apache it will use tomcat to process the 
  jsp pages; i.e - http://www.apache.org/test.jsp gets 
  processed by tomcat even though its being access through apache. I know 
  I can turn off apache and reconfigure tomcat so that it runs off of port 80, 
  but I would rather do it the other way. Like I said, I know this has 
  probably been discussed and I apologize for being repetitive. I couldn't 
  find any information on how to do this. Any help or direction you all 
  could give would be greatly appreciated.
  -gregHealantWeb 
  Developer[EMAIL PROTECTED][EMAIL PROTECTED]336-370-0604 
  x111 
  


Re: Getting the query string in a tag handler

2001-04-18 Thread Sam Newman

Its ok, I solved it. I just cast the ServletRequest from pageContext to a
HttpServletRequest

sam
- Original Message -
From: "Sam Newman" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 18, 2001 4:52 PM
Subject: Getting the query string in a tag handler


 Does anyone know how I can access the Query String in a tag handler? I can
 access the context of the page, and frm this get a ServletRequest. However
 the queryString is normally accessed from a HttpServletRequest, a
 ServletRequest subclass. Do I jsut try casting the request I get to a
 HttpServletRequest object and get the query string that way?

 sam





Re: Asking for an Opionio on Apache Tomcat or Just Apache

2001-04-17 Thread Sam Newman


 Please take a time to provide me with the following opinion. I spend some
 time configuring Tomcat and Apache. Because of deadline constaints and
the
 fact that some allready developed code has been devloped using only
Tomcat
 as standalone, the prototype team is focusing on just using Tomcat. Does
 anybody know if that approach is good? Personally I feel very reluctant
in
 following that approach, but I have to convence by team leader why Tomcat
by
 itself won't do the same work as Apache  Tomcat  together will.
 
 Any  opinions are wellcome

Beyond the fact that Apache will give you a wealth of options for
configuration, it serves static pages MUCH faster than tomcat. Once you get
SSL working with Apache, its pretty transparent to tomcat for example - your
servlets will use SSL without any extra work by yourself.

sam





Re: I need a working mod_jk.so for Linux

2001-04-17 Thread Sam Newman

Yowser! I have downloaded a version a few days back which works fine (from
apache.org). Do you want me to mail it to you?

sam
- Original Message -
From: "Farrell, Sarah" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 17, 2001 2:06 AM
Subject: I need a working mod_jk.so for Linux


 I have read in the email list archives that other people are having
problems
 with the mod_jk.so downloaded from apache.org for Linux.  When I use it in
 apache (in the httpd.conf file) I see the error below on apache startup:

 "Syntax error on line 240 of /usr/local/apache/conf/httpd.conf:
 API module structure `jk_module' in file
/usr/local/apache/libexec/mod_jk.so
 is garbled - perhaps this is not an Apache module DSO?
 /usr/local/apache/bin/apachectl start: httpd could not be started"






Re: Asking for an Opionio on Apache Tomcat or Just Apache

2001-04-17 Thread Sam Newman

Well, I have run my servlets over SSL. They use session tracking using the
HttpSession object and it works fine. I haven't had to change ANY
configuraation files at all.

sam
- Original Message -
From: "Christopher Kirk" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 17, 2001 8:33 AM
Subject: RE: Asking for an Opionio on Apache  Tomcat or Just Apache



 You said 'pretty transparent' to tomcat. Where is it not transparent?
 Specifically I am wondering about cookies, do cookies work with SSL at all
 or is it a possible configuration thing that has to be done correctly?

 - Chris.





Re: Apache-SSL or Mod-ssl

2001-04-17 Thread Sam Newman



Well, at the time I had been trying to use 
Apache-SSL, whci is the method for SSL mentioned in the tomcat docs so I assumed 
was the best one to use. Needless to say i cou;dnt get the sod to work. I tried 
using mod_ssl after finding that stronghold uses it. I got mod_ss l working so I 
guess I'll use that. As to why anyone would use strongolhd, the fact that 
itdoesn't involve rebulidng apache, and that it comes with commercial 
support will be enough for a lot of people. 

sam

  - Original Message - 
  From: 
  GOMEZ Henri 
  To: [EMAIL PROTECTED] 
  
  Sent: Tuesday, April 17, 2001 10:22 
  AM
  Subject: RE: Apache-SSL or Mod-ssl
  
  
  
I was wondering which is the prefered choice 
for work with servlets? I am having untold trouble getting Apache-SSL to 
work (built it, can't view a page without a seg fault). Whilst not a tomcat 
specific issue Apache-SSL is the mentioned way to get SSL working with 
tomcat. I've just tried RedHats Stronghold product (try www.c2.net) which gave be an out of the box SSL 
working Apache server (uses mod_ssl) in under 10 minutes. Getting tomcat to 
work with it hasn't been a problem either - well, hardly a problem (see my 
other post). Before I try and get my boss to buy stronghold, are there any 
issues I should be aware of with using mod_sll as opposed to 
Apache-SSL?

Why buy 
StrongHold ?
Just use apache 
and mod_ssl directly .

If you're 
running Redhat 7.0 (maybe also in the announced 7.1), mod_ssl is 
built-in.

You could also 
go to ftp://ftp.falsehope.com/home/gomez/apache/ 
and grab latest apache 1.3.19
for Redhat 7.0 
or ftp://ftp.falsehope.com/home/gomez/apache-mod_ssl/ 
for Redhat 6.x


Apache/Tomcat issue

2001-04-17 Thread Sam Newman

I mentioned this problem in an earlier post. I have some more information on
it now, so thought I'd see if anyone has some fresh ideas on the subject.
I have configured Apache to server Servlets using the ajpv13 protocol. This
works fine for the servlet examples. For my servlet however, netscape (4.6 
6) displays the sourcecode of the servlet as plain text rather than
rendering it. Accessing the servlet direct through tomcat displays the page
correctly. If I take the sourcecode of the page it couldn't render, and save
it into a file (eg. bob.html) netscape displays the page fine. MSIE has no
problems with the servlet. I'm guessing its something to do with the http
header I'm sending, but what?

Thanks in advance,

sam




Re: Apache-SSL or Mod-ssl

2001-04-17 Thread Sam Newman

for a lot of people.

 You didn't have to rebuild apache when using pre-packaged RPMs.

 http://www.falsehope.com/ftp-site/home/gomez/apache-mod_ssl/ for Redhat
6.x
 distrib

 http://www.falsehope.com/ftp-site/home/gomez/apache/ for Redhat 7.0 distro

 You'll see i386 RPMs :)

 Not to mention I build my Tomcat RPMs against these RPMs :)

Oh well, you live and learn :-)

We're deploying on SuSE 7.0 anyway. I prefer SuSE purely because:
a) you get shedloads of apps on the source cd's (less downloading)
b) yast is brilliant for admin stuff
c) They release new versions pretty frequently

sam




Re: Asking for an Opionio on Apache Tomcat or Just Apache

2001-04-17 Thread Sam Newman

HmmI thought the use of HttpSession worked independantly of cookies
settings? I assumed it is something very different to the Cookie object.
That said, I'll give it a go and let you know.

sam
- Original Message -
From: "Christopher Kirk" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 17, 2001 12:01 PM
Subject: RE: Asking for an Opionio on Apache  Tomcat or Just Apache



 Is that still the case if you disable cookies within a client?
 I find that Tomcat doesn't notice that cookies have been disabled and
won't
 rewrite the URL.. (this behaviour is only when I have SSL turned on at the
 Apache end).






Re: Newbie question with classpath and WEB-INF/lib and WEB-INF/classes

2001-04-17 Thread Sam Newman

You should just put the jar file in the lib directory
try doing it unpacked, so you have:

WEB-INF/classes - your servlets/jsp's
WEB-INF/lib - your jar

I'm not too hot on jsp's,but this works with servlets

sam
- Original Message -
From: "Chris Williams" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 17, 2001 1:51 PM
Subject: Newbie question with classpath and WEB-INF/lib and WEB-INF/classes


 I have Tomcat 3.2.1 running on Solaris and I have created a .war file
 containing my JSP's I want to execute.  My JSP's import some classes I
have
 create to help out with processing.  When I call my JSP, I get errors
saying
 my class isn't found for import.  I have tried including the jar'd version
 in both the lib and classes directory along with the uncompressed version
in
 both of those directories with no luck.  What am I missing???  Do I need
to
 add something to the web.xml file?  If I add the jar to another directory
 that is already in the classpath it works fine.  Please help me...
 Thanks
 Chris





Re: Asking for an Opionio on Apache Tomcat or Just Apache

2001-04-17 Thread Sam Newman

There are some issues depending on the protocol you are using. Apparently
ajpv12 couldn't correctly determine which mechanism was being used. Are you
using ajpv13? Also, check the config settings for SSL in the server.xml.

sam
- Original Message -
From: "Christopher Kirk" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 17, 2001 1:59 PM
Subject: RE: Asking for an Opionio on Apache  Tomcat or Just Apache



 Many thanx, I'll be very interested in your results.

 My impressions of things is that HttpSession works on session ids. That
 session id either comes from a cookie or a http GET paremeter.. The code

 servletResponse.encodeURL(url);

 is required to make the switch between the two different mechanisms. I
find
 that under my current setup with Apache/Tomcat/SSL, the encodeURL method
 makes the wrong choice when the browser has had its cookies disabled.

 - Chris.






Re: include a file in a servlet

2001-04-17 Thread Sam Newman

Do you mean include the contents of a file as a string? 


- Original Message - 
From: "Georges Boutros" [EMAIL PROTECTED]
To: "Tomcat (E-mail)" [EMAIL PROTECTED]
Sent: Tuesday, April 17, 2001 2:46 PM
Subject: include a file in a servlet


 hi,
 
 i wanna know how can i include a jsp or html file in a servlet 
 
 thanks
 
 Georges
 




Re: WAR deployment

2001-04-17 Thread Sam Newman

Thrid party libs and the like should be in WEB-INF\lib. Tomcats classloader
will automatically pick up and load these jars.
Your webapps classes should indeed be in WEB-INF\classes.

sam
- Original Message -
From: "Jim Willeke" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 17, 2001 3:45 PM
Subject: Re: WAR deployment


 But where do you findout what should/could be in this file?
 If I look at the examples.war file, it appears to contain all that is in
 the:
   \webapps\examples\WEB-INF\classes

 Is this typical or redundent?

 My specific issue is I can not find where to place "common" lib files
 that can be found by the a servlet. Even if it is placed in the:
\webapps\examples\WEB-INF\classes
 I continue to get an error that the class can not be found even though
 there is a jar file in this directory that contains the file AND the JVM
 has a classpath that includes the jar file.
 Any help or pointers to some docs as to howw this is all supposed to go
 together would be great!
 -jim






Re: Asking for an Opionio on Apache Tomcat or Just Apache

2001-04-17 Thread Sam Newman

have you edited the Apache directive for the default filex? Search for
index.html or index.htm in httpd.conf and try adding index.jsp. Apache
doesn't automatically look for any file called index - you need to
explicitly tell it what files to load as defaults. If this doesn't work but
typing in the index.jsp explicitly does, I'd guess is a problem with the
ajpv13 connector (or which ever one you are using).

sam
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 17, 2001 4:06 PM
Subject: Re: Asking for an Opionio on Apache  Tomcat or Just Apache





 I have tomcat running within apache. This was recommended by the user
guide for
 performance reasons. I'm wondering if running tomcat within apache has
anything
 to do with why I can't serve index.jsp as a default file for my
application
 directories. Do I have to anything on the apache end?

 Thanks.






Re: Followup: WAR deployment with JSP's

2001-04-17 Thread Sam Newman

3rd party libs (e.g. xml parsers etc) should be placed in the WEB-INF/lib
directory. But this is valid jar files, not simple classes. If you have your
own classes, or even other peoples, unpacked and not in a jar form, put them
in WEB-INF/classes (remembering to mirror thier package in the directory
structure under classes).

So if I had a support class call com.mycomp.UserValidator.class, I would put
it in WEB-INF/classes/com/mycomp/. If I had a jar file I use called
validator.jar, it would be in WEB-INF/lib

Hope this helps,

sam
- Original Message -
From: "Chris Williams" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 17, 2001 4:52 PM
Subject: Followup: WAR deployment with JSP's


 I keep seeing in these posts that any support classes should be jar'd up
and
 placed in the lib directory under WEB-INF.  Does the jsp engine also look
 there??  I keep getting errors when processing my jsp saying it can't load
 the class.  Should this setup work???
 Thanks
 Chris





Re: Asking for an Opionio on Apache Tomcat or Just Apache

2001-04-17 Thread Sam Newman


- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, April 17, 2001 4:56 PM
Subject: RE: Asking for an Opionio on Apache  Tomcat or Just Apache




 Thanks. It's still not working. I get a 404 error now when I go to my
 application directory (http://mysite.com/myapp/).
 I also get a 404 error when I type in the full path
 (http://mysite.com/myapp/index.jsp).
 myapp is a virtual directory. The physical path is something along the
lines of
 /users/me/myapp/

 Any help would be appreciated. Thx.

It sounds then like apache is not correctly serving jsp files then, or else
your trying the wrong URL. I take it the jsp works fine directly with
tomcat? If so, and assuming you are using mod_jk (please say you are!)
simply including the mod_jk.conf-auto generated by tomcat in httpd.conf
should get you started. try the Tomcat-Apahe howto, and the mod_jk howto
included in the tomcat distro

HTH,

sam




Re: question about CLASSPATH

2001-04-17 Thread Sam Newman



Tomcats special classloader should only access 
classes for each webapp under your webapp directory. You don't have to worry 
about classes in webapps/bob/WEB-INF/classes picking up 
webapps/fred/WEB-INF/classes for example.

sam

  - Original Message - 
  From: 
  Kresimir (Binsco) 
  
  To: [EMAIL PROTECTED] 
  
  Sent: Tuesday, April 17, 2001 5:37 
  PM
  Subject: question about CLASSPATH
  
  When setting up different applications in server.xml for an 
  instance of tomcat,
  is there a way to setup different CLASSPATH for each 
  application?
  Is there are way to setup CLASSPATH to be "application" 
  specific.
  For example, if I have two different 
  applications
  
  .../jakarta-tomcat/webapps/prod... and
  .../jakarta-tomcat/webapps/test... 
  
  Can I have tomcat use different CLASSPATH for 
  each.
  For example, if beyond these directories I have a 
  packages:
  .../jakarta-tomcat/webapps/prod/WEB-INF/classes/package
  .../jakarta-tomcat/webapps/test/WEB-INF/classes/package
  
  and my classes in package are the same, just different 
  versions (like test and prod instances)
  how can I make tomcat to use classes from 
  /prod/...package
  when I use URL:
  http://something/prod/jsp1.jsp - use 
  classes from prod/.../package and
  http://something/test/jsp1.jsp - use 
  classes from test/...package
  
  Assuming that in my classes (all of them) I use the same 
  import,
  import package.*
  
  Please help...
  Thanks.
  


Apache-SSL or Mod-ssl

2001-04-16 Thread Sam Newman



I was wondering which is the prefered choice for 
work with servlets? I am having untold trouble getting Apache-SSL to work (built 
it, can't view a page without a seg fault). Whilst not a tomcat specific issue 
Apache-SSL is the mentioned way to get SSL working with tomcat. I've just tried 
RedHats Stronghold product (try www.c2.net) 
which gave be an out of the box SSL working Apache server (uses mod_ssl) in 
under 10 minutes. Getting tomcat to work with it hasn't been a problem either - 
well, hardly a problem (see my other post). Before I try and get my boss to buy 
stronghold, are there any issues I should be aware of with using mod_sll as 
opposed to Apache-SSL?

sam


Apache/Tomcat integration issues

2001-04-16 Thread Sam Newman



I've just followed the instructions to get Apache 
and Tomcat working together. I editied the workers.properties file (which by the 
way seems to assume you are on a win32 platform!) and the server.xml to include 
the ajpv13 protocol connector. Apache includes tomcats autogenerated config file 
and everything works fine - I can see and execute all the example code. I 
basically have two problems however:

1.) The autogenerated conf file for mod_jk makes no 
reference of ajpv13, which I assumed is the prefered protocol. The only place I 
can see to make ajpv13 the default is for JServ. I obviously would like to avoid 
editing httpd.conf by hand and would rather tomcat generated the file using 
ajpv13 as the default - is it simply a matter of inserting a directive in the 
servler.xml? I appreciate that not everyone will choose to use ajpv13, but if 
its explicitly referenced in the server.xml, couldn't it be put in? What do I 
loose by not using ajpv13 (apart from performance)?

2.) When displaying one of my login servlets (a 
simple form forwarding requests to another servlet) via apache (over standard 
http or https) under netscape on a linux box, I get displayed the source code 
for the page (e.g. the plain text html) rather than the rendered page. Accessing 
the page via the tomcat port solves this. MSIE on my laptop can view the page 
fine - either via http or https. If it was a problem with the format of html i 
would of expected the tomcat served page to likewise display the html 
sourcecode. Any ideas?

Thanks in advance,

sam newman

p.s. I'm tempted to buy redhat's strongohld out of 
my own pocket rather than spend another week of hell getting SSL working 
myself!




  1   2   >