Re: Finding Version Of Tomcat On Unix?

2007-04-04 Thread David Smith
As with the recently asked question on which java version is in use, you 
should be able to glean that from the manager webapp.


http://localhost:8080/manager/html (replace localhost and 8080 with 
appropriate values for your installation)


Log in with a user that has the manager role and it should offer you 
lots of good information on the status of tomcat.


--David

[EMAIL PROTECTED] wrote:


Hello List!

I have a quick question that I'm hoping someone can help me with: How can 
I find the version of Tomcat running on my Unix box?


When I go into the README.txt doc, I see that it's 4.1...but I don't know 
the last #'s in the version: 4.1.x...


Is there a command I can run to find this info out?

Thanks much for your time and assistance!
-Jeanna
 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: accessing files/dirs.....

2007-04-03 Thread David Smith
I'm not sure what you're attempting to do here, but have you thought 
about ServletContext.getResource() and 
ServletContext.getResourceAsStream() ?  Both are safe methods of reading 
resources from the webapp whether it be in a compressed archive or not.  
There is also getRealPath(), but it will only work if the webapp is 
expanded (ie not a .war file).


I can't recommend it enough -- read the servlet spec.  It really does help.

--David

maya wrote:


File dir = new File(C:\\apache-tomcat-5.5.17\\webapps\\india\\delhi\
\images);

this works fine in my machine locally, but on my website.. if, say,
I'm in dir where 'images' dir is, this doesn't work...

File dir = new File(images)

starting @ root of webapp also doesn't work...

File dir = new File(/india/delhi/images);

names of directors are good, they are all lowercase...

have conditional to test...

if (imgsList == null)
   out.println(null);

always prints 'null' on my website...

do paths in this constructor have to be absolute?  so on my website
path would have to start with http...?

is this an access problem?  if so, do I need to ask my webhosting 
folks?  I know this is not a very kosher way of doing it, but am 
running this code in a JSP for now (still don't know enough struts and 
such to do this kind of stuff in a stand-alone class..  but of course 
eventually will have to..  all I want to do is count how many images 
are in 'images' dir.. that's it..)


thank you...



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: accessing files/dirs.....

2007-04-03 Thread David Smith
Ok... I think I'm starting to see the picture here.  You want to be able 
to write a jsp that can list the directory contents of a folder.   This 
is very crude, no error checking, untested, etc. but you'll catch on


   ul
   %
 String reqParameter = request.getParameter( directory ) ;
 URI dirURI = this.getServletContext().getResource( reqParameter 
).toURI() ;

 File dirFile = new File( dirURI ) ;
 if ( dirFile.isDirectory() ) {
 String[] fileList = dirFile.list() ;
 for ( int index = 0; index  fileList.length; index++ ) {
 out.println( li + fileList[ index ] + /li ) ;
 }
 }
   %
   /ul
  
And it does comply with the servlet spec.


--David



maya wrote:


thank you..  someone in another forum said the same thing.. problem 
is, if I have trouble accessing directory, how will I tell these 
methods to get Resource for that dir? :)


(also, alas, don't quite remember how to use methods of interfaces -- 
since interfaces can't be instantiated, didn't find getInstance() 
method for this interface..  but well, can look this up elsewhere, I 
suppose:)


thank you...



David Smith wrote:
I'm not sure what you're attempting to do here, but have you thought 
about ServletContext.getResource() and 
ServletContext.getResourceAsStream() ?  Both are safe methods of 
reading resources from the webapp whether it be in a compressed 
archive or not.  There is also getRealPath(), but it will only work 
if the webapp is expanded (ie not a .war file).


I can't recommend it enough -- read the servlet spec.  It really does 
help.


--David

maya wrote:


File dir = new File(C:\\apache-tomcat-5.5.17\\webapps\\india\\delhi\
\images);

this works fine in my machine locally, but on my website.. if, say,
I'm in dir where 'images' dir is, this doesn't work...

File dir = new File(images)

starting @ root of webapp also doesn't work...

File dir = new File(/india/delhi/images);

names of directors are good, they are all lowercase...

have conditional to test...

if (imgsList == null)
   out.println(null);

always prints 'null' on my website...

do paths in this constructor have to be absolute?  so on my website
path would have to start with http...?

is this an access problem?  if so, do I need to ask my webhosting 
folks?  I know this is not a very kosher way of doing it, but am 
running this code in a JSP for now (still don't know enough struts 
and such to do this kind of stuff in a stand-alone class..  but of 
course eventually will have to..  all I want to do is count how many 
images are in 'images' dir.. that's it..)


thank you...



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: path Attribute for Context Element

2007-04-02 Thread David Smith

Stefan Duffner wrote:


Hi,

I try to add a new webapplication to a Tomcat in version 5.5.23. I add 
an own context.xml, which contains some jndi configuration for the 
tomcat connection pool. I deployed this webapplication into my 
application directory as subdirectory named appl. This works fine, my 
application is starting.


Now I want to change the context name from appl into , which works 
with tomcat 4, but not with this Tomcat's version. I tried the following:


- add path attribute to element context inside context.xml of the 
META-INF directory of the webapplication
- add appl.xml into |the following path 
$CATALINA_HOME/conf/[enginename]/[hostname]/ with own path element, too.

- add own element context inside server.xml also with empty path element

Thanks for any suggestions
|

Rename appl.xml in $CATALINA_HOME/conf/[enginename]/[hostname] to 
ROOT.xml.  ROOT is the special name of the default (aka /) webapp.


--David

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Number of Servlets Tomcat Container Creates

2007-03-30 Thread David Smith

Quoting the spec here (SRV.2.1 of servlet spec 2.4):

The handling of concurrent requests to a Web application generally 
requires that the Web Developer design servlets that can deal with 
muiltiple threads executing within the service method at a particular time.


Generally the Web container handles concurrent requests to the same 
servlet by concurrent execution of the service method on different threads.


That right there suggests strongly that you should avoid class instance 
variables. 

On the thread front, the threads I believe are created by the connectors 
to handle incoming requests.  Connector threads aren't tied to any 
specific webapp or servlet.  They call the appropriate method of a 
servlet and pass in a HttpServletRequest and HttpServletResponse object.



--David

Evan J wrote:


Hi,

I am new to servlets and web container. From what I have read so far,
I've gotten an impression that the web containers, in this case
Tomcat, create only _one_ instance of each particular servlet upon
start/[re]deployment of a web application. Any request to such servlet
would cause a container to spawn a thread that would call upon this
servlet instance's methods (service()...).

My first question is, that under any circumstances, does the container
create a second instance of a servlet (obviously we are talking about
a servlet with a unique registered name not all the servlets in the
context)? I tried to verify this by placing `this' in a Hashtable
during doGet/Post() call to see whether the Container creates a new
one which apparently doesn't but I just want to make sure if my
assumption is correct. If that's correct then it does not matter the
servlet's variable be an instance variable or a class variable.

Another question that arises (relating to the first question), does
every newly created thread with the help of Container get accessed to
that single servlet instance and pass the request/response objects to
the servlet?

Wanting to dig deeper into details, and I know this may not be an
appropriate mailing list, but where does Tomcat container management
actually create these threads? What java file to be more specifically?

Thank You

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Number of Servlets Tomcat Container Creates

2007-03-30 Thread David Smith

Evan J wrote:


On 3/30/07, David Smith [EMAIL PROTECTED] wrote:


Quoting the spec here (SRV.2.1 of servlet spec 2.4):

The handling of concurrent requests to a Web application generally
requires that the Web Developer design servlets that can deal with
muiltiple threads executing within the service method at a particular 
time.


Generally the Web container handles concurrent requests to the same
servlet by concurrent execution of the service method on different 
threads.


That right there suggests strongly that you should avoid class instance
variables.

On the thread front, the threads I believe are created by the connectors
to handle incoming requests.  Connector threads aren't tied to any
specific webapp or servlet.  They call the appropriate method of a
servlet and pass in a HttpServletRequest and HttpServletResponse object.


--David



David,

Thank you for your response. A further investigation of Tomcat source
code reveals that, indeed, the servlet definition class such as
`org.apache.catalina.core.StandardWrapper.java' implements a singleton
design in creation of each servlet (in allocate() method). Unless of
course, servlet implements a single thread model, in that case, a
stack structure is used to handle pool of such servlet instances.

What I am still inclined to figure out is at what location(s) does the
container creates threads to handle servlet requests/responses? I've
looked in `org.apache.catalina.core/connector' packages in vein. Does
anyone aware of such detail?

Thank You

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



I wouldn't get too hung up on the internals of tomcat here.  You should 
remember servlet engines can be implement the spec in any way they see 
fit.  They are only required to comply with the spec.  Anything not 
spelled out there is subject to interpretation.


Suffice it to say servlets in and of themselves should be as stateless 
as possible as various threads call on their methods.  Stuff that 
persists for the life of the request, session, or application are stored 
as attributes of the request, session, or servletContext respectively.


I'll step back here and let a tomcat developer explain the internals of 
tomcat.  I've only ever had a cursory look at the tomcat internal source 
code.  I do know the threads aren't created per request -- they are 
pooled and the pool creates/drops threads as necessary.  Everywhere else 
they are just borrowed, used, and returned.


--David

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: connection pool

2007-03-22 Thread David Smith
Hmmm... that's odd.  Can you offer any more details of the problem?  OS? 
tomcat version?  database and driver?  Any reliance on mapped network 
drive resources?


--David

Gioia, Michael wrote:


Hi, I'm still having a problem with tomcat with keeping up the
connection to the database thru the connection pool.



Almost every weekend the database gets bumped and the java app that were
running needs to have tomcat restarted to reconnect to the database thru
the connection pool.  When we come in on Monday tomcat and the database
are up and running, but the app will not connect to the database.



I tried to use a batch file and have it run in scheduler to stop and
start the tomcat service, but it doesn't seem to work it the machine is
logged out.



Is there a way to reestablish the connection so our users don't have to
wait until we come in on Monday to restart tomcat?





MG








 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: context not recognised?

2007-03-22 Thread David Smith
Nope create a new xml file in that location named after your 
webapp's context ... ie Project.xml.


In the xml file, just put in the Context ../Context block.

--David

Richard Dunne wrote:


I have these: admin, balancer and manager .xml files in 
$CATALINA_HOME/conf/[enginename]/[hostname]/ directory.
Should I put my Context in one of these files as each already has a Context?

Richard.


- Original Message 
From: Caldarale, Charles R [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Thursday, March 22, 2007 1:42:32 PM
Subject: RE: context not recognised?


 

From: Richard Dunne [mailto:[EMAIL PROTECTED] 
Subject: context not recognised?


I have added the folowing line to my server.xml file
context path=/Project docBase=c:\Project debug=0 /.  
   



It's Context, not context.  For 5.0 and above Context elements
should not be placed in server.xml; they should be put in
conf/Catalina/[hostName]/[appName].xml when the app is deployed outside
of the Host appBase directory.  When not in server.xml, the path
attrbute should not be present.

Check the bold print at:
http://tomcat.apache.org/tomcat-5.0-doc/config/context.html

- Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Looking for earth-friendly autos? 
Browse Top Cars by Green Rating at Yahoo! Autos' Green Center.

http://autos.yahoo.com/green_center/
 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to run a .exe file from a web application in tomcat

2007-03-22 Thread David Smith
Just for clarifications sake, are you asking for how to launch a 
client-side app or a server-side app? 

Server-side is moderately easy, client-side is a whole different 
animal.  For security reasons, you really can't call a specific 
client-side app from tomcat.  Best bet there is to make sure you send 
the correct mime-type and hope an editor is associated with the file type.


--David

Jitendra Ch wrote:


Hi to allI am new member to this group. I am having some problems in 
calling an .exe file for example notepad, from a web application using 
Tomcat.Is it possible to call an .exe file from a web application in 
Tomcat.With Regards,Jitendra
_
Get the new Windows Live Messenger!
http://get.live.com/messenger/overview
 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to run a .exe file from a web application in tomcat

2007-03-22 Thread David Smith
Then you are looking for an applet or browser plugin rather than a exe 
file.  Text should be fairly easy via many richtext javascript tools out 
there.  Graphics sounds complicated and I wouldn't know where to begin.  
Might want to start with everyone's best friend Google and see what 
comes back.


--David

Jitendra Ch wrote:



Hi David Smith,Our requirement is call Client side application only, and there are two tasks under this, they are editing an image(.jpg) and a text file. As you said it is not possible to call client side application, how to call an server side application? Date: Thu, 22 Mar 2007 11:51:55 -0400 From: [EMAIL PROTECTED] To: users@tomcat.apache.org Subject: Re: How to run a .exe file from a web application in tomcat  Just for clarifications sake, are you asking for how to launch a  client-side app or a server-side app?   Server-side is moderately easy, client-side is a whole different  animal.  For security reasons, you really can't call a specific  client-side app from tomcat.  Best bet there is to make sure you send  the correct mime-type and hope an editor is associated with the file type.  --David  Jitendra Ch wrote:  Hi to allI am new member to this group. I am having some problems in calling an .exe file for example notepad, from a web application using Tomcat.Is it possible to call an .exe file from a web application in Tomcat.With Regards,Jitendra _ Get the new Windows Live Messenger! http://get.live.com/messenger/overview   - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 
_

Call friends with PC-to-PC calling -- FREE
http://get.live.com/messenger/overview
 





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: apache-tomcat on an ia64 rhel4?

2007-03-21 Thread David Smith
Tomcat is really a whole service environment for running java servlets 
and jsp.  Don't think if it in terms of CGIs that just run for the 
request and close down.  Tomcat is more akin to Apache's httpd, 
listening ports and responding to client requests on the http or https 
protocol.  It can be proxied with Httpd if you want using either 
straight http reverse proxying or a custom AJP protocol.


Tomcat is fully open source and can run with the Sun JRE as of version 
5.5 (maybe 5.0, but I'm not sure without looking it up).


Don't use gcj -- it's not a complete enough java environment.  I've 
heard IBM's implementation of  java is pretty good but haven't tried it.


--David

Jeff Sadowski wrote:


I'm still really unclear about what tomcat is. I have never used it I
play mostly with php and html.
I have another engineer that would like to use it. Is there a fully
open source alternative?
I guess tomcat itself is open source but it depends on java
development kit? is that right?
I'm more interested in if it could use something from the gcj project?
I know I can run java applications on my Altix 330 it has the java
command. I know I can compile some java code as well with gcj but I
take it that there is more too it than that? right? I guess I could
also use gcj to compile the java code to binaries and run them as cgi?
I guess I really need to ask my other engineer but I was just trying
to get as much done as I could and try and install the application he
asked for (tomcat)

Thanks

On 3/20/07, Jeff Sadowski [EMAIL PROTECTED] wrote:

I would like to run apache-tomcat on an dual Itanium server I have at 
work.

I cannot find JDK for it nor can I find anything besides gcj

Is it possable to build tomcat with gcj?

has anyone gotten tomcat to run on a ia64 linux machine? or ia64
windows even(I think MS stoped support for the ia64 even) for that
matter?
(the machine I'm looking at only supports linux and is headless) its
an SGI Altix 330



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Unable to compile class for JSP

2007-03-20 Thread David Smith
The error report implies that it's trying to compile a jsp it can't read 
(line -1 and jsp file: null).  Can you check for a root cause in the 
logs relating to the stack trace below?  Also check the usual suspects 
-- file permissions, security manager, etc.


--David

[EMAIL PROTECTED] wrote:


Hi,

This might be a silly question, but it seems to be quite a common
problem (lots or links in google). But none of the offered solutions so
far worked.

So I am asking the people who probably know!



I installed tomcat 4.1.29 with JDK 1.4.2



Trying the JSP examples coming with it, I get the following message:



type Exception report

message 


description The server encountered an internal error () that prevented
it from fulfilling this request.

exception 


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

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

Generated servlet error:
   [javac] Compiling 1 source file



   at
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHa
ndler.java:130)
   at
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.ja
va:293)
   at
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
   at
org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
   at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.ja
va:473)
   at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:190)
   at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
   at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
   at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
   at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:256)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
   at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:191)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
   at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
Base.java:494)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
   at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241
7)
   at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
   at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:171)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
   at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:172)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
   at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:174)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
   at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193)
   at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:78
1)
   at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:549)
   at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:58
9)
   at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:666)
   at java.lang.Thread.run(Unknown Source)



Apache Tomcat/4.1.29




Thanks for help!



Peter








 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Can't solve problem: Unable to compile class for JSP

2007-03-19 Thread David Smith
Have you taken a look at the full stack trace of the root cause in the 
logs?  It would also be helpful if we could see the relevant jsp source 
and know which version of tomcat you are working with.


--David

Linas Stankevicius wrote:


Hallo,

i tried to solve this problem and i read many posts but could found any good 
solution.
plz help me :)


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

Generated servlet error:
The return type is incompatible with JspSourceDependent.getDependants()



org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)

org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)

org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

note The full stack trace of the root cause is available in the Apache 
Tomcat/5.5.20 logs.




Sucker-punch spam with award-winning protection. 
Try the free Yahoo! Mail Beta.

http://advision.webevents.yahoo.com/mailbeta/features_spam.html
 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Same session for one IP

2007-03-16 Thread David Smith
None that I no of.  More to the point, it's a security issue to have all 
the browsers behind one IP share a common session.  Witness how cable 
routers can share one IP with an entire apartment building.  Would you 
really want your neighbor with the super loud metal rock to see your 
credit card statements?



All browser windows spawned from a single process can share (and often 
do to the frustration of some web developers).  So, if you use New 
Window or Ctrl-N from within IE you'll get the same session as the 
window that started the session.  Firefox does the same thing regardless 
of whether you open from Explorer or New Window in the File menu.


Is there a reason you need to guarantee all the browsers from a given 
user have the exact same session?


--David

kz wrote:


Hi,

Is there any option in Tomcat which can assign a new session ID only 
if the

IP address is changed and not a browser window? Actually right now a new
session ID comes in request for every new browser window (even if the IP
address is same). Is there any option to make Tomcat assign new 
session ID
only if IP address is changed and the session remains the same even if 
there

are multiple browser windows hitting the server?

Thank you so much.

Khurram.




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: org.apache.jasper.compiler.DefaultErrorHandler.javacError

2007-03-15 Thread David Smith
This is a partial stack taken out of the middle.  Please post a COMPLETE 
stack from the start and including the the root cause (if available).


Also we well need to know OS, JDK version, tomcat version.

--David

Raghuveer wrote:


Could anyone suggest me what is the following error related to.



error


   at
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
   at
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:248)
   at
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:315)
   at org.apache.jasper.compiler.Compiler.compile(Compiler.java:328)
   at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:427)
   at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:142)
   at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
   at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
   at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
   at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
   at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
   at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
   at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
   at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
   at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
   at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
   at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
   at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
   at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
   at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
   at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
   at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
   at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
   at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Classpath Problem

2007-03-14 Thread David Smith
Apologies if this sounds insulting, but ... you did include 
java.util.HashMap in your jsp, didn't you?


IE:  [EMAIL PROTECTED] import=java.util .HashMap %

--David

Mark Hale wrote:

Hi there.

I am new to Tomcat and have installed Tomcat6 and JDK1.5 on Windows.
I get Tomcat to run and can include my own JSP's.  However, whenever I
use classes like HashMap I get a compiler error (HashMap cannot be
resolved to a type).

I've dug all through the web, documentation and mail archives.

Does anyone have a url that will help or information for a newbie on
why classes in what would be in j2se are not available to compile?

Another piece of info:  my jvm in tomcat6w is set to:

C:\Program Files\Java\jdk1.5.0_11\jre\bin\server\jvm.dll

Thanks!

Mark

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: The requested resource (/) is not available.

2007-03-13 Thread David Smith
It would except tomcat just serves up folders with out web.xml files as
static resources.  A WARN might be in order, but that's about it.  In
addition, tomcat does not chase down sym links.  Best practice is to be
sure all required resources are contained within the webapp.

--David

Aditya Prasad wrote:
 I guess all I'm looking for is something like could not find a
 web.xml for resource or somesuch.

 On 3/12/07, Martin Gainty [EMAIL PROTECTED] wrote:
 Prasad-

 If you can get Tomcat to resolve any of the hundreds of OS specific
 binary or construct (such as symlink)..
 you can always exit the VM to the OS thru Runtime.exec() ..but then
 again that would spawn a process

 Anyone else?
 M-
 ---

 This e-mail message (including attachments, if any) is intended for
 the use of the individual or entity to which it is addressed and may
 contain information that is privileged, proprietary , confidential
 and exempt from disclosure. If you are not the intended recipient,
 you are notified that any dissemination, distribution or copying of
 this communication is strictly prohibited.
 ---

 Le présent message électronique (y compris les pièces qui y sont
 annexées, le cas échéant) s'adresse au destinataire indiqué et peut
 contenir des renseignements de caractère privé ou confidentiel. Si
 vous n'êtes pas le destinataire de ce document, nous vous signalons
 qu'il est strictement interdit de le diffuser, de le distribuer ou de
 le reproduire.
 - Original Message -
 From: Aditya Prasad [EMAIL PROTECTED]
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Monday, March 12, 2007 8:15 PM
 Subject: Re: The requested resource (/) is not available.


  Thanks for the suggestion.
 
  It turns out that the problem was that my web.xml was a symlink.  I
  had to figure this out through trial and error.  Is there no better
  way to debug this sort of thing?
 
  Cheers,
  Aditya
 
  On 3/12/07, Rashmi Rubdi [EMAIL PROTECTED] wrote:
  I had a similar problem too, I did a few things that got it resolved.
 
  One thing I remember is, setting the directory listings to true
 in server.xml , at that time if there's no index page in the directory
  it listed the directory listings instead of giving a 404 error.
 
  Other possible causes:
 
  -Check for conflicting ports - see if another app is using the
 same port as Tomcat. On my machine Oracle 10g HTML interface was
 using port 8080, so I changed
  Tomcat port to 9090.
 
  -Check CATALINA_HOME path
 
  -Rashmi
 
  - Original Message 
  From: Aditya Prasad [EMAIL PROTECTED]
  To: users@tomcat.apache.org
  Sent: Monday, March 12, 2007 5:35:39 PM
  Subject: The requested resource (/) is not available.
 
 
  I've set my JULI logging to FINE to figure out why I always get The
  requested resource (/) is not available.  Unfortunately, the log
  seems to indicate that the ROOT context was started up all right:
 
  Mar 12, 2007 2:32:56 PM org.apache.catalina.startup.HostConfig
 deployDirectory
  FINE: Deploying web application directory ROOT
  ...
  Mar 12, 2007 2:32:56 PM org.apache.catalina.core.StandardContext
 start
  FINE: Starting ROOT
 
  And there are no errors in the log.  Any suggestions on where to
 go to
  figure out why my webapp stopped working all of a sudden?  I don't
  recall making any changes that should have broken it.
 
  Thanks!
 
 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Apache - tomcat connection on Suse Lnux

2007-03-13 Thread David Smith
Looks like the error says it all.  Tomcat can't find servlet-api.jar in
common/lib.  Check that it really exists there and isn't a symlink. 
Tomcat isn't known for tolerating symlinks all that well.

--David

dianelane wrote:
 On a Suse linu 10 server, with Apache2 I am trying to setup Tomcat5
 (coonector with Apache2) to run web applicatons.
 I do foolow the Apache Tomcat Coonector - webserver how-to, but have errors.

 Java and Tomcat installed from Suse repository via YAst.
 mod_jk.so downloaded and stored in /usr/lib/apache2
 /etc/tomcat5/base/workers.properties modified as follows
 ...
 #workers.tomcat_home=/var/tomcat3
 workers.tomcat_home=/usr/share/tomcat5
 #
 # workers.java_home should point to your Java installation. Normally
 # you should have a bin and lib directories beneath it.
 #
 #workers.java_home=/opt/IBMJava2-13
 workers.java_home=/usr/lib/java
 ...

 in /etc/apache2/httpd.con file added last line 
 Include /usr/share/tomcat5/conf/jk/mod_jk.conf-auto

 /ets/tomcat5/base/server.xml modified as follows:
   Listener className=org.apache.catalina.mbeans.ServerLifecycleListener
 debug=0/
   Listener
 className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
 debug=0/
   Listener className=org.apache.jk.config.ApacheConfig 
 modJk=/usr/lib/apache2/mod_jk.so /

 tomcat restarted with error 7 and log
 files

 start.log:
 Using CATALINA_BASE:   /srv/www/tomcat5/base/
 Using CATALINA_HOME:   /usr/share/tomcat5
 Using CATALINA_TMPDIR: /srv/www/tomcat5/base//temp
 Using JAVA_HOME:   /usr/lib/jvm/java

 catalina.out:
 Bootstrap: Class loader creation threw exception
 java.lang.IllegalArgumentException: addRepositoryInternal:
 repository='file:/usr/share/tomcat5/common/lib/servlet-api.jar'
   at
 org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(StandardClassLoader.java:957)
   at
 org.apache.catalina.loader.StandardClassLoader.init(StandardClassLoader.java:153)
   at
 org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:207)
   at
 org.apache.catalina.startup.Bootstrap.createClassLoader(Bootstrap.java:163)
   at
 org.apache.catalina.startup.Bootstrap.initClassLoaders(Bootstrap.java:104)
   at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:196)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:402)
 Caused by: java.util.zip.ZipException: No such file or directory
   at java.util.zip.ZipFile.open(Native Method)
   at java.util.zip.ZipFile.init(ZipFile.java:203)
   at java.util.jar.JarFile.init(JarFile.java:132)
   at java.util.jar.JarFile.init(JarFile.java:70)
   at
 org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(StandardClassLoader.java:944)
   ... 6 more

 Could you help me?
 thank you
   


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Cannot create resource instance

2007-03-08 Thread David Smith
)
  at
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
 .java:683)
  at java.lang.Thread.run(Thread.java:539)
 Cannot create resource instance









 David Smith wrote:


 Then I would point you to

 http://tomcat.apache.org/tomcat-4.1-doc/jndi-resources-howto.html
 and


 http://tomcat.apache.org/tomcat-4.1-doc/jndi-datasource-examples-howto.h
 tml

 for some excellent information on setting up this stuff.  I don't

 think
 you have to spec a resource factory as the built-in one for

 datasources
 is a slightly refactored (package rename only) version of DBCP.  Also,


 the JDBC driver needs to be stored in common/lib of the tomcat
 installation.  Lastly, unless you are directly using the
 commons-dbcp package or the commons-pool package in your code, the
 commons-dbcp-xx.xx.jar and commons-pool.jar are not necessary in

 WEB-INF.

 --David

 Natasha N Wright wrote:


 I am using Tomcat version 4. with JDK 1.4 (quite old i know!)

 David Smith wrote:


 Before we can offer any relevant advice, please let us know which
 version of tomcat you are working with.  There are configuration
 differences between 5.0.x and 5.5.x.

 --David

 Natasha N Wright wrote:


 Hi,

 I am trying to create a servlet which connects to a oracle
 database.  My servlet is called from an HTML form.  When it is
 called i recieve a
 javax naming exception Cannot create resource instance error. 
 Please can someone advise me what I need to configure? I get no
 tomcat errors on startup.
 Thankyou

 i am calling the db connection with the following java:
 -
 Context initial = new InitialContext();
 Context envContext = (Context)initial.lookup(java:/comp/env);
 DataSource ds = (DataSource)envContext.lookup(jdbc/maindb);
 tcon = ds.getConnection();

 server.xml (within context)
 --
 Resource name=jdbc/maindb auth=Container
 type=javax.sql.DataSource /
 ResourceParams name=jdbc/maindb
 parameter
namedriverClassName/name
valueoracle.jdbc.driver.OracleDriver/value
 /parameter
 parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
 /parameter
 parameter
nameurl/name

 valuejdbc:oracle:[EMAIL PROTECTED]:1512:maindb/value

 /parameter
 parameter
nameuser/name
valuennw03u/value
 /parameter
 parameter
namepassword/name
value**/value
 /parameter
 parameter
namemaxActive/name
value20/value
 /parameter
 parameter
namemaxIdle/name
value10/value
 /parameter
 parameter
namemaxWait/name
value-1/value
 /parameter
 /ResourceParams

 web.xml
 --
 resource-ref
res-ref-namejdbc/maindb/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
 /resource-ref

 Jar files in WEB-INF/lib
 ---
 classes12.jar
 jasper-compiler.jar
 commons-collections-3.1.jar
 jasper-runtime.jar
 commons-dbcp-1.2.1.jar
 jsp-api.jar
 commons-dbcp-1.2.jar   
 mysql-connector-java-3.1.8-bin.jar
 commons-el.jar
 naming-factory-dbcp.jar
 commons-pool-1.3.jar
 naming-java.jar
 jasper-compiler-jdt.jar

 This message has been checked for viruses but the contents of an
 attachment
 may still contain software viruses, which could damage your

 computer
 system:
 you are advised to perform your own checks. Email communications
 with the
 University of Nottingham may be monitored as permitted by UK
 legislation.




 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 This message has been checked for viruses but the contents of an
 attachment
 may still contain software viruses, which could damage your computer
 system:
 you are advised to perform your own checks. Email communications with
 the
 University of Nottingham may be monitored as permitted by UK
 legislation.


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 This message has been checked for viruses but the contents of an
 attachment
 may still contain software viruses, which could damage your computer
 system:
 you are advised to perform your own checks. Email communications with the
 University of Nottingham may be monitored as permitted by UK legislation.




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Cannot create resource instance

2007-03-07 Thread David Smith
Before we can offer any relevant advice, please let us know which 
version of tomcat you are working with.  There are configuration 
differences between 5.0.x and 5.5.x.


--David

Natasha N Wright wrote:

Hi,

I am trying to create a servlet which connects to a oracle database.  
My servlet is called from an HTML form.  When it is called i recieve a
javax naming exception Cannot create resource instance error.  Please 
can someone advise me what I need to configure? I get no tomcat errors 
on startup.

Thankyou

i am calling the db connection with the following java:
-
Context initial = new InitialContext();
Context envContext = (Context)initial.lookup(java:/comp/env);
DataSource ds = (DataSource)envContext.lookup(jdbc/maindb);
tcon = ds.getConnection();

server.xml (within context)
--
Resource name=jdbc/maindb auth=Container 
type=javax.sql.DataSource /

 ResourceParams name=jdbc/maindb
parameter
namedriverClassName/name
valueoracle.jdbc.driver.OracleDriver/value
/parameter
parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
parameter
nameurl/name
valuejdbc:oracle:[EMAIL PROTECTED]:1512:maindb/value
/parameter
parameter
nameuser/name
valuennw03u/value
/parameter
parameter
namepassword/name
value**/value
/parameter
parameter
namemaxActive/name
value20/value
/parameter
parameter
namemaxIdle/name
value10/value
/parameter
parameter
namemaxWait/name
value-1/value
/parameter
/ResourceParams

web.xml
--
resource-ref
res-ref-namejdbc/maindb/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref

Jar files in WEB-INF/lib
---
classes12.jar
jasper-compiler.jar
commons-collections-3.1.jar
jasper-runtime.jar
commons-dbcp-1.2.1.jar
jsp-api.jar
commons-dbcp-1.2.jar
mysql-connector-java-3.1.8-bin.jar

commons-el.jar
naming-factory-dbcp.jar
commons-pool-1.3.jar
naming-java.jar
jasper-compiler-jdt.jar

This message has been checked for viruses but the contents of an 
attachment
may still contain software viruses, which could damage your computer 
system:

you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: getting context path name

2007-03-07 Thread David Smith
request.getContextPath() should supply what you need.  If the webapp is 
the ROOT webapp, it will return an empty string.  That just makes it 
easy to write stuff like:


img src=${pageContext.request.contextPath}/images/myMasthead.jpg /

If you really need the ROOT webapp to return /, then you'll just have 
to test for an empty string and handle that as a special case.


--David

santhoshihrd wrote:

Hi all,
   I have an issue 
I have a context nemed demo with the following configuration
Context path=/demo docBase=webapps/MyWebApp.war 
 debug=0 privileged=true

/Context

I want to get the context name demo in a servlet . I am using Spring
framework. It will be more usefule if I get it in Dispatcher servlet. If I
am deploying the context in / , I should get it as /
Context path=/ docBase=webapps/MyWebApp.war 
 debug=0 privileged=true

/Context

Thanks in advance



  


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Cannot create resource instance

2007-03-07 Thread David Smith

Then I would point you to

http://tomcat.apache.org/tomcat-4.1-doc/jndi-resources-howto.html
and
http://tomcat.apache.org/tomcat-4.1-doc/jndi-datasource-examples-howto.html

for some excellent information on setting up this stuff.  I don't think 
you have to spec a resource factory as the built-in one for datasources 
is a slightly refactored (package rename only) version of DBCP.  Also, 
the JDBC driver needs to be stored in common/lib of the tomcat 
installation.  Lastly, unless you are directly using the commons-dbcp 
package or the commons-pool package in your code, the 
commons-dbcp-xx.xx.jar and commons-pool.jar are not necessary in WEB-INF.


--David

Natasha N Wright wrote:

I am using Tomcat version 4. with JDK 1.4 (quite old i know!)

David Smith wrote:

Before we can offer any relevant advice, please let us know which 
version of tomcat you are working with.  There are configuration 
differences between 5.0.x and 5.5.x.


--David

Natasha N Wright wrote:


Hi,

I am trying to create a servlet which connects to a oracle 
database.  My servlet is called from an HTML form.  When it is 
called i recieve a
javax naming exception Cannot create resource instance error.  
Please can someone advise me what I need to configure? I get no 
tomcat errors on startup.

Thankyou

i am calling the db connection with the following java:
-
Context initial = new InitialContext();
Context envContext = (Context)initial.lookup(java:/comp/env);
DataSource ds = (DataSource)envContext.lookup(jdbc/maindb);
tcon = ds.getConnection();

server.xml (within context)
--
Resource name=jdbc/maindb auth=Container 
type=javax.sql.DataSource /

 ResourceParams name=jdbc/maindb
parameter
namedriverClassName/name
valueoracle.jdbc.driver.OracleDriver/value
/parameter
parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
parameter
nameurl/name
valuejdbc:oracle:[EMAIL PROTECTED]:1512:maindb/value
/parameter
parameter
nameuser/name
valuennw03u/value
/parameter
parameter
namepassword/name
value**/value
/parameter
parameter
namemaxActive/name
value20/value
/parameter
parameter
namemaxIdle/name
value10/value
/parameter
parameter
namemaxWait/name
value-1/value
/parameter
/ResourceParams

web.xml
--
resource-ref
res-ref-namejdbc/maindb/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref

Jar files in WEB-INF/lib
---
classes12.jar
jasper-compiler.jar
commons-collections-3.1.jar
jasper-runtime.jar
commons-dbcp-1.2.1.jar
jsp-api.jar
commons-dbcp-1.2.jar
mysql-connector-java-3.1.8-bin.jar

commons-el.jar
naming-factory-dbcp.jar
commons-pool-1.3.jar
naming-java.jar
jasper-compiler-jdt.jar

This message has been checked for viruses but the contents of an 
attachment
may still contain software viruses, which could damage your computer 
system:
you are advised to perform your own checks. Email communications 
with the
University of Nottingham may be monitored as permitted by UK 
legislation.






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: install DBCP and mm.mysql 2.0.14 (JDBC Driver) and test app, get class compile error.

2007-03-06 Thread David Smith
There's no reason I know of to have .classpath or .project in the
webapp.  The servlet spec doesn't define them and tomcat doesn't use
them.  I would imagine these are specific to the development environment
you are working in.

I've seen posts from other people integrating PHP with Tomcat, but don't
do it myself.  Hopefully someone else on the list might offer some
helpful tips there.

Glad you got things working.

--David

Wayne Bragg wrote:
 Thank you once again David,

 Yes I did upgrade the mysql driver, made the appropriate changes, and
 now it's all working fine!

 Is there any reason to have .classpath and .project in the \DBTest\
 directory? Are they for deploying or a leftover from another platform?

 Next step is to tie in PHP the same way.
 I'll try configuring it with the docs I've come across, if not you'll
 see me back here.
 Unless you know right offhand were some newbie docs can be found for
 configuring the PHP using drivers like the mysql would you? Or have
 the steps handy!

 Can't thank you enough for what you have already done!



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: install DBCP and mm.mysql 2.0.14 (JDBC Driver) and test app, get class compile error.

2007-03-05 Thread David Smith
A few things to consider ...

1) What version of tomcat are you using?  What follows is based on using
version 5.0.x.  The syntax for configuring JDBC resources in 5.5 is a
little different.

2)  mm.mysql 2.0.14 is VERY old.  What version of MySQL Db server are
you using?  You may want to take a look at the MySQL website for an
updated driver .jar file.  I believe the current driver version is
Connector/J 5.0.5

3) The mm.mysql driver file has to be in common/lib.  That's because the
tomcat server itself has to be able to access the driver when setting up
the db pool before your webapp even loads.

4) If using the tomcat internal database pooling, there is no need for
adding commons-dbcp.jar or commons-pool.jar as tomcat has a slightly
refactored version of commons-dbcp already.  The refactoring was only a
package name change to avoid collisions with webapps that use
commons-dbcp directly.  Only add those jars if you have some code of
your own using classes in the packages org.apache.commons.dbcp or
org.apache.commons.pool.

5) The stack trace cited below is in regards to your test jsp file. 
Class files need to be compiled before deployment as tomcat doesn't
compile them itself -- it only compiles jsps.  To fix the error below,
compile DbTest.java to DbTest.class and place it in WEB-INF/classes/foo
or in a .jar archive in WEB-INF/lib.

There's a start.  You might also want to review the tomcat docs
regarding JNDI and JDBC resources -- how to configure, etc., ...

--David


Wayne Bragg wrote:

Sorry about the previous premature post.
This is the full question/problem

I am trying to install DBCP and mm.mysql 2.0.14 (JDBC Driver) and a test app 
to see if it works.
I'm not sure I have all the correct steps and configuration, in other words I 
don't know what I am doing.. Here is what I know and my setup for this test 
example that I keep getting a class compile error on.

You can probably tell I only have HALF a clue at best? Any ideas what's wrong?

This is the error reported by browser -

type Exception report
message 
 description The server encountered an internal error () that prevented it 
 from fulfilling this request.
exception 
 org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 7 in the jsp file: /test.jsp
Generated servlet error:
foo.DBTest cannot be resolved to a type
An error occurred at line: 7 in the jsp file: /test.jsp
Generated servlet error:
foo.DBTest cannot be resolved to a type
 org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause 
 org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 7 in the jsp file: /test.jsp
Generated servlet error:
foo.DBTest cannot be resolved to a type
An error occurred at line: 7 in the jsp file: /test.jsp
Generated servlet error:
foo.DBTest cannot be resolved to a type
 org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
 org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
 org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:414)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
 org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:305)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

This is the Tomcat log -

Mar 5, 2007 12:13:30 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 7 in the jsp file: /test.jsp
Generated servlet error:
foo.DBTest cannot be resolved to a type
An error occurred at line: 7 in the jsp file: /test.jsp
Generated servlet error:
foo.DBTest cannot be resolved to a type
 at 
 org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
 at 
 org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
 at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:414)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
 at 
 

Re: install DBCP and mm.mysql 2.0.14 (JDBC Driver) and test app, get class compile error.

2007-03-05 Thread David Smith
Answers inline below.

--David

Wayne Bragg wrote:
 Thank you David,

 I was suspicious about the .java needing to be compiled and the
 commons-dbcp.jar and commons-pool.jar being unnecessary. What about
 commons-collections-3.2.jar is that necessary or does commons-el.jar
 have what is needed? Commons-el.jar is all that was in there to start
 with. You've given me enough to go on to fix this and make this work.
 I thank you again..


If commons-el.jar was all that was in common/lib, only add the mysql
driver jar.  commons-collections shouldn't be needed except by your
project if you use it.

 Do you think it's better to allow Tomcat to handle the MySql or have
 PHP and MySql handled by httpd and pass the java related calls on to
 Tomcat? I just finished reading an article that explains how to set it
 up this second way and have to admit it would be better for me in the
 SHORT run as I have pre-existing code that wouldn't require rewriting
 other than adding NEW java code which is the reason I'm doing this in
 the first place.


IMHO it's a cleaner solution if you can get this all in tomcat or php. 
Having part in one and part in the other just makes things complicated
and hard to work with.

 Also 97 and Visual J but it doesn't appear to be able to save .class
 files. It looks like it just puts the class code into the .exe at
 compile time. I also installed just installed MS Visual Web Developer
 Express, do you know if this will compile and save a .class file?


A lot of people on this list seem to like Eclipse as an IDE.  I
personally am a fan of Netbeans.  Don't use any of Microsoft's developer
tools except for those rare moments when I have to help a co-worker out
with .net stuff.

 Thanks for the help..



 - Original Message - From: David Smith [EMAIL PROTECTED]
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Monday, March 05, 2007 7:06 AM
 Subject: Re: install DBCP and mm.mysql 2.0.14 (JDBC Driver) and test
 app, get class compile error.


 A few things to consider ...

 1) What version of tomcat are you using?  What follows is based on using
 version 5.0.x.  The syntax for configuring JDBC resources in 5.5 is a
 little different.

 2)  mm.mysql 2.0.14 is VERY old.  What version of MySQL Db server are
 you using?  You may want to take a look at the MySQL website for an
 updated driver .jar file.  I believe the current driver version is
 Connector/J 5.0.5

 3) The mm.mysql driver file has to be in common/lib.  That's because the
 tomcat server itself has to be able to access the driver when setting up
 the db pool before your webapp even loads.

 4) If using the tomcat internal database pooling, there is no need for
 adding commons-dbcp.jar or commons-pool.jar as tomcat has a slightly
 refactored version of commons-dbcp already.  The refactoring was only a
 package name change to avoid collisions with webapps that use
 commons-dbcp directly.  Only add those jars if you have some code of
 your own using classes in the packages org.apache.commons.dbcp or
 org.apache.commons.pool.

 5) The stack trace cited below is in regards to your test jsp file.
 Class files need to be compiled before deployment as tomcat doesn't
 compile them itself -- it only compiles jsps.  To fix the error below,
 compile DbTest.java to DbTest.class and place it in WEB-INF/classes/foo
 or in a .jar archive in WEB-INF/lib.

 There's a start.  You might also want to review the tomcat docs
 regarding JNDI and JDBC resources -- how to configure, etc., ...

 --David


 Wayne Bragg wrote:

 Sorry about the previous premature post.
 This is the full question/problem

 I am trying to install DBCP and mm.mysql 2.0.14 (JDBC Driver) and a
 test app to see if it works.
 I'm not sure I have all the correct steps and configuration, in
 other words I don't know what I am doing.. Here is what I know and
 my setup for this test example that I keep getting a class compile
 error on.

 You can probably tell I only have HALF a clue at best? Any ideas
 what's wrong?

 This is the error reported by browser -

 type Exception report
 message
 description The server encountered an internal error () that
 prevented it from fulfilling this request.
 exception
 org.apache.jasper.JasperException: Unable to compile class for JSP
 An error occurred at line: 7 in the jsp file: /test.jsp
 Generated servlet error:
 foo.DBTest cannot be resolved to a type
 An error occurred at line: 7 in the jsp file: /test.jsp
 Generated servlet error:
 foo.DBTest cannot be resolved to a type
 org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)

 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)

 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)

 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 root cause
 org.apache.jasper.JasperException: Unable to compile class for JSP
 An error

Re: install DBCP and mm.mysql 2.0.14 (JDBC Driver) and test app, get class compile error.

2007-03-05 Thread David Smith
The Resource tag in your context config changes and the
ResourceParams tag is removed as in 

 Resource name=jdbc/TestDB
auth=Container
type=javax.sql.DataSource
maxActive=100
maxIdle=30
maxWait=1
username=javauser
password=javadude
driverClassName=org.gjt.mm.mysql.Driver
url=jdbc:mysql://localhost:3306/javatest?autoReconnect=true
removeAbandoned=true
removeAbandonedTimeout=60
logAbandoned=true /

In a side note, if you update your mysql driver, the new class name is
com.mysql.jdbc.Driver and you should remove ?autoReconnect=true from the
database url.

--David

Wayne Bragg wrote:
 What version of tomcat are you using?  What follows is based on using
 version 5.0.x.  The syntax for configuring JDBC resources in 5.5 is a
 little different.

 Of  course I am using 5.5. Thats' what I get for not providing that to
 start with. So what you gave me below needs to be modified HOW?
 Because I am now getting -


 - Original Message - From: Wayne Bragg [EMAIL PROTECTED]
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Monday, March 05, 2007 11:46 AM
 Subject: Re: install DBCP and mm.mysql 2.0.14 (JDBC Driver) and test
 app, get class compile error.


 David, you can ignore the question about how to compile .java into
 .class. I just found out the jdk can do that.


 Wayne

 - Original Message - From: David Smith [EMAIL PROTECTED]
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Monday, March 05, 2007 7:06 AM
 Subject: Re: install DBCP and mm.mysql 2.0.14 (JDBC Driver) and test
 app, get class compile error.


 A few things to consider ...

 1) What version of tomcat are you using?  What follows is based on
 using
 version 5.0.x.  The syntax for configuring JDBC resources in 5.5 is a
 little different.

 2)  mm.mysql 2.0.14 is VERY old.  What version of MySQL Db server are
 you using?  You may want to take a look at the MySQL website for an
 updated driver .jar file.  I believe the current driver version is
 Connector/J 5.0.5

 3) The mm.mysql driver file has to be in common/lib.  That's because
 the
 tomcat server itself has to be able to access the driver when
 setting up
 the db pool before your webapp even loads.

 4) If using the tomcat internal database pooling, there is no need for
 adding commons-dbcp.jar or commons-pool.jar as tomcat has a slightly
 refactored version of commons-dbcp already.  The refactoring was only a
 package name change to avoid collisions with webapps that use
 commons-dbcp directly.  Only add those jars if you have some code of
 your own using classes in the packages org.apache.commons.dbcp or
 org.apache.commons.pool.

 5) The stack trace cited below is in regards to your test jsp file.
 Class files need to be compiled before deployment as tomcat doesn't
 compile them itself -- it only compiles jsps.  To fix the error below,
 compile DbTest.java to DbTest.class and place it in WEB-INF/classes/foo
 or in a .jar archive in WEB-INF/lib.

 There's a start.  You might also want to review the tomcat docs
 regarding JNDI and JDBC resources -- how to configure, etc., ...

 --David


 Wayne Bragg wrote:

 Sorry about the previous premature post.
 This is the full question/problem

 I am trying to install DBCP and mm.mysql 2.0.14 (JDBC Driver) and a
 test app to see if it works.
 I'm not sure I have all the correct steps and configuration, in
 other words I don't know what I am doing.. Here is what I know and
 my setup for this test example that I keep getting a class compile
 error on.

 You can probably tell I only have HALF a clue at best? Any ideas
 what's wrong?

 This is the error reported by browser -

 type Exception report
 message
 description The server encountered an internal error () that
 prevented it from fulfilling this request.
 exception
 org.apache.jasper.JasperException: Unable to compile class for JSP
 An error occurred at line: 7 in the jsp file: /test.jsp
 Generated servlet error:
 foo.DBTest cannot be resolved to a type
 An error occurred at line: 7 in the jsp file: /test.jsp
 Generated servlet error:
 foo.DBTest cannot be resolved to a type
 org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)

 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)

 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)

 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 root cause
 org.apache.jasper.JasperException: Unable to compile class for JSP
 An error occurred at line: 7 in the jsp file: /test.jsp
 Generated servlet error:
 foo.DBTest cannot be resolved to a type
 An error occurred at line: 7 in the jsp file: /test.jsp
 Generated servlet error:
 foo.DBTest cannot be resolved to a type
 org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)

 org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328

Re: page remembers data

2007-03-01 Thread David Smith
Michal Glowacki wrote:

 Hi

I'm not sure if it's the problem of Tomcat, but I've spotted it after
 upgrading to JBoss 4.0.5 (Tomcat 5.5.20). This not the problem of session
 scoped beans as I'm using request ones. When I enter some data, submit
 them
 and return back to that page, the data remains there. I've no clue why
 it's
 like this. Has anyone idea what can be the problem?

 Regards,
 Michal


So... you are submitting some data in a form and when the request
returns (assuming to the same page) all the data you submitted is
auto-populating the form fields?  Are you using taglibs to render form
fields?  Some taglibs are designed to initialize form fields with data
in the request.


--David

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: create[8005]: java.net.BindException: error occured while starting tomcat on Ubuntu Plateform

2007-03-01 Thread David Smith
hetal wrote:

StandardServer.await: create[8005]: java.net.BindException: Cannot assign
requested address 

I have installed j2sdk1.5 and tomcat-5.0.28 on ubuntu plateform.

I have changed port no in server.xml also but still i am facing same
problem..

error that is displayed in catalina.out is as under:

StandardServer.await: create[8015]: java.net.BindException: Cannot assign
requested address
java.net.BindException: Cannot assign requested address
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.init(ServerSocket.java:185)
at
org.apache.catalina.core.StandardServer.await(StandardServer.java:496)
at org.apache.catalina.startup.Catalina.await(Catalina.java:619)
at org.apache.catalina.startup.Catalina.start(Catalina.java:579)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)


so please anybody have any solution then help me.  
  


In one case I responded to about a year ago now, it turned out the issue
was a messed up localhost interface.  The shutdown port in tomcat binds
explicitly to the localhost interface (127.0.0.1) so that interface
needs to be working correctly.  Can you confirm the localhost interface
is working?

Also one other instance I've seen on the list (sorry, no personal
experience with this) had to do with the OS having issues with IPv6. 
That was in a *nix distribution.  I don't remember much beyond that, but
a search at google might dig up the original thread.

--David


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: .java(Permission denied) error in tomcat

2007-02-27 Thread David Smith
Try clearing out your work directory and restarting tomcat.  Tomcat will
rebuild the stuff it had there.  Also check to be sure ownership or
permissions of files in the work directory aren't being altered.  The
work directory and all it's contents should be owned by tomcat and
read/write by owner.

--David

Muruganantham wrote:

 hi,

 When i tried to access a jsp page the tomcat shows the following error
 message

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

 and the root cause is

 java.io.FileNotFoundException:
 /usr/local/jakarta/jakarta-tomcat-5.5.9/work/Catalina/localhost/_/org/apache/jsp/Serv_jsp.java

 (Permission denied)


 Please any one help me.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: URL-pointing problem

2007-02-27 Thread David Smith
There's a difference between webapp names and servlet names.  You want
to change the webapp's name.  To do that, just change the name of the
webapp in the webapps folder ie pub_db - publications or pub_db.war -
publications.war.  You may have to make a similar name change to the
context.xml file in conf/Catalina/localhost and then restart tomcat.

--David

wille wrote:

Hello,

having a bit of a problem here.


We have deployed a web application on our server by putting it in the
webapps directory, this makes it appear at a URL like
http://mjau.com/pub_db. Now we want to change the URL for this webapp to
something else, (in this case http://mjau.com/publications). 

Currently we've tried messing around with URL-mapping
in /tomcat5/conf/web.xml and /tomcat5/webapps/WEB-INF/web.xml.


We've tried to use the servlet-mapping directive in our web data
xml-files, but it seems that the servlet is implicitly defined when
putting the webapp in the webapps directory, because we have no servlet
section in our web data xml-files. But things work anyway.

But when we try to define our own servlet section, it won't work.

We are running Tomcat 5.0.30, Java 5.0, on a Debian Etch server.




This is what we've tried to do in the /tomcat5/conf/web.xml:

   servlet
servlet-namepubdb/servlet-name
servlet-class
pubdb
  /servlet-class
  /servlet--

  !--servlet-mapping
  servlet-nameinvoker/servlet-name
  url-pattern/publications/*/url-pattern
/servlet-mapping--

/web-app





Anyone have a clue what we're doing wrong?


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: connection pool - DBCP error

2007-02-27 Thread David Smith
The pooling in tomcat is a refactored copy of Commons-DBCP
(http://jakarta.apache.org/commons/dbcp).  See the javadocs for
org.apache.commons.dbcp.BasicDataSource for all the options settable. 
minEvictableIdleTimeMillis= translates to setMinEvictableIdleTimeMillis().

--David

Propes, Barry L [GCG-NAOT] wrote:

Daniel,

I scoured the APIs for that method and couldn't find anywhere, but I added to 
my server.xml file any way.

Without something like lamda probe, would I see any connections dropping, or 
would I need a third party tool like that to see it logged?

ORwould I just not get any errors like before and assume that that 
addition and revision has successfully addressed it?

Thanks!

Barry

-Original Message-
From: Stephens, Daniel [mailto:[EMAIL PROTECTED]
Sent: Monday, February 26, 2007 4:55 PM
To: Tomcat Users List
Subject: RE: connection pool - DBCP error


I had to add the following before I saw that behavior. You'll have to check
the API, to make sure the minEvictableIdleTimeMillis and
timeBetweenEvictionRunsMillis are set correctly for your pool. But once I
added these, I would see abandoned connections get dropped. 

I put these settings in, because I found that the DBCP pool only evalutes
connections on a check-in/out basis.

 
parameternameminEvictableIdleTimeMillis/namevalue5000/value/param
eter
 
parameternametimeBetweenEvictionRunsMillis/namevalue1/value/p
arameter
 parameternametestWhileIdle/namevaluetrue/value/parameter
 parameternamevalidationQuery/namevalueselect count(*) from
dual/value/parameter


-Original Message-
From: Propes, Barry L [GCG-NAOT] [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 26, 2007 3:48 PM
To: Tomcat Users List
Subject: connection pool - DBCP error

I am getting a slight error with regards to my connection pool
configuration.
 
I may not have totally closed the connection properly, but shouldn't the
following account for it?
 
 

AbandonedObjectPool is used (
[EMAIL PROTECTED])
 
   LogAbandoned: true
   RemoveAbandoned: true
   RemoveAbandonedTimeout: 60

 
in other words, if I have the following configured like so, 
 
   parameter
 namemaxWait/name
 value7000/value
   /parameter
 parameter
 nameremoveAbandoned/name
 valuetrue/value
 /parameter
 parameter
 nameremoveAbandonedTimeout/name
 value60/value
 /parameter
 parameter
 namelogAbandoned/name
 valuetrue/value
 /parameter
 
shouldn't the RemoveAbandoned params account for an open or vagrant
connection and kill it off properly?
Am I wrong in the assumption this attribute should have?
 
Thanks,
 
Barry


-
The information in this message may be proprietary and/or
confidential, and protected from disclosure.  If the reader of this
message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify First Data
immediately by replying to this message and deleting it from your
computer.
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Mysql timouts...

2007-02-23 Thread David Smith
Sorry... my bad.  My math doesn't work early in the morning.   :-[

At any rate, the validation query run every minute is still acting as a
keep-alive on the connection.  It'll never go stale.  Personally I'd
drop the testWhileIdle, timeBetweenEvictionRuns, minEvictableIdleTime
and just let the pool test on borrow.  That's the default behavior as
long as a validationQuery is specified.

--David

Jacob Rhoden wrote:

 David Smith wrote:

 I think I see what's happening here.  You've told the database pool to
 continually test connections every hour.  The validation query itself
  

  validationQuery=select 1  testWhileIdle=true
  timeBetweenEvictionRunsMillis=6
  minEvictableIdleTimeMillis=6
 

 This is why I am confused, isnt 6=60 seconds? It is certinaly not
 doing an idle test every 60 seconds, why does it say Millis?

 Best Regards,
 Jacob

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Mysql timouts...

2007-02-22 Thread David Smith
If you read through
http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html,
you'll find the validationQuery attribute is used to test connections
before they are borrowed from the pool.  The query can be as simple as
select 1.

As a side note, drop the autoReconnect=true from your database url. 
It's not recommended and actually does not prevent SQLExceptions on
connections that go stale.  It just restores the connection for the next
request after the exception.  The MySQL website has further information
regarding what autoReconnect actually does.  One of these days, the
tomcat docs should be updated to remove that.

--David

Jacob Rhoden wrote:


 Jacob Rhoden wrote:

 I am having the seemingly common Broken pipe to mysql problem with
 tomcat.

  Resource auth=Container name=jdbc/blah type=javax.sql.DataSource
  maxActive=5 removeAbandoned=true
  maxIdle=2 maxIdleTime=300 idleConnectionTestPeriod=60
  maxWait=1 username=blah password=blah
  driverClassName=com.mysql.jdbc.Driver
 url=jdbc:mysql://localhost:3306/blah?autoReconnect=trueamp;useUnicode=trueamp;characterEncoding=utf8/


 I have installed a most up to date version of tomcat 5.5.20/mysql5.0.4
 connector on Redhat Enterprise WS 4, and according to the mysqladmin
 tool, the connections are not used (remain in sleep mode for way more
 than the idleConnectionTestPeriod variable), which makes me think this
 configuration is invalid. Is there anyway to ensure tomcat
 tests/refreshes its database connections?

 Best Regards,
 Jacob



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Running tomcat as an unprivileged user with a war file

2007-02-22 Thread David Smith
Jim Goodspeed wrote:

 I would like to run tomcat as an unprivileged user for security
 reasons, but
 when my war file is created through Ant it loses all of the
 permissions (as
 it says it will in the Ant manual).  Does anyone know of a way to run
 tomcat
 as an unprivileged user and still use a war file which when it is
 created is
 not accessible to the tomcat user?

 I'm wondering if I need to create the war file as the tomcat user or
 maybe
 change the default umask on my build machine - just wondering if
 anyone else
 has run into this.


 Thanks.

S ... setting the privileges on the war file to be readable by
tomcat doesn't work?

Here's how I understand the process:

When you deploy a .war file and tomcat is configured to expand them, the
.war file is expanded to a folder of the same name in the webapps
directory.  In most systems I've ever encountered, the expanded folder
is owned by the tomcat process and therefore has full privileges.  Even
when the .war file isn't expanded to the webapps directory, it's still
expanded to the work directory and all the files are owned by tomcat.

What OS are you running?

--David


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: where to store user-generated files?

2007-02-21 Thread David Smith
I'm sure this is horribly insufficient, so I would recommend reading the
servlet spec.  It's not all that bad a read as far as specifications go
and you can learn a lot about how tomcat operates.

If you have a servlet mapping all *.jpg to some servlet myServlet in
web.xml, web.xml also has another section where the servlets are
individually declared.  In there you'll find the class that backs the
servlet named myServlet.  All that means is the request for the
resource goes to that specific servlet class to be handled.  What the
servlet does with it is open-ended.  In the case of the default servlet,
it basically calls sc.getResourceAsStream( request.getServletPath() +
request.getPathInfo() ) and returns the contents of the file to the
client.  That's over simplified -- the real default servlet does some
security checks to be sure it's not returning something it shouldn't and
set's the mime type in the response, but you get the idea. 
sc.getResourceAsStream is aware of the webapp's location in the
filesystem and takes care of finding the resource in the webapp's folder.

sc.getRealPath will only return a full path to a file if the webapp is
NOT compressed in a web archive file (.war).  From within a .war file,
it always returns null and isn't recommended except in rare cases where
you might want to write access.  This is all in the spec.

Servlet 2.4 spec is available at
http://jcp.org/aboutJava/communityprocess/final/jsr154/index.html

--David

Williams, Allen wrote:

I'm new at this, so bear with me here for a moment...

The servlet mapping seems to me to tell tomcat anytime you have a
request for a URI with .jpg extension, deliver the request to this
servlet, but that doesn't give any information about where in the
real file system said jpeg is stored, does it?  So, when you call
sc.getRealPath(), how does the servlet context know where to go?
Doesn't there have to be a mapping or alias somewhere (server.xml,
web.xml,...?) that resolves, or translates ThisTypeofFileName.ext into
/real/path/in/OS/ThatTypeOfFileName.oxt?


-Original Message-
From: John Pedersen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 21, 2007 4:37 AM
To: Tomcat Users List
Subject: Re: where to store user-generated files?

Looks like roll your own then!

A few thoughts on the matter - maybe someone could add to them?

It should be easy to map requests for images to a servlet, which can
then find the appropriate image file wherever it might be ( within or
outside the server ). Like this in the web.xml file:

servlet-mapping
   servlet-nameservletName/servlet-name
   url-pattern*.jpg/url-pattern
/servlet-mapping

?

But how is the image then added to the reponse? Another servlet (
behind the scenes - I am actually using  the Spring framework ) is
handling the request/response. Can the request/response be passed to
the image-providing servlet for the images within a page to be written
to the reponse in this kind of way:

 // This method is called by the servlet container to process a GET
request.
public void doGet(HttpServletRequest req, HttpServletResponse
resp) throws IOException {
// Get the absolute path of the image
ServletContext sc = getServletContext();
String filename = sc.getRealPath(image.gif);

// Get the MIME type of the image
String mimeType = sc.getMimeType(filename);
if (mimeType == null) {
sc.log(Could not get MIME type of +filename);
 
resp.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
return;
}

// Set content type
resp.setContentType(mimeType);

// Set content size
File file = new File(filename);
resp.setContentLength((int)file.length());

// Open the file and output streams
FileInputStream in = new FileInputStream(file);
OutputStream out = resp.getOutputStream();

// Copy the contents of the file to the output stream
byte[] buf = new byte[1024];
int count = 0;
while ((count = in.read(buf)) = 0) {
out.write(buf, 0, count);
}
in.close();
out.close();
}

( from http://www.exampledepot.com/egs/javax.servlet/GetImage.html )

I'm off for a walk to mull it over - any suggestions while I am out
and before I get to experimenting will be most welcome.

Thanks,

John

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For 

Re: Expression Language in JSP and JasperException

2007-02-21 Thread David Smith
Ok.  I'm not overly familiar with Stripes, so you'll have to bear with
me a little.  I can think of a few ways to handle this.

First, look at what makes a request from calculator.jsp unique.  You
could use the referrer header, the value of a submit button, or the
presence of the equation request parameter.  Below is an example using
the submit button:

c:if test=${(param.submitBtn == 'Calculate') and (actionBean.result !=
null)}
  pThe answer is ${actionBean.result}/p
/c:if

A better solution would be to name the actionBean that's a result of
CalculatorActionBean something more descript than just 'actionBean' like
'calcBean'.  The main advantage here is it's simple and you could use
your original expression language test -- just change the name of the
object being tested:

c:if test=${calcBean.result != null}
  ... display the result
/c:if

A more complicated solution if you can't change the name of 'actionBean'
might be to test the type of actionBean like...

c:set var=calcAvailablejsp:expression
  (request.getAttribute(actionBean) != null) 
(request.getAttribute(actionBean) instanceOf
com.some.packages.action.CalculatorActionBean )/jsp:expression/c:set
c:choose
c:when test=${calcAvailable and (actionBean.result != null)}
  pThe answer is  ${actionBean.result}/p
/c:when
c:when test=${calcAvailable}
  pSorry, I couldn't understand your equation.  Please rephrase it.../p
/c:when
c:otherwise
  !-- Just logged in.  Display the form. --
/c:otherwise
/c:choose

The essential point of this is testing for a property to be null is not
the same as testing for it's presence.  You'll have to know if it has a
property before you can test the property for null.

--David

Piotr Kiraga wrote:

 Hi David,

 Ok  forgive me now, but this is getting confusing.  Where does
 result come into this picture?  Were you expecting actionBean to be an
 instance of a different class?  You aren't offering a lot to go on here.


 Sorry for mixup. I've just thought that it is just about some option
 in Tomcat configuration or something, and I haven't knew it. Like I
 see... It may be not. :(

 Here goes more background.

 login.jsp (handled by LoginActionBean class) redirects after
 submission login form to calculator.jsp. After submition form from
 calculator.jsp  (what is handled by CalculatorActionBean class) it
 returns to calculator.jsp and shows the result of mathematical
 equation. Sources of calculator.jsp and it's class are placed below.

 Problem shows when I'm submiting from LoginActionVean to
 calculator.jsp. Like I wrote before, LoginActionBean doesn't have
 result field because it doesn't need it. But JSP (in this case used by
 two classes) expects result in:
 46:c:if test=${!empty actionBean.result}
 47:Result: ${actionBean.result}br/
 line.

 Here actionBean could be an instance of different class.

 Sorry for so much source in thread, here it goes:




 #
 package com.some.packages.action;

 import net.sourceforge.stripes.action.ActionBean;
 import net.sourceforge.stripes.action.ActionBeanContext;
 import net.sourceforge.stripes.action.DefaultHandler;
 import net.sourceforge.stripes.action.DontValidate;
 import net.sourceforge.stripes.action.ForwardResolution;
 import net.sourceforge.stripes.action.Resolution;
 import net.sourceforge.stripes.validation.LocalizableError;
 import net.sourceforge.stripes.validation.Validate;
 import net.sourceforge.stripes.validation.ValidationErrors;
 import net.sourceforge.stripes.validation.ValidationMethod;

 /**
 * A very simple calculator action.
 * @author Tim Fennell
 */

 public class CalculatorActionBean implements ActionBean {

 private ActionBeanContext context;
 private String forwardSuccess = /calculator.jsp;
 private String forwardFail = /index.jsp;
 
 private Double result;
 @Validate(required=true, mask=^\\d*$) private double numberOne;
 @Validate(required=true, mask=^\\d*$) private double numberTwo;

 public CalculatorActionBean() {
 }
 
 /* execution */
 
 /*
  * Handler method.
  * Handles addition functionality of web application form.
  */
 @DefaultHandler
 @DontValidate
 public Resolution init() {
 return new ForwardResolution(forwardSuccess);
 }

 /*
  * Handler method.
  * Handles addition functionality of web application form.
  */
 public Resolution addition() {
 result = getNumberOne() + getNumberTwo();
 return new ForwardResolution(forwardSuccess);
 }

 /* getters and setters */
 
 public ActionBeanContext getContext() {
 return context;
 }

 public void setContext(ActionBeanContext context) {
 this.context = context;
 }

 public double getNumberOne() {
 return numberOne;
 }

 public void setNumberOne(double numberOne) {
 this.numberOne = numberOne;
 }

 public double getNumberTwo() {
 

Re: Get rid of 8080 port in Tomcat 3.3

2007-02-21 Thread David Smith
I haven't tried it on such an old version of tomcat, but I would think
jsvc from the commons-daemon project would work here.

http://jakarta.apache.org/commons/daemon

It essentially allows you to start tomcat as a privileged user long
enough to grab the port and then drop back to a low privilege user for
general running.

--David

EDMOND KEMOKAI wrote:

 80 is a privileged port on *nix systems, you'll need to run tomcat as
 root
 (generally not recommended). May I ask why you're still running tomcat
 circa
 version 3?

 On 2/21/07, Frank Nguyen [EMAIL PROTECTED] wrote:


 Hi,



 We're still running 3.3.1 – We'd like to get rid of specifying the port
 8080
 in the http request like HYPERLINK
 http://www.something.com:8080/http://www.something.com:8080 and
 have it
 default to 80 (HYPERLINK http://www.somehting.com/;
 http://www.somehting.com
 only) but could not find any way. I tried to define port=80 in
 server.xml
 but tomcat threw exceptions. If you know a way, could you help ?



 Thanks in advance,





 Frank Nguyen


 -- 
 No virus found in this outgoing message.
 Checked by AVG Free Edition.
 Version: 7.5.441 / Virus Database: 268.18.1/691 - Release Date:
 2/17/2007
 5:06 PM



 -- 
 No virus found in this outgoing message.
 Checked by AVG Free Edition.
 Version: 7.5.441 / Virus Database: 268.18.1/691 - Release Date:
 2/17/2007
 5:06 PM





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Expression Language in JSP and JasperException

2007-02-20 Thread David Smith
Does com.some.packages.action.LoginActionBean have a public method
getResult()?  The test below effectively translates to:

if (actionBean.getResult() != null) {
   //  some stuff to do 
}

--David

Piotr Kiraga wrote:

 Hi,

 When I'm using in JSP:
   c:if test=${actionBean.result != null}.../c:if
 Tomcat (5.5.17) throws exception (javax.servlet.ServletException:
 Unable to find a value for result in object of class
 com.some.packages.action.LoginActionBean using operator .).

 I've heard that it can be configured in Tomcat, so he could pass
 through it without an exception. Is it true? If so, how to do that?


 Regards,



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Expression Language in JSP and JasperException

2007-02-20 Thread David Smith

Piotr Kiraga wrote:

Does com.some.packages.action.LoginActionBean have a public method
getResult()?  The test below effectively translates to:

if (actionBean.getResult() != null) {
   //  some stuff to do 
}


The problem is that there could be a class that has no property with
name result. In another case there could be another class (bean) that
has such property (than of course it works fine, but at first case
Tomcat throws exception).

Maybe but let's keep debugging simple.  The expression language is 
expecting a class conforming to the JavaBeans standard.  What does the 
class com.some.packages.action.LoginActionBean look like?


--David

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can't find classes in jar files in WEB-INF

2007-02-20 Thread David Smith
No just got busy with work.  Given what you provided in your last 
post, it seems to come down to permissions or something overlooked. 

Are you running the security manager? 
Have you checked file permissions? 
Did you restart tomcat (or at least restart the webapp) after building 
the .jar file and placing it in WEB-INF/lib?
Are there any messages in the logs when your webapp starts that might 
indicate a problem?


--David

aladdin wrote:

Have we given up here?  Do I need to have the packages in separate jars?

On Monday 19 February 2007 08:02, David Smith wrote:
  

You don't need to tell tomcat to look in WEB-INF/lib/*.jar.  Tomcat does
that automatically per spec.  I'm guessing there is something wrong with
the way your jar was created or a permissions problem.

Try testing the jar with

$JAVA_HOME/bin/jar tf whatever.jar
(linux/maxos syntax)
or
%JAVA_HOME\bin\jar tf whatever.jar
(windows syntax)

to be sure it's valid.  The command above lists all the files in the jar
file.  Then be sure permissions are set so the user tomcat runs as can
read it.  One last thing to look for is any errors further up in the
logs above the class not found exception.

--David

aladdin wrote:


Thanks for the tip!

I don't think I'd have a conflict with all the classes in my application.
Although some of my classes have common names, like user.java (compiled,
of course, to user.class), they are all member of just one of three
packages: infoisland, dbMgr, and utils, so I don't think the names are
colliding. Loading the app bombs out as tomcat is loading when it can't
find my filter, CheckUser (makes sure users are logged in), which is in
the infoIsland package.

However, your comment is telling: WEB-INF itself is not checked or
scanned for .jar files at all.  So, if I make sure the WEB-INF/classes
subdirectory is empty, how do I tell tomcat to go get classes out of the
WEB-INF/lib/whatever.jar file?

Thanks.

On Sunday 18 February 2007 20:05, David Smith wrote:
  

It should be noted there are only a couple of places .jar files are
allowed in tomcat:

1. WEB-INF/lib
2. common/lib of the tomcat installation directory

WEB-INF itself is not checked or scanned for .jar files at all.  In
addition, any files in the classes directory will override their
equivalent in the lib directory.  This occurs regardless of it being in
WEB-INF/classes or common/classes

As to the issue below, are you sure you don't have similar classes (in
name and package) in both common/lib and WEB-INF/lib?  Seems like
there's a classloader issue at work here.  Take a look at the
classloader howto at
http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html.  It
might offer some ideas.

--David

aladdin wrote:


When I put my webapp.jar file in the WEB-INF directory, it doesn't find
the app.  When I exploded it into the classes directory, and associated
subdirectories, they are found fine, but I get this problem (the one
below).

This, it turns out, is triggered by the fact I have the webapp.jar file
in the lib directory and all the classes unpacked in the classes
directory (both under WEB-INF, of course).  Getting rid of the
webapp.jar file in the lib directory solves the problem below, but now
tomcat won't use that the jar file in the lib directory, even though
when it's unpacked in the classes directory, he seems perfectly happy. 
Is there some magic I need for tomcat to use .jar files in the

WEB-INF/lib directory, like an entry in web.xml or server.xml?

On Friday 16 February 2007 22:52, aladdin wrote:
  

I was getting a message like SEVERE PersistenceManager persistence not
enabled, or something like that (I don't remember) so I disabled
(commented out) the Manager tag in server.xml that configured the
PersistenceManager. Now, I'm getting

Feb 16, 2007 9:26:34 PM org.apache.catalina.loader.WebappClassLoader
modified INFO: Additional JARs have been added
Feb 16, 2007 9:26:34 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started

over and over in the log files.  Anyone know what's causing this?  I
thought maybe tomcat was restarting, but the PID doesn't change.  It
seems to work, but it's filling up my log files.





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Expression Language in JSP and JasperException

2007-02-20 Thread David Smith
Ok  forgive me now, but this is getting confusing.  Where does 
result come into this picture?  Were you expecting actionBean to be an 
instance of a different class?  You aren't offering a lot to go on here.



--David

Piotr Kiraga wrote:

 The problem is that there could be a class that has no property with
 name result. In another case there could be another class (bean) that
 has such property (than of course it works fine, but at first case
 Tomcat throws exception).

Maybe but let's keep debugging simple.  The expression language is
expecting a class conforming to the JavaBeans standard.  What does the
class com.some.packages.action.LoginActionBean look like?


Here is LoginActionBean class code (like I sad before, there is no
result field, so getter and seter either):


package com.some.packages.action;

import net.sourceforge.stripes.action.ActionBean;
import net.sourceforge.stripes.action.ActionBeanContext;
import net.sourceforge.stripes.action.DefaultHandler;
import net.sourceforge.stripes.action.DontValidate;
import net.sourceforge.stripes.action.ForwardResolution;
import net.sourceforge.stripes.action.Resolution;
import net.sourceforge.stripes.validation.LocalizableError;
import net.sourceforge.stripes.validation.Validate;

import com.some.packages.util.Global;
import com.some.packages.util.SessionManager;
import com.some.packages.vo.UserVO;

/**
* @author Piotr Kiraga
* @since 2007-02-15 12:13:06
*/
public class LoginActionBean implements ActionBean {

private ActionBeanContext context;
private String forwardSuccess = /calculator.jsp;
private String forwardFail = /index.jsp;

@Validate(required=true, mask=^.{4,8}$) private String userName;

@Validate(required=true, mask=^.{1,8}$) private String password;

/* execute 
*/ 


/*

 * Handler method.
 * Handles default action.
 */
@DefaultHandler
@DontValidate
public Resolution init() {
return new ForwardResolution(forwardFail);
}

/*

 * Handler method.
 * Handles login action.
 */
public Resolution login() {
if ( SessionManager.authorize(getContext(), getUserName(), 
getPassword()) ) {

return new ForwardResolution(forwardSuccess);
}
else {
this.getContext().getValidationErrors().addGlobalError(new
LocalizableError(login.error.invalidUserOrPass, userName));
return init();
}
}

/* validation 
**/

/* getters and setters

*/

public String getPassword() {

return password;
}

public void setPassword(String password) {
this.password = password;
}

public String getUserName() {
return userName;
}

public void setUserName(String userName) {
this.userName = userName;
}

public ActionBeanContext getContext() {
return context;
}

public void setContext(ActionBeanContext context) {
this.context = context;
}

}



Regards,




--
David Smith
Network Operations Supervisor
Department of Entomology
Cornell University
2132 Comstock Hall
Ithaca, NY 14853
Phone: (607) 255-9571
Fax: (607) 255-0940


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can't find classes in jar files in WEB-INF

2007-02-19 Thread David Smith
You don't need to tell tomcat to look in WEB-INF/lib/*.jar.  Tomcat does
that automatically per spec.  I'm guessing there is something wrong with
the way your jar was created or a permissions problem.

Try testing the jar with

$JAVA_HOME/bin/jar tf whatever.jar
(linux/maxos syntax)
or
%JAVA_HOME\bin\jar tf whatever.jar
(windows syntax)

to be sure it's valid.  The command above lists all the files in the jar
file.  Then be sure permissions are set so the user tomcat runs as can
read it.  One last thing to look for is any errors further up in the
logs above the class not found exception.

--David

aladdin wrote:

Thanks for the tip!

I don't think I'd have a conflict with all the classes in my application.  
Although some of my classes have common names, like user.java (compiled,
of course, to user.class), they are all member of just one of three packages:
infoisland, dbMgr, and utils, so I don't think the names are colliding.  
Loading the app bombs out as tomcat is loading when it can't find my filter,
CheckUser (makes sure users are logged in), which is in the infoIsland 
package.

However, your comment is telling: WEB-INF itself is not checked or scanned
for .jar files at all.  So, if I make sure the WEB-INF/classes subdirectory 
is empty, how do I tell tomcat to go get classes out of the 
WEB-INF/lib/whatever.jar file?

Thanks.

On Sunday 18 February 2007 20:05, David Smith wrote:
  

It should be noted there are only a couple of places .jar files are
allowed in tomcat:

1. WEB-INF/lib
2. common/lib of the tomcat installation directory

WEB-INF itself is not checked or scanned for .jar files at all.  In
addition, any files in the classes directory will override their
equivalent in the lib directory.  This occurs regardless of it being in
WEB-INF/classes or common/classes

As to the issue below, are you sure you don't have similar classes (in
name and package) in both common/lib and WEB-INF/lib?  Seems like
there's a classloader issue at work here.  Take a look at the
classloader howto at
http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html.  It
might offer some ideas.

--David

aladdin wrote:


When I put my webapp.jar file in the WEB-INF directory, it doesn't find
the app.  When I exploded it into the classes directory, and associated
subdirectories, they are found fine, but I get this problem (the one
below).

This, it turns out, is triggered by the fact I have the webapp.jar file
in the lib directory and all the classes unpacked in the classes
directory (both under WEB-INF, of course).  Getting rid of the webapp.jar
file in the lib directory solves the problem below, but now tomcat won't
use that the jar file in the lib directory, even though when it's
unpacked in the classes directory, he seems perfectly happy.  Is there
some magic I need for tomcat to use .jar files in the WEB-INF/lib
directory, like an entry in web.xml or server.xml?

On Friday 16 February 2007 22:52, aladdin wrote:
  

I was getting a message like SEVERE PersistenceManager persistence not
enabled, or something like that (I don't remember) so I disabled
(commented out) the Manager tag in server.xml that configured the
PersistenceManager. Now, I'm getting

Feb 16, 2007 9:26:34 PM org.apache.catalina.loader.WebappClassLoader
modified INFO: Additional JARs have been added
Feb 16, 2007 9:26:34 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started

over and over in the log files.  Anyone know what's causing this?  I
thought maybe tomcat was restarting, but the PID doesn't change.  It
seems to work, but it's filling up my log files.

TIA





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can't find classes in jar files in WEB-INF

2007-02-18 Thread David Smith
It should be noted there are only a couple of places .jar files are 
allowed in tomcat:


1. WEB-INF/lib
2. common/lib of the tomcat installation directory

WEB-INF itself is not checked or scanned for .jar files at all.  In 
addition, any files in the classes directory will override their 
equivalent in the lib directory.  This occurs regardless of it being in 
WEB-INF/classes or common/classes


As to the issue below, are you sure you don't have similar classes (in 
name and package) in both common/lib and WEB-INF/lib?  Seems like 
there's a classloader issue at work here.  Take a look at the 
classloader howto at 
http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html.  It 
might offer some ideas.


--David

aladdin wrote:
When I put my webapp.jar file in the WEB-INF directory, it doesn't find the 
app.  When I exploded it into the classes directory, and associated 
subdirectories, they are found fine, but I get this problem (the one below).


This, it turns out, is triggered by the fact I have the webapp.jar file in the 
lib directory and all the classes unpacked in the classes directory (both 
under WEB-INF, of course).  Getting rid of the webapp.jar file in the lib 
directory solves the problem below, but now tomcat won't use that the jar 
file in the lib directory, even though when it's unpacked in the classes 
directory, he seems perfectly happy.  Is there some magic I need for tomcat 
to use .jar files in the WEB-INF/lib directory, like an entry in web.xml or 
server.xml?


On Friday 16 February 2007 22:52, aladdin wrote:
  

I was getting a message like SEVERE PersistenceManager persistence not
enabled, or something like that (I don't remember) so I disabled
(commented out) the Manager tag in server.xml that configured the
PersistenceManager. Now, I'm getting

Feb 16, 2007 9:26:34 PM org.apache.catalina.loader.WebappClassLoader
modified INFO: Additional JARs have been added
Feb 16, 2007 9:26:34 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started

over and over in the log files.  Anyone know what's causing this?  I
thought maybe tomcat was restarting, but the PID doesn't change.  It seems
to work, but it's filling up my log files.

TIA

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ampersand (amp;) handling in jspx - any workaround?

2007-02-15 Thread David Smith
Pid wrote:

 Stefan wrote:

 Christopher Schultz schrieb:


 Stefan,

 Stefan wrote:
  

  Christopher Schultz schrieb:

 
  Compare this to XSLT. If you want a stylesheet to emit an '',
 don't you
  use amp;? And if you want to emit 'amp;' you have to double it. I
  don't see the difference, and I think that the OP is being
  unreasonable ;)

 
Not in my xslt ;-) It depends of the output method. If you
 output xml,
  amp; still gets amp; It is meanless to create a not well formed
 xml. I
  don't remember what the output method text or html makes.
  


 Fair enough. When you put amp; into your XSLT, the processor sees it
 as entity:amp. When you write that out, the exact display depends on
 the output format. If it's emitting XML (or XHTML), you get amp;
 right back out.

 But, if you're outputting HTML (?) or text (definitely), then you get
 ''. If you want to emit amp; in text mode, you'll definitely have to
 double-up the amps.

 The problem is that JSPX is not XSLT. It's really JSP with some extra
 junk thrown in. Fortunately for me, I don't have to use it ;)
  
 
  Yes, I start to understand the ins and outs. Perhaps the spec
 writers just could not imagine, that someone will use jspx to do what 
 it is great for, to produce xml ;-) So I'll go for my filter and wait
 for future jsp specs which will include something like
  jsp:output preserve-xml-entities=true / or
 jsp:output-method=xml / Similar directives for omitting XML
 declarations etc. are already included.


  i'll weigh in late with this thread...

  how then do i differentiate an ampersand that i need to process in
 the source document?



  in general there are 2 use cases for ampersands in xml generating
 xml docs:

  1. xml source doc needs to process/contain an ampersand
  2. xml generated doc needs to process/contain an ampersand

  the solution that the spec implements is double encoding in the
 source document - and it makes complete sense if you consider the two
 cases above; even if it doesn't make immediate, intuitive sense to an
 end user who is moving from the JSP to JSP Document format and who is
 only considering the 2nd case.

  the JSP document format has some strengths but also some practical
 weaknesses which is probably why it's adoption hasn't been as
 widespread...


  p



 -chris


I'm sorry I missed most of this debate yesterday :-(  Admittedly this
can be a prickly issue from the jsp compiler stand point in trying to
know when an  is just a  and when it's an entity for output to a
(x)html or xml response.  I have two thoughts that are probably better
served on the tomcat-dev list or as comments to the spec committee:

1. Xml spec allows for material to be escaped in the source with
![CDATA[ . ]].  I've done this with jspx files that have included
jsp:scriptlet sections.  It's easier than trying to make sure all the
special characters in the java scriptlet source are properly referenced.

2. It would be nice if the compiled resulting servlet paid attention to
the type of the response and handled entity references properly on
output.  Text/binary/misc types get a dereferenced entity while (x)html
and xml output leaves the entity intact as stated in the source jspx.

I appreciate the problem as the output doesn't necessarily have to be
just (x)html or xml.  Sometimes the output is straight text or a binary
format of some sort.  Maybe the end solution is an attribute of the jsp
tag that defines the response type.  That would maintain backwards
compatibility with existing jspx sources.

--David

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] RE: insight into model.do

2007-02-14 Thread David Smith
Looking at the source code for the class my.package.action.ModelAction 
will get you to the entry point for handling the request.  Depending on 
the size of the app and how well versed your predecessor was, this could 
be the whole back-end or it could call other classes to handle the 
database back-end.  Either way, this class is where to start looking 
when tracing back what's happening.


--David

Steve Ingraham wrote:

Hi Steve,

Since you are using a struts application, you would be better 
off asking 
this question on the struts user mailing list. In any case, 
you can look 
inside the /WEB-INF/struts-config.xml file and there should 
be a mapping 
between the action and the invoked class:


e.g., something like:

action
  path=/model
  type=my.package.action.ModelAction
Good luck,
Cheers,
--
Haroon Rafique
[EMAIL PROTECTED]



Thanks for that information.  So here is what I found in the
/WEB-INF/struts-config.xml file.  Is this what you were referring to
above?  Can you tell me what I am reading here?

  !-- == Action Mapping Definitions
== --

  action-mappings

!-- Below is the general modification required to tie Struts to
Keel --
action  path=/model
 type=org.keel.clients.struts.ModelAction
 name=none
 scope=request
/action

  /action-mappings

Will this direct me to the script that is used to pass the input data to
the database fields?  If not, am I even looking in the location to find
out this information?

Steve

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: request.getRemoteUser() returning null

2007-02-14 Thread David Smith
You'll need to add an attribute to the ajp13 connector in server.xml:

tomcatAuthentication=false

By default, tomcat ignores the REMOTE_USER header provided by the IIS or
Apache HTTPd front-end.  This allows that header through.

--David

Uwe_77 wrote:

Hello,

I configured IIS 6.0 (Windows 2003) to redirect jsp's to Tomcat (5.5.20) via
JK2 ajp13 (isapi_redirector2.dll). Anonymous login in IIS ist turned off,
Windows Authentication is turned on. Now I need to get the username. When I
us request.getRemoteUser(), that is only returning null. In jk2.properties I
added tomcatAuthentication=false (also I tried
request.tomcatAuthentication=false), but that is also not working.

Any ideas? Thanks!

Uwe
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] RE: insight into model.do

2007-02-14 Thread David Smith
Sorry my bad.   I wrote that waaa tooo early in the morning. 
You are looking for the class org.keel.clients.struts.ModelAction which
should be in the folder org/keel/clients/struts of your source code.

Since you've described yourself as a real newbie, you might find the
servlet spec as well as a good book on struts enlightening.  The servlet
spec located at the link below offers up a top level view of web
application architecture that Struts fits into.  A good Struts book can
get you into the specifics of the Struts framework and how it implements
the MVC (model-view-controller) architecture.

http://jcp.org/aboutJava/communityprocess/final/jsr154/index.html

--David

Steve Ingraham wrote:

David Smith wrote:
Looking at the source code for the class 
my.package.action.ModelAction 
will get you to the entry point for handling the request.  
Depending on 
the size of the app and how well versed your predecessor was, 
this could 
be the whole back-end or it could call other classes to handle the 
database back-end.  Either way, this class is where to start looking 
when tracing back what's happening.

--David



Ok, I have been trying to locate the class file but am striking out.
Can someone tell me where this my.package.action.ModelAction class
would be located in a Jakarta Tomcat 5.5.9 build on a Redhat AS 3
machine?  I have run the command locate *.ModelAction* with no return.

Thanks,
Steve

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ampersand (amp;) handling in jspx - any workaround?

2007-02-14 Thread David Smith

Ok... you are wrong.   An  by itself is wrong.

It's a hack, but you end up having to do amp;amp;

Seems like these should be preserved instead of decoded when the output 
is x/html. I can see it getting real ugly if you  have to process a 
document through several transforms.   But that's just my opinion.


-David

Leon Rosenberg wrote:

correct me if i wrong, but isn't amp; forbidden in xml anyway?
Leon

On 2/14/07, Stefan [EMAIL PROTECTED] wrote:

Hello,

for sure, the problem is well known. jspx pages turn the amp; in
simple  which causes a lot of problems. See
http://www.lunatech-research.com/archives/2006/01/20/jsp-xml-rant
for details.

How to avoid this problems? Or just live with it?

Thanks

--
Stefan


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: insight into model.do

2007-02-13 Thread David Smith
Actually, model.do is really just an abstract path that can map to a
file or a servlet.  Take a look in the WEB-INF/web.xml file of the occa
webapp for the servlet mappings.  There should be a servlet there mapped
to *.do or model.do.  The class in that mapping is responsible for
handling the request.

--David

Steve Ingraham wrote:

http://172.16.255.100:8080/occa/model.do;jsessionid=9212C2FF4620210C92B6
2443EE97760A
 
I am looking for some information on how I can track down and read the
particular code on a web page.  Above is an address to an intranet web
page that our users use to input information into a database.  I
understand that /occa is a directory on the server 172.16.255.100 but I
cannot find where the specific script for this page is and how the data
is passed onto the database.  In my limited understanding I thought
there would be a file in the /occa directory named model.do but there is
not.  So, is this a call up to run some other file or script?  My reason
for asking about this is that I am basically trying to track down which
field and table a particular field's data is passed to when a user
inputs data on the web page.
 
I have talked with several of you guys in the past and you have been
very helpful.  Although I have mentioned it before, I will say again
that I am trying to manage a system that was developed by my predecessor
and I have little to no information on how he developed this application
or where it resides.  I am pretty much left with trying to reverse
engineer what was done.  Is there a way I can track down how the user's
data is captured and stored in the database?
 
Thanks in advance for your help,
Steve
 
 
 

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Unable to work with Tomcat 4.0

2007-02-12 Thread David Smith
There are a few things to look at:

1. Check that the examples webapp is present in the webapps directory.

2. Check with the manager webapp that the examples webapp is deployed.
(http://localhost:8080/manager/html)

3. Check the logs around the time tomcat was started for other errors
attempting to deploy the examples webapp.

4. Check file permissions to be sure the user tomcat is running as has
read access to the examples webapp

5. Check the examples web.xml for the servlet mappings for these
servlets.  The urls you provided make me thing you are attempting to use
the invoker servlet.  That servlet was disabled by default soo long ago,
I can't remember which version was the first to remove it.

--David

Rahul Choubey wrote:

Dear Friends,

I have installed Apache Tomcat version 4.0 in my system.
I am getting the homepage correctly on writing
http://localhost:8080 on the browser's address bar but
when I go to servlets example page I am unable to execute
the servlets,the same is the problem with JSP too.I am getting
the following error:

Apache Tomcat/4.0.4- HTTP Status 404 - /examples/servlet/HelloWorldExample
type Status report
 message /examples/servlet/HelloWorldExample
 description The requested resource  (/examples/servlet/HelloWorldExample) is 
 not available.


I have correctly set the environment variables.I have tried on both Win98
and XP and on both IE and Mozilla.Please help.

Regards,
Rahul



 
-
Need a quick answer? Get one in minutes from people who know. Ask your 
question on Yahoo! Answers.
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Daylight Saving Time Impact

2007-02-08 Thread David Smith
This might be of interest in figuring out what jre/jdk you need to
handle the Daylight Savings Time change:

http://java.sun.com/developer/technicalArticles/Intl/tzupdatertool.html

Tomcat itself relies on the OS and JRE/JDK for time zone handling and as
such doesn't have to be updated.

--David

Leung Joe-W30220 wrote:

Hi all,
 
Is there going to be an impact on Tomcat due to Daylight Saving Time
Change in US?  Currently, I am using Tomcat 5.5.17.   I am wondering if
I need to upgrade to the Tomcat 6.
 
Thank you in advance.
 
Joe

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: File permission problem not understood

2007-02-06 Thread David Smith

java.security.AccessControlException: access denied
(java.io.FilePermission 
/var/lib/tomcat5.5/webapps/blog/WEB-INF/classes/META-INF/hivemodule.xml

read)

This line (above) would indicate you have the security manager running.  
To fix this, you'll need to adjust conf/catalina.policy to allow read 
access to the file.  The OS's file permissions are probably fine.  As an 
aside, META-INF is typically a special folder in jar and war files -- 
you probably rename this META-INF to something else if for no other 
reason than to remove some potential confusion.


--David

Alan Chandler wrote:

I have just upgraded my Debian Etch system from tomcat5 to tomcat5.5

Now when I start my applications I am getting the following

javax.servlet.ServletException: Unable to initialize application 
servlet: access denied 
(java.io.FilePermission /var/lib/tomcat5.5/webapps/blog/WEB-INF/classes/META-INF/hivemodule.xml 
read)



the root cause of this is ...
java.security.AccessControlException: access denied 
(java.io.FilePermission /var/lib/tomcat5.5/webapps/blog/WEB-INF/classes/META-INF/hivemodule.xml 
read)



The file refered to exists and is accessable by tomcat
ls -l /var/lib/tomcat5.5/webapps/blog/WEB-INF/classes/META-INF/hivemodule.xml

gives

-rw-r--r-- 1 tomcat55 nogroup  1035 2006-01-26 19:13 hivemodule.xml

so I puzzled as what I need to do to fix it.

Can anyone help please
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat and MySQL sync problems

2007-01-29 Thread David Smith
It appears your code is holding on to a connection to the database.  Bad
design practice.  Review your code for any place that might keep hold of
a connection between requests and make sure the connection is closed. 

Also, If you haven't done so yet, use a database connection pool.  If
using tomcat's built-in one, set testOnBorrow to true and set
validationQuery to something simple like select 1.  The idea being
that the connections will be validated just before they are borrowed and
used, closed and recreated if they fail.

Lastly, please avoid autoReconnect=true in the connection url as the
first query will still error out.  There is documentation on mysql's
site recommending this option not be used.

--David

Scott Purcell wrote:

If I remember correctly, MySQL basically disconnects and shutdowns after
a certain amount of time. I remember doing something with a
reload=true in the datasource to prevent this.

Hopefully someone else may clue you in better, but you may want to check
the datasource props and see if this is valid.


Scott

-Original Message-
From: Chris Long [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 29, 2007 8:54 AM
To: users@tomcat.apache.org
Subject: Tomcat and MySQL sync problems

Hello,

I'm having a problem where it seems Tomcat and MySQL go out of sync and
I am
no longer able to connect to the MySQL database.  The only way I've
found to
be able to reconnect to my database is to restart Tomcat.  This
generally
seems to happen some time over the course of the night and I notice the
problem when I check on things in the morning, but it doesn't seem to
happen
every time.

Does anyone have any idea what may be causing this and how to fix it?

Here is a list of what I'm using:

Tomcat 5.5.17
MySQL 14.12
Hibernate 3.2
mysql-connector-java-5.0.4
JAVA 1.5
Windows XP Pro


[Jan 29 2007 (Mon)9:30:56 EST] ERROR [http--Processor20](
org.hibernate.util.JDBCExceptionReporter) - No operations allowed after
connection closed.Connection was implicitly closed due to underlying
exception/error:


** BEGIN NESTED EXCEPTION **

com.mysql.jdbc.CommunicationsException
MESSAGE: Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: Software caused connection abort: socket write error

STACKTRACE:

java.net.SocketException: Software caused connection abort: socket write
error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java
:65)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2637)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1554)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3176)
at com.mysql.jdbc.PreparedStatement.executeInternal(
PreparedStatement.java:1153)
at
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java
:1266)
at
org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java
:186)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1778)
at org.hibernate.loader.Loader.doQuery(Loader.java:662)
at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(
Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2211)
at
org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2095)
at org.hibernate.loader.Loader.list(Loader.java:2090)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:388)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(
QueryTranslatorImpl.java:338)
at
org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java
:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at org.hibernate.impl.AbstractQueryImpl.uniqueResult(
AbstractQueryImpl.java:804)
at
com.tne.nres.projectTracker.ProjectTrackerServlet.validateUser(Unknown
Source)
at com.tne.nres.projectTracker.ProjectTrackerServlet.doPost(Unknown
Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(
StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(
ErrorReportValve.java:105)
at 

Re: datasource-realm troubles

2007-01-29 Thread David Smith
I would guess from the outset that your Context.xml file isn't being
used.  Where are your putting it and what are you naming it?  What's the
name of your webapp when deployed?

Quick checks:

1. It has to be named to match your webapp if your are storing it in
Catalina/localhost and deploying an expanded webapp.  If the webapp is
named fubar, then the file should be named fubar.xml.

2. If deploying a .war file, it has to be named context.xml (note: case
is important) and stored in the war files META-INF directory.


--David

Walter, Oliver (BR/ICI3) wrote:

Hello,

i have some trouble using a datasource realm in tomcat 5.5.20, jdk
1.5.0_09.

In META-INF/Context.xml i defined a datasource:

Resource name=jdbc/mangos auth=Container
   type=javax.sql.DataSource maxActive=10 maxIdle=2
maxWait=1
   username= password=
   driverClassName=com.mysql.jdbc.Driver
   
url=jdbc:mysql://localhost:3306/realmd?autoReconnect=true /

and in web.xml a resource reference:

resource-ref
   descriptionDB Connection/description
   res-ref-namejdbc/mangos/res-ref-name
   res-typejavax.sql.DataSource/res-type
   res-authContainer/res-auth
/resource-ref

With hibernate everything works fine, no problems, but if i define a
datasource realm in Context.xml

Realm className=org.apache.catalina.realm.DataSourceRealm debug=4
   dataSourceName=jdbc/mangos
   userTable=... /

it can`t find the resource name:

javax.naming.NameNotFoundException: Name jdbc is not bound in this
Context
   at
org.apache.naming.NamingContext.lookup(NamingContext.java:769)
   at
org.apache.naming.NamingContext.lookup(NamingContext.java:152)
   at
org.apache.catalina.realm.DataSourceRealm.open(DataSourceRealm.java:401)
   at
org.apache.catalina.realm.DataSourceRealm.authenticate(DataSourceRealm.j
ava:282)
   ...

I tried already the following namings, jdbc/mangos,
java:comp/env/jdbc/mangos, mangos, java:/comp/env/jdbc/mangos
with no luck.

I can workaround this issue, when defining the resource in server.xml
GlobalNamingResources
and create a ResourceLink name=jdbc/mangos global=jdbc/mangos
type=javax.sql.DataSource /
in Context.xml, but i would prefer, doing Realm and Datasource
definition together in Context.xml.


The second issue i run into is programming my webapp against the realm
interface. I want to built
up the Navigation Panel dynamically based on the users asigned roles,
but when i try to access
GenericPrincipal i get java.lang.NoClassDefFoundError:
org/apache/catalina/realm/GenericPrincipal.

I also can workaround this issue by copying the catalina into my
webapp`s classpath (WEB-INF/lib/),
but i`m pretty this is not correct.

I would be appreciate for any help.

Regards Oliver





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat as root and security issues

2007-01-26 Thread David Smith
Or the commons daemon project's jsvc which can launch as root long
enough to grab port 80 and then shift to an unprivileged user for normal
runtime operations.

--David

Peter Crowther wrote:

From: Gaurav Kushwaha [mailto:[EMAIL PROTECTED] 
I read somewhere that if I want to run Tomcat standalone on 
port 80, I will
have to run it as root and that this is potentially unsafe. 



True on UNIX, false on Windows.

  

Is there any way
for me to run it on port 80 without having to give the root 
privileges to the process.



The simplest I've found on most UNIXes is to use the firewall's
facilities to forward port 80/tcp to 8080/tcp.  Set Tomcat up on 8080,
and incoming requests will arrive at Tomcat's port.

If you do this, be aware that any code in Tomcat that writes URLs may do
the wrong thing unless you include the proxyPort attribute in your HTTP
connector config in server.xml:

   Connector port=8080 proxyPort=80 .../

Hope this helps.

   - Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 4.1.29 Question

2007-01-25 Thread David Smith
It's not a tomcat issue, so no.  The time comes from the JVM and the
OS.  So check the Java JVM for fix versions and patches for your OS. 
BTW, this has been covered many, many times in recent months.  I'm sure
you'll find lots of links with Google.

--David

GARNER Jim J wrote:

Congress passed a law that changes the start and end dates of daylight
savings time, and that change goes into affect this year.  Starting this
year, daylight savings will start on the second Sunday in March and end
on the first Sunday of November.  Does anyone know if Tomcat 4.1.29 will
have any trouble with this change?

 

[EMAIL PROTECTED]

 

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat Webapp security.

2007-01-23 Thread David Smith
The best method I can think of is to store the jsp in a directory
outside your tomcat and outside your webapp.  Then configure the path to
the storage in either the context.xml or web.xml for your webapp and use
a ServletContextListener to load up an application scope attribute with
the path.  Lastly a slightly modified version of the default servlet
could offer up the jsp files as type text/plain.  The benefits of
storing the files in a location outside tomcat and the webapp include
easy upgrade of both and inhibiting execution of the jsp.

--David

Sachin Patel wrote:

I have a web application and a functionality to be able to upload files to one 
of the folders inside it and be able to access it using direct link URL.

now I am wondering if someone uploads .jsp file, how would I stop tomcat from 
compiling and running that file when someone requests that same file using 
direct link. I want to treat it as a file, not a page.

Is there any configuration that will stop that file from configuring? Just 
like execute scripts permission on IIS directory.


 

We won't tell. Get more on shows you hate to love 
(and love to hate): Yahoo! TV's Guilty Pleasures list.
http://tv.yahoo.com/collections/265 
  



-- 
===
David Smith
Network Operations Supervisor
Department of Entomology
College of Agriculture  Life Sciences
Cornell University
2132 Comstock Hall
Ithaca, NY  14853
Phone: 607.255.9571
Fax: 607.255.0939


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Webapps loading order

2007-01-22 Thread David Smith
Funny, I find lot's of info on this and the answer is always no.  Some
posts suggest hacks though:

http://www.google.com/search?hl=enq=tomcat+webapp+load+order

As has been noted in at least one of the results above, it's a fragile
design.  Better to design the depending webapps to handle the case when
one of their dependencies isn't available.  Then they will all just wait
or gracefully deal with the missing resource until it's available.

--David

Orlando Reis wrote:

 Hi, can someone please tell me the order in which the webapps are loaded?

 I can't find anything on the archives nor on the documentation, is it
 alphabetically or reverse alphabetically or is there no order at all?

 On the searches I made through out the list archive someone said the
 answer
 was already posted on the list, I can't find it.

 I have 20 contexts in webapps directory and want to know the order in
 which
 tomcat loads contexts.

 Thanks in advance
 Orlando



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Cannot create JDBC driver

2007-01-17 Thread David Smith
Ok ... I'll bite.  What's a realm got to do with the original post?  The
OP is just trying to setup a database pool via tomcat's built-in JNDI.

OP -- Your code didn't match completely with the example code on the
tomcat website.  Here it is matched up with what's in the docs:

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

The only two real changes here are 1) a missing / mark in between java:
and comp and 2) the return of new InitialContext() is of type
InitialContext.  The second difference is probably not affecting your
situation.  Everything else looked really good.

--David

Martin Gainty wrote:

Ray-

You will need to supply JDBC parameters as in this example Realm specification 
in server.xml

  Realm  className=org.apache.catalina.realm.JDBCRealm
 driverName=org.gjt.mm.mysql.Driver
  connectionURL=jdbc:mysql://localhost/authority
 connectionName=D connectionPassword=**
  userTable=users userNameCol=user_name userCredCol=user_pass
  userRoleTable=user_roles roleNameCol=role_name /

M-
--- 
This e-mail message (including attachments, if any) is intended for the use of 
the individual or entity to which it is addressed and may contain information 
that is privileged, proprietary , confidential and exempt from disclosure. If 
you are not the intended recipient, you are notified that any dissemination, 
distribution or copying of this communication is strictly prohibited.
--- 
Le présent message électronique (y compris les pièces qui y sont annexées, le 
cas échéant) s'adresse au destinataire indiqué et peut contenir des 
renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le 
destinataire de ce document, nous vous signalons qu'il est strictement 
interdit de le diffuser, de le distribuer ou de le reproduire.
- Original Message - 
From: Ray Madigan [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, January 16, 2007 7:02 PM
Subject: RE: Cannot create JDBC driver


  

Well,

I have to apologize, I was unsure of how much information on the setup
environment was needed?

I deploy the application from a war file.  When I delete the war file from
the webapps directory and leave only the previously extracted directory the
servlet can create the DataSource.  If I leave the war file in place the
servlet cannot create the DataSource.

Thanks

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 16, 2007 2:00 PM
To: Tomcat Users List
Subject: RE: Cannot create JDBC driver




From: Ray Madigan [mailto:[EMAIL PROTECTED]
Subject: RE: Cannot create JDBC driver

An interesting twist to the situation is that if I delete
the war file in webapps the Exception does not occur and
the application works.
  

What war file?  You did not mention any in the first message.



Also, the context.xml is not copied, so I suspect it doesn't
need to be.
  

The context.xml file is only copied when a .war is expanded; if you have
both [appname].war and an [appname] directory, things might be a bit
confused.



What causes the application to operate differently when the
war file is present then when it isn't?
  

Sounds like you had both the .war and the expanded app under your
appBase directory.  If they weren't identical, there may have been some
kind of conflict between them.



Context path=/Library docBase=Library
  

It's an error to specifiy the path or docBase attributes when your
Context element is in META-INF/context.xml; doing so has been known to
result in erratic behavior in some levels of Tomcat.

- Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Help loading XML config file via Init Servlet

2007-01-16 Thread David Smith
I think you are really after this.class.getResourceAsStream(
org/coffeebreak/config/attributes-config.xml ) ;  which would use the
classloader to locate your xml file in WEB-INF/classes or your jar file
and return an InputStream to it.

--David

James Dekker wrote:

 Robert,

 The problem with the getRealPath() is that I have the undeployWars 
 set to false in server.xml
 and getRealPath() is just for raw File I / O, it can't be used to 
 read from a jar file...

 Thanks for the suggestion, nonetheless!

 Sincerely,

 James Dekker

 On Jan 15, 2007, at 4:54 AM, robert lazarski wrote:

 On 1/14/07, James Dekker [EMAIL PROTECTED] wrote:

 Hello there,

 I am using the Apache Commons Digester to load an XML config file via
 a servlet with init params...

 I keep getting this error when I start Tomcat 5.5.9 and have deployed
 the war file via my build script:

 INFO: Deploying web application archive coffeebreak.war
 2007-01-14 03:10:33,050 WARN
 [org.coffeebreak.logging.Log4jInitServlet] - Loaded: log4j.properties
 file
 attributes-config.xml not found, /Developer/JavaTools/tomcat/jakarta-
 tomcat-5.5.9/bin/WEB-INF/classes/org/coffeebreak/config/attributes-
 config.xml


 Try using getRealPath() . Here's some code a wrote a while back:

 /**
 * Load log4j
 *
 * @web.servlet
 *  display-name=log4j-init
 *  load-on-startup=1
 *  name=com.infoseg.mr.xtutil.Log4jInit
 *
 * @web.servlet-init-param name=log4j-init-file
 * value=WEB-INF/properties/log4j.properties
 *
 */

 public class Log4jInit extends HttpServlet
 {
  public void init()
  {
String prefix =  getServletContext().getRealPath(/);
String file = getInitParameter(log4j-init-file);
// if the log4j-init-file is not set, then no point in trying
if(file != null)
{
  PropertyConfigurator.configure(prefix+file);
}
else
{
  throw new RuntimeException(Cannot load InitParameter from
 web.xml: log4j-init-file);
}
  }

  public void doGet(HttpServletRequest req, HttpServletResponse
 res) {}

 HTH,
 Robert

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Adding a virtual host in Tomcat 5.5

2007-01-16 Thread David Smith
First thing to realize is this is not like setting up PHP.  JSPs aren't
meant to live on their own like what you've setup below. 

Consider pointing your tomcat virtual host to /home/username/webapps. 
Then create a folder /home/username named ROOT (case is important here)
and place your .jsp file in it.  Next, add a folder named WEB-INF (case
is still important) under ROOT and then a basic web.xml file in that new
folder.  This is the basic architecture of a web application.

Second, I would HIGHLY recommend you read the servlet spec.  It's not
nearly as dry as reading an IEEE spec and you'll learn a lot about
what's expected of the app as well as the servlet container.

Basic web.xml file:

?xml version=1.0 encoding=ISO-8859-1?

webapp xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
version=2.4

/webapp

--David

Werner Schalk wrote:

Hi,

as I have now spend several hours trying to get this work, I am asking for 
your support guys. But please dare with me as I am a complete newbie to 
Tomcat.

Basically I installed Tomcat 5.5 and mod_jk 1.2.20 as decribed in 
http://gentoo-wiki.com/HOWTO_Apache2_and_Tomcat5 and it works fine (the 
samples work fine when I access them via http://localhost/index.jsp and 
http://localhost:8080. Now for one of my customers wants to use Tomcat in his 
Apache virtual host and run .jsp files. Therefore I added the following lines 
to my httpd.conf:

LoadModule jk_modulemodules/mod_jk.so
JkWorkersFile   conf/jk-workers.properties
JkLogFile   logs/mod_jk.log
JkLogLevel  info
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
JkRequestLogFormat %w %V %T
jkAutoAlias /var/lib/tomcat-5/default/webapps/
jkMount /*.jsp ajp13

Now, my jk-workers.properties file contains:

worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1
worker.ajp13.cachesize=10

Finally here is my server.xml with the new Host section:

Server port=8010 shutdown=XXX address=127.0.0.1

  Service name=Catalina

!-- Define an AJP 1.3 Connector on port 8009 --
Connector port=8009  enableLookups=false protocol=AJP/1.3 
address=127.0.0.1/

Engine name=Catalina defaultHost=localhost

  Host name=localhost appBase= unpackWARs=true autoDeploy=true 
xmlValidation=false xmlNamespaceAware=false
/Host

  Host name=myuser appBase=/home/username/htdocs unpackWARs=true 
autoDeploy=true xmlValidation=false xmlNamespaceAware=false
Aliaswww.mydomain.com/Alias

Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs  prefix=myuser_access_log. suffix=.txt
 pattern=common resolveHosts=false/
  /Host
/Engine
  /Service
/Server

Then I created the following hello world .jsp file in the htdocs directory 
of my user (/home/username/htdocs) as defined above:

HTML
 HEAD
  TITLEHello World/TITLE
 /HEAD
 BODY
  H1Hello World/H1
  Today is: %= new java.util.Date().toString() %
 /BODY
/HTML

Now the problem is that after restarting both Apache and Tomcat, accessing 
this file results in a blank page being displayed by the browser (with no 
content whatsoever). But Tomcat is listening on the ports as defined:

# netstat -tunap | grep java
tcp0  0 127.0.0.1:8009  0.0.0.0:*   LISTEN 
 
17179/java
tcp0  0 127.0.0.1:8010  0.0.0.0:*   LISTEN 
 
17179/java

And even the log is not really helpful:

(Tomcat log)
15.01.2007 17:58:35 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
15.01.2007 17:58:35 org.apache.catalina.realm.JAASRealm setContainer
INFO: Set JAAS app name Catalina
15.01.2007 17:58:36 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /127.0.0.1:8009
15.01.2007 17:58:36 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/83  config=null
15.01.2007 17:58:36 org.apache.catalina.startup.Catalina start
INFO: Server startup in 1397 ms

Is there anything more I need to do to get this working? What are the mistakes 
that I made? I have found so much documentation online about Tomcat, but the 
more I read, the more confused I got. So maybe you guys can shed some light 
on this... 

Thank you very much.

Best regards,
Werner

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JSTL c:if statements

2007-01-12 Thread David Smith
Could you post your page source?  Also post the web-app dtd declaration 
in your web.xml file.  I suspect either servlet spec version or tag 
usage is causing your issue.


--David

rotvang wrote:

I have Tomcat version 5.0.28, and I am trying to use the JSTL tags in my
webapp. I have placed the 2 required JSTL jar files, standard.jar and
jstl.jar into my WEB-INF/lib directory.  


The bizarre thing is that some of the JSTL standard tags work, and some
don't!  Even stranger, it doesn't break down by taglib--in other words, half
of the core tags work, and half don't. Half of the fmt tags work, and
half don't. 

Most importantly, c:out   works just fine, and with the EL, properly. 
However, none of the selection or conditional tags work: c:if , c:when,

and c:choose  tags all throw weird, indecypherable Jasper exceptions at JSP
compilation time.
Why would only some of the c: tags throw exceptions, and not all of the c:
tags.

Now, to rule out the possibility of syntax errors in my source, I
copy/pasted a complete JSP example from Sun's own website, which ostensibly
should work.  Even with Sun Microsystem's own JSPs, these conditional c:
tags throw the weird Jasper exception.   I've pasted an excerpt of the stack
trace thrown by any occurrence of c:if    in any of my JSPages:


Jan 12, 2007 12:30:04 AM org.apache.jasper.compiler.Compiler generateClass
SEVERE: Error compiling file: /C:/Documents and Settings/HR
Systems/Desktop/jaka
rta-tomcat-5.0.28/jakarta-tomcat-5.0.28/work/Catalina/localhost/OVWebApp//org/ap
ache/jsp\Example1_jsp.java [javac] Compiling 1 source file

C:\Documents and Settings\HR
Systems\Desktop\jakarta-tomcat-5.0.28\jakarta-tomca
t-5.0.28\work\Catalina\localhost\OVWebApp\org\apache\jsp\Example1_jsp.java:152:
_jspx_meth_c_out_1(javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.PageContext
) in org.apache.jsp.Example1_jsp cannot be applied to
(org.apache.taglibs.standa
rd.tag.el.core.IfTag,javax.servlet.jsp.PageContext)
if (_jspx_meth_c_out_1(_jspx_th_c_if_0, _jspx_page_context))

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat 5.5, java 6 and jconsole not working as service

2007-01-09 Thread David Smith
I've had some interesting issues with Maven 2 and Java 6, but Tomcat
5.5.20 has run great on Java 6.

--David

Martin Dubuc wrote:

 I haven't been successful running Tomcat on Java 6. My guess is that
 Tomcat can't run yet on Java 6.

 Martin

 On 1/9/07, teknokrat [EMAIL PROTECTED] wrote:

 I am running Tomcat 5.5 as a service using Java 6. I try to connect
 jconsole locally but it can't seem to find tomcat. Anyone know how I can
 do this?

 thanks


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how to configure tomcat for Turkey?

2007-01-04 Thread David Smith
Dharma General wrote:

 (2) at present, i want to find out about an error message ---

 java.lang.NumberFormatException: For input string: 0,00
at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
at java.lang.Float.parseFloat(Unknown Source)

 what is it?

 thx

Read the java api docs for java.lang.NumberFormatException and
java.lang.Float.  Specifically the following link should shed some light
on the exception:

http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Float.html#valueOf(java.lang.String)

There's also a link there to java.text.NumberFormat which should provide
some methods for localized parsing of values.

--David

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: MOD_JK Redirection issues

2007-01-03 Thread David Smith
I can see how the server might decode %2f in the path to /.  The % 
character is a special character in urls and should be decoded.  If you 
really mean for the url to literally include '%2f' as part of the file 
name, I would think the url should be:


http://xxx.xxx.xxx/APIServer/authz/list/master%252fAB?apikey=WEB_INTERFACE_API

Note I replaced the % character with it's encoded form %25,  Having said 
that, I don't think it's a good idea to use special characters like % as 
part of the resource name.  It creates nothing but headaches as the 
server has to figure out whether the url has already been normalized or not.


--David

Jagadeesh wrote:

Further to my last mail, whenever I try accessing this url

http://xxx.xxx.xxx/APIServer/authz/list/master%2fAB?apikey=WEB_INTERFACE_API

the browser shows exactly the below response

Not Found

The requested URL /APIServer/authz/list/master/AB was not found on this
server.
Apache/2.2.2 (Fedora) Server at cluster.omnidrive.com Port 80

The interesting thing is '%2F' has been replaced with a '/'

Any thoughts???

Thanks
Jugs

-Original Message-
From: Jagadeesh [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 03, 2007 2:38 PM

To: 'Tomcat Users List'
Subject: RE: MOD_JK Redirection issues

I changed the loglevel to TRACE, But I couldn't find any new log file. The
access_log now shows

61.17.42.35 - - [03/Jan/2007:03:48:05 +] GET
/APIServer/authz/list/master/AB?apikey=WEB_INTERFACE_API HTTP/1.1 200 1350
- Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9)
Gecko/20061206 Firefox/1.5.0.9

61.17.42.35 - - [03/Jan/2007:03:48:44 +] GET
/APIServer/authz/list/master%2fAB?apikey=WEB_INTERFACE_API HTTP/1.1 404 314
- Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9)
Gecko/20061206 Firefox/1.5.0.9

Where the first request returns HTTP/1.1 200 and the 2nd request returns
HTTP/1.1 404.

error_log doesn't have any entries.

I tried sending the same request directly to tomcat and both
/APIServer/authz/list/master/AB?apikey=WEB_INTERFACE_API and
/APIServer/authz/list/master%2fAB?apikey=WEB_INTERFACE_API gave the correct
response and the status was HTTP/1.1 200. The second request returns 404
only when it is passed through mod jk.

Thanks
Jagadeesh



-Original Message-
From: Rainer Jung [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 03, 2007 2:03 PM

To: Tomcat Users List
Subject: Re: MOD_JK Redirection issues

Set JkLogLevel to trace and have a look at the JkLogFile.

Jagadeesh wrote:
  

Thanks for the tip and I will delete the cachelines.

I want jkmod to redirect all the requests to tomcat and it is working fine
except for the request which has %2f in the url before the parameter part.

For eg: 


http://loadbalancer.xxx.com/authenticate%2Fjagadeesh?key=12345678 will not
be redirected to tomcat servlet container, 


however

http://loadbalancer.xxx.com/authenticate/jagadeesh?key=12345678
http://loadbalancer.xxx.com/authenticate/jagadeesh%2C/abcd?key=12345678
http://loadbalancer.xxx.com/authenticate/jagadeesh?key=12345678test=%2F

are all getting redirected properly to tomcat. Only those request with %2F
in the URI before the parameter (?) part is being ignored and they are not
going past apache (load balancer).

The error_log says

[Sun Dec 31 04:02:03 2006] [notice] Digest: generating secret for digest
authentication ...
[Sun Dec 31 04:02:03 2006] [notice] Digest: done
[Sun Dec 31 04:02:03 2006] [notice] Apache/2.2.2 (Fedora) configured --
resuming normal operations
[Sun Dec 31 14:55:17 2006] [error] [client 212.241.200.196] client sent
HTTP/1.1 request without hostname (see RFC2616 section 14.23):
/w00tw00t.at.ISC.SANS.DFind:)
[Sun Dec 31 21:58:25 2006] [error] [client 87.118.100.232] client sent
HTTP/1.1 request without hostname (see RFC2616 section 14.23):
/w00tw00t.at.ISC.SANS.DFind:)

Thanks
Jugs

-Original Message-
From: Rainer Jung [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 03, 2007 1:42 PM

To: Tomcat Users List
Subject: Re: MOD_JK Redirection issues

OK, from the config I would guess, that you actually forward the request 
to tomcat, but get the 404 from there. What does the debug log tell you 
about the request in question?


Small hint not related to your problem: delete the cachesize lines if 
you've got no special reason for them.


Jagadeesh wrote:


Thanks for the reply Rainer.

I am using tomcat-connectors-1.2.19 and jBoss 4.0.5GA in Fedora Core 5.
Since the binary I downloaded was throwing errors, I build the shared
library mod_jk.so from the source and copied it to the
/usr/lib/httpd/modules/ directory.

Please find below the configuration file (mod-jk.conf) I am using


  

#=
  

#Loads the module
LoadModule jk_module modules/mod_jk.so

# The workers file
JkWorkersFile conf/worker.properties

# Set the jk log level [debug/error/info]
JkLogLevel debug

# Select the log format
JkLogStampFormat  [%a %b %d 

Re: IllegalStateException

2007-01-03 Thread David Smith
Shooting from the hip here, it appears your web code is attempting to
send the client a redirect after some response data has been sent to the
client.  You can't redirect after sending a response.  Can you offer
more context regarding what code is throwing this and what version of
tomcat?

--David

Leon van der Merwe wrote:

I am getting the above exception thrown all over my log files and I am
not sure what it means...
Does anyone know what this means?

20061113 09:54:33 ERROR
PageTemplateManager java.lang.IllegalStateException
   at
org.apache.coyote.tomcat4.CoyoteResponseFacade.sendRedirect(CoyoteRespon
seFacade.java:340)
   at
finswitch.servlet.AuthenticationServlet.service(AuthenticationServlet.ja
va:125)
   at
finswitch.servlet.SecureSiteServlet.service(SecureSiteServlet.java:98)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
   at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
   at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:260)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
   at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:191)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
   at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
Base.java:527)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
   at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.ja
va:246)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
   at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:239
6)
   at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
   at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:170)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
   at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:172)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
   at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:469
)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
   at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:174)
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
   at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
   at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
   at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
   at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:40
5)
   at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:380)
   at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:50
8)
   at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:533)
   at java.lang.Thread.run(Thread.java:536)

Thanks

Leon van der Merwe
#
This e-mail message has been scanned for Viruses and Content and cleared 
by FinSource Infrastructure Services' MailMarshal
#

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For 

Re: What a wonderfull world ..

2007-01-02 Thread David Smith
Chuck = Charles Caldarale.

Dinesh Kumar wrote:

 who is chuck?

 Bill Barker wrote:

 Frack, after all Chuck started it.  Get a life, and let these two
 little
 kiddies get on with their mud fight.  Just do what I do and block
 both of



 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TOMCAT 1.4

2006-12-31 Thread David Smith
Tomcat is typically installed as a service using commons-daemon from 
http://jakarta.apache.org/commons/daemon.  As  a result, it's process 
name in any install I've done is jsvc.  You might also see it as java if 
you start it using a shell script directly.  Individual netstat commands 
change from os to os, but in Mandriva Linux, executing netstat -tlnp as 
root will list all the listening TCP ports and the process names.  
Something similar might help you identify both your tomcat process when 
running and what's listening on port 8080.


--David

tuosu wrote:

Hello Charles,
Honored to see your post, since i have seen your wonderful, worthful posts.
Thanks for all your info.
It was a typo - it should have been - 4.1.34
.profile = 
CATALINA_HOME=/tomcat-4.1.34


I am running solaris -8, 
postgresql-8.1.5-sol8-sparc-local

j2sdk-1_4_2_13-solaris-sparc
j2re-1_4_2_13-solaris-sparc
J2SE_Solaris_8_Recommended patches
rrdtool-1.0.49-sol8-sparc-local   and
opennms-1.2.8-sol8-sparc-local

The question i have is - when i do ps -ae, i don't see tomcat as a deamon
process.
How can i make tomcat a process.
If tomcat cannot be a process then how do i verify if tomcat is working or
not.

When i enter the following:
./catalina.sh run
Using CATALINA_BASE:   /tomcat-4.1.34
Using CATALINA_HOME:   /tomcat-4.1.34
Using CATALINA_TMPDIR: /tomcat-4.1.34/temp
Using CATALINA_OUT:/tomcat-4.1.34/logs/catalina.out
Using JAVA_HOME:   /usr/java
log4j:WARN No appenders could be found for logger
(org.apache.commons.digester.Digester).
log4j:WARN Please initialize the log4j system properly.
Catalina.start: LifecycleException:  Protocol handler initialization failed:
java.net.BindException: Address already in use:8080
LifecycleException:  Protocol handler initialization failed:
java.net.BindException: Address already in use:8080
at
org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConnector.java:1324)
at
org.apache.catalina.core.StandardService.initialize(StandardService.java:531)
at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:2268)
at org.apache.catalina.startup.Catalina.start(Catalina.java:457)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:345)
at org.apache.catalina.startup.Catalina.process(Catalina.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:150)
Catalina.stop: LifecycleException:  This server has not yet been started
LifecycleException:  This server has not yet been started
at
org.apache.catalina.core.StandardServer.stop(StandardServer.java:2235)
at org.apache.catalina.startup.Catalina.start(Catalina.java:489)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:345)
at org.apache.catalina.startup.Catalina.process(Catalina.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:150)

I have no clue on this error message.

Thanks in advance




Caldarale, Charles R wrote:
  
From: tuosu [mailto:[EMAIL PROTECTED] 
Subject: TOMCAT 1.4


My O.S == sun solaris 8.0, running tomcat 1.4.2
  

It's highly unlikely you have Tomcat 1.4.2; the oldest level in the
archives is 3.0, and that's almost seven years old.  The 1.4.2 probably
refers to the level of Java (JRE) you have installed.

You probably need to download and install Tomcat from here:
http://tomcat.apache.org/download-55.cgi

Since you are most likely running version 1.4.2 of the JVM, you'll also
need the JDK 1.4 Compatibility Package, from the same download page.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: session#getId changes during doGet invocation under heavy load

2006-12-30 Thread David Smith

Hmm...

I can see two senarios that can cause this situation:

1. Your sessions are configured to be way too short.  I'd 
recommend at sessions live at least until the request times out.


2. You have a reference to the session in a servlet instance -- either 
directly or indirectly.  Keep in mind that servlets are recycled between 
requests and should be entirely stateless.  Class instance properties 
should be avoided.  In this case an old session is continuously reused 
for several requests even after it's been invalidated.


Even if these two suggestions aren't an exact fit to your issue, maybe 
they can seed some ideas on what's going on.


--David

Peter Coppens wrote:


Actually it just seems to be related to the fact that under heavy load the db
connection starts to take longer than the timeout. 


Apparently, a call to request.getSession() somewhere in the middel of the
doGet processing will also trigger invalidating the session, which is kind
of a nuisance as one should then apparently constantly check whether the
session has not expired during request processing.

I assume this is Servlet spec compliant, but it does seem to make my life
rather complex.

Would there be anyone having any suggestions to deal with this.   


Thanks,

Peter


Leon Rosenberg-3 wrote:
 


On 12/30/06, Peter Coppens [EMAIL PROTECTED] wrote:
   


I am gathering more evidence that this is related to a session expiring
on
one hand and a request being processed for that same session.

I have been debugging the tomcat code a bit, and I have the *impression*
that the expiration handling is not thread safe. It seems possible at
first
sight that the background processor decides a session is expired while at
the same time another thread starts a request for that same session.

I will try to debug a bit more and if I find more I will let you know.
 


The question is whether the next request get the right session again
or not. I had the impression from your first post, that this is the
case:
Request A - Session 1
Request B - Session 2 -- which is wrong
Request C - Session 1 again.

I observed this behaviour 3 years ago on a resin 2.1.x, but had not
enough time to debug it.

regards
Leon
   


Thanks,

Peter

PS What does O/T mean ?
 


Off Topic

   


Martin Gainty wrote:
 


Agreed
Once you have your use cases and test cases identified

If you want the server to maintain its own side of the relationship
independent of client activity then you should consider container
   


managed
 


persistence
More info avaialable at

   


http://www.javaworld.com/javaworld/jw-08-2006/jw-0828-persistence.html?page=6
 


Feel free to contact me offline as this is definitely O/T
Martin--

   


---
 


This e-mail message (including attachments, if any) is intended for the
use of the individual or entity to which it is addressed and may
   


contain
 


information that is privileged, proprietary , confidential and exempt
   


from
 


disclosure. If you are not the intended recipient, you are notified
   


that
 


any dissemination, distribution or copying of this communication is
strictly prohibited.

   


---
 


Le présent message électronique (y compris les pièces qui y sont
   


annexées,
 


le cas échéant) s'adresse au destinataire indiqué et peut contenir des
renseignements de caractère privé ou confidentiel. Si vous n'êtes pas
   


le
 


destinataire de ce document, nous vous signalons qu'il est strictement
interdit de le diffuser, de le distribuer ou de le reproduire.
- Original Message -
From: Leon Rosenberg [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Friday, December 29, 2006 6:31 AM
Subject: Re: session#getId changes during doGet invocation under heavy
load


   


Do I understand it right, that you made it a reproduceable testcase?
If so, can we have a look on it?

thank you
Leon

On 12/29/06, Peter Coppens [EMAIL PROTECTED] wrote:
 


Thanks Chuck.

I have done some further research and I have the impression that
   


there
 


is
some kind of race condition where a session that is being removed
because of
a timeout is also handling requests.

The loggings indicate that a session is destroyed but then
   


nevertheless
 


a
doGet is invoked with a request parameter that refers to that timed
   


out
 


session.

If I crank up the timeout, seriously reducing the chances a session
times
out before it has completed all the client requests it is supposed to
handle
during the test, the problem does no longer occur.

I am not sure where that leaves me. I am still uncertain as to what
   


the
 


servlet is doing wrong.

Would you (or anyone else) have any other comments on this?

Thanks,


Re: What a wonderfull world ..

2006-12-30 Thread David Smith



Frack, after all Chuck started it.  Get a life, and let these two little 
kiddies get on with their mud fight.  
 



Who started what is debatable but there's no need to continue it -- or 
invite it as is the case here.


--David


Bill Barker wrote:

Mark Thomas [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 


Martin Gainty wrote:
   

Im still waiting for the usual insults from chuck..then again maybe he 
took the day off..
 


Martin,

This sort of comment is completely out of line. There is no
justification whatsoever for your behaviour on this thread.

I expect to see a public apology on this thread from you to Chuck
forthwith.

   



Frack, after all Chuck started it.  Get a life, and let these two little 
kiddies get on with their mud fight.  Just do what I do and block both of 
them :).


 


This is the second time I have had to ask you to apologise to Chuck.
You ignored my request the last time, I do not expect to be ignored a
second time.

Mark
[EMAIL PROTECTED]

   



This sort of gross over-reaction is a sure sign that you should pass this 
title on to someone else.  Remember that this isn't a cathedral, it's a 
bazaar.
 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


   






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Peak load of Tomcat-powered server(s)?

2006-12-27 Thread David Smith

Martin --

That doesn't answer the question.  Where is there a connection between 
the maxThreads and the number of users defined in tomcat-user.xml?


As far as I can tell, the only way number of users in tomcat-users.xml 
can influence anything is 1) the amount of memory needed to hold the 
memory realm datastructure in memory and 2) the amount of time needed to 
iterate over the list to the current user's record.  The set of users in 
tomcat-users.xml would have to be huge to make and significant impact on 
performance.  By then I would hope the developer switched to a database 
driven user realm.


--David

Martin Gainty wrote:

maxThreads is a hard gate (immutable) attribute specifying the max number of threaded connections to the implemented connector 
(where there is no distinction between same user connected maxThread times or maxThread users running concurrently)


HTH
Martin --
--- 
This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited.
--- 
Le présent message électronique (y compris les pièces qui y sont annexées, le cas échéant) s'adresse au destinataire indiqué et peut contenir des renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le destinataire de ce document, nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire.
- Original Message - 
From: Li Ma [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org; Martin Gainty [EMAIL 
PROTECTED]
Sent: Tuesday, December 26, 2006 10:26 PM
Subject: Re: Peak load of Tomcat-powered server(s)?


Martin,

For the concept No 2, I dont understand why the user defined in
tomcat-users.xml will matter to number of connection or maxThreads?

Can you explain more?

Thanks!

Li

On 12/25/06, Martin Gainty [EMAIL PROTECTED] wrote:
 


Tim makes a very good point

to make this distinction clearer there are 2 distinct concepts which we
need to have clear understanding

1)there may be thousands of of (browser users) connecting in (on unix as
the nobody account) to a tomcat server

2)number of users which are configured under $TOMCAT_HOME/conf/tomcat-
users.xml which would be configured as something like
user username=tomcat password=tomcat roles=tomcat/
in the latter case the number of users would be confined to number of
maxThreads for the connector used

On a side note It is a welcome respite to hear from courteous and polite
professionals..if only for one day!

Martin--

---
This e-mail message (including attachments, if any) is intended for the
use of the individual or entity to which it is addressed and may contain
information that is privileged, proprietary , confidential and exempt from
disclosure. If you are not the intended recipient, you are notified that any
dissemination, distribution or copying of this communication is strictly
prohibited.

---
Le présent message électronique (y compris les pièces qui y sont annexées,
le cas échéant) s'adresse au destinataire indiqué et peut contenir des
renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le
destinataire de ce document, nous vous signalons qu'il est strictement
interdit de le diffuser, de le distribuer ou de le reproduire.
- Original Message -
From: Tim Funk [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, December 25, 2006 9:47 AM
Subject: Re: Peak load of Tomcat-powered server(s)?


   


Any modern server can easily handle thousands of concurrent users.

But that doesn't answer concurrent requests. Which should be  100/sec.

But there are 2 major factors
- use of HttpSession is light - Using HttpSession for users can kill
scalability due to memory constraints. (YMMV)
- Amount of work each request takes - images/css will be served very
quickly as compared to JSP's or servlets which utilize database
connectivity or file access.


-Tim

Li Ma wrote:
 


Thanks for the suggestions. I agree lots of stuff can only be decided
   


after
   


putting into a specific environment. But still, any number that can be
shared?

How many concurrent users your Tomcat can serve?

Thanks again!

Li

On 12/24/06, Gary Evesson [EMAIL PROTECTED] wrote:
   


Generally in a production environment, increasing the number of
 


threads
   


from
the default is compulsory. You need to balance that against the amount
 


of
   


memory that you have 

Re: JSP Reload problem (wierd)

2006-12-25 Thread David Smith

Try Shift+Reload.  I don't think Ctrl+Reload does anything.

--David

Mon Cab wrote:


I am using WinSCP to open and edit jsp's on my remote Tomcat server.  I
open the file from the server to edit and add a hello world into the
Login jsp.  Then I request the page in IE 6 and it loads the page and
hello world is displayed.  The page loads within a second (is this
enough time for a jsp to compile ??!).

Then I edit the file in WinSCP again to remove the hello world from
the login jsp, and I click on ctrl + refresh in IE6.  The login page
reloads almost immediately and hello world is still displaying.  I hit
ctrl refresh over and over, and cant get rid of hello world.  I check
Login.jsp on the server ant hello world is definitely not in there.  



I go into the work directory 
tomcat5.0/work/Catalina/localhost/myWebapp and notice that the

Login_jsp.java file is 3 hours old.  I delete this as well as the
Login_jsp.class file.  I try reload the page (ctrl +refresh).  Hello
world is still displaying. 


I look in the work folder.  No new Login_jsp.java file, and no new
Login_jsp.class file. 


I add aagh into the Login.jsp file.  Hit reload in explorer and
aagh displays.  But there is still no new Login_jsp.java file,
and no new Login_jsp.class file

If I rename the file to Login1.jsp and then click on reload in IE6,
after the third attempt Tomcat realizes there's no JSP file and logs an
error in catalina.log.  Then if I rename the Login.jsp back to
Login.jsp, tomcat reloads the file and displays it correctly. 

What is going on??  I feel like I'm in the Twilight zone.  






__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Peak load of Tomcat-powered server(s)?

2006-12-25 Thread David Smith
I knew somewhere in the past someone had done some performance testing 
against static content.  After a bit of googling, I found this paper 
detailing some performance testing with regard to various JDKs and 
different sizes of static png files:


http://cvs.apache.org/~woolfel/benchmark_summary.doc

With regard to dynamic content (jsps, servlets, etc., ...) performance 
will swing widely depending on what the code is doing.  Connecting to 
databases and other services are among the most expensive processes 
followed by hashing through large linear data structures.  Also consider 
the amount of memory being used per session and per request against the 
size of the server.  Lastly, developers always have to pay attention to 
taking care of their data structures and dropping references on them as 
soon as they aren't needed any more to avoid leaks.


Bottom line -- the only way to tell how many users will be supported by 
a specific webapp/server combo is to stress test with an tool like JMeter.


--David


Martin Gainty wrote:


Tim makes a very good point

to make this distinction clearer there are 2 distinct concepts which we need to 
have clear understanding

1)there may be thousands of of (browser users) connecting in (on unix as the nobody account) to a tomcat server 


2)number of users which are configured under 
$TOMCAT_HOME/conf/tomcat-users.xml which would be configured as something like
user username=tomcat password=tomcat roles=tomcat/
in the latter case the number of users would be confined to number of 
maxThreads for the connector used

On a side note It is a welcome respite to hear from courteous and polite 
professionals..if only for one day!

Martin--
--- 
This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited.
--- 
Le présent message électronique (y compris les pièces qui y sont annexées, le cas échéant) s'adresse au destinataire indiqué et peut contenir des renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le destinataire de ce document, nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire.
- Original Message - 
From: Tim Funk [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, December 25, 2006 9:47 AM
Subject: Re: Peak load of Tomcat-powered server(s)?


 


Any modern server can easily handle thousands of concurrent users.

But that doesn't answer concurrent requests. Which should be  100/sec.

But there are 2 major factors
- use of HttpSession is light - Using HttpSession for users can kill 
scalability due to memory constraints. (YMMV)
- Amount of work each request takes - images/css will be served very 
quickly as compared to JSP's or servlets which utilize database 
connectivity or file access.



-Tim

Li Ma wrote:
   


Thanks for the suggestions. I agree lots of stuff can only be decided after
putting into a specific environment. But still, any number that can be
shared?

How many concurrent users your Tomcat can serve?

Thanks again!

Li

On 12/24/06, Gary Evesson [EMAIL PROTECTED] wrote:
 


Generally in a production environment, increasing the number of threads
from
the default is compulsory. You need to balance that against the amount of
memory that you have allocated for your JVM, which needs to be balanced
against the amount of memory available in the machine.

Handling concurrent users generally comes back to the number of
connections
that your architecture can handle and how much work your database
server(s)
(assuming you have some) can handle. Our experience has been that these
things become an issue before tomcat does. It depends on your application
*a
lot*.

Nothing beats real load testing to figure out where *your* stress points
are. They are probably going to be different to other people...

Gary

-Original Message-
From: Li Ma [mailto:[EMAIL PROTECTED]
Sent: Sunday, December 24, 2006 12:35 PM
To: Tomcat Users List
Subject: Re: Peak load of Tomcat-powered server(s)?

Actually you can imagine the server serves a site like mySpace where
people
can access their own home, blog, images, forum, etc. I know it is still
not
easy to answer, but I'm not looking for an answer to my specific 
question.
I'm just looking for any similiar experience that can be shared and 
hoping

I
can learn some.

Another question, how many threads do you think Tomcat can have on one
machine? And will increasing number of threads help processing more
requests? I think 100-150 per server per second is not a good 

Re: Tomcat on Gentoo from the horse, no hear say.

2006-12-24 Thread David Smith
Despite your request to the contrary, this very long winded message is 
begging for responses.  If all you wanted was for people with Gentoo 
packaged tomcat to contact Gentoo user's list, you should have simply 
requested that.


On to the comments ---

1. Compiling tomcat.  Why???  Java by it's design is one binary 
byte-code for all platforms.  Is there really any reason to build it 
from source?  Well... aside from the Commons-daemon code (jsvc) used to 
launch tomcat as a service and the tc-native library for the 
connectors.  Those bits of native code still requires a build.


2. The tomcat-dbcp.jar is intended to avoid a classloader collision 
between tomcat's built-in database pooling functions and Commons-DBCP 
release builds.  I don't see a problem here.


3. Personally I would create one package with tomcat-core as close as 
possible to what's provided by the tomcat download site and then create 
packages for all these dependencies.  People can opt-in or opt-out of 
the extra features at their discretion.  It would make more of the 
already built documentation applicable to their setup.


Lastly, since the main point of this message is to ask us to steer 
Gentoo users towards you for questions, we would welcome a 
representative on the tomcat-users list who could respond to those 
questions.  There shouldn't be a need to make people choose one or the 
other and most will seek out what they perceive to be the most 
authoritative source.  I see if I google for 'Gentoo tomcat' I get your 
Tomcat guide as the first result.  Too bad google isn't used more often 
for some of these questions.


--David

William L. Thomson Jr. wrote:

Ok, not even sure where to start so I will kinda just jump in with this.
I am not looking to start a flame war, or long thread. I would prefer
this thread not to grow beyond this post. As there are better places,
like Gentoo java mailing list, gentoo forums, irc, etc. In the Gentoo
Tomcat Guide[1] I request users do this before say contacting upstream
mailing lists or etc. Like what happened in this case.

I am the present maintainer of Tomcat on Gentoo. I started doing so a
year ago when I noticed 5.0.27 was the lastest stable, and 5.5.x was
pretty far from hitting the tree, despite being almost a year old at the
time. The Tomcat maintainer was mia. So I slowly took over and
eventually became an official dev.

To being with, on Gentoo we compile Open Source Software from source.
This is quite common in the FOSS world everywhere except for Java.[2]
For some reason you can't get Apache http server binaries, but you can
get Tomcat binaries.

With that said, compiling Tomcat from source is COMPLETELY different
than downloading a pre-built binary version of Tomcat. That has bundled
dependencies. As in third party jars not part of Tomcat, but shipped
with it. Because Tomcat needs them to run.

Now keep in mind not only are we compiling Tomcat from source, we are
compiling all of Tomcat's dependencies from source as well. Which leads
to considerable dependencies. So package A depends only on B, but to
build package B might need/depend on the entire alphabet :)

Tomcat 5.5.20, has a ton of build time dependencies with even more
optional dependencies.  It's not clear if the optional dependencies
activate functionality or not within Tomcat. Some of these in question
are like Sun's jaf and javamail. Which till recent were not open source
or easily available, and could only be obtained as binaries from Sun. So
instead of having a potentially limited functionality Tomcat, we provide
all possible dependencies, as would be present when Tomcat devs build
and package Tomcat.

Others can't be bi-passed at all. Try compiling Tomcat with say IBM JDK.
You will notice classes are missing. Because only Sun JDK's and
blackdown implement JSSE. There is talk of removing that SSL code, and
pretty sure has been done with Tomcat 6.0.x. We don't even package JSSE
on Gentoo, since it's a pre 1.4 tech. Tomcat is one of the only apps
that is using or needs that stuff.

Now Tomcat 6.0.x has WAY less deps. A MUCH cleaner and clearer
build/compile process. Despite a bit of nastiness still going on. Like
naming-factory-dbcp.jar called tomcat-dbcp.jar. Is basically a slightly
modified re-packaged and compiled from source commons-dbcp,
commons-pool, and commons-collections. Most all Tomcat packagers for
Linux distros have voiced their opinion on how that jar is built. So far
seem to have fallen on deaf ears.

Finally let me apologize for that unfortunately user who decided to post
here first. Rather than contacting the proper channels first. Seems
there is lots they don't get about the distro they have chosen to run.
Much less where to go with questions, problems, or for help with distro
provided packages.

1. http://www.gentoo.org/proj/en/java/tomcat-guide.xml
2. http://www.gentoo.org/proj/en/java/why-build-from-source.xml

P.S.
For anyone that has a real problem with the dependencies. Our build
system on 

Re: Tomcat on Gentoo from the horse, no hear say.

2006-12-24 Thread David Smith

William L. Thomson Jr. wrote:


On Sun, 2006-12-24 at 18:32 -0500, Martin Gainty wrote:
 


William-
Just went to gentoo site and cant read the type (without a magnifying
glass)..apparently the font is cranked way down 
   



No control over that sorry. But any browser should have the ability to
increase font size. All that is dictated by, well I have no clue ;) I
just know we make does in guidexml format. It get's parsed into what you
see ;) So all the docs look the same and etc. Not sure off hand who I
would talk to about that. However should be a local font issue. Either
change your default fonts, increase their sizes, or just enlarge the
fonts/text when you are on the page via the browsers options. Should be
in a context menu or something.

 

Browsers don't always have control over font size.  Setting a font size 
in absolute terms like pixel units in the css can lock out user 
preference.  I just saw the Gentoo site and it looked fine although it 
may not render that way in all browsers.


Merry Christmas!

--David

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Re-executing a servlet request

2006-12-22 Thread David Smith
You won't be able to re-compose the request object as if it was just
submitted.  The quickest, dirtiest way is to just stow the form params
in the session upfront and then use them from the session later.

Example:

c:if test=${not empty param.mySubmitBtn}
  c:set var=mySessProp scope=session value=${param.myFormField} /
  c:set var=mySessProp2 scope=session value=${param.myFormField2} /
  !-- Keep going though all the form fields you want to save. --
/c:if

pYour request for ${SessProp} follows:/p
.

--David

David Kerber wrote:

 David Smith wrote:

 So you want to effectively save the parameters from the original
 request to page 1 and then use them when you come back to page 1.  I
 can see two options:

 1. Sessionless -- each page propogates the original params as hidden
 fields until you return to page 1 where it makes use of them.
 2. With sessions -- the original params are stored in the session and
 page 1 uses them in the absence of form params -- ie when completing
 the process.


 I've been trying to do this with sessions, but can't figure out the
 details:. I can handle extracting the original params and storing them
 away no problem, but can't figure out how to build the request again
 and re-initiate it, to bring that page up again.  Can you give me an
 example or a link?  I've tried quite a bit of googling, but must not
 have hit upon the right combination of terms yet.

 Dave


 --David

 David Kerber wrote:

 Ok, I'll try:

 My app is started with a .jsp.  On it the user enters a location
 ID.  When they click the submit button, it sends the request to a
 servlet (call it page 1)  which brings up information from a
 database about that location, and gives them the option to make
 changes to the information for the location, stepping through 3 more
 pages, all from servlets.  After the last page is done, I want to
 return to the first servlet page (page 1) with the same request
 parameters as it was originally requested with, so that the site
 information is re-requested from the database, and they will then
 see the same site, but with the data changed to reflect what they
 just entered.

 All of this works right now, except that I haven't figured out how
 to return to servlet page 1 with the same request parameters it had
 the first time, *as if* it had been requested from the jsp, but
 without them needing to re-enter the location ID and clicking on the
 submit button again.  How can I do that?

 Thanks for any suggestions!
 Dave


 Hassan Schroeder wrote:

 On 12/21/06, David Kerber [EMAIL PROTECTED] wrote:

 Nobody has a suggestion about this?




 Sure. I suggest you rephrase what you're actually trying to
 accomplish,
 because the original made utterly no sense to me :-)

 FWIW,





 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Re-executing a servlet request

2006-12-22 Thread David Smith
Oooops.  Minor point in code, but one that could trip someone up if they
copy paste my code:

pYour request for ${SessProp} follows:/p

should read:

pYour request for ${mySessProp} follows:/p

--David

David Smith wrote:

You won't be able to re-compose the request object as if it was just
submitted.  The quickest, dirtiest way is to just stow the form params
in the session upfront and then use them from the session later.

Example:

c:if test=${not empty param.mySubmitBtn}
  c:set var=mySessProp scope=session value=${param.myFormField} /
  c:set var=mySessProp2 scope=session value=${param.myFormField2} /
  !-- Keep going though all the form fields you want to save. --
/c:if

pYour request for ${SessProp} follows:/p
.

--David

David Kerber wrote:

  

David Smith wrote:



So you want to effectively save the parameters from the original
request to page 1 and then use them when you come back to page 1.  I
can see two options:

1. Sessionless -- each page propogates the original params as hidden
fields until you return to page 1 where it makes use of them.
2. With sessions -- the original params are stored in the session and
page 1 uses them in the absence of form params -- ie when completing
the process.
  

I've been trying to do this with sessions, but can't figure out the
details:. I can handle extracting the original params and storing them
away no problem, but can't figure out how to build the request again
and re-initiate it, to bring that page up again.  Can you give me an
example or a link?  I've tried quite a bit of googling, but must not
have hit upon the right combination of terms yet.

Dave



--David

David Kerber wrote:

  

Ok, I'll try:

My app is started with a .jsp.  On it the user enters a location
ID.  When they click the submit button, it sends the request to a
servlet (call it page 1)  which brings up information from a
database about that location, and gives them the option to make
changes to the information for the location, stepping through 3 more
pages, all from servlets.  After the last page is done, I want to
return to the first servlet page (page 1) with the same request
parameters as it was originally requested with, so that the site
information is re-requested from the database, and they will then
see the same site, but with the data changed to reflect what they
just entered.

All of this works right now, except that I haven't figured out how
to return to servlet page 1 with the same request parameters it had
the first time, *as if* it had been requested from the jsp, but
without them needing to re-enter the location ID and clicking on the
submit button again.  How can I do that?

Thanks for any suggestions!
Dave


Hassan Schroeder wrote:



On 12/21/06, David Kerber [EMAIL PROTECTED] wrote:

  

Nobody has a suggestion about this?




Sure. I suggest you rephrase what you're actually trying to
accomplish,
because the original made utterly no sense to me :-)

FWIW,
  




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Which class i have missed?

2006-12-22 Thread David Smith
And how did you install tomcat (rpm package or .tar.gz dl from
tomcat.apache.org)? Did you set permissions on all the folders and files
so tomcat can read them?


--David

Wang Penghui wrote:

Hello, Everyone,

After install tomcat 5.5.20 in RHEL4, i have tested the jsp-examples
which distributed with the tomcat package.

The uri i have used is http://domainname:8080/jsp-examples.

But there is two example features report errors.

1. jsp:attribute and jsp:body
2. Custom tag example

HTTP Status 500 -

type Exception report
message
description The server encountered an internal error () that prevented
it from fulfilling this request.
exception
javax.servlet.ServletException
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:843)
org.apache.jasper.runtime.PageContextImpl.access$1100(PageContextImpl.java:65)
org.apache.jasper.runtime.PageContextImpl$12.run(PageContextImpl.java:763)
   java.security.AccessController.doPrivileged(Native Method)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:761)
org.apache.jsp.jsp2.jspattribute.jspattribute_jsp._jspService(jspattribute_jsp.java:70)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   java.lang.reflect.Method.invoke(Method.java:585)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
   java.security.AccessController.doPrivileged(Native Method)
   javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
   org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)

root cause
java.lang.NoClassDefFoundError
org.apache.jasper.runtime.PageContextImpl.pushBody(PageContextImpl.java:707)
org.apache.jasper.runtime.PageContextImpl.pushBody(PageContextImpl.java:697)
org.apache.jsp.jsp2.jspattribute.jspattribute_jsp._jspService(jspattribute_jsp.java:51)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)

note The full stack trace of the root cause is available in the Apache
Tomcat/5.5.20 logs.


So i think i must missing some class in the tomcat installation. Could
someone pick me up?

Thanks very much

Wang Penghui


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Re-executing a servlet request

2006-12-22 Thread David Smith
Yes.  I'm saying the original request won't be available.  One other
alternative I can think of is for the last page submit to add all the
saved params to the request for page 1.  Last page example form tag:
form action=page1.jsp?frmParam1=valuefrmParam2=value

--David

David Kerber wrote:

 David Smith wrote:

 You won't be able to re-compose the request object as if it was just
 submitted.  The quickest, dirtiest way is to just stow the form params
 in the session upfront and then use them from the session later.
  

 Are you saying that I can't build a request and execute it directly,
 and therefore will need to check for the stored parameters on the page
 that I'm re-opening?


 Example:

 c:if test=${not empty param.mySubmitBtn}
  c:set var=mySessProp scope=session value=${param.myFormField} /
  c:set var=mySessProp2 scope=session
 value=${param.myFormField2} /
  !-- Keep going though all the form fields you want to save. --
 /c:if

 pYour request for ${SessProp} follows:/p
 .

 --David

 David Kerber wrote:

  

 David Smith wrote:

   

 So you want to effectively save the parameters from the original
 request to page 1 and then use them when you come back to page 1.  I
 can see two options:

 1. Sessionless -- each page propogates the original params as hidden
 fields until you return to page 1 where it makes use of them.
 2. With sessions -- the original params are stored in the session and
 page 1 uses them in the absence of form params -- ie when completing
 the process.
 

 I've been trying to do this with sessions, but can't figure out the
 details:. I can handle extracting the original params and storing them
 away no problem, but can't figure out how to build the request again
 and re-initiate it, to bring that page up again.  Can you give me an
 example or a link?  I've tried quite a bit of googling, but must not
 have hit upon the right combination of terms yet.

 Dave

   

 --David

 David Kerber wrote:

 

 Ok, I'll try:

 My app is started with a .jsp.  On it the user enters a location
 ID.  When they click the submit button, it sends the request to a
 servlet (call it page 1)  which brings up information from a
 database about that location, and gives them the option to make
 changes to the information for the location, stepping through 3 more
 pages, all from servlets.  After the last page is done, I want to
 return to the first servlet page (page 1) with the same request
 parameters as it was originally requested with, so that the site
 information is re-requested from the database, and they will then
 see the same site, but with the data changed to reflect what they
 just entered.

 All of this works right now, except that I haven't figured out how
 to return to servlet page 1 with the same request parameters it had
 the first time, *as if* it had been requested from the jsp, but
 without them needing to re-enter the location ID and clicking on the
 submit button again.  How can I do that?

 Thanks for any suggestions!
 Dave


 Hassan Schroeder wrote:

   

 On 12/21/06, David Kerber [EMAIL PROTECTED] wrote:

 

 Nobody has a suggestion about this?
   



 Sure. I suggest you rephrase what you're actually trying to
 accomplish,
 because the original made utterly no sense to me :-)

 FWIW,
 




 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Re-executing a servlet request

2006-12-21 Thread David Smith
So you want to effectively save the parameters from the original request 
to page 1 and then use them when you come back to page 1.  I can see two 
options:


1. Sessionless -- each page propogates the original params as hidden 
fields until you return to page 1 where it makes use of them.
2. With sessions -- the original params are stored in the session and 
page 1 uses them in the absence of form params -- ie when completing the 
process.


--David

David Kerber wrote:

Ok, I'll try:

My app is started with a .jsp.  On it the user enters a location ID.  
When they click the submit button, it sends the request to a servlet 
(call it page 1)  which brings up information from a database about 
that location, and gives them the option to make changes to the 
information for the location, stepping through 3 more pages, all from 
servlets.  After the last page is done, I want to return to the first 
servlet page (page 1) with the same request parameters as it was 
originally requested with, so that the site information is 
re-requested from the database, and they will then see the same site, 
but with the data changed to reflect what they just entered.


All of this works right now, except that I haven't figured out how to 
return to servlet page 1 with the same request parameters it had the 
first time, *as if* it had been requested from the jsp, but without 
them needing to re-enter the location ID and clicking on the submit 
button again.  How can I do that?


Thanks for any suggestions!
Dave


Hassan Schroeder wrote:


On 12/21/06, David Kerber [EMAIL PROTECTED] wrote:


Nobody has a suggestion about this?



Sure. I suggest you rephrase what you're actually trying to accomplish,
because the original made utterly no sense to me :-)

FWIW,





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Setting up the logger

2006-12-16 Thread David Smith
Tomcat 5.5 removed the Logger tag.  See 
http://tomcat.apache.org/faq/logging.html for details on how to setup 
logging.


--David

Harbir wrote:

Hello Every One!
I am using the Tomcat version 5.5.17
I am new to tomcat, and learning the meaning of the tags in the
/conf/server.xml file.
In my version there is no Logger tag, but I am reading a book to get the
customized logs specific to the application, I run. In this book they have
put the Logger tag, and so did I.
But I get the following error, when I start Catalina:

INFO: Stopping service Catalina
Dec 16, 2006 9:00:13 PM org.apache.coyote.http11.Http11BaseProtocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
Dec 16, 2006 9:00:13 PM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: Failed shutdown of Apache Portable Runtime
Dec 16, 2006 9:03:28 PM org.apache.tomcat.util.digester.Digester
startElement
SEVERE: Begin event threw exception
java.lang.ClassNotFoundException: org.apache.catalina.logger.FileLogger
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:204)
at org.apache.tomcat.util.digester.Rule.begin(Rule.java:152)

---
When I remove a Logger tag, Catalina runs fine, but the logs specific to
the Application does not get generated.

Any sort of help will be highly appreciated.

Regards
Harbir

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat localhost server page won't open on XP PC with bitdefender 10

2006-12-15 Thread David Smith

1) What do you get when you attempt to access tomcat at home?
2) Try looking at the tomcat logs to be sure it started normally
3) SysInternals TCPMon (free at www.sysinternals.com) can show if tomcat 
is listening on the ports you expect.
4) Consult the Bit Defender documentation on how to configure it or even 
if it needs configuration.


--David

Ragnar Moller (MA/EAF) wrote:


I installed the Tomcat windows package as-is on both my work and home computer.

The work computer is Win 2000
The home computer is XP SP2 with an additional Bit defender firewall

The local Tomcat page load on my work PC
But not on my home pc which is XP with bitdefender 10.

It should be a firewall problem it seems
Does anyone has the same configuration and tips how to resolve it, bit defender 
configuration or troubleshooting tips ?


Cordialement,

Ragnar Moller

Tél:+ 33 1 69 93 75 73 / ECN 879 5206
Mobile:	+ 33 6 50 86 47 24 
Fax:	+ 33 1 69 93 70 10

Sécr:   + 33 1 69 93 76 01
Email:  [EMAIL PROTECTED]


 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: File not found with file include in a jsp file.

2006-12-12 Thread David Smith
You can't have files in the webapps top level. In this regard things
stop working the way they do in Apache Httpd. Move your headerCon.jsp
file down into the product webapp or put the whole works in a ROOT
directory inside of your wwwroot.

--David

Wang Penghui wrote:

Dick Balaska 写道:
  

If /product_view.jsp is at the root of your tree (a top level document),
surely it can not know how to go up above the root. This is by design.

I say it's at the root of the tree of the virtual host based on the
parse error /product_view.jsp(2,0)

dik




Thanks very much for your quick response.

I am afraid that the product_view.jsp is NOT on the root of the tree.
And i don't know why tomcat server add a slash in the front of it.

It's in product/product_view.jsp.

But i think there maybe something wrong with the virtual host
configuration in server.xml.

Here is my configuraiton about this virtual host:

  

Host className=org.apache.catalina.core.StandardHost 
appBase=/home/test/wwwroot autoDeploy=true 
configClass=org.apache.catalina.startup.ContextConfig 
contextClass=org.apache.catalina.core.StandardContext debug=0 
deployXML=true 
errorReportValveClass=org.apache.catalina.valves.ErrorReportValve 
liveDeploy=true mapperClass=org.apache.catalina.core.StandardHostMapper 
name=test.jsp-test.bizcn.com unpackWARs=true
Context path= docBase= reloadable=true debug=0/
/Host



And the tomcat version is 5.5.20 offical package from the
http://tomcat.apache.org.

Thanks again.

Wang.

  

On 12/12/2006 1:22 AM also sprach Wang Penghui :


Hello,

I am using tomcat 5.5.20, apache 2.0 and mod_jk.so to building a jsp
server on a RHEL 4.

And there is a very strange problem here:

There is a file named headerCon.jsp in the document root of a virtual
host. And there is a folder named product. There is a file named
product_view.jsp in the folder product.

Here is a folder structure

wwwroot--headerCon.jsp
|
-product/
|
-product_view.jsp

And  there are the follow sentences in product_view.jsp:

%@ page contentType=text/html; charset=gb2312 language=java
errorPage= %
%@ include file =../headerCon.jsp%
%@ page import=com.longtopsystem.comm.* %
%@ page import=com.handle.common.* %

Then there web browser will show me the follow error messages:

HTTP Status 500 -



type Exception report
message
description The server encountered an internal error () that prevented
it from fulfilling this request.
exception
org.apache.jasper.JasperException: /product_view.jsp(2,0) File
/../headerCon.jsp not found
 
 org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause
org.apache.jasper.JasperException: /product_view.jsp(2,0) File
/../headerCon.jsp not found
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:86)
org.apache.jasper.compiler.Parser.processIncludeDirective(Parser.java:339)
org.apache.jasper.compiler.Parser.parseIncludeDirective(Parser.java:372)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:484)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1556)
org.apache.jasper.compiler.Parser.parse(Parser.java:126)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:155)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:305)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


note The full stack trace of the root cause is available in the Apache
Tomcat/5.5.20 logs.



Apache Tomcat/5.5.20


But if i copy the file headerCon.jsp to the product/ folder. and change
the line
%@ include file =../headerCon.jsp%
to
%@ include file =headerCon.jsp%
It works great.

And i have also tried use a absolute path, it doesn't work.

I have digged this for a while, but no result. Could someone pick me up?


Re: File not found with file include in a jsp file.

2006-12-12 Thread David Smith
No, no, no...

Try this directory structure, starting with the appbase you declared in
your host definition:

wwwroot
ROOT
headerCon.jsp
product
product_view.jsp
WEB-INF
web.xml

The web.xml can be very minimal -- just a web-app root element with
the appropriate dtd or schema declaration.

Then request http://localhost:8080/product/product_view.jsp.

Note all the jsp files are contained inside the ROOT webapp folder. You
name the ROOT folder something else, but be aware the ROOT name is
special under tomcat and receives requests that don't match up with any
other webapp.


I would highly recommend you read the servlet spec at
http://jcp.org/aboutJava/communityprocess/final/jsr154/index.html

--David




David Smith 写道:

  You can't have files in the webapps top level. In this regard things
  stop working the way they do in Apache Httpd. Move your headerCon.jsp
  file down into the product webapp or put the whole works in a ROOT
  directory inside of your wwwroot.
  
  --David
  
   

Hello, David,

Follow your advice, i put the whole directory to a subdirectory in the
/home/test/wwwroot/webapps

Then use the http://uri/webapps, everything works well. But, that's
could not accepted by my clients.

I wonder know, why it works great under tomcat4.1 with the same
configuration. Is it any differences between the two versions? So it has
the different behaviors.

If i don't wanna to put it to a subdirectory under the top webapps
directory. What should i do make it workable?

Thanks very much.

Wang Penghui


  Wang Penghui wrote:
  
   
  Dick Balaska 写道:
   
 
 
  If /product_view.jsp is at the root of your tree (a top level document),
  surely it can not know how to go up above the root. This is by design.
 
  I say it's at the root of the tree of the virtual host based on the
  parse error /product_view.jsp(2,0)
 
  dik
 
 
   
 
  Thanks very much for your quick response.
 
  I am afraid that the product_view.jsp is NOT on the root of the tree.
  And i don't know why tomcat server add a slash in the front of it.
 
  It's in product/product_view.jsp.
 
  But i think there maybe something wrong with the virtual host
  configuration in server.xml.
 
  Here is my configuraiton about this virtual host:
 
   
 
 
  Host className=org.apache.catalina.core.StandardHost 
  appBase=/home/test/wwwroot autoDeploy=true 
  configClass=org.apache.catalina.startup.ContextConfig 
  contextClass=org.apache.catalina.core.StandardContext debug=0 
  deployXML=true 
  errorReportValveClass=org.apache.catalina.valves.ErrorReportValve 
  liveDeploy=true 
  mapperClass=org.apache.catalina.core.StandardHostMapper 
  name=test.jsp-test.bizcn.com unpackWARs=true
  Context path= docBase= reloadable=true debug=0/
  /Host
 
 
   
  And the tomcat version is 5.5.20 offical package from the
  http://tomcat.apache.org.
 
  Thanks again.
 
  Wang.
 
   
 
 
  On 12/12/2006 1:22 AM also sprach Wang Penghui :
 
 
   
  Hello,
 
  I am using tomcat 5.5.20, apache 2.0 and mod_jk.so to building a jsp
  server on a RHEL 4.
 
  And there is a very strange problem here:
 
  There is a file named headerCon.jsp in the document root of a 
  virtual
  host. And there is a folder named product. There is a file named
  product_view.jsp in the folder product.
 
  Here is a folder structure
 
  wwwroot--headerCon.jsp
 |
 -product/
 |
 -product_view.jsp
 
  And  there are the follow sentences in product_view.jsp:
 
  %@ page contentType=text/html; charset=gb2312 language=java
  errorPage= %
  %@ include file =../headerCon.jsp%
  %@ page import=com.longtopsystem.comm.* %
  %@ page import=com.handle.common.* %
 
  Then there web browser will show me the follow error messages:
 
  HTTP Status 500 -
 
  
 
  type Exception report
  message
  description The server encountered an internal error () that prevented
  it from fulfilling this request.
  exception
  org.apache.jasper.JasperException: /product_view.jsp(2,0) File
  /../headerCon.jsp not found

  org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 
 
  root cause
  org.apache.jasper.JasperException: /product_view.jsp(2,0) File
  /../headerCon.jsp not found
  org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
  org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
  org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:86)
  org.apache.jasper.compiler.Parser.processIncludeDirective(Parser.java:339

Re: File not found with file include in a jsp file.

2006-12-12 Thread David Smith
My apologies for reposting this outside the thread, but Thunderbird has 
a real problem with the encoding of the original thread and has made a 
mess of the minimal formatting I tried to put in below. --David


Try this directory structure, starting with the appbase you declared in 
your host definition:


wwwroot
ROOT
headerCon.jsp
product
product_view.jsp
WEB-INF
web.xml

The web.xml can be very minimal -- just a web-app root element with 
the appropriate dtd or schema declaration.


Then request http://localhost:8080/product/product_view.jsp.

Note all the jsp files are contained inside the ROOT webapp folder. You
name the ROOT folder something else, but be aware the ROOT name is
special under tomcat and receives requests that don't match up with any
other webapp.


I would highly recommend you read the servlet spec at
http://jcp.org/aboutJava/communityprocess/final/jsr154/index.html

--David




David Smith ??:

   You can't have files in the webapps top level. In this regard things
   stop working the way they do in Apache Httpd. Move your 
headerCon.jsp

   file down into the product webapp or put the whole works in a ROOT
   directory inside of your wwwroot.
  
   --David
  
 

Hello, David,

Follow your advice, i put the whole directory to a subdirectory in the
/home/test/wwwroot/webapps

Then use the http://uri/webapps, everything works well. But, that's
could not accepted by my clients.

I wonder know, why it works great under tomcat4.1 with the same
configuration. Is it any differences between the two versions? So it has
the different behaviors.

If i don't wanna to put it to a subdirectory under the top webapps
directory. What should i do make it workable?

Thanks very much.

Wang Penghui


   Wang Penghui wrote:
  
 
   Dick Balaska ??:
  
  
 
   If /product_view.jsp is at the root of your tree (a top 
level document),
   surely it can not know how to go up above the root. This 
is by design.

  
   I say it's at the root of the tree of the virtual host 
based on the

   parse error /product_view.jsp(2,0)
  
   dik
  
  
 
  
   Thanks very much for your quick response.
  
   I am afraid that the product_view.jsp is NOT on the root of 
the tree.
   And i don't know why tomcat server add a slash in the front 
of it.

  
   It's in product/product_view.jsp.
  
   But i think there maybe something wrong with the virtual host
   configuration in server.xml.
  
   Here is my configuraiton about this virtual host:
  
  
  
 
   Host className=org.apache.catalina.core.StandardHost 
appBase=/home/test/wwwroot autoDeploy=true 
configClass=org.apache.catalina.startup.ContextConfig 
contextClass=org.apache.catalina.core.StandardContext debug=0 
deployXML=true 
errorReportValveClass=org.apache.catalina.valves.ErrorReportValve 
liveDeploy=true 
mapperClass=org.apache.catalina.core.StandardHostMapper 
name=test.jsp-test.bizcn.com unpackWARs=true

   Context path= docBase= reloadable=true debug=0/
   /Host
  
  
 
   And the tomcat version is 5.5.20 offical package from the
   http://tomcat.apache.org.
  
   Thanks again.
  
   Wang.
  
  
  
 
   On 12/12/2006 1:22 AM also sprach Wang Penghui :
  
  
 
   Hello,
  
   I am using tomcat 5.5.20, apache 2.0 and mod_jk.so 
to building a jsp

   server on a RHEL 4.
  
   And there is a very strange problem here:
  
   There is a file named headerCon.jsp in the 
document root of a virtual
   host. And there is a folder named product. There is 
a file named

   product_view.jsp in the folder product.
  
   Here is a folder structure
  
   wwwroot--headerCon.jsp
   |
   -product/
   |
   -product_view.jsp
  
   And there are the follow sentences in product_view.jsp:
  
   %@ page contentType=text/html; charset=gb2312 
language=java

   errorPage= %
   %@ include file =../headerCon.jsp%
   %@ page import=com.longtopsystem.comm.* %
   %@ page import=com.handle.common.* %
  
   Then there web browser will show me the follow error 
messages:

  
   HTTP Status 500 -
  
   


  
   type Exception report
   message
   description The server encountered an internal error 
() that prevented

   it from fulfilling this request.
   exception
   org.apache.jasper.JasperException: 
/product_view.jsp(2,0) File

   /../headerCon.jsp not found
   
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
   
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
   
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
   
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
   
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

  
  
   root cause
   org.apache.jasper.JasperException: 
/product_view.jsp(2,0) File

   /../headerCon.jsp not found
   
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
   
org.apache.jasper.compiler.ErrorDispatcher.dispatch

Re: [tomcat 5.0] - DBCP pooling vs sharing a single open connection

2006-12-11 Thread David Smith
Single connections create bottlenecks and slow down throughput when the 
site get's busy.  DBCP allows for multiple managed connections for 
faster performance.  Plus it can take care of when connections die and 
create new ones automatically.


There are shades of grey as well.  I have one solution that made use of 
commons-pool (the pool component of DBCP).  The app manages a pool of 
workers, each with a set of prepared statements ready to go.  It boosted 
performance on the app a lot over the original single connection design.


--David

Ran wrote:


Hi all,
How does DBCP compare to application managed, single connection which 
stays

open to share ?

Thanks,
ran




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat5.5.x cannot run on Java6

2006-12-11 Thread David Smith
While I haven't had a chance to actually try it yet, I would imagine 
just change the JAVA_HOME to point to 6 and start.  You could try it and 
let us know what happens.


--David

Eric Chow wrote:

Hello,

How can run Tomcat5.5 in Java6 ?

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: EL not evaluatin in TC 5.5

2006-12-05 Thread David Smith
Did you declare your web.xml to use the servlet spec 2.4 schema? AFAIK, 
that's required to make EL expressions work.


--David

Roberto Marra wrote:
I usually put under WEB-INF/tld/ all the JSP tag library and under 
WEB-INF/lib all the *.jar file... even jstl.jar  I never have had 
problem


Ciao
Roberto

Michael Hencin ha scritto:

I have tomcat 5.5,  j2sdk1.4.2_11 on windows xp sp2

 

 


I have installed the BIRT viewer web app (from eclips.org) and wanted to
also add JSTL to the jsp pages. I download and installed the jstl.jar 
and
standard.jar into my webapp WEB-INF/lib. I put the c.tld and some 
other tld
files into the WEB-INF dir. My jsp does not seem to be evaluating the 
EL I

have another sample webapp, that I got the simple jsp from, and its
installed in the same TC5.5 and the same jsp evaluates fine.
 


From what I have read about installing JSTL, I cannot see why the EL
expressions will not evaluate?

 


I added a simple jsp as follows into the webapp dir.

 


%@ page contentType=text/html %

%@ taglib uri=http://java.sun.com/jstl/core; prefix=c %

html

  head

titleJSP is Easy/title

  /head

  body bgcolor=white

 


h1JSP is as easy as .../h1

 


%-- Calculate the sum of 1 + 2 + 3 dynamically --%

1 + 2 + 3 = c:out value=${1 + 2 + 3} /

 


  /body

/html

 


The result when I load this jsp is

 

 
 
html

  head
titleJSP is Easy/title
  /head
  body bgcolor=white
 
h1JSP is as easy as .../h1
 
1 + 2 + 3 = ${1 + 2 + 3}
 
  /body

/html

 


My web.xml entries for the tag-lib are as follows;

 


taglib

taglib-urihttp://java.sun.com/jstl/fmt/taglib-uri

taglib-location/WEB-INF/fmt.tld/taglib-location

  /taglib

 


  taglib

taglib-urihttp://java.sun.com/jstl/fmt-rt/taglib-uri

taglib-location/WEB-INF/fmt-rt.tld/taglib-location

  /taglib

 


  taglib

taglib-urihttp://java.sun.com/jstl/core/taglib-uri

taglib-location/WEB-INF/c.tld/taglib-location

  /taglib

 


  taglib

taglib-urihttp://java.sun.com/jstl/core-rt/taglib-uri

taglib-location/WEB-INF/c-rt.tld/taglib-location

  /taglib

 


  taglib

taglib-urihttp://java.sun.com/jstl/sql/taglib-uri

taglib-location/WEB-INF/sql.tld/taglib-location

  /taglib

 


  taglib

taglib-urihttp://java.sun.com/jstl/sql-rt/taglib-uri

taglib-location/WEB-INF/sql-rt.tld/taglib-location

  /taglib

 


  taglib

taglib-urihttp://java.sun.com/jstl/x/taglib-uri

taglib-location/WEB-INF/x.tld/taglib-location

  /taglib

 


  taglib

taglib-urihttp://java.sun.com/jstl/x-rt/taglib-uri

taglib-location/WEB-INF/x-rt.tld/taglib-location

  /taglib

   
 


Michael Hencin

Enginuity Development

815-505-5028

 



  





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: EL not evaluatin in TC 5.5

2006-12-05 Thread David Smith

Roberto Marra wrote:


In my web.xml I don't declare to use the servlet spec 2.4 schema

David Smith ha scritto:

Did you declare your web.xml to use the servlet spec 2.4 schema? 
AFAIK, that's required to make EL expressions work.


--David




Try replacing the top of your web.xml with this and restarting the app:

?xml version=1.0 encoding=UTF-8?
web-app version=2.4
xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;


--David

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Context problem in tomcat 5.5

2006-12-05 Thread David Smith
An even better resource for servlet mapping is the servlet spec.  It can 
be downloaded here:


http://jcp.org/aboutJava/communityprocess/final/jsr154/index.html

SRV.11 describes mapping requests to servlets and SRV.13.4 describes 
elements of a web.xml file.


--David

Martin Gainty wrote:

servlet-mapping in web.xml?
an example for cgi located at
http://tomcat.apache.org/tomcat-5.0-doc/RELEASE-NOTES.txt

HTH

M-
This e-mail communication and any attachments may contain confidential and privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its 
contents
  - Original Message - 
  From: Rizwan Ahmad 
  To: users@tomcat.apache.org 
  Sent: Tuesday, December 05, 2006 6:00 AM

  Subject: Context problem in tomcat 5.5


  Hi,

  I am new to tomcat. I just installed tomcat 5.5 on my machine having windows XP platform. I am 
trying to deploy a war file naming samena.war where samena is the context name. When I 
startup tomcat it automatically unpacks war file but when I try to access my website using 
http://localhost:8080/samena/ it says The requested resource (/samena/) is not 
available.

  I also don't find any context name specified anywhere for 
http://localhost:8080/servlets-examples/ provided with the tomcat.

  I am also attaching my web.xml file so that it can help you in suggesting a 
solution to me.

  Thanks in advance.

  Rizwan Ahmad



--


  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat w/o commercial crap

2006-12-05 Thread David Smith

?? Sun's Commercial Crap  ??

What about http://tomcat.apache.org?

--David

Enrico Weigelt wrote:

Hi folks,

is there any chance to get tomcat working w/o sun's commercial crap ? 

I'm working on gentoo and can't tomcat it w/o going to the 
sun shop :((



cu
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat w/o commercial crap

2006-12-05 Thread David Smith
In every install I've done, I've only needed the tomcat download from 
tomcat.apache.org (and a JVM of course).  Never needed to get extra 
stuff direct from Sun's site.  Sounds like you are trying to use some 
third party package install that added dependencies.


--David

Enrico Weigelt wrote:

* Nelson, Tracy [EMAIL PROTECTED] wrote:
  

Not sure what you mean by 'commercial crap', Java is OSS now, and Tomcat
always has been.



maybe I missed something, but tomcat requires several packages,
ie. sun-jimi, which are NOT free (and cannot be downloaded directly).


cu
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: compiled header filter on tomcat 5.5

2006-12-05 Thread David Smith
I see the prob here -- your code was compiled for java version 1.5 and 
you are using an older jvm to run tomcat.  Match up and build your code 
on the same java version your server is using.  I typically have 
Netbeans build to 1.4 just to stay on the safe side (plus I'm not using 
any of the 1.5 new features).


--David

Ian H wrote:

On 12/5/06, Caldarale, Charles R [EMAIL PROTECTED] wrote:

  SEVERE: Error filterStart


What else is in the log?  (The underlying cause usually appears _after_
the above somewhat misleading message.)


Hi Chuck,

Thank you for your quick reply!

The whole stdout.log follows...(I see that for _this_ dev box, it's
actually tomcat 5.0).:

5/12/2006 09:30:11 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8754
5/12/2006 09:30:11 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1000 ms
5/12/2006 09:30:11 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
5/12/2006 09:30:11 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.0.27
5/12/2006 09:30:11 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
5/12/2006 09:30:12 org.apache.catalina.startup.ContextConfig 
applicationConfig

INFO: Missing application web.xml, using defaults only
StandardEngine[Catalina].StandardHost[localhost].StandardContext[/voice]
5/12/2006 09:30:12 org.apache.catalina.startup.ContextConfig 
applicationConfig

INFO: Missing application web.xml, using defaults only
StandardEngine[Catalina].StandardHost[localhost].StandardContext[/interpimages] 


log4j:WARN No such property [maxBackupIndex] in
org.apache.log4j.DailyRollingFileAppender.
5/12/2006 09:30:12 org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
5/12/2006 09:30:12 org.apache.catalina.core.StandardContext start
SEVERE: Context startup failed due to previous errors
5/12/2006 09:30:12 org.apache.catalina.core.StandardHost getDeployer
INFO: Create Host deployer for direct deployment ( non-jmx )
5/12/2006 09:30:12 org.apache.catalina.core.StandardHostDeployer install
INFO: Processing Context configuration file URL
file:D:\web\tomcat\conf\Catalina\localhost\admin.xml
5/12/2006 09:30:12 org.apache.struts.util.PropertyMessageResources init
INFO: Initializing, config='org.apache.struts.util.LocalStrings',
returnNull=true
5/12/2006 09:30:12 org.apache.struts.util.PropertyMessageResources init
INFO: Initializing, config='org.apache.struts.action.ActionResources',
returnNull=true
5/12/2006 09:30:13 org.apache.struts.util.PropertyMessageResources init
INFO: Initializing,
config='org.apache.webapp.admin.ApplicationResources', returnNull=true
5/12/2006 09:30:14 org.apache.catalina.core.StandardHostDeployer install
INFO: Processing Context configuration file URL
file:D:\web\tomcat\conf\Catalina\localhost\manager.xml
5/12/2006 09:30:14 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8754
5/12/2006 09:30:14 org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
5/12/2006 09:30:14 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/31  config=d:\web\tomcat\conf\jk2.properties
5/12/2006 09:30:14 org.apache.catalina.startup.Catalina start
INFO: Server startup in 2813 ms


Seemingly of much greater value, I've found this in the localhost log:

2006-12-05 08:11:29 StandardContext[]Exception starting filter
ResponseHeaderFilter
java.lang.UnsupportedClassVersionError: ResponseHeaderFilter
(Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at 
org.apache.catalina.loader.StandardClassLoader.findClass(StandardClassLoader.java:485) 

at 
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:820) 

at 
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:721) 

at 
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:803) 

at 
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:721) 

at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1327) 

at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189) 

at 
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:211) 

at 
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:308) 

at 

Re: jsp optimization for db driver load and connection

2006-12-04 Thread David Smith
You'll have to do something because the below code is very inefficient.  
Creating and closing connections is an extremely expensive operation and 
the way this is written you're getting one on every request.


At minimum, I would recommend a ServletContextListener that creates a 
pooled DataSource, stored in the application scope.  Then convert your 
code below to get the DataSource from there whenever it needs it.  The 
difference will be day and night.  Oh, yes ... and make sure you always 
close the connections as soon as you can after you're finished using 
them -- preferably in a finally block.


--David

IT Desk wrote:


This isn't Tomcat specific but general to any jsp container and its jvm.

I am working on a site where almost everything is done through the jsp 
page plus one main java class to store state data.


The site's jsp page may do up to 7 queries on the database. On each 
query, the statements are these:


Driver DriverDB = (Driver)Class.forName(db_DRIVER).newInstance();
Connection ConnDB = 
DriverManager.getConnection(db_STRING,db_USERNAME,db_PASSWORD);
PreparedStatement StatementDB = ConnDB.prepareStatement(SELECT * from 
table);

ResultSet resultDB = StatementDB.executeQuery();

My 2 questions are:
Does the forName call to load the driver get optimized out? Clearly 
the driver need only load once.
Does the getConnection reuse the same connection that was done in the 
previous call on the same jsp page?


There are some performance problems and I'm wondering if I should try 
to clean the code up or if the jvm
does it for me through optimization. It's running on Tomcat 5.5.20 and 
JVM 5.x.


The client won't pay for any major redesign so I'm looking for 
something small that could make a big impact.


Thanks for any insight.
Coral

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Probm in starting Tomcat5.5

2006-12-03 Thread David Smith

thiru chengodu wrote:

Hi, i'm using Tomcat 5.5.1 in windows xp,
Now i cant start Tomcat and receiving the following err while try to
start...PLEASE HELP ME TO RECOVER THIS PROBLEM and why it happens?
*Error:*
*Windows could'nt start TOMCAT in ur local machine.*



Have you looked at your logs?  They are in the logs directory of your 
Tomcat installation directory.  If the messages there don't help you, 
post them here.


--David

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Webapps inexplicably losing access to common/shared classloaders

2006-12-02 Thread David Smith


Caldarale, Charles R wrote:
From: David Smith [mailto:[EMAIL PROTECTED] 
Subject: Re: Webapps inexplicably losing access to 
common/shared classloaders


H. only fixed by a system restart?  This sounds like an 
environment variable is changed during start or stop and the 
new value is bad.  Your start and stop scripts aren't attempting

to set classpath or something evil like that are they?



Can't be that specifically, since the CLASSPATH environment variable
isn't used by the JVM proper, just the launcher in the absence of the
-cp parameter.  Probably not any other environment variables, since
(AFAIK) Tomcat's classloaders don't look at any.  However, it might be
interesting to compare the system properties visible to Tomcat after a
reboot with those after a Tomcat restart.  The LambdaProbe add-on can
display them, for example.  Turning on -verbose:class might also provide
some hints, but it will produce a lot of output.

 - Chuck

  
I'd agree in 99.999% of all cases, but there is always that 0.001% case 
to really throw a monkey wrench in the works.  And I think we are 
looking at it.  It might be worthwhile for testing to simply add some 
echo statements to the start and stop scripts to see what the 
environment looks at those moments.


--David

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Webapps inexplicably losing access to common/shared classloaders

2006-12-01 Thread David Smith


Timothy Collett wrote:

Now, this seems to happen *every* time I stop and restart Tomcat...

I'm somewhat at a loss to see what could be put into a bad state by 
stopping and restarting Tomcat, but put back in a good state by 
restarting the computer.  Shouldn't everything be cleaned up by 
stopping Tomcat, or not cleaned up at all?




H. only fixed by a system restart?  This sounds like an 
environment variable is changed during start or stop and the new value 
is bad.  Your start and stop scripts aren't attempting to set classpath 
or something evil like that are they?


--David

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Connector question

2006-11-30 Thread David Smith
Nope.  You can remove the one not used.  I would recommend you comment 
it out first and test.  Remove when it's tested to work just to make 
sure you are removing the right one.


--David

Narayanaswamy, Mohan wrote:

In one of my development server, we have the following two entry, Do we
need both of the below entries to support Apache + Tomcat4.1.x?

!-- Define an AJP 1.3 Connector on port 8009 --
Connector className=org.apache.ajp.tomcat4.Ajp13Connector port=8009
minProcessors=50 maxProcessors=800 enableLookups=false
acceptCount=10 debug=0/

!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8010 --
Connector className=org.apache.coyote.tomcat4.CoyoteConnector
port=8010 minProcessors=50 maxProcessors=800 enableLookups=false
redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=2
useURIValidationHack=false
protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/


---

In http://tomcat.apache.org/tomcat-4.1-doc/config/connectors.html -
org.apache.coyote.tomcat4.CoyoteConnector has mentioned as HTTP
connector for modern browser, but when I send request to port 8010, I
did not get any valid output on my browser.

Regards,
Mohan
This email is confidential. If you are not the addressee tell the sender 
immediately and destroy this email
without using, sending or storing it. Emails are not secure and may suffer 
errors, viruses, delay,
interception and amendment. Standard Chartered PLC and subsidiaries (SCGroup) 
do not accept liability for
damage caused by this email and may monitor email traffic.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Address already in use

2006-11-30 Thread David Smith
TCPView from http://www.sysinternals.com can help you figure out what 
program has control over your port .


--David

red phoenix wrote:

My JDK is jdk1.5.0_09 and my tomcat is 5.5.17,and I use Norton Antivirus
2006,when I start Tomcat,it raise following error:

Error: Error initializing endpoint
java.net.BindException: Address already in use: JVM_Bind:
at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(
PoolTcpEndpoint.java:264)
at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:137)
at org.apache.coyote.tomcat5.CoyoteConnector.initialize(
CoyoteConnector.java:1429)
at 
org.apache.catalina.core.StandardService.initialize(StandardService.java

:609)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java
:2384)
at org.apache.catalina.startup.Catalina.load(Catalina.java:507)
at org.apache.catalina.startup.Catalina.load(Catalina.java:528)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:250)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:424)

I guess this port  has been used,so I use command to look up,like
follows:
C:\netstat -an 
Proto  Local Address  Foreign AddressState
TCP192.168.131.63:0.0.0.0:0  LISTENING

I don't know which program has used this port,how to find this program 
and

kill it?
I attemp to change tomcat port from  to 9090,for several times,tomcat
can start and run well,but then I find a puzzle question for tomcat 
run some

times,after I modify tomcat,I restart tomcat again,I find tomcat raise
error,
java.net.BindException: Address already in use: JVM_Bind:9090,even I 
restart
my computer,it still raise above error! I puzzled it for several 
times! This
error will solved until I change tomcat port again! I don't know the 
reason!

I don't know if this is a bug of JDK or Tomcat?
Anyone can give me some advice? Any idea will be appreciated!

Thanks.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: virtual mapping on Tomcat 5.5

2006-11-29 Thread David Smith
1. the path attribute of your context definition will be ignored by
tomcat 5.5.  The webapp itself will be deployed as RMS, not images.

2. Assuming you have an images folder in your RMS webapp and a file
named logo.gif exists there, the url
http://localhost:8080/RMS/images/logo.gif should work.  Check the logs
if it's not working.

3. Please don't hijack threads.  Join the list and send a NEW message to
[EMAIL PROTECTED]  Replying to a message and changing the subject
isn't enough.

--David

Jennifer Lu wrote:

 Dear all,

 I need to define a virtual mapping path on Tomcat 5.5. The following
 works
 well on Tomcat 5.0.28 (I put it in the server.xml)

 Context path=/images docBase=E:/templates/images debug=0
 reloadable=true/Context

 The webapp is called RMS and its classes directory has been installed
 on C:.

 http://localhost:8080/RMS/images/logo.gifthis url works well on
 Tomcat
 5.0.28 but causes a HTTP404error on Tomcat5.5

 I have tried several approaches on Tomcat5.5 but none of them succeeded.

 Approach 1. put it in conf/Catalina/localhost/RMS.xml
 Approach 2. put it in webapps/RMS/META-INF/context.xml

 Any advice on this? Thanks a lot.

 Jen



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



<    5   6   7   8   9   10   11   12   13   14   >