Re: Help Needed to configure servlets

2002-10-25 Thread Kwok Peng Tuck
Just deploy your .war file as AppDir  so you will have
http://covington:8080/AppDir/*.jsp or servlets
The .war file should be put under the {CATALINA_HOME}/webapps/
It will be autodeployed when tomcat is restarted. Or you can use the 
webapp manager.
Again, read the docs on how to use the webapp manager. There is even a 
tutorial on how to deploy a sample webapp with the docs.

Anitha K Rao wrote:

Yes, but i want it under a directory called AppDir,
which i need not under examples directory.
Where do i configure this??




- Original Message -
From: "Kwok Peng Tuck" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Friday, October 25, 2002 12:18 PM
Subject: Re: Help Needed to configure servlets


 

The classes go under WEB-INF , either under classes (if they are .class
& don't forget their package if they have any), or the directory lib if
they are jars.
Define your servlet in the web.xml of your web application. How? It's in
the tomcat documentation as well as the examples that came with tomcat.

Anitha K Rao wrote:

   

Hello,

I'm Anitha, working on JSP/Servlet.
In simple sentence...
I want to create a Directory called "AppDir" under webapps.
Then i need to configure my servlets.
The Directory Structure looks like this..

webapps
 --- AppDir -  JSP file
  --- Web-inf   - web.xml file
-- classes - My Servlet Class files

http://localhost:port/AppDir/

does not display the servlet.

Kindly help me out as to where I need to configure the servlet,
 

Application
 

Directory
with example code or a web site to help me run the servlets.

Thank you
Regards
Anitha



--
To unsubscribe, e-mail:
 


 

For additional commands, e-mail:
 


 



 


--
To unsubscribe, e-mail:
   


 

For additional commands, e-mail:
   


 

   



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Missing optional package Extension...

2002-10-25 Thread Eung-ju Park
I put all required jars to WEB-INF/lib. but tomcat says missing optional
packages.
excalibur-container.jar require avalon-framework extension package. I have
all required packages.
WEB-INF/lib is incorrect place for optional packages?
Why tomcat throws exception for just optional package? I don't know about
Optional Extension Package specification.

--- catalina_log ---
Catalina.start: LifecycleException:  Missing optional package
Extension[avalon-f
ramework, implementationVersion=4.1.3, specificationVersion=1.0]
LifecycleException:  Missing optional package Extension[avalon-framework,
implem
entationVersion=4.1.3, specificationVersion=1.0]
>...at
org.apache.catalina.loader.WebappLoader.validatePackages(WebappLoader
.java:1317)
>...at
org.apache.catalina.loader.WebappLoader.start(WebappLoader.java:682)
>...at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3
456)
>...at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
>...at
org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
>...at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
>...at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347
)
>...at
org.apache.catalina.core.StandardService.start(StandardService.java:4
97)


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Help to Configure Apache and Tomcat to use mod_jk!

2002-10-25 Thread Hai To Thanh
 Hi, 
 I get trouble when I try to make communication
between Tomcat and Apache. I follow following steps:
   1, I get mod_jk.so.
   2, To Configure Apache using mod_jk:
  I put the following include directive at the end
of your Apache httpd.conf file: 
  "Include /usr/local/jakarta- 
tomcat/conf/jk/mod_jk.conf".
   3, To Configuring Tomcat:
  I add the following block to your 
TOMCAT_HOME/conf/server.xml file 
   "".

 But When I type:
   #./httpd start
to start Apache Web Server then I get following error:
 
 "Starting httpd: Systax error on line 7 of
/usr/local/src/jakarta-tomcat-4.1.12/conf/auto/mod_jk.conf:
  invalid command "JkWorkersFile", perhaps mis-spelled
of defined by a module not include in the server
configuration.

Help me!



__
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




how do I invoke servlet from a servlet in different web application?

2002-10-25 Thread Jason Novotny

Hi,

   I would like to know how I can invoke a servlet in one web 
application from a servlet in another web application? Also, how would I 
do this if the other servlet is hosted in another servlet container on 
another machine?

   My goal is to provide a web application framework that other web 
applications can plug into, so that I can re-deploy the secondary web 
application while still running my main framework servlet. What are the 
potential security/performance issues associated with this?

   Finally, I see that server.xml has an option to allow for the 
reloading of web applications whose servlet classes/JSP's have changed. 
However this may be to resource consumptive on a production server-- is 
there any way I can send an "admin" command to reload servlets whose 
timestamp has changed (push rather than pull model)?

   Thanks for the help, Jason



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



Tomcat autostart on Linux

2002-10-25 Thread neal
Anyone know how to make Tomcat automatically startup when Linux is rebooted?

As you can probably tell I'm not a Linux expert.  :(

Thanks.
Neal

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: how do I invoke servlet from a servlet in different web application?

2002-10-25 Thread Anthony Geoghegan
You could try a client-side redirect.

response.sendRedirect(..URL..);

Best Regards,
Anthony Geoghegan.
J2EE Developer
CPS Ireland Ltd.
- Original Message -
From: "Jason Novotny" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, October 25, 2002 10:05 AM
Subject: how do I invoke servlet from a servlet in different web
application?


>
> Hi,
>
> I would like to know how I can invoke a servlet in one web
> application from a servlet in another web application? Also, how would I
> do this if the other servlet is hosted in another servlet container on
> another machine?
>
> My goal is to provide a web application framework that other web
> applications can plug into, so that I can re-deploy the secondary web
> application while still running my main framework servlet. What are the
> potential security/performance issues associated with this?
>
> Finally, I see that server.xml has an option to allow for the
> reloading of web applications whose servlet classes/JSP's have changed.
> However this may be to resource consumptive on a production server-- is
> there any way I can send an "admin" command to reload servlets whose
> timestamp has changed (push rather than pull model)?
>
> Thanks for the help, Jason
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Tomcat autostart on Linux

2002-10-25 Thread Mr. Cristian Romanescu
It depends on how it's installed, also Linux distro

If you have RedHat and istalled via rpm distro, you should have in 
/etc/init.d/ a script named tomcat4 that launches Tomcat @ statup.

 4 -rwxr-xr-x1 root root 3055 Mar  4  2002 tomcat4

(I'm not also a linux expert, but I suppose that should be marked 
executable.

also you can stop/start manually invoking
/etc/init.d/tomcat4 

Here's a quick'n paste solution

--
#!/bin/sh
#
# Startup script for Tomcat 4.0, the Apache Servlet Engine
#
# chkconfig: 345 80 20
# description: Tomcat 4.0 is the Apache Servlet Engine RI for Servlet 
2.3/JSP 1.2
# processname: tomcat
# pidfile: /var/run/tomcat4.pid
# config:  /etc/tomcat4/conf/tomcat4.conf
#
# Gomez Henri <[EMAIL PROTECTED]>
# Keith Irwin <[EMAIL PROTECTED]>
# Nicolas Mailhot <[EMAIL PROTECTED]>
#
# version 1.02 - Removed initlog support
# version 1.03 - Removed config:
# version 1.04 - tomcat will start before httpd and stop after httpd
# version 1.05 - jdk hardcoded to link /usr/java/jdk and tomcat runs as 
"nobody"
# version 1.06 - split up into script and config file
# version 1.07 - Rework from Nicolas ideas
# version 1.08 - Fix work dir permission at start time, switch to use 
tomcat4
# version 1.09 - Fix pidfile and config tags
# version 1.10 - Fallback to su direct use on systems without 
Redhat/Mandrake init.d functions
# version 1.11 - Fix webapps dir permissions
#

# Source function library.
if [ -x /etc/rc.d/init.d/functions ]; then
. /etc/rc.d/init.d/functions
fi

# Get Tomcat config

TOMCAT_CFG="/etc/tomcat4/conf/tomcat4.conf"

[ -r "$TOMCAT_CFG" ] && . "${TOMCAT_CFG}"

# Path to the tomcat launch script (direct don't use wrapper)
TOMCAT_SCRIPT=/usr/bin/dtomcat4

# Tomcat name :)
TOMCAT_PROG=tomcat4

# if TOMCAT_USER is not set, use tomcat4 like Apache HTTP server
if [ -z "$TOMCAT_USER" ]; then
TOMCAT_USER="tomcat4"
fi

# Since the daemon function will sandbox $tomcat
# no environment stuff should be defined here anymore.
# Please use the /etc/tomcat.conf file instead ; it will
# be read by the $tomcat script

RETVAL=0

# See how we were called.
start() {
echo -n "Starting $TOMCAT_PROG: "

chown -R $TOMCAT_USER:$TOMCAT_USER $CATALINA_HOME/logs
chown -R $TOMCAT_USER:$TOMCAT_USER $CATALINA_HOME/work
chown -R $TOMCAT_USER:$TOMCAT_USER $CATALINA_TMPDIR
chown -R $TOMCAT_USER:$TOMCAT_USER $CATALINA_HOME/webapps

if [ -x /etc/rc.d/init.d/functions ]; then
daemon --user $TOMCAT_USER $TOMCAT_SCRIPT start
else
su - $TOMCAT_USER -c "$TOMCAT_SCRIPT start"
fi

RETVAL=$?
echo
[ $RETVAL = 0 ] && touch /var/lock/subsys/tomcat4
return $RETVAL
}

stop() {
echo -n "Stopping $TOMCAT_PROG: "
if [ -x /etc/rc.d/init.d/functions ]; then
daemon --user $TOMCAT_USER $TOMCAT_SCRIPT stop
else
su - $TOMCAT_USER -c "$TOMCAT_SCRIPT stop"
fi
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/tomcat4 /var/run/tomcat4.pid
}


# See how we were called.
case "$1" in
  start)
start
;;
  stop)
stop
;;
  restart)
stop
# Ugly hack
# We should really make sure tomcat
# is stopped before leaving stop
sleep 2
start
;;
  condrestart)
if [ -f /var/run/tomcat4.pid ] ; then
stop
start
fi
;;
  *)
echo "Usage: $TOMCAT_PROG {start|stop|restart|condrestart}"
exit 1
esac

exit
--



neal wrote:

Anyone know how to make Tomcat automatically startup when Linux is 
rebooted?

As you can probably tell I'm not a Linux expert.  :(

Thanks.
Neal

--
To unsubscribe, e-mail:
For additional commands, e-mail:



--
Cristian D. Romanescu
alternative: cristian at qdrei.de
mobile : +40745133096

--- "Pauca sed matura" - Gauss' motto ---


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Tomcat autostart on Linux

2002-10-25 Thread Kwok Peng Tuck
Or you could take  the rpm script and configure for you tomcat location.
make sure  add the script using chkconfig.

neal wrote:


Anyone know how to make Tomcat automatically startup when Linux is rebooted?

As you can probably tell I'm not a Linux expert.  :(

Thanks.
Neal

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Tomcat autostart on Linux

2002-10-25 Thread neal
Cool thanks!  :)

Neal

-Original Message-
From: Kwok Peng Tuck [mailto:pengtuck@;makmal.com]
Sent: Friday, October 25, 2002 1:47 AM
To: Tomcat Users List
Subject: Re: Tomcat autostart on Linux


Or you could take  the rpm script and configure for you tomcat location.
make sure  add the script using chkconfig.

neal wrote:

>Anyone know how to make Tomcat automatically startup when Linux is
rebooted?
>
>As you can probably tell I'm not a Linux expert.  :(
>
>Thanks.
>Neal
>
>--
>To unsubscribe, e-mail:

>For additional commands, e-mail:

>
>
>
>



--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: linux tomcat startup prob

2002-10-25 Thread sonam singh
u can use find or it should bi in the tomcat_home/bin 
regards
Sonam Singh
[EMAIL PROTECTED]

--- maninder s batth <[EMAIL PROTECTED]>
wrote:
> hii am new to linux. i installed tomcat but 4.1.12
> and the docs 
> mentioned there would be
> startup.sh and shutdown.sh in $CATALINA_HOME/bin ,
> all i found was 3 jar 
> files :'-(
> where are those files..anyone??
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: where to put servlet classes

2002-10-25 Thread sonam singh

--- "Kennedy, Ed" <[EMAIL PROTECTED]> wrote:
> I am a new Tomcat user and I am having trouble
> accessing my servlet classes.
> I am getting the following error:
> 
> "The requested resource (/servlets/authenticate.jsp)
> is not available"
> 
> Any help you can give would be appreciated.
> 
> Thanks
> 
>  Background info #
> 
> I have the directory structure that looks correct...
>  app
>  app\login
>  app\login\login.jsp
>  app\WEB-INF
>  app\WEB-INF\web.xml
>  app\WEB-INF\classes
>  app\WEB-INF\classes\authenticateUser.class
> 
> Then in my web.xml file I have:
> 
> 
> 
>   
>   
> authenticateUser
> authenticateUser
>   
> 
>   
> authenticateUser
>
>
/servlets/authenticateUser

it should be /xyz
and u can access this servlet like 
http://IP/app/xyz
or without url mapping
http://IP/app/servlet/authenticateUser

regards
Sonam Singh
[EMAIL PROTECTED]







>   
> 


> 
> 
> Then in my jsp code I have:
> 
>  method="post">
>   USERNAME :  size="25">
>   
>   PASSWORD :  size="25">
>   
>  type="reset"
> value="CLEAR">
> /form>
> 


__
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Tomcat's connection pooling

2002-10-25 Thread sonam singh

--- "Shapira, Yoav" <[EMAIL PROTECTED]> wrote:
> Hi,
> One of the main points of connection pooling is to
> bound the number of connections you have.  It's a
> bad design to define a connection pool that doesn't
> meet expected loads.  If you know your app will need
> 10 connections concurrently, define 10 as maxActive.
>  Don't define 5 and ask it to grow ;)
> 
u can create u'r own connection pooling independent of
application specific using singleton class.which will
satisfy u'r need . if u need how to do this mail me in
below mailid
regards
Sonam Singh
[EMAIL PROTECTED]

> Yoav Shapira
> Millennium ChemInformatics
> 
> 
> >-Original Message-
> >From: Cristiano Moreira Silva
> [mailto:crisbrsp@;yahoo.com.br]
> >Sent: Thursday, October 24, 2002 8:24 AM
> >To: [EMAIL PROTECTED]
> >Subject: Tomcat's connection pooling
> >
> >Hello. I've installed and tested successfully an
> >example of JDBC access using the Tomcat's
> >connection pooling (JNDI + Datasource), showed at
>
>http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-
> >howto.html.However,
> >I've some doubts...
> >I'd like to know if in Tomcat's connection pooling
> I
> >can increase the number of
> >connections if it hasn't anyone available. You know
> >that in my server.xml I set
> >three important parameters:
> ># maxActive - The maximum number of active
> instances
> >that can be allocated from this pool at the same
> time.
> ># maxIdle - The maximum number of connections that
> can
> >sit idle in this pool at the same time.
> ># maxWait - The maximum number of milliseconds that
> >the pool will wait (when there are no available
> >connections) for a connection to be returned before
> >throwing an exception.
> >When I've seen the parameter maxWait, I've
> understood
> >that the Tomcat's Connection Pooling doesn't create
> >more connections if there are no
> >more available. Is that true or not?
> >Thanks in advance.
> >
> >
> >=
>
>
> >Cristiano Moreira Silva
> >Site - http://computologo.vila.bol.com.br
> >E-mail - [EMAIL PROTECTED]
> >"Tudo posso nAquele que me fortalece." Fp. 4:13
> >
>
>___
> >Yahoo! GeoCities
> >Tudo para criar o seu site: ferramentas fáceis de
> usar, espaço de sobra e
> >acessórios.
> >http://br.geocities.yahoo.com/
> >
> >--
> >To unsubscribe, e-mail:    >[EMAIL PROTECTED]>
> >For additional commands, e-mail:
>  >[EMAIL PROTECTED]>
> 
> > This e-mail, including any attachments, is a
> confidential business communication, and may contain
> information that is confidential, proprietary and/or
> privileged.  This e-mail is intended only for the
> individual(s) to whom it is addressed, and may not
> be saved, copied, printed, disclosed or used by
> anyone else.  If you are not the(an) intended
> recipient, please immediately delete this e-mail
> from your computer system and notify the sender. 
> Thank you.
> 
> > --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:



__
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




tomcat4.1/apache2

2002-10-25 Thread james
Hi,

I have the following setup using a normal socket connector config :
Redhat 8
Apache 2.0.43
Tomcat 4.1.12
mod_jk2-2.0.43.so
jkjni-2.0.so

Questions:

What are the difference between the normal socket, AF unix, and JNI?
Pros/cons when to use or when not to use? I didn't see any info on this on
the jakarta site. Any pointers?
Also, I'd tried setting up the Apache/Tomcat using the JNI method but they
didn't seem to talk to each other - I followed the config examples given
on the jk2 tomcat site
(http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/index.html). What is
wrong?
Thanks, James







--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




plz help, I cannot determine why this is not working????

2002-10-25 Thread Edmund Smith
I have so far tried many times to make a program work at another location. Now I am 
totally lost for ideas. 
The program works at home but when I try it in a networked computer everything fails. 
I do not know why. 
I would be grateful if someone would look at my code and test it. Please reply to me 
here so that I could perhaps send the code. 
I would be eternally grateful.
Thank you in advance. 
Here is the error, which I get only at the deployment location: 
Error: 500
Location: /myJSPs/jsp/portal-project/processviewfiles_dir.jsp
Internal Servlet Error: 
javax.servlet.ServletException
at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:460)
at 
jsp.portal_0002dproject.processviewfiles_dir_4._jspService(processviewfiles_dir_4.java:163)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
at org.apache.tomcat.core.Handler.service(Handler.java:235)
at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
at 
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
at java.lang.Thread.run(Thread.java:536)
Root cause:
java.lang.NullPointerException
at 
jsp.portal_0002dproject.processviewfiles_dir_4._jspService(processviewfiles_dir_4.java:133)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
at org.apache.tomcat.core.Handler.service(Handler.java:235)
at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
at 
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
at java.lang.Thread.run(Thread.java:536) 




-
Get a bigger mailbox -- choose a size that fits your needs.



tomcat 4.1.12 compilation error

2002-10-25 Thread Nirav . Shah
Dear All,

I am just newbie for tomcat 4.1.12 version. Recently I have installed it on
my NT Server. Now I have a problem to access classes through JSP files of
my Application.

Following is the structure of my application

webapps\myapp\*.jsp
webapps\myapp\WEB-INF\classes\*.class

Following is the error which I am getting.

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

An error occurred at line: 1 in the jsp file: /checklogin.jsp

Generated servlet error:
[javac] Compiling 1 source file

D:\Tomcat 4.1\work\Standalone\localhost\opt\checklogin_jsp.java:44: cannot
resolve symbol
symbol  : class Login
location: class org.apache.jsp.checklogin_jsp
  Login log = null;
  ^



An error occurred at line: 1 in the jsp file: /checklogin.jsp

Generated servlet error:
D:\Tomcat 4.1\work\Standalone\localhost\opt\checklogin_jsp.java:46: cannot
resolve symbol
symbol  : class Login
location: class org.apache.jsp.checklogin_jsp
log = (Login) pageContext.getAttribute("log",
PageContext.SESSION_SCOPE);



The same structure was working fine in tomcat 3.x version.

Thanks in advance :)

Rgds
Nirav






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: plz help, I cannot determine why this is not working????

2002-10-25 Thread Mr. Cristian Romanescu
In my oppinion it's your application fault and not Tomcat's. It would be 
helpful to send the code snippet from place where your code throws 
NullPointer...

But first you should try to put some System.outs. out there and see 
where the code hangs...as that exception doesn't give (me) a clue about 
what's happening..


regards,
cristian.




Edmund Smith wrote:

I have so far tried many times to make a program work at another 
location. Now I am totally lost for ideas.
The program works at home but when I try it in a networked computer 
everything fails. I do not know why.
I would be grateful if someone would look at my code and test it. 
Please reply to me here so that I could perhaps send the code.
I would be eternally grateful.
Thank you in advance.
Here is the error, which I get only at the deployment location:
Error: 500
Location: /myJSPs/jsp/portal-project/processviewfiles_dir.jsp
Internal Servlet Error:
javax.servlet.ServletException
at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:460)
at 
jsp.portal_0002dproject.processviewfiles_dir_4._jspService(processviewfiles_dir_4.java:163)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at 
org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
at org.apache.tomcat.core.Handler.service(Handler.java:235)
at 
org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
at 
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
at java.lang.Thread.run(Thread.java:536)
Root cause:
java.lang.NullPointerException
at 
jsp.portal_0002dproject.processviewfiles_dir_4._jspService(processviewfiles_dir_4.java:133)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at 
org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
at org.apache.tomcat.core.Handler.service(Handler.java:235)
at 
org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
at 
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
at java.lang.Thread.run(Thread.java:536)




-
Get a bigger mailbox -- choose a size that fits your needs.



--
Cristian D. Romanescu
alternative: cristian at qdrei.de
mobile : +40745133096

--- "Pauca sed matura" - Gauss' motto ---


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: tomcat 4.1.12 compilation error

2002-10-25 Thread Tim Funk
Put your custom java classes in a package and recompile.

Old class: Login
New class: fooPackage.Login
New location: webapps\myapp\WEB-INF\classes\fooPackage\Login.class

Tomcat 4 doesn't looking for classes without a package.

[EMAIL PROTECTED] wrote:

Dear All,

I am just newbie for tomcat 4.1.12 version. Recently I have installed it on
my NT Server. Now I have a problem to access classes through JSP files of
my Application.

Following is the structure of my application

webapps\myapp\*.jsp
webapps\myapp\WEB-INF\classes\*.class

Following is the error which I am getting.

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

An error occurred at line: 1 in the jsp file: /checklogin.jsp

Generated servlet error:
[javac] Compiling 1 source file

D:\Tomcat 4.1\work\Standalone\localhost\opt\checklogin_jsp.java:44: cannot
resolve symbol
symbol  : class Login
location: class org.apache.jsp.checklogin_jsp
  Login log = null;
  ^



An error occurred at line: 1 in the jsp file: /checklogin.jsp

Generated servlet error:
D:\Tomcat 4.1\work\Standalone\localhost\opt\checklogin_jsp.java:46: cannot
resolve symbol
symbol  : class Login
location: class org.apache.jsp.checklogin_jsp
log = (Login) pageContext.getAttribute("log",
PageContext.SESSION_SCOPE);



The same structure was working fine in tomcat 3.x version.

Thanks in advance :)

Rgds
Nirav



 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: plz help, I cannot determine why this is not working????

2002-10-25 Thread Ralph Einfeldt
Have a look in the generated java file in the 
work directory that caused this exception 
(processviewfiles_dir_4.java) to find the 
corresponding location in your jsp.

If you don't see the error post the code 
around that line.

> -Original Message-
> From: Edmund Smith [mailto:edmund_b_smith@;yahoo.co.uk]
> Sent: Friday, October 25, 2002 12:43 PM
> To: [EMAIL PROTECTED]
> Subject: plz help, I cannot determine why this is not working
> 
> Root cause:
> java.lang.NullPointerException at 
> jsp.portal_0002dproject.processviewfiles_dir_4._jspService(pro
> cessviewfiles_dir_4.java:133)

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: plz help, I cannot determine why this is not working????

2002-10-25 Thread Tim Funk
See ...
> Root cause:
> java.lang.NullPointerException
> at 
jsp.portal_0002dproject.processviewfiles_dir_4._jspService(processviewfiles_dir_4.java:133)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)

You are getting a java.lang.NullPointerException

Look for processviewfiles_dir_4.java line 133 - there is a NPE being 
thrown here. Why .. don't know.


Edmund Smith wrote:
I have so far tried many times to make a program work at another location. Now I am totally lost for ideas. 
The program works at home but when I try it in a networked computer everything fails. I do not know why. 
I would be grateful if someone would look at my code and test it. Please reply to me here so that I could perhaps send the code. 
I would be eternally grateful.
Thank you in advance. 
Here is the error, which I get only at the deployment location: 
Error: 500
Location: /myJSPs/jsp/portal-project/processviewfiles_dir.jsp
Internal Servlet Error: 
javax.servlet.ServletException
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:460)
at jsp.portal_0002dproject.processviewfiles_dir_4._jspService(processviewfiles_dir_4.java:163)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
at org.apache.tomcat.core.Handler.service(Handler.java:235)
at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
at java.lang.Thread.run(Thread.java:536)
Root cause:
java.lang.NullPointerException
at jsp.portal_0002dproject.processviewfiles_dir_4._jspService(processviewfiles_dir_4.java:133)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
at org.apache.tomcat.core.Handler.service(Handler.java:235)
at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
at java.lang.Thread.run(Thread.java:536) 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




HttpProcessor not recycling connections / bug 5181 ?

2002-10-25 Thread Graham King
	Dear all,

 I'm running Tomcat 4.0.3 with Java 1.4 on Linux, and we are getting lots of 'IOException: 
Connection reset by peer' (see stack trace at bottom of mail), which I understand is the user 
hitting 'stop' or closing the window before the load completes.

After several hours of running our server will run out of request processors (well actually we put 
maxProcessors at 1024 so the site falls over with 'OutOfMemoryError: unable to create native thread' 
but that's just whilst we try and fix this).

I believe this is because StandardWrapperValve is catching the IOException, so it never gets back up 
to HttpProcessor, so the processor never gets recycled.

I saw in a comment right at the bottom of here 
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5181 that this is fixed in 4.0.4b1, but I could 
not find any other information about that in the release notes, bugzilla or mail list archives.

 We can't use the 4.1.X branch because we symlink to content outside the webapp directory and the 
allowLinking doesn't work for us (in 4.1.12 at least).

 So what I am asking is:

 - Does anyone know of a recorded problem with recycling processors in 4.0.3 and if so is this 
definately fixed in later versions of 4.0.X ?
 And:
 - Has anyone else experienced something like this and is my analysis way off mark ?

 Many thanks,
 Graham.


Stack trace:

2002-10-25 11:57:25 StandardWrapperValve[default]: Servlet.service() for servlet default threw exception
java.io.IOException: Connection reset by peer
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:126)
at org.apache.catalina.connector.ResponseBase.flushBuffer(Unknown Source)
at org.apache.catalina.connector.HttpResponseBase.flushBuffer(Unknown Source)
at org.apache.catalina.connector.ResponseBase.write(Unknown Source)
at org.apache.catalina.connector.ResponseStream.write(Unknown Source)
at org.apache.catalina.connector.http.HttpResponseStream.write(Unknown Source)
at org.apache.catalina.servlets.DefaultServlet.copyRange(Unknown Source)
at org.apache.catalina.servlets.DefaultServlet.copy(Unknown Source)
at org.apache.catalina.servlets.DefaultServlet.serveResource(Unknown Source)
at org.apache.catalina.servlets.DefaultServlet.doGet(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
at com.gocontent.servlet.GCSecurityFilter.doFilter(GCSecurityFilter.java:97)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)<-- Catches 
the exception
at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
at org.apache.catalina.valves.CertificatesValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
at org.apache.catalina.valves.AccessLogValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBa

tomcat or java problem?

2002-10-25 Thread chad kellerman
Hello,

I am running tomcat 4.0.X with Java 1.4.1. on a red hat 6.2 apache
1.3.x.

 I am using the WarpConnector to allow tomcat and apache to
communicate and for Virtual Hosts.  I have a few ( about 16) Virtual
Hosts on the box.

 What I am noticing is that when tomcat starts and the warp
connection gets estatblished by localhost on port 8008.

 
[org.apache.catalina.connector.warp.WarpConnector] Connection from
/127.0.0.1:3952 to /127.0.0.1:8008


 But it apears that the connection opens eventhough a request  has
not been made.  Then the connection never closes.

Is this a bug with the Warp Connector or is it a config problem with
java or tomcat?

Thansk for the help.

Chad





signature.asc
Description: This is a digitally signed message part


USING SSL with VIRTUAL HOST and TOMCAT STANDALONE

2002-10-25 Thread Donie Kelly
Hi all
I'm trying to configure my server.xml with multiple hosts on Tomcat 4.0.4
and I want to use a different SSL certificate for each host entry. 

I AM NOT USING APACHE! JUST TOMCAT STANDALONE (sorry for
shouting but this is important)

Does anybody have an example of how to do this? I'd really appreciate a
simple HOW-TO. I'd also be interested in how the IP addresses are configured
on the machine. Do I need to always use the DNS name to access the protected
hosts (DNS name is stored in certificate). What happens if I use the IP
address when the host is protected by SSL?

Thanks for the help
Donie


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: HttpProcessor not recycling connections / bug 5181 ?

2002-10-25 Thread Remy Maucherat
Graham King wrote:


Dear all,

 I'm running Tomcat 4.0.3 with Java 1.4 on Linux, and we are getting
lots of 'IOException: Connection reset by peer' (see stack trace at
bottom of mail), which I understand is the user hitting 'stop' or
closing the window before the load completes.

After several hours of running our server will run out of request
processors (well actually we put maxProcessors at 1024 so the site falls
over with 'OutOfMemoryError: unable to create native thread' but that's
just whilst we try and fix this).

I believe this is because StandardWrapperValve is catching the
IOException, so it never gets back up to HttpProcessor, so the processor
never gets recycled.

I saw in a comment right at the bottom of here
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5181 that this is
fixed in 4.0.4b1, but I could not find any other information about that
in the release notes, bugzilla or mail list archives.

 We can't use the 4.1.X branch because we symlink to content outside the
webapp directory and the allowLinking doesn't work for us (in 4.1.12 at
least).

 So what I am asking is:

 - Does anyone know of a recorded problem with recycling processors in
4.0.3 and if so is this definately fixed in later versions of 4.0.X ?
 And:
 - Has anyone else experienced something like this and is my analysis
way off mark ?


Mmmm, yes, it's kinda bogus. A case where a processor wouldn't be 
recycled is if an exception is *not* caught (the thread would get 
killed). There's still a hypothetical bug with recycling of the 
processors that has been reported once in a while, but that no committer 
has ever been able to reproduce, except in conjunction with garbage 
collection peaks.

You should reorganize your setup to make your webapps look like real 
webapps, and upgrade to 4.1.x.

Remy


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



Send code 401 instead of 403

2002-10-25 Thread Johann Uhrmann
Hi,

when using basic authentication with tomcat, tomcat sends a 401 response
code if the user is accessing the page for the first time.

This makes the browser show a login window and retry the request with
the username/password provided by the user.

However, if there is already a username and password in the request,
then tomcat answers with a 403 code which does not result in a login
window.

Unfortunately, if the user makes a typo when he/she tries to log in
there is no chance to make another try except restarting the web
browser.

Does tomcat provide any mechanism to make it return 401 instead of 403?
(except the hack of specifying a user based 403 jsp and make it return
401)

Thanks,

Hans




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 





RE: Help with Filters

2002-10-25 Thread Cox, Charlie
the filter is only applied on teh original request, not for forward() or
include()

/* will match all files
/mydir/* will only match the files in /mydir
*.do will match all 'do' files - reguardless of path

/*.do - invalid, you cannot mix path and wildcard.

Charlie

> -Original Message-
> From: Wendy Smoak [mailto:Wendy.Smoak@;asu.edu]
> Sent: Thursday, October 24, 2002 5:57 PM
> To: 'Tomcat Users List'
> Subject: RE: Help with Filters
> 
> 
> I wrote:
> > /*.do
> > So that my initial "welcome" page won't get filtered, and 
> so hopefully
> only
> > the initial /editContact.do hit will get filtered, and only once.
> > Unfortunately, this isn't working-- 
> 
> It seems that the leading slash was incorrect.  This seems to 
> be working to
> filter *just* the Struts actions, and to only filter once per 
> "page" even
> with the multiple forwards that occur:
> 
>  *.do
> 
> Please let me know if I've still got it wrong.
> 
> -- 
> Wendy Smoak
> Applications Systems Analyst, Sr.
> Arizona State University PA Information Resources Management
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: HttpProcessor not recycling connections / bug 5181 ?

2002-10-25 Thread Graham King


Remy Maucherat wrote:

Graham King wrote:


Dear all,

 I'm running Tomcat 4.0.3 with Java 1.4 on Linux, and we are getting
lots of 'IOException: Connection reset by peer' (see stack trace at
bottom of mail), which I understand is the user hitting 'stop' or
closing the window before the load completes.

After several hours of running our server will run out of request
processors (well actually we put maxProcessors at 1024 so the site falls
over with 'OutOfMemoryError: unable to create native thread' but that's
just whilst we try and fix this).

I believe this is because StandardWrapperValve is catching the
IOException, so it never gets back up to HttpProcessor, so the processor
never gets recycled.

I saw in a comment right at the bottom of here
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5181 that this is
fixed in 4.0.4b1, but I could not find any other information about that
in the release notes, bugzilla or mail list archives.

 We can't use the 4.1.X branch because we symlink to content outside the
webapp directory and the allowLinking doesn't work for us (in 4.1.12 at
least).

 So what I am asking is:

 - Does anyone know of a recorded problem with recycling processors in
4.0.3 and if so is this definately fixed in later versions of 4.0.X ?
 And:
 - Has anyone else experienced something like this and is my analysis
way off mark ?



Mmmm, yes, it's kinda bogus. A case where a processor wouldn't be 
recycled is if an exception is *not* caught (the thread would get 
killed). There's still a hypothetical bug with recycling of the 
processors that has been reported once in a while, but that no committer 
has ever been able to reproduce, except in conjunction with garbage 
collection peaks.


 Ah yes I wasn't thinking it through clearly. What then did you mean in your comment on bug 5181 ?

 Russell Edens says:
---
After walking through the code, it appears (to someone not familiar with the
source) that this exception prevents the recycle of the HttpProcessor.  The net
effect is that once maxProcessors is exceeded the server can never accept
requests again.
---

 and you respond:

--- Additional Comments From Remy Maucherat 2002-03-21 16:13 ---

This is a bug with JDK 1.4.
The processor not being recycled in that particular case has been fixed in
4.0.4-b1.


 What did you mean ?


 Thanks.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: HttpProcessor not recycling connections / bug 5181 ?

2002-10-25 Thread Felipe Schnack
  Wow, asking to upgrade to 4.1.x to solve a bug isn't just too much?
Personally I'm waiting 4.1.x to get more stable before upgrading it.

On Fri, 2002-10-25 at 09:21, Remy Maucherat wrote:
> Graham King wrote:
> 
> > Dear all,
> >
> >  I'm running Tomcat 4.0.3 with Java 1.4 on Linux, and we are getting
> > lots of 'IOException: Connection reset by peer' (see stack trace at
> > bottom of mail), which I understand is the user hitting 'stop' or
> > closing the window before the load completes.
> >
> > After several hours of running our server will run out of request
> > processors (well actually we put maxProcessors at 1024 so the site falls
> > over with 'OutOfMemoryError: unable to create native thread' but that's
> > just whilst we try and fix this).
> >
> > I believe this is because StandardWrapperValve is catching the
> > IOException, so it never gets back up to HttpProcessor, so the processor
> > never gets recycled.
> >
> > I saw in a comment right at the bottom of here
> > http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5181 that this is
> > fixed in 4.0.4b1, but I could not find any other information about that
> > in the release notes, bugzilla or mail list archives.
> >
> >  We can't use the 4.1.X branch because we symlink to content outside the
> > webapp directory and the allowLinking doesn't work for us (in 4.1.12 at
> > least).
> >
> >  So what I am asking is:
> >
> >  - Does anyone know of a recorded problem with recycling processors in
> > 4.0.3 and if so is this definately fixed in later versions of 4.0.X ?
> >  And:
> >  - Has anyone else experienced something like this and is my analysis
> > way off mark ?
> 
> Mmmm, yes, it's kinda bogus. A case where a processor wouldn't be 
> recycled is if an exception is *not* caught (the thread would get 
> killed). There's still a hypothetical bug with recycling of the 
> processors that has been reported once in a while, but that no committer 
> has ever been able to reproduce, except in conjunction with garbage 
> collection peaks.
> 
> You should reorganize your setup to make your webapps look like real 
> webapps, and upgrade to 4.1.x.
> 
> Remy
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
-- 

Felipe Schnack
Analista de Sistemas
[EMAIL PROTECTED]
Cel.: (51)91287530
Linux Counter #281893

Faculdade Ritter dos Reis
www.ritterdosreis.br
[EMAIL PROTECTED]
Fone/Fax.: (51)32303328


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Tomcat and 401 custom page how?

2002-10-25 Thread Johann Uhrmann
On Thu, 2002-10-24 at 16:24, Kristján Bjarni Guðmundsson wrote:
> I use custom error pages for various error codes (404. etc),  all of them 
> work except 401 error.
> 
> If I go to a protected page the browser just displays the 401 page without 
> prompting me
> to log in. What am I doing wrong?

Short answer: nothing

Tomcat sends that pages with response code 200. I consider this a bug.

If You want tomcat to send You 401-page with a 401 code You have to
use a JSP which sets the response code manually:

...
<% response.setStatus(response.SC_UNAUTHORIZED);
   response.setHeader("WWW-Authenticate", "BASIC realm=\"restricted\"");
%>
...

It is a hack but at least it is working.

hth,

Hans


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Tomcat 4.1.12 ClassNotFoundException

2002-10-25 Thread Cox, Charlie
sounds like you need to allow the WEB-INF/classes permission in your
catalina.policy file

Charlie

> -Original Message-
> From: Jeremy Cavagnolo [mailto:jcavagnolo@;hotmail.com]
> Sent: Wednesday, October 23, 2002 12:31 PM
> To: [EMAIL PROTECTED]
> Subject: Tomcat 4.1.12 ClassNotFoundException
> 
> 
> Hello:
> 
> I am building a Struts-based web application and, among other 
> classes, have 
> written a LoginForm bean for my login.jsp.  When this class is in 
> /var/tomcat4/webapps/myApp/WEB-INF/classes, and after I 
> restart tomcat I get 
> the following stack trace in the host log file when I try to access 
> login.jsp (see trace at the end of the message).  Further, 
> when I put the 
> classes in /var/tomcat4/common/classes, everything works.  
> Any ideas would 
> be much appreciated.
> 
> Thanks,
> 
> Jeremy
> 
> 
> 2002-10-22 14:13:16 StandardWrapperValve[jsp]: 
> Servlet.service() for servlet 
> jsp threw exception
> org.apache.jasper.JasperException: Exception creating bean of class 
> org.alf.msq.data.ClassReg: java.lang.ClassNotFoundException: 
> org.alf.msq.data.ClassReg
>   at 
> org.apache.jasper.servlet.JspServletWrapper.service(Unknown Source)
>   at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown Source)
>   at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java)
>   at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> er(Unknown 
> Source)
>   at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Unkno
> wn Source)
>   at 
> org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
>   at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(Unknown 
> Source)
>   at 
> org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
>   at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
>   at 
> org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
>   at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(Unknown 
> Source)
>   at 
> org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
>   at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
>   at 
> org.apache.catalina.core.StandardContext.invoke(Unknown Source)
>   at 
> org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
>   at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(Unknown 
> Source)
>   at 
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown Source)
>   at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(Unknown 
> Source)
>   at 
> org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
>   at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(Unknown 
> Source)
>   at 
> org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
>   at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
>   at 
> org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
>   at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(Unknown 
> Source)
>   at 
> org.apache.catalina.valves.RequestDumperValve.invoke(Unknown Source)
>   at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invokeNext(Unknown 
> Source)
>   at 
> org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
>   at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
>   at 
> org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:458)
>   at 
> org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551)
>   at java.lang.Thread.run(Thread.java:536)
> - Root Cause -
> javax.servlet.ServletException: Exception creating bean of class 
> org.alf.msq.data.ClassReg: java.lang.ClassNotFoundException: 
> org.alf.msq.data.ClassReg
>   at 
> org.apache.jasper.runtime.PageContextImpl.handlePageException(Unknown 
> Source)
>   at org.apache.jsp.login_jsp._jspService(login_jsp.java:90)
>   at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java)
>   at 
> org.apache.jasper.servlet.JspServletWrapper.service(Unknown Source)
>   at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown Source)
>   at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java)
>   at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> er(Unknown 
> Source)
>   at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Unkno
> wn Source)
>   at 
> org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
>   at 
> org.apache

RE: Apache-Tomcat

2002-10-25 Thread Turner, John

I only know the inelegant, brute force way, which is to check the request
object for the request type, and if it's "http" when it should be "https",
do a redirect to the same URL but with "https" prepended.

There's probably a much more robust and correct way to do this using Tomcat
security restrictions and realms, but I haven't worked with them that much,
so I don't want to give you wrong information.  Lots of people on the list
have done this, though, so perhaps the best way to proceed would be to start
a new thread with a new subject about restricting particular URLs to SSL.

John


> -Original Message-
> From: Christie I [mailto:christie_iii@;yahoo.com]
> Sent: Friday, October 25, 2002 1:04 AM
> To: Tomcat Users List
> Subject: RE: Apache-Tomcat
> 
> 
> 
> Hi
> 
> Thank you very much John. It worked!. I have one last 
> problem. Iam running Openssl. Iam having *.jsp files in my 
> webapps/myproject directory that some of the files needs to 
> be accessed by https and not thru http? How to do this?
> 
> for eg :https://0.0.0.0/welcome.jsp  should not be accessed 
> thru http://0.0.0.0 ? How to do restrict this?
> 
> Thanks in advance
> 
> 
> 
> 
> -
> Get a bigger mailbox -- choose a size that fits your needs.
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Apache+Tomcat Configuration problems

2002-10-25 Thread Turner, John

Yup, ditto Milt and Robert.  You've got JK directives but you're loading
JK2.  To get rid of your Apache config error, use mod_jk.so instead of
mod_jk2.so, or keep mod_jk2.so and change your config to a JK2 config.

John


> -Original Message-
> From: J.F. Noonan [mailto:jfn@;msc.com]
> Sent: Thursday, October 24, 2002 5:29 PM
> To: [EMAIL PROTECTED]
> Subject: Apache+Tomcat Configuration problems
> 
> 
> 
> OK, I'm about ready to scream.  Although I'm certain that I've
> missed something appallingly simple, I have no idea what that
> something is.
> 
> I have installed Tomcat tomcat4-4.1.12-full.2jpp.noarch.rpm on a
> RH7.3 system.  I have compiled and installed Apache 1.3.27 with
> mod_ssl, EAPI, and mod_so.  I have read through:
> 
> 
> 
> more times than I care to count.  I have in httpd.conf:
> 
> 
> 
> LoadModule jk2_module modules/mod_jk2.so
> AddModule  mod_jk2.c
> 
> 
> JkWorkersFile /etc/httpd/conf/workers.properties
> JkMount  /*.jsp ajp13
> JkMount /servlet/* ajp13
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: linux tomcat startup prob

2002-10-25 Thread Turner, John

Are you sure you have CATALINA_HOME set correctly?

By "I installed tomcat" what do you mean?  From source?  From an RPM?  From
a binary package?

John


> -Original Message-
> From: maninder s batth [mailto:anywhereinfo@;netscape.net]
> Sent: Thursday, October 24, 2002 4:37 PM
> To: [EMAIL PROTECTED]
> Subject: linux tomcat startup prob
> 
> 
> hii am new to linux. i installed tomcat but 4.1.12 and the docs 
> mentioned there would be
> startup.sh and shutdown.sh in $CATALINA_HOME/bin , all i 
> found was 3 jar 
> files :'-(
> where are those files..anyone??
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Apache-Tomcat

2002-10-25 Thread Graham King
See javax.servlet.ServletRequest.isSecure()

 This should do it:

 if ( request.isSecure() ) {
// All is well
 }
 else {
// Redirect to https site
 }


Turner, John wrote:

I only know the inelegant, brute force way, which is to check the request
object for the request type, and if it's "http" when it should be "https",
do a redirect to the same URL but with "https" prepended.

There's probably a much more robust and correct way to do this using Tomcat
security restrictions and realms, but I haven't worked with them that much,
so I don't want to give you wrong information.  Lots of people on the list
have done this, though, so perhaps the best way to proceed would be to start
a new thread with a new subject about restricting particular URLs to SSL.

John




-Original Message-
From: Christie I [mailto:christie_iii@;yahoo.com]
Sent: Friday, October 25, 2002 1:04 AM
To: Tomcat Users List
Subject: RE: Apache-Tomcat



Hi

Thank you very much John. It worked!. I have one last 
problem. Iam running Openssl. Iam having *.jsp files in my 
webapps/myproject directory that some of the files needs to 
be accessed by https and not thru http? How to do this?

for eg :https://0.0.0.0/welcome.jsp  should not be accessed 
thru http://0.0.0.0 ? How to do restrict this?

Thanks in advance




-
Get a bigger mailbox -- choose a size that fits your needs.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Help to Configure Apache and Tomcat to use mod_jk!

2002-10-25 Thread Turner, John

You have to load the module into Apache before you can use it.

Look in httpd.conf for lines that look like this:

LoadModule 

Then add one that looks like this:

LoadModule jk_module wherever_you_put_it/mod_jk.so 

John

> -Original Message-
> From: Hai To Thanh [mailto:nguyenquocanh01@;yahoo.com]
> Sent: Friday, October 25, 2002 3:55 AM
> To: [EMAIL PROTECTED]
> Subject: Help to Configure Apache and Tomcat to use mod_jk!
> 
> 
>  Hi, 
>  I get trouble when I try to make communication
> between Tomcat and Apache. I follow following steps:
>1, I get mod_jk.so.
>2, To Configure Apache using mod_jk:
>   I put the following include directive at the end
> of your Apache httpd.conf file: 
>   "Include /usr/local/jakarta- 
> tomcat/conf/jk/mod_jk.conf".
>3, To Configuring Tomcat:
>   I add the following block to your 
> TOMCAT_HOME/conf/server.xml file 
>"".
> 
>  But When I type:
>#./httpd start
> to start Apache Web Server then I get following error:
>  
>  "Starting httpd: Systax error on line 7 of
> /usr/local/src/jakarta-tomcat-4.1.12/conf/auto/mod_jk.conf:
>   invalid command "JkWorkersFile", perhaps mis-spelled
> of defined by a module not include in the server
> configuration.
> 
> Help me!
> 
> 
> 
> __
> Do you Yahoo!?
> Y! Web Hosting - Let the expert host your web site
> http://webhosting.yahoo.com/
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Apache-Tomcat

2002-10-25 Thread Turner, John

Thanks, but I think there is a "better" way to do it, such that the request
never even gets to the servlet or JSP page if it isn't secure when it should
be.  I just don't know it.

John

> -Original Message-
> From: Graham King [mailto:graham@;gointernet.co.uk]
> Sent: Friday, October 25, 2002 8:29 AM
> To: Tomcat Users List
> Subject: Re: Apache-Tomcat
> 
> 
> See javax.servlet.ServletRequest.isSecure()
> 
>   This should do it:
> 
>   if ( request.isSecure() ) {
>  // All is well
>   }
>   else {
>  // Redirect to https site
>   }
> 
> 
> Turner, John wrote:
> > I only know the inelegant, brute force way, which is to 
> check the request
> > object for the request type, and if it's "http" when it 
> should be "https",
> > do a redirect to the same URL but with "https" prepended.
> > 
> > There's probably a much more robust and correct way to do 
> this using Tomcat
> > security restrictions and realms, but I haven't worked with 
> them that much,
> > so I don't want to give you wrong information.  Lots of 
> people on the list
> > have done this, though, so perhaps the best way to proceed 
> would be to start
> > a new thread with a new subject about restricting 
> particular URLs to SSL.
> > 
> > John
> > 
> > 
> > 
> >>-Original Message-
> >>From: Christie I [mailto:christie_iii@;yahoo.com]
> >>Sent: Friday, October 25, 2002 1:04 AM
> >>To: Tomcat Users List
> >>Subject: RE: Apache-Tomcat
> >>
> >>
> >>
> >>Hi
> >>
> >>Thank you very much John. It worked!. I have one last 
> >>problem. Iam running Openssl. Iam having *.jsp files in my 
> >>webapps/myproject directory that some of the files needs to 
> >>be accessed by https and not thru http? How to do this?
> >>
> >>for eg :https://0.0.0.0/welcome.jsp  should not be accessed 
> >>thru http://0.0.0.0 ? How to do restrict this?
> >>
> >>Thanks in advance
> >>
> >>
> >>
> >>
> >>-
> >>Get a bigger mailbox -- choose a size that fits your needs.
> >>
> > 
> > 
> > --
> > To unsubscribe, e-mail:   

> For additional commands, e-mail:

> 


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Apache Tomcat URLs - don't want port 8080

2002-10-25 Thread Turner, John

I don't have a 3.3.1 install available, so I'm not sure how much more I can
help.  What do your Apache logs say when you make a request for that URL?
What does mod_jk.log say?

John


> -Original Message-
> From: Stephen Graham [mailto:sg3@;bigpond.com]
> Sent: Thursday, October 24, 2002 8:45 PM
> To: Tomcat Users List
> Subject: RE: Apache Tomcat URLs - don't want port 8080
> 
> 
> I'm using Tomcat 3.3.1 and Apache 1.3.19 on RedHat 7.1. I 
> haven't made any
> changes to server.xml as it seems that this version of Tomcat 
> is unlike
> earlier versions in that contexts are defined in the
> $TOMCAT_HOME/conf/apps.xml file which I've created myself to 
> contain the
> following.
> 
> 
> 
> 
>docBase="/opt/usr/src/jalapeno"
> debug="9"
> reloadable="true" >
> 
> 
> path="logs/servlet_jalapeno.log"
>servletLogger="true"/>
>   
> 
>   docBase="/opt/usr/src/pepper"
>debug="9"
>reloadable="true">
>   
> 
> 
> =
> My workers.propertes file contains the following.
> =
> 
> workers.tomcat_home=/tomcat
> workers.java_home=/java
> ps=/
> worker.list=ajp12, ajp13
> worker.ajp12.port=8007
> worker.ajp12.host=titan.sgdev.com.au
> worker.ajp12.type=ajp12
> worker.ajp12.lbfactor=1
> worker.ajp13.port=8009
> worker.ajp13.host=titan.sgdev.com.au
> worker.ajp13.type=ajp13
> worker.ajp13.lbfactor=1
> worker.loadbalancer.type=lb
> worker.loadbalancer.balanced_workers=ajp12, ajp13
> worker.inprocess.type=jni
> worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps
> )tomcat.jar
> worker.inprocess.cmd_line=start
> worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)lib$
> (ps)i386$(ps)c
> lassic$(ps)libjvm.so
> worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)in
> process.stdout
> worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)in
> process.stderr
> 
> ==
> My mod_jk.conf file is as follows.
> ==
> 
> ## Auto generated on Fri Oct 25 10:21:24 EST 2002##
> 
> 
>   LoadModule jk_module libexec/mod_jk.so
> 
> 
> JkWorkersFile 
> "/opt/usr/jakarta-tomcat-3.3.1/conf/jk/workers.properties"
> JkLogFile "/opt/usr/jakarta-tomcat-3.3.1/logs/mod_jk.log"
> JkLogLevel emerg
> JkMount /jalapeno ajp13
> JkMount /jalapeno/* ajp13
> JkMount /pepper ajp13
> JkMount /pepper/* ajp13
> JkMount /admin ajp13
> JkMount /admin/* ajp13
> JkMount /examples ajp13
> JkMount /examples/* ajp13
> JkMount /test ajp13
> JkMount /test/* ajp13
> JkMount /soap ajp13
> JkMount /soap/* ajp13
> JkMount /axis ajp13
> JkMount /axis/* ajp13
> 
> ===
> 
> When I try to access the '/pepper' context by using
> http://titan.sgdev.com.au/pepper/login.jsp it doesn't work - 
> the browser
> (IE6) just says "Opening page...". But when I add the 8080 
> port number to
> this URL it works.
> 
> What shoudl my 'host' entry in server.xml look like? I can't find any
> example of it, in Tomcat 3.3.1 or earlier 3.2.x versions.
> 
> Thanks again.
> Stephen Graham.
> 
> 
> > -Original Message-
> > From: Turner, John [mailto:JTurner@;AAS.com]
> > Sent: Friday, 25 October 2002 02:04
> > To: 'Tomcat Users List'
> > Subject: RE: Apache Tomcat URLs - don't want port 8080
> >
> >
> >
> > There should be a Host element in server.xml that matches
> > whatever hostname
> > you are trying to reach.  If the ServerName in httpd.conf is
> > "foobar",  and
> > "foobar" has JkMount statements, there should be a Host element
> > with a name
> > parameter set to "foobar" in server.xml.
> >
> > This is happening piecemeal.  It would probably go a lot faster
> > if you could
> > tell us all at once:
> >
> > - which exact URL are you trying to access
> > - which versions you're using
> > - what is your workers.properties as it exists now
> > - what is your server.xml file as it exists now
> > - what is your httpd.conf (or mod_jk.conf) as it exists now
> >
> > There shouldn't be 2 declarations for "/pepper" unless you 
> want that URL
> > available on both the default Apache server (global 
> ServerName) as well as
> > some other host.  Right now, there is a declaration for it 
> in both the
> > auto-generated mod_jk.conf and in the actual httpd.conf.
> >
> > In workers.properties, you can remove all references to ajp12.
> >
> > John
> >
> > > -Original Message-
> > > From: Stephen Graham [mailto:sg3@;bigpond.com]
> > > Sent: Thursday, October 24, 2002 10:05 AM
> > > To: Tomcat Users List
> > > Subject: RE: Apache Tomcat URLs - don't want port 8080
> > >
> > >
> > > The only JkMount statements I have are in the 
> automatically created
> > > mod_jk.conf file and the httpd.conf file. The contents of 
> each are as
> > > follows.
> > >
> > >
> > > ## Auto generated on Thu Oct 24 23:07:26 EST 
> 2002##
> > >
> > >

RE: Help Needed to configure servlets

2002-10-25 Thread Shapira, Yoav
Hi,

>webapps
>   --- AppDir -  JSP file
>--- Web-inf   - web.xml file
>  -- classes - My Servlet Class files
>
>http://localhost:port/AppDir/

In the above configuration, if you have the invoker servlet mapping
enabled in $CATALINA_HOME/conf/web.xml:

http://localhost:port/AppDir/servlet/ will invoke your
servlet
http://localhost:port/AppDir/your.jsp will invoke your JSP file

If you add the following to your web.xml:

  myservlet
  your.servlet.class



  myservlet
  /MyServlet


Then your servlet will be accessible (without needing the invoker
servlet) at:
http://localhost:port/AppDir/MyServlet

Yoav Shapira
Millennium ChemInformatics

This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Re: Java Logger problem with Tomcat4 web apps on Unix platforms...

2002-10-25 Thread Warren Sweetman
do you mean that the the tomcat user has to have write priveledge for 
the directory being written to ??


On Thursday, Oct 24, 2002, at 21:44 Etc/GMT, Sexton, George wrote:

Sounds like a permissions problem to me.

-Original Message-
From: Vijay KN [mailto:KNVIJAY@;novell.com]
Sent: Thursday, October 24, 2002 00:46
To: [EMAIL PROTECTED]
Subject: Java Logger problem with Tomcat4 web apps on Unix platforms...

Hi,

We are using JVM1.4 Logger APIs in our servlet application deployed in
Tomcat4.0 container to log messages into a file.

On Unix platforms, the log file doesn't get created, though the
application using Logger objects does not throw any exceptions.
However, the same code works on other platforms like WinXP.

Appreciate an early response.

thanks
vijay


--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   

For additional commands, e-mail: 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: tomcat 4.1.12 compilation error

2002-10-25 Thread Frédéric LEFRANC
Just put on CLASSPATH c:\jdk1.3\lib\tools.jar and c:\jdk1.3\lib\dt.jar

it will be better
fred

-Message d'origine-
De : [EMAIL PROTECTED] [mailto:Nirav.Shah@;arvindmills.com]
Envoyé : vendredi 25 octobre 2002 12:44
À : Tomcat Users List
Objet : tomcat 4.1.12 compilation error
Importance : Haute


Dear All,

I am just newbie for tomcat 4.1.12 version. Recently I have installed it on
my NT Server. Now I have a problem to access classes through JSP files of
my Application.

Following is the structure of my application

webapps\myapp\*.jsp
webapps\myapp\WEB-INF\classes\*.class

Following is the error which I am getting.

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

An error occurred at line: 1 in the jsp file: /checklogin.jsp

Generated servlet error:
[javac] Compiling 1 source file

D:\Tomcat 4.1\work\Standalone\localhost\opt\checklogin_jsp.java:44: cannot
resolve symbol
symbol  : class Login
location: class org.apache.jsp.checklogin_jsp
  Login log = null;
  ^



An error occurred at line: 1 in the jsp file: /checklogin.jsp

Generated servlet error:
D:\Tomcat 4.1\work\Standalone\localhost\opt\checklogin_jsp.java:46: cannot
resolve symbol
symbol  : class Login
location: class org.apache.jsp.checklogin_jsp
log = (Login) pageContext.getAttribute("log",
PageContext.SESSION_SCOPE);



The same structure was working fine in tomcat 3.x version.

Thanks in advance :)

Rgds
Nirav






--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: connector and tomcat 4.1.12 !!

2002-10-25 Thread Max
Thanks.

But i don't understand why tomcat need to get its classpath in apache
configuration file
and how specifie in tomcat where is this file ...

Where can i find documentation on this subject ?
there is few documentation on
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2 but very light ...
or a book ?

- Original Message -
From: "Robert L Sowders" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Thursday, October 24, 2002 7:32 PM
Subject: Re: connector and tomcat 4.1.12 !!


> Looks like you are having problems with your class path.  Guess you didn't
> update the workers2.properties file when you updated to 4.1.12.
>
> In the [VM] section of workers2.properties, try replacing the line:
>
> OPT=-Djava.class.path=${TOMCAT_HOME}/bin/tomcat-jni.jar
>
> with the following
>
>
OPT=-Djava.class.path=${TOMCAT_HOME}/bin/tomcat-jni.jar;${TOMCAT_HOME}/serve
r/lib/commons-logging.jar
>
> Not sure but I think at some point the OPT lines will be replaced with
> simple class path lines.
>
> rls
>
>
>
>
>
> "Max" <[EMAIL PROTECTED]>
> 10/24/2002 02:39 PM
> Please respond to "Tomcat Users List"
>
>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> cc:
> Subject:connector and  tomcat 4.1.12 !!
>
> Hi
>
> I have a tomcat 4.1.12, an apache 2.0.40 and mod_jk2
> (tomcat-connectors-4.1.12)
>
> since i put this simple jk2.properties in my $CATALINA/conf dir :
> #
> handler.list=apr,channelUnix,request
> channelUnix.file=${jkHome}/work/jk2.socket
> apr.NativeSo=${jkHome}/lib/libjkjni.so
>
> (it works great with a tomcat 4.1.10)
> tomcat doesn't start and my catalina.out looks like this :
>
> Starting service Tomcat-Standalone
> Apache Tomcat/4.1.12-LE-jdk14
> 24 oct. 2002 17:26:38 org.apache.jk.server.JkMain newHandler
> GRAVE: Can't create apr
> java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
> at org.apache.jk.apr.AprImpl.(AprImpl.java:340)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:130)
> at org.apache.jk.server.JkMain.newHandler(JkMain.java:494)
>
> and the socket file is not created .
>
> Can you help me ?
>
> THANKS !
>
> my server.xml :
>
> 
>   
>
>   port="8009" minProcessors="5" maxProcessors="75"
> enableLookups="true" redirectPort="8443"
> acceptCount="10" debug="0" connectionTimeout="2"
>  protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>
>
> 
>
>  unpackWARs="true">
>
> [...]
>
> 
>
> 
>
>   
>
> 
>
>
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: XML Parser for Tomcat 4.1.12

2002-10-25 Thread Ujwal Oswal
Thanks a lot for your responce. Here's the error I am getting when I put my
xerces.jar version 1.1 in the 
common/endorsed directory.

UO.


INFO] Registry - -Loading registry information
[INFO] Registry - -Creating new Registry instance
org.apache.xerces.validators.datatype.InvalidDatatypeFacetException:
Installation Problem???  Couldn't load messages: Can't find bundle for base
name org.apache.xerces.utils.regex.message, locale en_US
at
org.apache.xerces.validators.datatype.DatatypeValidatorFactoryImpl.createDat
atypeValidator(DatatypeValidatorFactoryImpl.java:449)
at
org.apache.xerces.validators.datatype.DatatypeValidatorFactoryImpl.createDat
atypeValidator(DatatypeValidatorFactoryImpl.java:404)
at
org.apache.xerces.validators.datatype.DatatypeValidatorFactoryImpl.initializ
eDTDRegistry(DatatypeValidatorFactoryImpl.java:146)
at
org.apache.xerces.validators.common.XMLValidator.initDataTypeValidators(XMLV
alidator.java:1949)
at
org.apache.xerces.validators.common.XMLValidator.setValidationEnabled(XMLVal
idator.java:511)
at
org.apache.xerces.framework.XMLParser.setValidation(XMLParser.java:393)
at
org.apache.xerces.framework.XMLParser.setFeature(XMLParser.java:1144)
at
org.apache.xerces.parsers.SAXParser.setFeature(SAXParser.java:578)
at
org.apache.xerces.jaxp.SAXParserImpl.(SAXParserImpl.java:118)
at
org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(SAXParserFactoryImp
l.java:96)
at org.apache.commons.digester.Digester.getParser(Digester.java:676)
at
org.apache.commons.digester.Digester.getXMLReader(Digester.java:892)
at org.apache.commons.digester.Digester.parse(Digester.java:1514)
at
org.apache.commons.modeler.Registry.loadRegistry(Registry.java:356)
at
org.apache.catalina.mbeans.MBeanUtils.createRegistry(MBeanUtils.java:1620)
at
org.apache.catalina.mbeans.MBeanUtils.(MBeanUtils.java:162)
at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.(GlobalR
esourcesLifecycleListener.java:115)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Unknown Source)
at
org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.java:253
)
at
org.apache.commons.digester.Digester.startElement(Digester.java:1237)
at
org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376)
at
org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidat
or.java:1170)
at
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanne
r.java:1862)
at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XM
LDocumentScanner.java:1238)
at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.
java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:952)
at org.apache.commons.digester.Digester.parse(Digester.java:1495)
at org.apache.catalina.startup.Catalina.start(Catalina.java:449)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
[INFO] Registry - -Creating MBeanServer
[INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on port 8080
Starting service Tomcat-Standalone
Apache Tomcat/4.1.12
org.apache.xerces.validators.datatype.InvalidDatatypeFacetException:
Installation Problem???  Couldn't load messages: Can't find bundle for base
name org.apache.xerces.utils.regex.message, locale en_US
at
org.apache.xerces.validators.datatype.DatatypeValidatorFactoryImpl.createDat
atypeValidator(DatatypeValidatorFactoryImpl.java:449)
at
org.apache.xerces.validators.datatype.DatatypeValidatorFactoryImpl.createDat
atypeValidator(DatatypeValidatorFactoryImpl.java:404)
at
org.apache.xerces.validators.datatype.DatatypeValidatorFactoryImpl.initializ
eDTDRegistry(DatatypeValidatorFactoryImpl.java:146)
at
org.apache.xerces.validators.common.XMLValidator.initDataTypeValidators(XMLV
alidator.java:1949)
at
org.apache.xerces.validators.common.XMLValidator.setValidationEnabled(XMLVal
idator.java:511)
at
org.apache.xerces.framework.XMLParser.setValidation(XMLParser.java:393)
at
org.apache.xerces.framework.XMLParser.setFeature(XMLParser.java:1144)
at
org.apache.xerces.parsers.SAXParser.setFeature(SAXParser.java:578)
at
org.apache.xerces.jaxp.SAXParserImpl.(SAXParserImpl.java:118)
at
org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(SAXParserFactoryImp
l.java:96)
at org.apache.commons.digester.Digester.getParser(Digester.java:676)
at
org.apache.commons.digester.Digester.getXMLReader(Digester.java:892)
at org.apache.commons.digester.Digester.parse(Digester.java:1

VerifyError when creating action

2002-10-25 Thread Steinar Bang
Platform: Intel PIII, RedHat 7.2, apache 1.3.20, ajp1.3
  tomcat 4.1.12, BlackDown Java SDK 1.3.1

When I run with tomcat 3.3 my webapp run as expected, but when I try
it with tomcat 4.1.12, I get a VerifyError when creating one of the
webapp's Action beans.  The error output is attached to the end of
this message.

I've searched www.google.com for this problem, and I've found that
some people have had problems with custom tags when changing to
tomcat4, but I haven't found anyone having problems with actions.

I have cleaned away the webapp, rebuilt it, and stopped and started
tomcat, to make sure it hadn't cached a broken .class file.

The  definition from struts-config.xml, is:


  


Has anyone seen a similar problem?  Does anyone know what to do to fix
it?

Thanx!


- Steinar



[INFO] RequestProcessor - -Processing a 'GET' for path '/main'
java.lang.VerifyError: (class: no/dod/TPS/corba/stb/WelcomeAction, method: doPerform 
signature: 
(Lorg/apache/struts/action/ActionMapping;Lorg/apache/struts/action/ActionForm;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Lno/dod/T
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:237)
at 
org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:219)
at 
org.apache.struts.action.RequestProcessor.processActionCreate(RequestProcessor.java:314)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:258)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.catalina.core.ApplicationDispatcher.invoke(Unknown Source)
at org.apache.catalina.core.ApplicationDispatcher.doForward(Unknown Source)
at org.apache.catalina.core.ApplicationDispatcher.forward(Unknown Source)
at 
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1019)
at 
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:422)
at 
org.apache.struts.action.RequestProcessor.processActionForward(RequestProcessor.java:389)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:269)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown 
Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
 Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
 Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
 Source)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown Source)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
 Source)
at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
 Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
 Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:458)
at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551)
at java.lang.Thread.run(Thread.java:484)
[ERROR] RequestProcessor - -No action i

tomcat4, which ajp1.3 connector to use? (Coyote? plain?)

2002-10-25 Thread Steinar Bang
Platform: Intel PIII, RedHat 7.2, apache 1.3.20, ajp1.3
  tomcat 4.1.12, BlackDown Java SDK 1.3.1

The tomcat4 server.xml file came with the Coyote/JK2 Ajp 1.3 Connector
enabled and the normal(?) Ajp 1.3 connector disabled (the class is
org.apache.ajp.tomcat4.Ajp13Connector).

I had to disable the Coyote connector and enable the normal connector
to be able to make things work.

Is this to be expected?  Or would it be preferrable if I would be able
to make tomcat/apache use the Coyote connector?

Thanx!


- Steinar



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Tomcat Scalability - Long

2002-10-25 Thread Glenn Nielsen
I have the following in production:

Tomcat 4.1, JDK 1.3.1, and MySQL on a Dual CPU Sun 250 app server and Apache
using mod_jk 1.2 on a separate server. We are now getting 4 weeks continuous uptime.
I stop and restart Tomcat once each month because the minimum memory the java heap
uses over time increases.  This is on a site handling 30k Tomcat requests per day.
With peak loads of 5k-6k Tomcat requests per hour.

When scaling Tomcat there are many issues to address when tuning performance.

I would suggest learning more about how the JVM does garbage collection and
test different Java startup args related to jvm stack size, etc.  Try starting
Tomcat with the java arg "-verbose:gc", this will collect GC data which can
help you when tuning the JVM memory usage.

You might also want to profile your applicaiton using OptimizeIt or JProbe
to see if it is the source of the problem.

And of course the performance tuning should be done on test servers which
are as close as possible to your production environment and with a load
that simulates your site usage.

Consider upgrading to Tomcat 4.1.  Especially if your site uses JSP.
Jasper 2 which comes with Tocmat 4.1 significantly improves performance
of JSP.

One final note, I would not set reloadable=true on a production system.
That adds alot of overhead.  The reloadable option is really there only
to make development easier.

Regards,

Glenn

Brandon Cruz wrote:

Does anyone have any solid information about the scalability of Tomcat?  It
seems very limiting to me, but that is hopefully due to improper
configuration.  Here is our situation and what seems to be happening under a
small amount of stress.

---About our Environment---

PIII 1.0Ghz
512 Meg Ram
Linux RedHat 7.1
MySQL Database
Apache 1.3.x
mod_jk - logging turned all the way down
Tomcat 3.2.4 - contexts *are* reloadable right now
SUN JDK 1.3.1_01

---About our Application---

Our Application is a content management tool that reads and writes to the
MySQL Database and reads and writes files.  All the pages within this
application are served by Tomcat 3.2.4.  About 80-120 people per day log
into this application and spend anywhere from 10 minutes to one hour working
on the application.  At any given time there are between 15 and 50 active
database connections.

---What we are seeing---

Tomcat needs to be restarted every few days.  If we don't restart it, it
seems tomcat eventually locks up and does not respond at all.  No errors or
anything are reported, it just will not respond.  Apache continues to work
during this time and all static HTML pages are accessible.

CPU - The processor usage seems to slowly increase as time goes on.  After
about one day, it seems one java process uses 30% of available CPU or more,
depending on whether users are performing operations or not.  When nobody is
doing anything, the processer still seems to be sitting around 30% until
tomcat is restarted.  This seems to cap after three to five days and not
increase too much more.

RAM - This slowly increases and never stops increasing.  We do not have any
special parameters set for the VM when it starts, but this does not seem to
matter.  The RAM gets up to about 135 MB after four or five days, but would
continue to grow if tomcat were not allowed.


Can anyone explain this behavior, talk about the scalability of Tomcat, or
provide any similar working solutions that perform better than this?  Is it
normal, should we just throw more hardware at it?  Are there configuration
parameters that can be used to increase performance, such as set
reloadable=false in all contexts?  Would we get better performance if we
upgraded to 4.x, or would that just be more work for little improvement?


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: HTTP Connection Pool grows continuously

2002-10-25 Thread Michael . Bombyk
If I set a maxProcessors value, Tomcat gives me new connection threads until
it reaches the limit, and then connection requests fail. 

The high timeout value is an end user requirement for the app. In any case,
I know that Tomcat is allocating many more threads - upwards of a thousand -
than I ever have concurrently connected users.  It is almost as if threads
are not being reused. I know that in earlier releases of Tomcat, it was
necessary to explicitly configure pooling in server.xml, but after 4.0 it is
the default (and only) option. 

What would be very useful is an explanation of exactly how the Tomcat
connection pooling logic is supposed to work in release 4.0. 
> -Original Message-
> From: Kwok Peng Tuck [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, October 25, 2002 1:46 AM
> To:   Tomcat Users List
> Subject:  Re: HTTP Connection Pool grows continuously
> 
> If you change this value:  
> 
> maxProcessors="-1" 
> 
> to some value like 20 what happens?
> 
> Kristian A. Leth wrote:
> 
> >You got a pretty high connection timeout on (120) 20min.
> >Try setting it to something like 15000 or even lower.
> >
> >You could also fix your min and max heapsize to get more continously
> >garbagecollection
> >
> >It could also be due to problems in your code, delaying, stopping or
> >killing threads.
> >
> >Regards
> >
> >Kleth
> >
> >-
> -
> >
> >Kristian A. Leth.
> >Systemsdeveloper, Maersk Data A/S.
> >--
> >Professionals are predictable;
> >the world is full of dangerous amateurs.
> >-
> -
> >
> >
> >
> >
> >|-+->
> >| | |
> >| | Michael.Bombyk@W|
> >| | ellsFargo.COM   |
> >| | |
> >| | 24-10-2002 22:44|
> >| | Please respond  |
> >| | to "Tomcat Users|
> >| | List"   |
> >| | |
> >| | |
> >|-+->
> >
> >-
> -|
> >  |
> |
> >  |   To: [EMAIL PROTECTED]
> |
> >  |   cc:
> |
> >  |   Subject:  HTTP Connection Pool grows continuously
> |
> >
> >-
> -|
> >
> >
> >
> >I am running Tomcat 4.0.3 standalone on WIndows 2000 Server. I have a
> >maximum of perhaps 50 concurrent connections at any given time. I have
> the
> >following server.xml configuration for the HTTPConnector:
> >
> > >port="80" minProcessors="5" maxProcessors="-1" enableLookups="true"
> >redirectPort="8443" acceptCount="10" debug="0"
> connectionTimeout="120"
> >/>
> >My problem is this:
> >My connection thread pool grows continuously until the point that all JVM
> >memory allocated to Tomcat is exhausted. This can be observed in the
> >catalina log with messages like these:
> >2002-10-24 12:02:14 HttpProcessor[80][1077] Starting background thread
> >2002-10-24 12:02:14 HttpProcessor[80][1078] Starting background thread
> >I understand that maxProcessors="-1" allows Tomcat to create as many
> >threads
> >as it needs to satisfy http requests, but doesn't connection thread
> pooling
> >allow reuse? I would expect that the pool would not grow any larger than
> >the
> >highest number of concurrent connections. Previously when I used
> >maxProcessors to set a connection limit, I found that I rapidly reached
> >this
> >limit, which is why I set the max value to infinity. But this is not how
> I
> >would expect connection thread pooling - which is supposed to be the
> >default
> >option in 4.0 - to work. What am I missing?
> >Thanks for your help.
> >
> >
> >--
> >To unsubscribe, e-mail:   <
> >mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
> >For additional commands, e-mail: <
> >mailto:tomcat-user-help@;jakarta.apache.org>
> >
> >
> >
> >
> >
> >
> >
> >--
> >To unsubscribe, e-mail:
> 
> >For additional commands, e-mail:
> 
> >
> >
> >  
> >
> 
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




jspc pre-compiled pages distributed with .war file?

2002-10-25 Thread Thomas Heller
hi there,

i am migrating my projects from php to java and began to set up a
development server that ideally does all the dev work once a project is
marked release i just call an ant task to deploy the project to one or more
(load balanced) production servers.

i have written an ant build.xml to compile my webapp and to put everything i
need into "mywebapp.war". thats working very fine and i can just deploy that
.war to a tomcat server without any problems.

now, i have setup another ant task to precompile every jsp file using jasper
(ant task "jspc"). thats working perfectly fine and i have loads of
index_jsp.java, etc files. now i compile those to .class files and i would
like to distribute them inside the .war file so that the tomcat server
itself doesnt need to compile anything by himself. _Ideally_ i'd like to
exclude _any_ .jsp file in the .war file and just include the compiled
jsp.class files.

but i wonder ... tomcat somehow doesnt really know what i'm sending him and
he doesnt recognize any of the precompiled pages. how do i tell tomcat to
use the precompiled pages in the .war instead of compiling them himself?

i know i can write this it into my web.xml


index_jsp

  my.package.jsp.index_jsp




index_jsp
/index.jsp


but somehow i dont like it this way, but i would rather use this instead of
putting jsp files into the .war file. would be cool if tomcat would do
something like this by himself when he finds *_jsp.class in a
/WEB-INF/precompiled directory.

Anyways maybe tomcat has some support for what i'm trying to find and i just
can't find it? Comments welcome

Greetings,
Thomas




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Oracle connection pooling

2002-10-25 Thread Sinclair, Alan (CORP, GEAccess)
Yoav,
Did you mean setting maxWait to 0 ?

thanks

-Original Message-
From: Shapira, Yoav [mailto:Yoav.Shapira@;mpi.com]
Sent: Thursday, October 24, 2002 7:15 AM
To: Tomcat Users List
Subject: RE: Oracle connection pooling


Hi,

> 
>   maxActive
>   5
> 
> 
>   maxIdle
>   3
> 
> 
>   maxWait
>   -1
> 

The above to me suggests that the initial value could be 0.  The above
doesn't force pre-creation of any connections on server startup.

>have I missed ?  Where does Tomcat write the JDBC logging info - there
is
>nothing in logs/catalina.out I presume when Tomcat starts, the db
>connections should be initiated with the database but there are none.
I
>have no idea where to go from here.

Try setting the relevant debug="0" statements to debug="99" in your
$CATALINA_HOME/conf/server.xml.  Then you should get a lot more
information on what tomcat is trying to do and any errors it may run
into.

Yoav Shapira
Millennium ChemInformatics

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Oracle connection pooling

2002-10-25 Thread Shapira, Yoav
Hi,

>Did you mean setting maxWait to 0 ?

No.  I meant that setting maxActive to 5, maxIdle to 3, and maxWait to
-1 does not mean there will be 3 connections on startup.  

It's up to the connection pool implementation to decide if it wants to
pre-create the connections on startup, or not.  Some implementations may
expose a configuration parameter so that you can tell them whether to be
greedy.  

Alternatively, you could ask for as many connections as your maxIdle
will allow on startup, so that when your first real DB calls come the
connections are already created.

Yoav Shapira
Millennium ChemInformatics

This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Re: Tag object pooling and immutability in the servlet spec

2002-10-25 Thread Glenn Nielsen
Mr. Tomcat wrote:

Is there a way to turn off tag object pooling?  Object pooling was a
cool performance technique in earlier versions of Java, but now object
creation is very fast, so it no longer serves a performance function,
and it introduces extra complexity into tag object design.  Is this
misfeature going to be phased out?



In more recent JVM's object creation is faster, but those objects also
need to be garbage collected later.  Large numbers of objects
requiring GC can significantly degrade performance. The above statement
is a generalization that doesn't apply in all cases.

In Jasper 2 custom JSP tag pooling provides a huge boost in performance
for JSP pages which use custom tags. Request latency for JSP pages which
use custom tags was reduced significantly and the system can now scale to
handle larger numbers of concurrent requests.  Before upgrading to
Jasper 2 we had upgraded the hardware from single to dual cpu's and
tripled the system ram.  We still had some scaling problems.  Upgrading
to Jasper 2 a few weeks later solved are problems.  It improved performance
as much or more than the hardware upgrade. (The site uses alot of JSP pages
with custom tags).

This is on Sun sparc's running Solaris with JDK 1.3.1.

I'll let someone else address your other issue.

Regards,

Glenn


Also, on the immutable object topic, it seems that it would be better to
have all the initialization of servlets and filters done in the
constructor, not by calling an init function.  If everything could be
set in the constructor, then all instance fields could be private final,
meaning that the servlet or filter object could be immutable, and
therefore known to be threadsafe, which is an issue with servlets.  Any
chance of these changes happening in future releases of the servlet
spec?

Thanks


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Tomcat Scalability - Long

2002-10-25 Thread Felipe Schnack
  I would say Tomcat 4.1.x probably would be good for you mainly if you
uses lots of Taglibs, if they actually will work on it.
  Btw, I'm still using 4.0.x... how everybody is doing with 4.1.x? I
heard is too much buggy for production right now.

On Fri, 2002-10-25 at 12:20, Glenn Nielsen wrote:
> I have the following in production:
> 
> Tomcat 4.1, JDK 1.3.1, and MySQL on a Dual CPU Sun 250 app server and Apache
> using mod_jk 1.2 on a separate server. We are now getting 4 weeks continuous uptime.
> I stop and restart Tomcat once each month because the minimum memory the java heap
> uses over time increases.  This is on a site handling 30k Tomcat requests per day.
> With peak loads of 5k-6k Tomcat requests per hour.
> 
> When scaling Tomcat there are many issues to address when tuning performance.
> 
> I would suggest learning more about how the JVM does garbage collection and
> test different Java startup args related to jvm stack size, etc.  Try starting
> Tomcat with the java arg "-verbose:gc", this will collect GC data which can
> help you when tuning the JVM memory usage.
> 
> You might also want to profile your applicaiton using OptimizeIt or JProbe
> to see if it is the source of the problem.
> 
> And of course the performance tuning should be done on test servers which
> are as close as possible to your production environment and with a load
> that simulates your site usage.
> 
> Consider upgrading to Tomcat 4.1.  Especially if your site uses JSP.
> Jasper 2 which comes with Tocmat 4.1 significantly improves performance
> of JSP.
> 
> One final note, I would not set reloadable=true on a production system.
> That adds alot of overhead.  The reloadable option is really there only
> to make development easier.
> 
> Regards,
> 
> Glenn
> 
> Brandon Cruz wrote:
> > Does anyone have any solid information about the scalability of Tomcat?  It
> > seems very limiting to me, but that is hopefully due to improper
> > configuration.  Here is our situation and what seems to be happening under a
> > small amount of stress.
> > 
> > ---About our Environment---
> > 
> > PIII 1.0Ghz
> > 512 Meg Ram
> > Linux RedHat 7.1
> > MySQL Database
> > Apache 1.3.x
> > mod_jk - logging turned all the way down
> > Tomcat 3.2.4 - contexts *are* reloadable right now
> > SUN JDK 1.3.1_01
> > 
> > ---About our Application---
> > 
> > Our Application is a content management tool that reads and writes to the
> > MySQL Database and reads and writes files.  All the pages within this
> > application are served by Tomcat 3.2.4.  About 80-120 people per day log
> > into this application and spend anywhere from 10 minutes to one hour working
> > on the application.  At any given time there are between 15 and 50 active
> > database connections.
> > 
> > ---What we are seeing---
> > 
> > Tomcat needs to be restarted every few days.  If we don't restart it, it
> > seems tomcat eventually locks up and does not respond at all.  No errors or
> > anything are reported, it just will not respond.  Apache continues to work
> > during this time and all static HTML pages are accessible.
> > 
> > CPU - The processor usage seems to slowly increase as time goes on.  After
> > about one day, it seems one java process uses 30% of available CPU or more,
> > depending on whether users are performing operations or not.  When nobody is
> > doing anything, the processer still seems to be sitting around 30% until
> > tomcat is restarted.  This seems to cap after three to five days and not
> > increase too much more.
> > 
> > RAM - This slowly increases and never stops increasing.  We do not have any
> > special parameters set for the VM when it starts, but this does not seem to
> > matter.  The RAM gets up to about 135 MB after four or five days, but would
> > continue to grow if tomcat were not allowed.
> > 
> > 
> > Can anyone explain this behavior, talk about the scalability of Tomcat, or
> > provide any similar working solutions that perform better than this?  Is it
> > normal, should we just throw more hardware at it?  Are there configuration
> > parameters that can be used to increase performance, such as set
> > reloadable=false in all contexts?  Would we get better performance if we
> > upgraded to 4.x, or would that just be more work for little improvement?
> > 
> > 
> > --
> > To unsubscribe, e-mail:   
> > For additional commands, e-mail: 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
-- 

Felipe Schnack
Analista de Sistemas
[EMAIL PROTECTED]
Cel.: (51)91287530
Linux Counter #281893

Faculdade Ritter dos Reis
www.ritterdosreis.br
[EMAIL PROTECTED]
Fone/Fax.: (51)32303328


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

Virtual Hosts

2002-10-25 Thread Curt LeCaptain
Okay... so, I've redone my complete Tomcat/Apache setup according to
instructions on John Turner's website:

http://www.johnturner.com/howto/apache1-tomcat404-howto.html

Everything works as it should! :)

Now... I'm completely baffled as to how to set up a virtual host in
server.xml, I'm not exactly sure how to setup the elements and such to get
directories to work.

IE, I want a virtual host called "dev.infinity-tech.com" within there, where
JSP's can be launched from the document root of that site
(/www/docs/dev.infinity-tech.com) and servlets can be launched from a folder
within that directory.  If someone could help me out, or point me in a
direction to figure this out, please, let me know! :)

Curt LeCaptain


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




4.1.x In Production [Was: Re: Tomcat Scalability - Long]

2002-10-25 Thread Shapira, Yoav
Hi,

>  I would say Tomcat 4.1.x probably would be good for you mainly if you
>uses lots of Taglibs, if they actually will work on it.
>  Btw, I'm still using 4.0.x... how everybody is doing with 4.1.x? I
>heard is too much buggy for production right now.

We're using 4.1.10-LE and 4.1.12-LE in production.  It's been good and
stable, except for one bug, but it's an annoying one: something in our
HTTP headers trips the 32K buffer size limit, and so we get an
ArrayIndexOutOfBounds exception from one of the internal Coyote classes
sometimes.

The good news is that if you look closely at the test milestone from
yesterday, 4.1.13, there's an item addressing the above ;)  Buffer size
increased to 48K.  I downloaded and setup a couple of 4.1.13 test
servers yesterday and I'm having our QA team run some tests against them
to attempt to duplicate the exception above.  So far, so good, no
exception.

I'd be interested to hear if other people have seen the above exception
when using 4.1.x.  

Yoav Shapira
Millennium ChemInformatics

This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Re: Tomcat Scalability - Long

2002-10-25 Thread Renato
I'm using Tomcat 4.1.12 on a production site with more than 150 clients and it looks 
like to me is better that 4.0.x.

On 25 Oct 2002 11:42:14 -0200, Felipe Schnack <[EMAIL PROTECTED]> escreveu :

> De: Felipe Schnack <[EMAIL PROTECTED]>
> Data: 25 Oct 2002 11:42:14 -0200
> Para: Tomcat Users List <[EMAIL PROTECTED]>
> Assunto: Re: Tomcat Scalability - Long
> 
>   I would say Tomcat 4.1.x probably would be good for you mainly if you
> uses lots of Taglibs, if they actually will work on it.
>   Btw, I'm still using 4.0.x... how everybody is doing with 4.1.x? I
> heard is too much buggy for production right now.
> 
> On Fri, 2002-10-25 at 12:20, Glenn Nielsen wrote:
> > I have the following in production:
> > 
> > Tomcat 4.1, JDK 1.3.1, and MySQL on a Dual CPU Sun 250 app server and Apache
> > using mod_jk 1.2 on a separate server. We are now getting 4 weeks continuous 
>uptime.
> > I stop and restart Tomcat once each month because the minimum memory the java heap
> > uses over time increases.  This is on a site handling 30k Tomcat requests per day.
> > With peak loads of 5k-6k Tomcat requests per hour.
> > 
> > When scaling Tomcat there are many issues to address when tuning performance.
> > 
> > I would suggest learning more about how the JVM does garbage collection and
> > test different Java startup args related to jvm stack size, etc.  Try starting
> > Tomcat with the java arg "-verbose:gc", this will collect GC data which can
> > help you when tuning the JVM memory usage.
> > 
> > You might also want to profile your applicaiton using OptimizeIt or JProbe
> > to see if it is the source of the problem.
> > 
> > And of course the performance tuning should be done on test servers which
> > are as close as possible to your production environment and with a load
> > that simulates your site usage.
> > 
> > Consider upgrading to Tomcat 4.1.  Especially if your site uses JSP.
> > Jasper 2 which comes with Tocmat 4.1 significantly improves performance
> > of JSP.
> > 
> > One final note, I would not set reloadable=true on a production system.
> > That adds alot of overhead.  The reloadable option is really there only
> > to make development easier.
> > 
> > Regards,
> > 
> > Glenn
> > 
> > Brandon Cruz wrote:
> > > Does anyone have any solid information about the scalability of Tomcat?  It
> > > seems very limiting to me, but that is hopefully due to improper
> > > configuration.  Here is our situation and what seems to be happening under a
> > > small amount of stress.
> > > 
> > > ---About our Environment---
> > > 
> > > PIII 1.0Ghz
> > > 512 Meg Ram
> > > Linux RedHat 7.1
> > > MySQL Database
> > > Apache 1.3.x
> > > mod_jk - logging turned all the way down
> > > Tomcat 3.2.4 - contexts *are* reloadable right now
> > > SUN JDK 1.3.1_01
> > > 
> > > ---About our Application---
> > > 
> > > Our Application is a content management tool that reads and writes to the
> > > MySQL Database and reads and writes files.  All the pages within this
> > > application are served by Tomcat 3.2.4.  About 80-120 people per day log
> > > into this application and spend anywhere from 10 minutes to one hour working
> > > on the application.  At any given time there are between 15 and 50 active
> > > database connections.
> > > 
> > > ---What we are seeing---
> > > 
> > > Tomcat needs to be restarted every few days.  If we don't restart it, it
> > > seems tomcat eventually locks up and does not respond at all.  No errors or
> > > anything are reported, it just will not respond.  Apache continues to work
> > > during this time and all static HTML pages are accessible.
> > > 
> > > CPU - The processor usage seems to slowly increase as time goes on.  After
> > > about one day, it seems one java process uses 30% of available CPU or more,
> > > depending on whether users are performing operations or not.  When nobody is
> > > doing anything, the processer still seems to be sitting around 30% until
> > > tomcat is restarted.  This seems to cap after three to five days and not
> > > increase too much more.
> > > 
> > > RAM - This slowly increases and never stops increasing.  We do not have any
> > > special parameters set for the VM when it starts, but this does not seem to
> > > matter.  The RAM gets up to about 135 MB after four or five days, but would
> > > continue to grow if tomcat were not allowed.
> > > 
> > > 
> > > Can anyone explain this behavior, talk about the scalability of Tomcat, or
> > > provide any similar working solutions that perform better than this?  Is it
> > > normal, should we just throw more hardware at it?  Are there configuration
> > > parameters that can be used to increase performance, such as set
> > > reloadable=false in all contexts?  Would we get better performance if we
> > > upgraded to 4.x, or would that just be more work for little improvement?
> > > 
> > > 
> > > --
> > > To unsubscribe, e-mail:   
> > > For additional commands, e-mail: 

Re: Tomcat and 401 custom page how?

2002-10-25 Thread Kristján Bjarni Guðmundsson
Yes you are right I looked into the bug database (should have done that 
first)

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10373
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13430

This bug has been around forever, and will probably never be fixed it 
seems according to the developers.

The hack only works for jsp pages, but doesn't work in servlets (anyone 
know why?), Tomcat ignores whatever you write out
to the stream and puts in it's own standard message.

This bug means you can't have professional looking web applications on 
Tomcat, I guess I have look
into some other web applications solutions, too bad I kinda like Tomcat.

Johann Uhrmann <[EMAIL PROTECTED]> wrote on 25.10.2002 12:00:18:

> On Thu, 2002-10-24 at 16:24, Kristján Bjarni Guðmundsson wrote:
> > I use custom error pages for various error codes (404. etc),  all of 
them
> > work except 401 error.
> >
> > If I go to a protected page the browser just displays the 401 page 
without
> > prompting me
> > to log in. What am I doing wrong?

> Short answer: nothing

> Tomcat sends that pages with response code 200. I consider this a bug.

> If You want tomcat to send You 401-page with a 401 code You have to
> use a JSP which sets the response code manually:

> ...
> <% response.setStatus(response.SC_UNAUTHORIZED);
> response.setHeader("WWW-Authenticate", "BASIC realm=\"restricted\"");
> %>
> ...

> It is a hack but at least it is working.

> hth,

> Hans

> 
> --
> To unsubscribe, e-mail:   <
mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail: <
mailto:tomcat-user-help@;jakarta.apache.org>


RE: Virtual Hosts

2002-10-25 Thread Turner, John

Glad I could help.  

Check the documentation for the Host container:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html

...and the documentation for the Context container:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html

Basically, a default Tomcat install has a single Virtual Host (localhost)
with a single webapp (/examples).  So setup a new Host container that mimics
the one for localhost, and setup a ROOT Context container for your webapp
within the new Host container.

On the Apache side, setup a normal Apache VirtualHost, and in that
VirtualHost container, put two JkMount statements to map *.jsp and /servlet
to ajp13.  In workers.properties, duplicate the setup you have for
localhost, and change .host to the same name as the virtual host in Apache
and the new Host container in server.xml.

That should get you started.

John


> -Original Message-
> From: Curt LeCaptain [mailto:lecaptainc@;itol.com]
> Sent: Friday, October 25, 2002 10:50 AM
> To: Tomcat Users List
> Subject: Virtual Hosts
> 
> 
> Okay... so, I've redone my complete Tomcat/Apache setup according to
> instructions on John Turner's website:
> 
> http://www.johnturner.com/howto/apache1-tomcat404-howto.html
> 
> Everything works as it should! :)
> 
> Now... I'm completely baffled as to how to set up a virtual host in
> server.xml, I'm not exactly sure how to setup the elements 
> and such to get
> directories to work.
> 
> IE, I want a virtual host called "dev.infinity-tech.com" 
> within there, where
> JSP's can be launched from the document root of that site
> (/www/docs/dev.infinity-tech.com) and servlets can be 
> launched from a folder
> within that directory.  If someone could help me out, or point me in a
> direction to figure this out, please, let me know! :)
> 
> Curt LeCaptain
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Virtual Hosts

2002-10-25 Thread Curt LeCaptain
Now, what I'm wondering, is since (according to your HOWTO) Tomcat is setup
to create the  directive for Apache, will setting up just my
server.xml do it for me, or will I need to setup Apache also?

Curt



- Original Message -
From: "Turner, John" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Friday, October 25, 2002 10:03 AM
Subject: RE: Virtual Hosts


>
> Glad I could help.
>
> Check the documentation for the Host container:
>
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html
>
> ...and the documentation for the Context container:
>
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html
>
> Basically, a default Tomcat install has a single Virtual Host (localhost)
> with a single webapp (/examples).  So setup a new Host container that
mimics
> the one for localhost, and setup a ROOT Context container for your webapp
> within the new Host container.
>
> On the Apache side, setup a normal Apache VirtualHost, and in that
> VirtualHost container, put two JkMount statements to map *.jsp and
/servlet
> to ajp13.  In workers.properties, duplicate the setup you have for
> localhost, and change .host to the same name as the virtual host in Apache
> and the new Host container in server.xml.
>
> That should get you started.
>
> John
>
>
> > -Original Message-
> > From: Curt LeCaptain [mailto:lecaptainc@;itol.com]
> > Sent: Friday, October 25, 2002 10:50 AM
> > To: Tomcat Users List
> > Subject: Virtual Hosts
> >
> >
> > Okay... so, I've redone my complete Tomcat/Apache setup according to
> > instructions on John Turner's website:
> >
> > http://www.johnturner.com/howto/apache1-tomcat404-howto.html
> >
> > Everything works as it should! :)
> >
> > Now... I'm completely baffled as to how to set up a virtual host in
> > server.xml, I'm not exactly sure how to setup the elements
> > and such to get
> > directories to work.
> >
> > IE, I want a virtual host called "dev.infinity-tech.com"
> > within there, where
> > JSP's can be launched from the document root of that site
> > (/www/docs/dev.infinity-tech.com) and servlets can be
> > launched from a folder
> > within that directory.  If someone could help me out, or point me in a
> > direction to figure this out, please, let me know! :)
> >
> > Curt LeCaptain
> >
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> >
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Virtual Hosts

2002-10-25 Thread Turner, John

Nope, just setting up server.xml should be enough.  You will need to restart
Tomcat to regen a new mod_jk.conf, then either restart apache or do
`APACHE_HOME/bin/apachectl graceful`.

John

> -Original Message-
> From: Curt LeCaptain [mailto:lecaptainc@;itol.com]
> Sent: Friday, October 25, 2002 11:14 AM
> To: Tomcat Users List
> Subject: Re: Virtual Hosts
> 
> 
> Now, what I'm wondering, is since (according to your HOWTO) 
> Tomcat is setup
> to create the  directive for Apache, will 
> setting up just my
> server.xml do it for me, or will I need to setup Apache also?
> 
> Curt
> 
> 
> 
> - Original Message -
> From: "Turner, John" <[EMAIL PROTECTED]>
> To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
> Sent: Friday, October 25, 2002 10:03 AM
> Subject: RE: Virtual Hosts
> 
> 
> >
> > Glad I could help.
> >
> > Check the documentation for the Host container:
> >
> > http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html
> >
> > ...and the documentation for the Context container:
> >
> > http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html
> >
> > Basically, a default Tomcat install has a single Virtual 
> Host (localhost)
> > with a single webapp (/examples).  So setup a new Host 
> container that
> mimics
> > the one for localhost, and setup a ROOT Context container 
> for your webapp
> > within the new Host container.
> >
> > On the Apache side, setup a normal Apache VirtualHost, and in that
> > VirtualHost container, put two JkMount statements to map *.jsp and
> /servlet
> > to ajp13.  In workers.properties, duplicate the setup you have for
> > localhost, and change .host to the same name as the virtual 
> host in Apache
> > and the new Host container in server.xml.
> >
> > That should get you started.
> >
> > John
> >
> >
> > > -Original Message-
> > > From: Curt LeCaptain [mailto:lecaptainc@;itol.com]
> > > Sent: Friday, October 25, 2002 10:50 AM
> > > To: Tomcat Users List
> > > Subject: Virtual Hosts
> > >
> > >
> > > Okay... so, I've redone my complete Tomcat/Apache setup 
> according to
> > > instructions on John Turner's website:
> > >
> > > http://www.johnturner.com/howto/apache1-tomcat404-howto.html
> > >
> > > Everything works as it should! :)
> > >
> > > Now... I'm completely baffled as to how to set up a 
> virtual host in
> > > server.xml, I'm not exactly sure how to setup the elements
> > > and such to get
> > > directories to work.
> > >
> > > IE, I want a virtual host called "dev.infinity-tech.com"
> > > within there, where
> > > JSP's can be launched from the document root of that site
> > > (/www/docs/dev.infinity-tech.com) and servlets can be
> > > launched from a folder
> > > within that directory.  If someone could help me out, or 
> point me in a
> > > direction to figure this out, please, let me know! :)
> > >
> > > Curt LeCaptain
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > 
> > > For additional commands, e-mail:
> > > 
> > >
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> >
> 
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: jspc pre-compiled pages distributed with .war file?

2002-10-25 Thread John Trollinger
The jspc command does not put "real" package names on the jsp.class
files.  What happens is each jsp page gets its own classloader so if you
have 2 index.jsp files they will still run.  To do what you want to do
you have to have each jsp generated .java file have a "real" package
name so that when you deploy the class files to tomcat it can resolve
the classes correctly.

There have been a few threads on both this and the developer list about
work arounds to this.. Don't have the links.. But I suggest you try
there.

Also there is an option on jspc for jasper that will create the web.xml
fragment for all the mappings for the jsp servlets.

> -Original Message-
> From: Thomas Heller [mailto:th.heller@;mx4k.com] 
> Sent: Friday, October 25, 2002 10:24 AM
> To: Tomcat Users List
> Subject: jspc pre-compiled pages distributed with .war file?
> 
> 
> hi there,
> 
> i am migrating my projects from php to java and began to set 
> up a development server that ideally does all the dev work 
> once a project is marked release i just call an ant task to 
> deploy the project to one or more (load balanced) production servers.
> 
> i have written an ant build.xml to compile my webapp and to 
> put everything i need into "mywebapp.war". thats working very 
> fine and i can just deploy that .war to a tomcat server 
> without any problems.
> 
> now, i have setup another ant task to precompile every jsp 
> file using jasper (ant task "jspc"). thats working perfectly 
> fine and i have loads of index_jsp.java, etc files. now i 
> compile those to .class files and i would like to distribute 
> them inside the .war file so that the tomcat server itself 
> doesnt need to compile anything by himself. _Ideally_ i'd 
> like to exclude _any_ .jsp file in the .war file and just 
> include the compiled jsp.class files.
> 
> but i wonder ... tomcat somehow doesnt really know what i'm 
> sending him and he doesnt recognize any of the precompiled 
> pages. how do i tell tomcat to use the precompiled pages in 
> the .war instead of compiling them himself?
> 
> i know i can write this it into my web.xml
> 
> 
> index_jsp
> 
>   my.package.jsp.index_jsp
> 
> 
> 
> 
> index_jsp
> /index.jsp
> 
> 
> but somehow i dont like it this way, but i would rather use 
> this instead of putting jsp files into the .war file. would 
> be cool if tomcat would do something like this by himself 
> when he finds *_jsp.class in a /WEB-INF/precompiled directory.
> 
> Anyways maybe tomcat has some support for what i'm trying to 
> find and i just can't find it? Comments welcome
> 
> Greetings,
> Thomas
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
>  [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: jspc pre-compiled pages distributed with .war file?

2002-10-25 Thread Felipe Schnack
  I created an ANT script to generate the class files, and I'm with the
same problemas Thomas have. But about this jspc option to generate
web.xml... I think ant doesn't support it, does it?
  (I'm using Ant 1.5)

On Fri, 2002-10-25 at 13:29, John Trollinger wrote:
> The jspc command does not put "real" package names on the jsp.class
> files.  What happens is each jsp page gets its own classloader so if you
> have 2 index.jsp files they will still run.  To do what you want to do
> you have to have each jsp generated .java file have a "real" package
> name so that when you deploy the class files to tomcat it can resolve
> the classes correctly.
> 
> There have been a few threads on both this and the developer list about
> work arounds to this.. Don't have the links.. But I suggest you try
> there.
> 
> Also there is an option on jspc for jasper that will create the web.xml
> fragment for all the mappings for the jsp servlets.
> 
> > -Original Message-
> > From: Thomas Heller [mailto:th.heller@;mx4k.com] 
> > Sent: Friday, October 25, 2002 10:24 AM
> > To: Tomcat Users List
> > Subject: jspc pre-compiled pages distributed with .war file?
> > 
> > 
> > hi there,
> > 
> > i am migrating my projects from php to java and began to set 
> > up a development server that ideally does all the dev work 
> > once a project is marked release i just call an ant task to 
> > deploy the project to one or more (load balanced) production servers.
> > 
> > i have written an ant build.xml to compile my webapp and to 
> > put everything i need into "mywebapp.war". thats working very 
> > fine and i can just deploy that .war to a tomcat server 
> > without any problems.
> > 
> > now, i have setup another ant task to precompile every jsp 
> > file using jasper (ant task "jspc"). thats working perfectly 
> > fine and i have loads of index_jsp.java, etc files. now i 
> > compile those to .class files and i would like to distribute 
> > them inside the .war file so that the tomcat server itself 
> > doesnt need to compile anything by himself. _Ideally_ i'd 
> > like to exclude _any_ .jsp file in the .war file and just 
> > include the compiled jsp.class files.
> > 
> > but i wonder ... tomcat somehow doesnt really know what i'm 
> > sending him and he doesnt recognize any of the precompiled 
> > pages. how do i tell tomcat to use the precompiled pages in 
> > the .war instead of compiling them himself?
> > 
> > i know i can write this it into my web.xml
> > 
> > 
> > index_jsp
> > 
> >   my.package.jsp.index_jsp
> > 
> > 
> > 
> > 
> > index_jsp
> > /index.jsp
> > 
> > 
> > but somehow i dont like it this way, but i would rather use 
> > this instead of putting jsp files into the .war file. would 
> > be cool if tomcat would do something like this by himself 
> > when he finds *_jsp.class in a /WEB-INF/precompiled directory.
> > 
> > Anyways maybe tomcat has some support for what i'm trying to 
> > find and i just can't find it? Comments welcome
> > 
> > Greetings,
> > Thomas
> > 
> > 
> > 
> > 
> > --
> > To unsubscribe, e-mail:   
> >  [EMAIL PROTECTED]>
> > For 
> > additional commands, 
> > e-mail: 
> > 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
-- 

Felipe Schnack
Analista de Sistemas
[EMAIL PROTECTED]
Cel.: (51)91287530
Linux Counter #281893

Faculdade Ritter dos Reis
www.ritterdosreis.br
[EMAIL PROTECTED]
Fone/Fax.: (51)32303328


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




JNDI Datasource is null, again

2002-10-25 Thread "Steltner, Jörn HTC/DE/ESS"
Hallo,

I read that the problem was described many times here, but I cecked all
solutions and got the error again. Please may someone give me a hint.
Attached my config and the exception print. I don't know where I should look
...

I use Tomcat 4.1.12 and J2SDK 1.4.1_01.


my code:

/*
 * dbGetInvoices.java
 *
 * Created on 12. August 2002, 15:14
 */
import javax.naming.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.sql.*;
import java.io.*;
import java.sql.*;
import java.util.*;
import java.text.*;
/**
 *
 * @author  steltner
 * @version
 */


public class dbGetInvoices extends HttpServlet {

public void init(ServletConfig config) throws ServletException 
{
super.init(config);
}

/** Destroys the servlet.
 */
public void destroy() {
}

/** Returns a short description of the servlet.
 */
public String getServletInfo() {
return "dbGetInvoices";
}

/** Processes requests for both HTTP GET and
POST methods.
 * @param request servlet request
 * @param response servlet response
 */
protected void processRequest(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, java.io.IOException {
response.setContentType("text/html");
java.io.PrintWriter out = response.getWriter();
out.close();
}

/** Handles the HTTP GET method.
 * @param request servlet request
 * @param response servlet response
 */
protected void doGet(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, java.io.IOException 
{
   PrintWriter out = response.getWriter();
   HttpSession session = request.getSession(true);
   
   String  no_user = (String)session.getAttribute("logon.isUserNo");
   String  no_role = (String)session.getAttribute("logon.isRole");
  
   if ((null == no_user) || (null == no_role))
   {
  out.println("Sie sind zur Zeit nicht angemeldet!");
   }
   else
   {
   // wenn Projektteam Mitglied
   if ( 0 == no_role.compareTo("3"))
   GetInvoices( out, no_user );
   }
   out.println("");
}

protected void doPost(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, java.io.IOException {
processRequest(request, response);
}

protected void GetInvoices( PrintWriter out, String no_user )
{
   
   GetInvoiceContents(out,no_user);
   ..
}

protected void GetInvoiceContents( PrintWriter out, String no_user )
{
   try
   {
  Context initCtx = new InitialContext();
  DataSource ds =
(DataSource)initCtx.lookup("java:comp/env/jdbc/w2k");


  // at this point ds is equal null :-(( 

  if (null != ds) 
  {
 Connection conn = ds.getConnection();
  
 if (null != conn)  
 {
 Statement st = conn.createStatement();
 ResultSet rs = st.executeQuery("select description from
price_comparison where no_price_comparison=1");
   
 Strings  = "";
 int   i  = 0;
 doubled  = 0.0;

 // number formating
 Locale   myLocale= new Locale("de", "Germany");
 NumberFormat myFormatter =
NumberFormat.getNumberInstance(myLocale);
 myFormatter.setGroupingUsed( true );
 myFormatter.setMinimumFractionDigits(2);
 myFormatter.setMaximumFractionDigits(2);

 while (rs.next())
 {
 // do something
 } 
 
 st.close();  
 conn.close();
 }
  }
  
   }
   catch(Exception e) {
e.printStackTrace();
   }
   
}
  
}



my server.xml



  
  

  
   
 factory
 org.apache.commons.dbcp.BasicDataSourceFactory
   

   
   
 maxActive
 100
   

   
   
 maxIdle
 30
   

   
   
 maxWait
 1
   

   
   
 username
 web
   
   
 password
 access
   

   
   
 driverClassName
 org.gjt.mm.mysql.Driver
   

   
   
 url
 
jdbc:mysql://localhost:3306/w2k?autoReconnect=true
   

   
 removeAbandoned
 true
   

   
 removeAbandonedTimeout
 60
   

   
 logAbandoned
 

RE: JNDI Datasource is null, again

2002-10-25 Thread Short, Dave
I noticed you have the following code in your server.xml file within your
w2k context:



I don't have this in mine.  Not sure if it's needed.  I can connect just
fine without it.  Take it out and see if it works.

-Original Message-
From: "Steltner, Jörn HTC/DE/ESS" [mailto:Joern.Steltner@;hochtief.de]
Sent: October 25, 2002 8:38 AM
To: '[EMAIL PROTECTED]'
Subject: JNDI Datasource is null, again


Hallo,

I read that the problem was described many times here, but I cecked all
solutions and got the error again. Please may someone give me a hint.
Attached my config and the exception print. I don't know where I should look
...

I use Tomcat 4.1.12 and J2SDK 1.4.1_01.


my code:

/*
 * dbGetInvoices.java
 *
 * Created on 12. August 2002, 15:14
 */
import javax.naming.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.sql.*;
import java.io.*;
import java.sql.*;
import java.util.*;
import java.text.*;
/**
 *
 * @author  steltner
 * @version
 */


public class dbGetInvoices extends HttpServlet {

public void init(ServletConfig config) throws ServletException 
{
super.init(config);
}

/** Destroys the servlet.
 */
public void destroy() {
}

/** Returns a short description of the servlet.
 */
public String getServletInfo() {
return "dbGetInvoices";
}

/** Processes requests for both HTTP GET and
POST methods.
 * @param request servlet request
 * @param response servlet response
 */
protected void processRequest(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, java.io.IOException {
response.setContentType("text/html");
java.io.PrintWriter out = response.getWriter();
out.close();
}

/** Handles the HTTP GET method.
 * @param request servlet request
 * @param response servlet response
 */
protected void doGet(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, java.io.IOException 
{
   PrintWriter out = response.getWriter();
   HttpSession session = request.getSession(true);
   
   String  no_user = (String)session.getAttribute("logon.isUserNo");
   String  no_role = (String)session.getAttribute("logon.isRole");
  
   if ((null == no_user) || (null == no_role))
   {
  out.println("Sie sind zur Zeit nicht angemeldet!");
   }
   else
   {
   // wenn Projektteam Mitglied
   if ( 0 == no_role.compareTo("3"))
   GetInvoices( out, no_user );
   }
   out.println("");
}

protected void doPost(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, java.io.IOException {
processRequest(request, response);
}

protected void GetInvoices( PrintWriter out, String no_user )
{
   
   GetInvoiceContents(out,no_user);
   ..
}

protected void GetInvoiceContents( PrintWriter out, String no_user )
{
   try
   {
  Context initCtx = new InitialContext();
  DataSource ds =
(DataSource)initCtx.lookup("java:comp/env/jdbc/w2k");


  // at this point ds is equal null :-(( 

  if (null != ds) 
  {
 Connection conn = ds.getConnection();
  
 if (null != conn)  
 {
 Statement st = conn.createStatement();
 ResultSet rs = st.executeQuery("select description from
price_comparison where no_price_comparison=1");
   
 Strings  = "";
 int   i  = 0;
 doubled  = 0.0;

 // number formating
 Locale   myLocale= new Locale("de", "Germany");
 NumberFormat myFormatter =
NumberFormat.getNumberInstance(myLocale);
 myFormatter.setGroupingUsed( true );
 myFormatter.setMinimumFractionDigits(2);
 myFormatter.setMaximumFractionDigits(2);

 while (rs.next())
 {
 // do something
 } 
 
 st.close();  
 conn.close();
 }
  }
  
   }
   catch(Exception e) {
e.printStackTrace();
   }
   
}
  
}



my server.xml



  
  

  
   
 factory
 org.apache.commons.dbcp.BasicDataSourceFactory
   

   
   
 maxActive
 100
   

   
   
 maxIdle
 30
   

   
   
 maxWait
 1
   

   
   
 username
 web
   
   
 password
 access
 

RE: JNDI Datasource is null, again

2002-10-25 Thread "Steltner, Jörn HTC/DE/ESS"
sorry, doesn't work!

-Original Message-
From: Short, Dave [mailto:dave.short@;pfizer.com]
Sent: Freitag, 25. Oktober 2002 17:56
To: 'Tomcat Users List'
Subject: RE: JNDI Datasource is null, again


I noticed you have the following code in your server.xml file within your
w2k context:



I don't have this in mine.  Not sure if it's needed.  I can connect just
fine without it.  Take it out and see if it works.

-Original Message-
From: "Steltner, Jörn HTC/DE/ESS" [mailto:Joern.Steltner@;hochtief.de]
Sent: October 25, 2002 8:38 AM
To: '[EMAIL PROTECTED]'
Subject: JNDI Datasource is null, again


Hallo,

I read that the problem was described many times here, but I cecked all
solutions and got the error again. Please may someone give me a hint.
Attached my config and the exception print. I don't know where I should look
...

I use Tomcat 4.1.12 and J2SDK 1.4.1_01.


my code:

/*
 * dbGetInvoices.java
 *
 * Created on 12. August 2002, 15:14
 */
import javax.naming.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.sql.*;
import java.io.*;
import java.sql.*;
import java.util.*;
import java.text.*;
/**
 *
 * @author  steltner
 * @version
 */


public class dbGetInvoices extends HttpServlet {

public void init(ServletConfig config) throws ServletException 
{
super.init(config);
}

/** Destroys the servlet.
 */
public void destroy() {
}

/** Returns a short description of the servlet.
 */
public String getServletInfo() {
return "dbGetInvoices";
}

/** Processes requests for both HTTP GET and
POST methods.
 * @param request servlet request
 * @param response servlet response
 */
protected void processRequest(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, java.io.IOException {
response.setContentType("text/html");
java.io.PrintWriter out = response.getWriter();
out.close();
}

/** Handles the HTTP GET method.
 * @param request servlet request
 * @param response servlet response
 */
protected void doGet(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, java.io.IOException 
{
   PrintWriter out = response.getWriter();
   HttpSession session = request.getSession(true);
   
   String  no_user = (String)session.getAttribute("logon.isUserNo");
   String  no_role = (String)session.getAttribute("logon.isRole");
  
   if ((null == no_user) || (null == no_role))
   {
  out.println("Sie sind zur Zeit nicht angemeldet!");
   }
   else
   {
   // wenn Projektteam Mitglied
   if ( 0 == no_role.compareTo("3"))
   GetInvoices( out, no_user );
   }
   out.println("");
}

protected void doPost(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, java.io.IOException {
processRequest(request, response);
}

protected void GetInvoices( PrintWriter out, String no_user )
{
   
   GetInvoiceContents(out,no_user);
   ..
}

protected void GetInvoiceContents( PrintWriter out, String no_user )
{
   try
   {
  Context initCtx = new InitialContext();
  DataSource ds =
(DataSource)initCtx.lookup("java:comp/env/jdbc/w2k");


  // at this point ds is equal null :-(( 

  if (null != ds) 
  {
 Connection conn = ds.getConnection();
  
 if (null != conn)  
 {
 Statement st = conn.createStatement();
 ResultSet rs = st.executeQuery("select description from
price_comparison where no_price_comparison=1");
   
 Strings  = "";
 int   i  = 0;
 doubled  = 0.0;

 // number formating
 Locale   myLocale= new Locale("de", "Germany");
 NumberFormat myFormatter =
NumberFormat.getNumberInstance(myLocale);
 myFormatter.setGroupingUsed( true );
 myFormatter.setMinimumFractionDigits(2);
 myFormatter.setMaximumFractionDigits(2);

 while (rs.next())
 {
 // do something
 } 
 
 st.close();  
 conn.close();
 }
  }
  
   }
   catch(Exception e) {
e.printStackTrace();
   }
   
}
  
}



my server.xml



  
  

  
   
 factory
 org.apache.commons.dbcp.BasicDataSourceFactory
   

   
   
 maxActive
 100
   

   
   
 maxIdle
 30
   


RE: JNDI Datasource is null, again

2002-10-25 Thread Short, Dave
In the past, I've found that I received this type of exception when any of
my connection parameters were wrong (username/password, driver name , etc.).
I'd suggest you review connection parameters carefully to make sure that
isn't the problem.

You do have your JDBC diver class jar file loaded in your tomcat\common\lib
directory, correct?

-Original Message-
From: "Steltner, Jörn HTC/DE/ESS" [mailto:Joern.Steltner@;hochtief.de]
Sent: October 25, 2002 9:00 AM
To: 'Tomcat Users List'
Subject: RE: JNDI Datasource is null, again


sorry, doesn't work!

-Original Message-
From: Short, Dave [mailto:dave.short@;pfizer.com]
Sent: Freitag, 25. Oktober 2002 17:56
To: 'Tomcat Users List'
Subject: RE: JNDI Datasource is null, again


I noticed you have the following code in your server.xml file within your
w2k context:



I don't have this in mine.  Not sure if it's needed.  I can connect just
fine without it.  Take it out and see if it works.

-Original Message-
From: "Steltner, Jörn HTC/DE/ESS" [mailto:Joern.Steltner@;hochtief.de]
Sent: October 25, 2002 8:38 AM
To: '[EMAIL PROTECTED]'
Subject: JNDI Datasource is null, again


Hallo,

I read that the problem was described many times here, but I cecked all
solutions and got the error again. Please may someone give me a hint.
Attached my config and the exception print. I don't know where I should look
...

I use Tomcat 4.1.12 and J2SDK 1.4.1_01.


my code:

/*
 * dbGetInvoices.java
 *
 * Created on 12. August 2002, 15:14
 */
import javax.naming.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.sql.*;
import java.io.*;
import java.sql.*;
import java.util.*;
import java.text.*;
/**
 *
 * @author  steltner
 * @version
 */


public class dbGetInvoices extends HttpServlet {

public void init(ServletConfig config) throws ServletException 
{
super.init(config);
}

/** Destroys the servlet.
 */
public void destroy() {
}

/** Returns a short description of the servlet.
 */
public String getServletInfo() {
return "dbGetInvoices";
}

/** Processes requests for both HTTP GET and
POST methods.
 * @param request servlet request
 * @param response servlet response
 */
protected void processRequest(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, java.io.IOException {
response.setContentType("text/html");
java.io.PrintWriter out = response.getWriter();
out.close();
}

/** Handles the HTTP GET method.
 * @param request servlet request
 * @param response servlet response
 */
protected void doGet(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, java.io.IOException 
{
   PrintWriter out = response.getWriter();
   HttpSession session = request.getSession(true);
   
   String  no_user = (String)session.getAttribute("logon.isUserNo");
   String  no_role = (String)session.getAttribute("logon.isRole");
  
   if ((null == no_user) || (null == no_role))
   {
  out.println("Sie sind zur Zeit nicht angemeldet!");
   }
   else
   {
   // wenn Projektteam Mitglied
   if ( 0 == no_role.compareTo("3"))
   GetInvoices( out, no_user );
   }
   out.println("");
}

protected void doPost(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, java.io.IOException {
processRequest(request, response);
}

protected void GetInvoices( PrintWriter out, String no_user )
{
   
   GetInvoiceContents(out,no_user);
   ..
}

protected void GetInvoiceContents( PrintWriter out, String no_user )
{
   try
   {
  Context initCtx = new InitialContext();
  DataSource ds =
(DataSource)initCtx.lookup("java:comp/env/jdbc/w2k");


  // at this point ds is equal null :-(( 

  if (null != ds) 
  {
 Connection conn = ds.getConnection();
  
 if (null != conn)  
 {
 Statement st = conn.createStatement();
 ResultSet rs = st.executeQuery("select description from
price_comparison where no_price_comparison=1");
   
 Strings  = "";
 int   i  = 0;
 doubled  = 0.0;

 // number formating
 Locale   myLocale= new Locale("de", "Germany");
 NumberFormat myFormatter =
NumberFormat.getNumberInstance(myLocale);
 myFormatter.setGroupingUsed( true );
 myFormatter.setMinimumFractionDigits(2);
 myFormatter.setMaximumFractionDigits(2);

 while (rs.next())
 {
 // do something
 } 
 
 st.

JDBC error only on non-local URL

2002-10-25 Thread Greg Bullough
I've set up the MySQL example in the JNDI
Datasource HOW-TO located in
.../tomcat-docs/jndi-datasource-examples-howto.html

Works great called from a local browser on
URL http://localhost:8080/DBTest/DBtest.jsp

Works great called from a local browser on
URL http://myexternalname:8080/DBTest/DBtest.jsp

Works great called from a different machine in the same
domain on  URL http://myexternalname:8080/DBTest/DBtest.jsp

But throws a java.sql.SQLException: Cannot load JDBC driver class 'null'
if I call it from a different machine in the same domain via a fully-
qualified URL of the form 
http://myexternalname.mydomain.com:8080/DBTest?DBtest.jsp

Adding a bit of debug trace info shows me  that it happened on the
ds.GetConnection() after the ctxLookup has set ds to some non-null value.

Any insights as to why the fully-qualified URL on the page should
make a difference this deep into the code? I'm thinking some sort
of security settings. Once again, the configuration and code is
basically verbatim copied from the HOWTO. Tomcat 4.1.12-LE

Greg




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



RE: JNDI Datasource is null, again

2002-10-25 Thread "Steltner, Jörn HTC/DE/ESS"
username/password  --> are right, I checked with MySQL-Front :-)
driver --> is right and in the directory (mm.mysql-2.0.14-bin.jar)
drivername -->
driverClassNameorg.gjt.mm.mysql.Driver



-Original Message-
From: Short, Dave [mailto:dave.short@;pfizer.com]
Sent: Freitag, 25. Oktober 2002 18:07
To: 'Tomcat Users List'
Subject: RE: JNDI Datasource is null, again


In the past, I've found that I received this type of exception when any of
my connection parameters were wrong (username/password, driver name , etc.).
I'd suggest you review connection parameters carefully to make sure that
isn't the problem.

You do have your JDBC diver class jar file loaded in your tomcat\common\lib
directory, correct?

-Original Message-
From: "Steltner, Jörn HTC/DE/ESS" [mailto:Joern.Steltner@;hochtief.de]
Sent: October 25, 2002 9:00 AM
To: 'Tomcat Users List'
Subject: RE: JNDI Datasource is null, again


sorry, doesn't work!

-Original Message-
From: Short, Dave [mailto:dave.short@;pfizer.com]
Sent: Freitag, 25. Oktober 2002 17:56
To: 'Tomcat Users List'
Subject: RE: JNDI Datasource is null, again


I noticed you have the following code in your server.xml file within your
w2k context:



I don't have this in mine.  Not sure if it's needed.  I can connect just
fine without it.  Take it out and see if it works.

-Original Message-
From: "Steltner, Jörn HTC/DE/ESS" [mailto:Joern.Steltner@;hochtief.de]
Sent: October 25, 2002 8:38 AM
To: '[EMAIL PROTECTED]'
Subject: JNDI Datasource is null, again


Hallo,

I read that the problem was described many times here, but I cecked all
solutions and got the error again. Please may someone give me a hint.
Attached my config and the exception print. I don't know where I should look
...

I use Tomcat 4.1.12 and J2SDK 1.4.1_01.


my code:

/*
 * dbGetInvoices.java
 *
 * Created on 12. August 2002, 15:14
 */
import javax.naming.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.sql.*;
import java.io.*;
import java.sql.*;
import java.util.*;
import java.text.*;
/**
 *
 * @author  steltner
 * @version
 */


public class dbGetInvoices extends HttpServlet {

public void init(ServletConfig config) throws ServletException 
{
super.init(config);
}

/** Destroys the servlet.
 */
public void destroy() {
}

/** Returns a short description of the servlet.
 */
public String getServletInfo() {
return "dbGetInvoices";
}

/** Processes requests for both HTTP GET and
POST methods.
 * @param request servlet request
 * @param response servlet response
 */
protected void processRequest(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, java.io.IOException {
response.setContentType("text/html");
java.io.PrintWriter out = response.getWriter();
out.close();
}

/** Handles the HTTP GET method.
 * @param request servlet request
 * @param response servlet response
 */
protected void doGet(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, java.io.IOException 
{
   PrintWriter out = response.getWriter();
   HttpSession session = request.getSession(true);
   
   String  no_user = (String)session.getAttribute("logon.isUserNo");
   String  no_role = (String)session.getAttribute("logon.isRole");
  
   if ((null == no_user) || (null == no_role))
   {
  out.println("Sie sind zur Zeit nicht angemeldet!");
   }
   else
   {
   // wenn Projektteam Mitglied
   if ( 0 == no_role.compareTo("3"))
   GetInvoices( out, no_user );
   }
   out.println("");
}

protected void doPost(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, java.io.IOException {
processRequest(request, response);
}

protected void GetInvoices( PrintWriter out, String no_user )
{
   
   GetInvoiceContents(out,no_user);
   ..
}

protected void GetInvoiceContents( PrintWriter out, String no_user )
{
   try
   {
  Context initCtx = new InitialContext();
  DataSource ds =
(DataSource)initCtx.lookup("java:comp/env/jdbc/w2k");


  // at this point ds is equal null :-(( 

  if (null != ds) 
  {
 Connection conn = ds.getConnection();
  
 if (null != conn)  
 {
 Statement st = conn.createStatement();
 ResultSet rs = st.executeQuery("select description from
price_comparison where no_price_comparison=1");
   
 Strings  = "";
 int   i  = 0;
 doubled  = 0.0;

 // number formating
 Locale   myLocale= new Locale("de", "Germany");
 NumberFormat myForm

Thank ?????

2002-10-25 Thread Correo
can one web-server run on windows 98  ?
Where I download web server ?
Thank for all Fernando.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JNDI Datasource is null, again

2002-10-25 Thread Mehdi . Nejad

i cant see any descrepency between my own and yours..

only diff i see is the was you do your lookup in one step

  Context initContext = new InitialContext();
  Context envContext  = (Context)initContext.lookup("java:/comp/env");
  DataSource ds = (DataSource)envContext.lookup("jdbc/w2k");

ta,

m


   

  "Short, Dave"

  
  r.com>   cc: 

   Subject:  RE: JNDI Datasource is null, 
again
  25/10/2002 17:06 

  Please respond to

  "Tomcat Users

  List"

   

   





In the past, I've found that I received this type of exception when any of
my connection parameters were wrong (username/password, driver name ,
etc.).
I'd suggest you review connection parameters carefully to make sure that
isn't the problem.

You do have your JDBC diver class jar file loaded in your tomcat\common\lib
directory, correct?

-Original Message-
From: "Steltner, Jörn HTC/DE/ESS" [mailto:Joern.Steltner@;hochtief.de]
Sent: October 25, 2002 9:00 AM
To: 'Tomcat Users List'
Subject: RE: JNDI Datasource is null, again


sorry, doesn't work!

-Original Message-
From: Short, Dave [mailto:dave.short@;pfizer.com]
Sent: Freitag, 25. Oktober 2002 17:56
To: 'Tomcat Users List'
Subject: RE: JNDI Datasource is null, again


I noticed you have the following code in your server.xml file within your
w2k context:



I don't have this in mine.  Not sure if it's needed.  I can connect just
fine without it.  Take it out and see if it works.

-Original Message-
From: "Steltner, Jörn HTC/DE/ESS" [mailto:Joern.Steltner@;hochtief.de]
Sent: October 25, 2002 8:38 AM
To: '[EMAIL PROTECTED]'
Subject: JNDI Datasource is null, again


Hallo,

I read that the problem was described many times here, but I cecked all
solutions and got the error again. Please may someone give me a hint.
Attached my config and the exception print. I don't know where I should
look
...

I use Tomcat 4.1.12 and J2SDK 1.4.1_01.


my code:

/*
 * dbGetInvoices.java
 *
 * Created on 12. August 2002, 15:14
 */
import javax.naming.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.sql.*;
import java.io.*;
import java.sql.*;
import java.util.*;
import java.text.*;
/**
 *
 * @author  steltner
 * @version
 */


public class dbGetInvoices extends HttpServlet {

public void init(ServletConfig config) throws ServletException
{
super.init(config);
}

/** Destroys the servlet.
 */
public void destroy() {
}

/** Returns a short description of the servlet.
 */
public String getServletInfo() {
return "dbGetInvoices";
}

/** Processes requests for both HTTP GET and
POST methods.
 * @param request servlet request
 * @param response servlet response
 */
protected void processRequest(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, java.io.IOException {
response.setContentType("text/html");
java.io.PrintWriter out = response.getWriter();
out.close();
}

/** Handles the HTTP GET method.
 * @param request servlet request
 * @param response servlet response
 */
protected void doGet(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, java.io.IOException
{
   PrintWriter out = response.getWriter();
   HttpSession session = request.getSession(true);

   String  no_user = (String)session.getAttribute("logon.isUserNo");
   String  no_role = (String)session.getAttribute("logon.isRole");

   if ((null == no_user) || (null == no_role))
   {
  out.println("Sie sind zur Zeit nicht angemeldet!");
   }
   else
   {
   // wenn Projektteam Mitglied
   if ( 0 == no_role.compareTo("3"))
   GetInvoices( out, no_user );
   }
   out.println("");
}

protected void doPost(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, java.io.IOExcepti

jvm_route in jsessionid

2002-10-25 Thread johannes . grumboeck
Hi everybody,

If I do loadbalacing with Apache 2.0.40, mod_jk 1.2.0 und Tomcat 4.1.10
I have to enter the ajp13-connector-name into the "jvm_route" parameter of
each tomcat engine (in server.xml).

mod_jk does the session-true balancing with the help of the jvm_route which
is somehow encoded into the jsessionid.

Can anybody tell me how the jvm_route is encoded into the sessionid, and
secondly when is it encoded: 1) when the sessionid is the first time
created
or 2) when I use the function encodeURL() ?

thanks in advance and
best regards,
Johannes Grumböck



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




New to war files

2002-10-25 Thread Trickel, EE Erik (3946)

I am new to using war files, and I have run into a problem.  I tried
searching the archives and I didn't see an answer to my problem.  I am
building the war file from an ant build script.  I have tested this on the
pre-war directory and it works fine.  The issue I am running into involves a
jsp page and a server side include file.  I am using a relative path with
the .. pointer.  So It looks something like this

search/search.jsp
<%@include file="../general/globalvars.jsp"%>

I am running on win2k server, Tomcat as a service, 

I have verified the file was included in the war, and even changed the
context to use the extracted directory.  Any help would be great.


Thank you,
Erik


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




tomcat/EJBs

2002-10-25 Thread Grant C. Peters
Can anyone answer a question for me? Does Tomcat work as an EJB container,
or do I need to plugin something like openEJB?
thanks

Grant C. Peters
[EMAIL PROTECTED]
phone  : 415.948.7030



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Thank ?????

2002-10-25 Thread Andreas Probst
Hi Fernando,

On 24 Oct 2002 at 19:51, Correo wrote:

> can one web-server run on windows 98  ?

Yes, but I wouldn't recommend this as Win98 is too instable.

> Where I download web server ?

Tomcat as application server: http://jakarta.apache.org/tomcat
Apache as web server: maybe http://www.apache.org

You don't necessarily need both.

> Thank for all Fernando.

Andreas



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: tomcat/EJBs

2002-10-25 Thread Short, Dave
Tomcat does not work as an EJB container.

-Original Message-
From: Grant C. Peters [mailto:grantcpeters@;earthlink.net]
Sent: October 25, 2002 9:38 AM
To: Tomcat Users List
Subject: tomcat/EJBs


Can anyone answer a question for me? Does Tomcat work as an EJB container,
or do I need to plugin something like openEJB?
thanks

Grant C. Peters
[EMAIL PROTECTED]
phone  : 415.948.7030



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: tomcat/EJBs

2002-10-25 Thread Grant C. Peters
thanks

Grant C. Peters
[EMAIL PROTECTED]
phone  : 415.948.7030

-Original Message-
From: Short, Dave [mailto:dave.short@;pfizer.com]
Sent: Friday, October 25, 2002 12:37
To: 'Tomcat Users List'
Subject: RE: tomcat/EJBs

Tomcat does not work as an EJB container.

-Original Message-
From: Grant C. Peters [mailto:grantcpeters@;earthlink.net]
Sent: October 25, 2002 9:38 AM
To: Tomcat Users List
Subject: tomcat/EJBs


Can anyone answer a question for me? Does Tomcat work as an EJB container,
or do I need to plugin something like openEJB?
thanks

Grant C. Peters
[EMAIL PROTECTED]
phone  : 415.948.7030



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: jspc pre-compiled pages distributed with .war file?

2002-10-25 Thread John Trollinger
I created my own ant task that does all the jspc.bat does.  I have tried
to relay the code to the ant community with no luck..



> -Original Message-
> From: Felipe Schnack [mailto:felipes@;ritterdosreis.br] 
> Sent: Friday, October 25, 2002 10:36 AM
> To: Tomcat Users List
> Subject: RE: jspc pre-compiled pages distributed with .war file?
> 
> 
>   I created an ANT script to generate the class files, and 
> I'm with the same problemas Thomas have. But about this jspc 
> option to generate web.xml... I think ant doesn't support it, does it?
>   (I'm using Ant 1.5)
> 
> On Fri, 2002-10-25 at 13:29, John Trollinger wrote:
> > The jspc command does not put "real" package names on the jsp.class 
> > files.  What happens is each jsp page gets its own 
> classloader so if 
> > you have 2 index.jsp files they will still run.  To do what 
> you want 
> > to do you have to have each jsp generated .java file have a "real" 
> > package name so that when you deploy the class files to 
> tomcat it can 
> > resolve the classes correctly.
> > 
> > There have been a few threads on both this and the developer list 
> > about work arounds to this.. Don't have the links.. But I 
> suggest you 
> > try there.
> > 
> > Also there is an option on jspc for jasper that will create the 
> > web.xml fragment for all the mappings for the jsp servlets.
> > 
> > > -Original Message-
> > > From: Thomas Heller [mailto:th.heller@;mx4k.com]
> > > Sent: Friday, October 25, 2002 10:24 AM
> > > To: Tomcat Users List
> > > Subject: jspc pre-compiled pages distributed with .war file?
> > > 
> > > 
> > > hi there,
> > > 
> > > i am migrating my projects from php to java and began to set
> > > up a development server that ideally does all the dev work 
> > > once a project is marked release i just call an ant task to 
> > > deploy the project to one or more (load balanced) 
> production servers.
> > > 
> > > i have written an ant build.xml to compile my webapp and to
> > > put everything i need into "mywebapp.war". thats working very 
> > > fine and i can just deploy that .war to a tomcat server 
> > > without any problems.
> > > 
> > > now, i have setup another ant task to precompile every jsp
> > > file using jasper (ant task "jspc"). thats working perfectly 
> > > fine and i have loads of index_jsp.java, etc files. now i 
> > > compile those to .class files and i would like to distribute 
> > > them inside the .war file so that the tomcat server itself 
> > > doesnt need to compile anything by himself. _Ideally_ i'd 
> > > like to exclude _any_ .jsp file in the .war file and just 
> > > include the compiled jsp.class files.
> > > 
> > > but i wonder ... tomcat somehow doesnt really know what i'm
> > > sending him and he doesnt recognize any of the precompiled 
> > > pages. how do i tell tomcat to use the precompiled pages in 
> > > the .war instead of compiling them himself?
> > > 
> > > i know i can write this it into my web.xml
> > > 
> > > 
> > > index_jsp
> > > 
> > >   my.package.jsp.index_jsp
> > > 
> > > 
> > > 
> > > 
> > > index_jsp
> > > /index.jsp
> > > 
> > > 
> > > but somehow i dont like it this way, but i would rather use
> > > this instead of putting jsp files into the .war file. would 
> > > be cool if tomcat would do something like this by himself 
> > > when he finds *_jsp.class in a /WEB-INF/precompiled directory.
> > > 
> > > Anyways maybe tomcat has some support for what i'm trying to
> > > find and i just can't find it? Comments welcome
> > > 
> > > Greetings,
> > > Thomas
> > > 
> > > 
> > > 
> > > 
> > > --
> > > To unsubscribe, e-mail:   
> > >  [EMAIL PROTECTED]>
> > > For
> > > additional commands, 
> > > e-mail: 
> > > 
> > 
> > 
> > --
> > To unsubscribe, e-mail:   
>  [EMAIL PROTECTED]>
> > For 
> additional commands, 
> e-mail: 
> > 
> > 
> -- 
> 
> Felipe Schnack
> Analista de Sistemas
> [EMAIL PROTECTED]
> Cel.: (51)91287530
> Linux Counter #281893
> 
> Faculdade Ritter dos Reis
> www.ritterdosreis.br
> [EMAIL PROTECTED]
> Fone/Fax.: (51)32303328
> 
> 
> --
> To unsubscribe, e-mail:   
>  [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Form-based authentication assistance

2002-10-25 Thread Scott Purcell
Hello,

I am trying to understand how the built-in forms validation works in tomcat 4.03 on 
win.

I believe that I have my web.xml file correct, (below). All appears good. If I put in 
a bad username and passoword, I go to the error page, but if I successed, it throws up 
an error, [Invalid direct reference to form login page].

Which makes sense, I guess it is submitting it back and the URL shows 
[http://localhost/altercast/j_security_check]

How do I forward the user to a good login page, if they pass the basic authentication?

My page is /loginpage.html
// here it is:
  

  
  


Thanks,


   
  SecretProtection
  /servlet/SalaryServlet
  /servlet/secret
  GET
  POST
   
   
  AuthenticationSnoop
  /servlet/AuthenticationSnoop
  GET
   
   
  loginpage.html
  /altercast/loginpage.html
  POST
   
   
  manager
   



   FORM
   
  /loginpage.html
  /errorpage.html
   



   manager



Scott Purcell | Developer | VERTIS | 555 Washington Ave. 4th Floor | St. Louis, MO 
63101 |
T 314.588.0720 | F 314.588.0735 | [EMAIL PROTECTED] | http://www.vertisinc.com

Vertis is a global powerhouse for integrated marketing and advertising solutions that 
seamlessly combine advertising, direct marketing, media, imaging and progressive 
technology. Vertis' products and services include: consumer and media research, media 
planning and placement, creative services, digital media production, targetable insert 
programs, fully integrated direct marketing programs, circulation-building newspaper 
products and eMarketing.




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Oracle connection pooling

2002-10-25 Thread Sinclair, Alan (CORP, GEAccess)
I setup debug=99 and also set the verbosity="debug" for the Logger. I still
do not get any JDBC log information. I am stumped as to what I can do to
debug the pooling mechanism. One would expect some kind of message in the
catalina log 

as

-Original Message-
From: Shapira, Yoav [mailto:Yoav.Shapira@;mpi.com]
Sent: Friday, October 25, 2002 8:36 AM
To: Tomcat Users List
Subject: RE: Oracle connection pooling


Hi,

>Did you mean setting maxWait to 0 ?

No.  I meant that setting maxActive to 5, maxIdle to 3, and maxWait to
-1 does not mean there will be 3 connections on startup.  

It's up to the connection pool implementation to decide if it wants to
pre-create the connections on startup, or not.  Some implementations may
expose a configuration parameter so that you can tell them whether to be
greedy.  

Alternatively, you could ask for as many connections as your maxIdle
will allow on startup, so that when your first real DB calls come the
connections are already created.

Yoav Shapira
Millennium ChemInformatics

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Thank ?????

2002-10-25 Thread micael
Yes.
Jakarta-Tomcat downloads, for one.

At 07:51 PM 10/24/2002 -0500, you wrote:

can one web-server run on windows 98  ?
Where I download web server ?
Thank for all Fernando.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Micael

---

This electronic mail  transmission and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged.  This information is intended only for the use of the 
individual or entity to whom this electronic mail transmission was sent as 
indicated above. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this transmission is strictly prohibited.  If you 
have received this transmission in error, please delete the message.  Thank you 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



JSP's and J2SDK1.4 assert statement

2002-10-25 Thread Oliver Jonas
Form-based authentication assistanceHi,

I'm trying to use the new assert statement in my JSP's. So, I set my
JAVA_OPTS environment variable to "-source 1.4 -enableassertions" (w/o
quotes) but the catalina startup script doesn't like it. And exists
immediately without starting Tomcat.

I'm using Tomcat 4.1.12-LE on Windows 2000.

Has anyone managed to make use of asserts in JSP pages?


Thanks a lot,
Oliver.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.394 / Virus Database: 224 - Release Date: 03/10/2002



how use the ajp13 connector between hosts

2002-10-25 Thread Sigurður Bjarnason

Hi all..

I have i small problem.. 

I have Apache on host 1 and Tomcat on host 2..

how do i get the connector to talk between the two ?  ..that is what do i change

do i set virualhost in apache for host2 or is this configured somewere else ?!

i use ajp13

regards 
Siggi


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Tag object pooling and immutability in the servlet spec

2002-10-25 Thread Craig R. McClanahan


On 24 Oct 2002, Mr. Tomcat wrote:

> Date: 24 Oct 2002 17:37:36 -1000
> From: Mr. Tomcat <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Tag object pooling and immutability in the servlet spec
>
> Is there a way to turn off tag object pooling?  Object pooling was a
> cool performance technique in earlier versions of Java, but now object
> creation is very fast, so it no longer serves a performance function,
> and it introduces extra complexity into tag object design.  Is this
> misfeature going to be phased out?
>

No.  Your assumption that it "no longer serves a performance function" is
not correct.

Just as an example of why it still matters, consider something like this
(using the JSTL iteration tag):


  


The tag reuse mechanisms allow a page compiler to create one instance of
the  Also, on the immutable object topic, it seems that it would be better to
> have all the initialization of servlets and filters done in the
> constructor, not by calling an init function.  If everything could be
> set in the constructor, then all instance fields could be private final,
> meaning that the servlet or filter object could be immutable, and
> therefore known to be threadsafe, which is an issue with servlets.  Any
> chance of these changes happening in future releases of the servlet
> spec?
>

The constructor of a Servlet (or Filter) doesn't have access to the
ServletConfig (or FilterConfig) object, so it cannot acquire
initialization parameters, a reference to the ServletContext instance, or
anything like that.

Because javax.servlet.Servlet and javax.servlet.Filter are interfaces (not
classes), you can't declare constructors in them.  Therefore, the servlet
spec requires that there be a zero-args constructor available so that
instances can be dynamically instantiated.

Would it be possible to require servlets and filters to have a constructor
that takes a ServletConfig (or FilterConfig) argument?  Sure ... at the
cost of breaking every Servlet or Filter that has ever been written.
Doesn't seem like a smart idea to implement something that is purely
cosmetic, and wouldn't change the actual functionality provided by the
container.  There's much more important things for the spec to address.

> Thanks

Craig McClanahan




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: how use the ajp13 connector between hosts

2002-10-25 Thread Turner, John

In workers.properties, set worker.worker-name.host to the FQDN of host 2.

VirtualHost in Apache should be whatever virtual host is in the URL, not the
hostname of the machine hosting Tomcat.  Ditto in server.xml...the Host
container should have the name of the virtual host in the URL.

John


> -Original Message-
> From: Sigurður Bjarnason [mailto:siggi@;betware.com]
> Sent: Friday, October 25, 2002 1:03 PM
> To: Tomcat (E-mail)
> Subject: how use the ajp13 connector between hosts
> 
> 
> 
> Hi all..
> 
> I have i small problem.. 
> 
> I have Apache on host 1 and Tomcat on host 2..
> 
> how do i get the connector to talk between the two ?  ..that 
> is what do i change
> 
> do i set virualhost in apache for host2 or is this configured 
> somewere else ?!
> 
> i use ajp13
> 
> regards 
> Siggi
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: tomcat/EJBs

2002-10-25 Thread Jerry Birchler
Check out JBOSS at www.jboss.org goto the downloads link and check this out
JBoss-3.0.3_Tomcat-4.1.12.zip. It might be what you're looking for.

-Original Message-
From: Grant C. Peters [mailto:grantcpeters@;earthlink.net]
Sent: Friday, October 25, 2002 11:38 AM
To: Tomcat Users List
Subject: tomcat/EJBs


Can anyone answer a question for me? Does Tomcat work as an EJB container,
or do I need to plugin something like openEJB?
thanks

Grant C. Peters
[EMAIL PROTECTED]
phone  : 415.948.7030



--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: JSP's and J2SDK1.4 assert statement

2002-10-25 Thread Craig R. McClanahan


On Fri, 25 Oct 2002, Oliver Jonas wrote:

> Date: Fri, 25 Oct 2002 18:59:02 +0200
> From: Oliver Jonas <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: JSP's and J2SDK1.4 assert statement
>
> Form-based authentication assistanceHi,
>
> I'm trying to use the new assert statement in my JSP's. So, I set my
> JAVA_OPTS environment variable to "-source 1.4 -enableassertions" (w/o
> quotes) but the catalina startup script doesn't like it. And exists
> immediately without starting Tomcat.

Put it in CATALINA_OPTS intstead.

>
> I'm using Tomcat 4.1.12-LE on Windows 2000.
>
> Has anyone managed to make use of asserts in JSP pages?

Which implies you're putting code in scriptlets, right?  Sheesh ...

Java code to implement business logic belongs in Java classes, not
intermixed with your presentation markup in a JSP page.

>
>
> Thanks a lot,
> Oliver.

Craig McClanahan


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JSP's and J2SDK1.4 assert statement

2002-10-25 Thread John Trollinger

> Which implies you're putting code in scriptlets, right?  Sheesh ...
> 
> Java code to implement business logic belongs in Java 
> classes, not intermixed with your presentation markup in a JSP page.


If only more people would listen to this!


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JSP's and J2SDK1.4 assert statement

2002-10-25 Thread Oliver Jonas
Hi Craig,

I also tried CATALINA_OPTS... same thing happens. Thinking about it "-source
1.4" isn't actually a valid option for "java", only for "javac". (Maybe
that's why it fails because it starts fine if I only put "-enableassertions"
in JAVA_OPTS.

So I guess I need to tell Jasper to use the option "-source 1.4".


Any ideas how to?

Thanks,
Oliver.

PS: Using JSP's only for HTML presentation... but would still like to have
asserts to make sure values returned by the underlying Java API are valid.


-Original Message-
From: Craig R. McClanahan [mailto:craigmcc@;apache.org]
Sent: 25 October 2002 19:22
To: Tomcat Users List
Subject: Re: JSP's and J2SDK1.4 assert statement




On Fri, 25 Oct 2002, Oliver Jonas wrote:

> Date: Fri, 25 Oct 2002 18:59:02 +0200
> From: Oliver Jonas <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: JSP's and J2SDK1.4 assert statement
>
> Form-based authentication assistanceHi,
>
> I'm trying to use the new assert statement in my JSP's. So, I set my
> JAVA_OPTS environment variable to "-source 1.4 -enableassertions" (w/o
> quotes) but the catalina startup script doesn't like it. And exists
> immediately without starting Tomcat.

Put it in CATALINA_OPTS intstead.

>
> I'm using Tomcat 4.1.12-LE on Windows 2000.
>
> Has anyone managed to make use of asserts in JSP pages?

Which implies you're putting code in scriptlets, right?  Sheesh ...

Java code to implement business logic belongs in Java classes, not
intermixed with your presentation markup in a JSP page.

>
>
> Thanks a lot,
> Oliver.

Craig McClanahan


--
To unsubscribe, e-mail:

For additional commands, e-mail:


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.394 / Virus Database: 224 - Release Date: 03/10/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.394 / Virus Database: 224 - Release Date: 03/10/2002


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Tomcat JSPs not loading

2002-10-25 Thread eric scroger
Attached is the server.xml config.  If you think you want additional
config files, please tell me which files you think would help.

Eric

Robert L Sowders wrote:


Won't be able to pinpoint a problem in the configuration without seeing 
the configuration. 

Post your configs and we'll see what we can do.

rls





eric scroger <[EMAIL PROTECTED]>
10/24/2002 04:13 PM
Please respond to "Tomcat Users List"


   To: [EMAIL PROTECTED]
   cc: 
   Subject:Tomcat JSPs not loading

Greetings,

I'm having problems with a Tomcat 4.0.4 installation on Win2k.
Someone else within the company says they installed this binary
distribution from a standard Tomcat installer.  It appears that
one of the obvious things changed is the port for the HttpConnector
has been changed to port 9080.

For some reason JSP files do not load. I've tried accessing
the example JSP pages and they do not load.  The servlet examples
seem to work ok, but once you try to access the JSP pages,
the servlet examples hang as well.  There don't appear to be any
related errors.  The only thing that looks odd in the logs is access
to the JSP pages returns 302 status codes.  I believe this refers
to a redirect.

Any ideas on what I should look for? 

Thanks in advance,

Eric


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

 











  

  
  




























  
  

  
  

  

  

  

  

  

  

  
  




















  
  
  
		  
  
  
  
  
usersa
password
driverClassName
  org.hsql.jdbcDriver
driverName
  jdbc:HypersonicSQL:database
  
  
  

  mail.smtp.host
  localhost

  


  



  

  

  
  






  
  

  
  



  





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Help to me !! !! !! !!

2002-10-25 Thread Correo
I all.
I'm using Tomcat on win98
Have a problem when call my class error:404 
My class are in :

Tomcat 4.1/webapps/servlet1/web-inf/classes/st/Servlet1.class
 
How call in a brobser my class?
Where put Servlet1.shtml?

I send Servlet1.java  and web.xml to you see.

I'm new in Tomcat !!

Thank for all and excuse my English...I from Argentina.





 http://java.sun.com/dtd/web-app_2_3.dtd";>   
Un servlet simple  Se trata de poner 
un servlet en el tomcat. El servlet es simple.webmaster [EMAIL PROTECTED] 
 The EMAIL address of the administrator to whom questions and comments 
about this application should be addressed. simpleServlet  el 
servlet sencillo...  simpleServlet.SimpleServlet 
 1 
   simpleServlet /sservlet 
   30 
   
   


Servlet1.java
Description: JavaScript source


Servlet1.shtml
Description: Binary data
--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Re: jspc pre-compiled pages distributed with .war file?

2002-10-25 Thread Andy Wagg
Tomcat requires the servlet and servlet mappings in the web.xml, this is 
the way it works. Essentially, servlets are generated for the jsp pages. 
I modified my web application this week to precompile the jsp files and 
no longer include these in my war.

The JspC compiler when used with the -webapp option, also allows the use 
of either -webxml or -webinc to generate a complete web.xml file or just 
the servlet and servlet mappings to be included. I found I couldnt do 
this using the ant jspc command, but rather used a java task to run the 
jspc command.

My generated .java classes were then compiled with all my other classes 
and put in the war.

Andy.


Thomas Heller wrote:
hi there,

i am migrating my projects from php to java and began to set up a
development server that ideally does all the dev work once a project is
marked release i just call an ant task to deploy the project to one or more
(load balanced) production servers.

i have written an ant build.xml to compile my webapp and to put everything i
need into "mywebapp.war". thats working very fine and i can just deploy that
.war to a tomcat server without any problems.

now, i have setup another ant task to precompile every jsp file using jasper
(ant task "jspc"). thats working perfectly fine and i have loads of
index_jsp.java, etc files. now i compile those to .class files and i would
like to distribute them inside the .war file so that the tomcat server
itself doesnt need to compile anything by himself. _Ideally_ i'd like to
exclude _any_ .jsp file in the .war file and just include the compiled
jsp.class files.

but i wonder ... tomcat somehow doesnt really know what i'm sending him and
he doesnt recognize any of the precompiled pages. how do i tell tomcat to
use the precompiled pages in the .war instead of compiling them himself?

i know i can write this it into my web.xml


index_jsp

  my.package.jsp.index_jsp




index_jsp
/index.jsp


but somehow i dont like it this way, but i would rather use this instead of
putting jsp files into the .war file. would be cool if tomcat would do
something like this by himself when he finds *_jsp.class in a
/WEB-INF/precompiled directory.

Anyways maybe tomcat has some support for what i'm trying to find and i just
can't find it? Comments welcome

Greetings,
Thomas




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 







--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Virtual Hosts

2002-10-25 Thread Curt LeCaptain
Question about appBase...


What exactly would I set that to?

I've got dev.infinity-tech.com as what I want for my website... I want
everything served out of /www/docs/dev.infinity-tech.com/

Is that what I would set as my appBase?

Also, I'm a bit shaky on what the ROOT context is.

Curt L


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Virtual Hosts

2002-10-25 Thread Shapira, Yoav
Hi,

>What exactly would I set that to?

Depends on what you want to accomplish.  We typically leave it as
"webapps" and specify different (absolute) docBases for individual
webapps as necessary.

If you have several webapps under the same location, you can change just
the appBase to point to that location instead of changing each webapp's
docBase attribute.

>I've got dev.infinity-tech.com as what I want for my website... I want
>everything served out of /www/docs/dev.infinity-tech.com/

Do you have just one webapp or many?  

>Is that what I would set as my appBase?

If you have many webapps, all under /www/docs/dev.infinity-tech.com, and
you don't want to set the docBase for each webapp to that location, then
yes, you would set the above as your appBase.

>Also, I'm a bit shaky on what the ROOT context is.

It's simply the webapp with no context name.  The one that's accessed
when the user points his/her browser to your appBase (in the default
configuration).  If you start changing the appBase and docBases, you can
use the ROOT context for other things.

Tomcat gives you many ways to specify where the documents for your
webapps are located.

I assume you've already read the relevant tomcat docs.  If not, look at
the host reference at
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html
and the context reference at
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html

Yoav Shapira
Millennium ChemInformatics

This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Servlet running/not running

2002-10-25 Thread SAmhed
Hi all,

I'm a newbie at Tomcat and would appreciate the help.

I have installed Tomcat 4.1.12. I have this directory structure for a
servlet. C:\Tomcat\webapps\myApp\WEB-INF\classes and the servlet name is
test. OK. When I try to see this servlet by
http://localhost:8080/myApp/servlet/test, I get this; "The requested
resource (/myApp/servlet/test) is not available. Now, if I copy the
test.class file to C:\Tomcat\webapps\examples\WEB-INF\classes, it works
(http://localhost:8080/examples/servlet/test), which leads me to believe
that I need to do some tweaking with the configuration.

THREAT: I posted this question yesterday too but didn't get any reply.
Understand that I'm a Microsoft programmer trying to get on board with you
Java people and if you don't help me, I'll go back to working on good ol'
IIS.

 It's more of a threat to IIS actually :)


Thanks
Sohail Ahmed
GeneralCologne Re
Email:  [EMAIL PROTECTED]
Tel:(203) 328 - 5332



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Help to me !! !! !! !! - DON'T ATTACH FILES!!

2002-10-25 Thread Burt Johnson
PLEASE DON'T attach files to this list!!
-- 


- Burt Johnson
  MindStorm, Inc.
  [EMAIL PROTECTED]
  http://www.mindstorm-inc.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Help to me !! !! !! !!

2002-10-25 Thread Jim Urban
> Tomcat 4.1/webapps/servlet1/web-inf/classes/st/Servlet1.class
Tomcat is case sensitive.  Your directory must be Tomcat
4.1/webapps/servlet1/WEB-INF/classes/st/Servlet1.class  the web-inf must be
WEB-INF.  Windows Explorer has a problem with this.  Use the command line if
need be.  Also, I assume your servlet is in a package called st.  You must
invoke your servlet by the fully qualified name (st.Servlet1) unless you add
a  tag to your servlet1/WEB-INF/web.xml file.

Good luck,

Jim Urban - [EMAIL PROTECTED]
Park City Solutions Inc.
Clinical Connectivity Suite Product Manager
Suite 295
500 Park Blvd.
Itasca, IL  60143
Voice:  (630) 250-3045 x106
Fax:  (630) 250-3046

CONFIDENTIALITY NOTICE
This message and any included attachments are from Park City Solutions Inc.
and are intended only for the entity to which it is addressed. The contained
information is confidential and privileged material. If you are not the
intended recipient, you are hereby notified that any use, dissemination, or
copying of this communication is strictly prohibited and may be unlawful. If
you have received this communication in error please notify the sender of
the delivery error by e-mail or call Park City Solutions Inc. corporate
offices at (435) 654-0621

-Original Message-
From: Correo [mailto:hefperez@;ar.inter.net]
Sent: Friday, October 25, 2002 2:52 PM
To: Tomcat Users List
Subject: Help to me !! !! !! !!

I all.
I'm using Tomcat on win98
Have a problem when call my class error:404 
My class are in :

Tomcat 4.1/webapps/servlet1/web-inf/classes/st/Servlet1.class

How call in a brobser my class?
Where put Servlet1.shtml?

I send Servlet1.java  and web.xml to you see.

I'm new in Tomcat !!

Thank for all and excuse my English...I from Argentina.






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Servlet running/not running

2002-10-25 Thread Shapira, Yoav
Hi,

>I have installed Tomcat 4.1.12. I have this directory structure for a
>servlet. C:\Tomcat\webapps\myApp\WEB-INF\classes and the servlet name
is
>test. OK. When I try to see this servlet by
>http://localhost:8080/myApp/servlet/test, I get this; "The requested
>resource (/myApp/servlet/test) is not available. Now, if I copy the
>test.class file to C:\Tomcat\webapps\examples\WEB-INF\classes, it works
>(http://localhost:8080/examples/servlet/test), which leads me to
believe
>that I need to do some tweaking with the configuration.

4.1.12 comes with the default invoker servlet mapping turned off for
security.  The release notes have the full details.

Uncomment the  element for the invoker servlet in
$CATALINA_HOME/conf/web.xml to make the above work.

Better yet, declare a mapping for your servlet by adding the following
to your web.xml (the one in myApp/WEB-INF):


  testServletName
  test



  testServletName
  /Test


And then access your servlet by
http://localhost:8080/myApp/Test

This way, you don't have to have the invoker servlet.  

>THREAT: I posted this question yesterday too but didn't get any reply.
>Understand that I'm a Microsoft programmer trying to get on board with
you
>Java people and if you don't help me, I'll go back to working on good
ol'
>IIS.
>
> It's more of a threat to IIS actually :)

Funniest paragraph I've seen in a while ;) ;) ;)

Yoav Shapira
Millennium ChemInformatics

This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Re: Apache 1.3.23 and Tomcat 4 - connect??

2002-10-25 Thread John B. Moore
Still encountering some issues..

First I am following the howto's by John Turner.. (thanks much..BTW)

   Before doing anything I'm seeing the following output when starting 
tomcat

===
INFO: Initializing Coyote HTTP/1.1 on port 8080
mod_jk location: libexec/mod_jk.so
Make sure it is installed correctly or set the config location
Using 
.
INFO: JK2: ajp13 listening on tcp port 8009
..
INFO: Jk running ID=0 time 13/70 config-/var/tomcat4/conf/jk2.properties
===

Adding the recomending lines to the server.xml and creating the 
workers.properties file does not create the /auto/mod_jk.conf file I was 
previously expecting.. (good)

But now I see that I have JK2 on the port that I want only JK to be 
running..??? yes ???

I find the following in my server.xml


===


 port="8009" minProcessors="5" maxProcessors="75"
 enableLookups="true" redirectPort="8443"
 acceptCount="10" debug="0" connectionTimeout="2"
 useURIValidationHack="false"
 
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>


so I comment it out and uncomment the following


 

 port="8009" minProcessors="5" maxProcessors="75"
 acceptCount="10" debug="0"/>

   
but now I get the following error when restarting tomcat...


ServerLifecycleListener: createMBeans: MBeansException
java.lang.Exception: ManagedBean is not found with Ajp13Connector



if I uncomment both I still get this error.. (so it has nothing to do 
with the JK2 connector even though I don't think there can be two 
connectors on the same port, which lead me to comment out the JK2 one)

 Suggestions appreciated...

 Thanks, John..



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



Bug?

2002-10-25 Thread chad kellerman
Hey everyone,

  Check this out.
  So I am getting this java exception:
 2002-10-25 13:53:40
[org.apache.catalina.connector.warp.WarpConnection] Exception on socket
java.io.IOException: Premature packet header end 
at
org.apache.catalina.connector.warp.WarpConnection.recv(WarpConnection.java:237)
at
org.apache.catalina.connector.warp.WarpRequestHandler.handle(WarpRequestHandler.java:112)
at
org.apache.catalina.connector.warp.WarpConnection.run(WarpConnection.java:194)
at java.lang.Thread.run(Thread.java:536)

  Now I know I couldn't be the only one experiencing this error.  I
checked everywhere, where I eventually ended up at apache-bugzilla

http://issues.apache.org/bugzilla/show_bug.cgi?id=4547

If you read the thread you'll see that it has been resolved and it
was a duplicate bug.  And it lists the link to the other bug:

http://issues.apache.org/bugzilla/show_bug.cgi?id=4545


But,  The two are completely different.  One is a ssl key bug and the
other is a socket exception



Am I missing something??

I am running the newest tomcat 4.0.6  on apache 1.3.2X with the newest
jvm on redhat 6.2.

I get the above error then apache freezes up?

Any every have this happen?



Does this bug need to be reopened??  Never been in this situation and I
don't know how to proceed.  Any help would be greatly appreciated.

Sincerely,
Chad





signature.asc
Description: This is a digitally signed message part


RE: Servlet running/not running

2002-10-25 Thread SAmhed

You are a life-saver. It's up and running

Many thanks.

Sohail Ahmed
GeneralCologne Re
Email:  [EMAIL PROTECTED]
Tel:(203) 328 - 5332


   

  "Shapira, Yoav"  


  .com>cc:   (bcc: Sohail 
Ahmed/GCR-NAmerica/GRN)  
   Subject:  RE: Servlet running/not 
running   
  10/25/2002 02:40 

  PM   

  Please respond to

  "Tomcat Users

  List"

   

   





Hi,

>I have installed Tomcat 4.1.12. I have this directory structure for a
>servlet. C:\Tomcat\webapps\myApp\WEB-INF\classes and the servlet name
is
>test. OK. When I try to see this servlet by
>http://localhost:8080/myApp/servlet/test, I get this; "The requested
>resource (/myApp/servlet/test) is not available. Now, if I copy the
>test.class file to C:\Tomcat\webapps\examples\WEB-INF\classes, it works
>(http://localhost:8080/examples/servlet/test), which leads me to
believe
>that I need to do some tweaking with the configuration.

4.1.12 comes with the default invoker servlet mapping turned off for
security.  The release notes have the full details.

Uncomment the  element for the invoker servlet in
$CATALINA_HOME/conf/web.xml to make the above work.

Better yet, declare a mapping for your servlet by adding the following
to your web.xml (the one in myApp/WEB-INF):


  testServletName
  test



  testServletName
  /Test


And then access your servlet by
http://localhost:8080/myApp/Test

This way, you don't have to have the invoker servlet.

>THREAT: I posted this question yesterday too but didn't get any reply.
>Understand that I'm a Microsoft programmer trying to get on board with
you
>Java people and if you don't help me, I'll go back to working on good
ol'
>IIS.
>
> It's more of a threat to IIS actually :)

Funniest paragraph I've seen in a while ;) ;) ;)

Yoav Shapira
Millennium ChemInformatics
This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential,
proprietary and/or privileged.  This e-mail is intended only for the
individual(s) to whom it is addressed, and may not be saved, copied,
printed, disclosed or used by anyone else.  If you are not the(an) intended
recipient, please immediately delete this e-mail from your computer system
and notify the sender.  Thank you.

--
To unsubscribe, e-mail:   <
mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <
mailto:tomcat-user-help@;jakarta.apache.org>





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Help to me !! !! !! !! - DON'T ATTACH FILES!!

2002-10-25 Thread Sexton, George
I have to disagree. Sometimes it is the only way to troubleshoot issues,
particularly with server.xml and web.xml.

-Original Message-
From: Burt Johnson [mailto:burt@;mindstorm-inc.com]
Sent: 25 October, 2002 12:40 PM
To: Tomcat Users List
Cc: [EMAIL PROTECTED]
Subject: Re: Help to me !! !! !! !! - DON'T ATTACH FILES!!


PLEASE DON'T attach files to this list!!
--


- Burt Johnson
  MindStorm, Inc.
  [EMAIL PROTECTED]
  http://www.mindstorm-inc.com

--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Help to me !! !! !! !! - DON'T ATTACH FILES!!

2002-10-25 Thread Turner, John

Second on "OK to attach files".

John


> -Original Message-
> From: Sexton, George [mailto:gsexton@;mhsoftware.com]
> Sent: Friday, October 25, 2002 3:10 PM
> To: Tomcat Users List
> Subject: RE: Help to me !! !! !! !! - DON'T ATTACH FILES!!
> 
> 
> I have to disagree. Sometimes it is the only way to 
> troubleshoot issues,
> particularly with server.xml and web.xml.
> 
> -Original Message-
> From: Burt Johnson [mailto:burt@;mindstorm-inc.com]
> Sent: 25 October, 2002 12:40 PM
> To: Tomcat Users List
> Cc: [EMAIL PROTECTED]
> Subject: Re: Help to me !! !! !! !! - DON'T ATTACH FILES!!
> 
> 
> PLEASE DON'T attach files to this list!!
> --
> 
> 
> - Burt Johnson
>   MindStorm, Inc.
>   [EMAIL PROTECTED]
>   http://www.mindstorm-inc.com
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JSP's and J2SDK1.4 assert statement

2002-10-25 Thread Craig R. McClanahan


On Fri, 25 Oct 2002, Oliver Jonas wrote:

> Date: Fri, 25 Oct 2002 19:28:34 +0200
> From: Oliver Jonas <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
> Subject: RE: JSP's and J2SDK1.4 assert statement
>
> Hi Craig,
>
> I also tried CATALINA_OPTS... same thing happens. Thinking about it "-source
> 1.4" isn't actually a valid option for "java", only for "javac". (Maybe
> that's why it fails because it starts fine if I only put "-enableassertions"
> in JAVA_OPTS.
>
> So I guess I need to tell Jasper to use the option "-source 1.4".
>
>
> Any ideas how to?
>

Nope ... you'd have to modify Jasper sources to do this.

> Thanks,
> Oliver.
>
> PS: Using JSP's only for HTML presentation... but would still like to have
> asserts to make sure values returned by the underlying Java API are valid.
>

Good.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




  1   2   >