Tomcat and pdf fast web view

2006-10-31 Thread FOLLUT Guillaume
Hello,
I'm using Tomcat 5.0.28 to share some pdf files but the option fast web view 
doesn't work : my files need to be downloaded completly before I can view them.
Is there a way to see the first page of the pdf while the rest of the document 
is still downloading? Maybe by a specific servlet?

Thanks



This message has been scanned for viruses by BlackSpider MailControl - 
www.blackspider.com


Re: Servlet Mappings

2006-10-31 Thread ben short

Many thanks for your help Charles.

On 10/31/06, Bill Barker [EMAIL PROTECTED] wrote:


ben short [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I just tried changing the /images/* to *.jpg and it works


Yes, Tomcat's default servlet won't work with a prefix map.  It requires
either a suffex map, or a default map.

 On 10/30/06, ben short [EMAIL PROTECTED] wrote:
 Charles,

 Im deploying a war file. Im also using spring. I havent touched the
 web.xml. I have litrally downloaded and un tared the file from the
 apache tomcat website.

 Here is the layout of the test app;lication i have setup to try it out.

 test
 - images
   - test.jpg
 - WEB-INF
   - web.xml
   - test-servlet.xml
   - jsp
 - test.jsp
   - lib
 - various jars
   - tld
 - c-1.1.2.tld
 - fmt-1.1.2.tld

 test.jsp

 %@ page contentType=text/html;charset=UTF-8 language=java %
 html
   headtitleSimple jsp page/title/head
   bodyimg src=images/test.jpg alt= //body
 /html

 web.xml

 !DOCTYPE web-app PUBLIC
  -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
  http://java.sun.com/dtd/web-app_2_3.dtd; 

 web-app
   display-nameArchetype Created Web Application/display-name

 servlet
 servlet-nametest/servlet-name

 
servlet-classorg.springframework.web.servlet.DispatcherServlet/servlet-class
 load-on-startup1/load-on-startup
 /servlet

servlet-mapping
servlet-namedefault/servlet-name
url-pattern/images/*/url-pattern
/servlet-mapping

 servlet-mapping
servlet-nametest/servlet-name
url-pattern//url-pattern
/servlet-mapping

 /web-app

 test-servlet.xml

 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE beans PUBLIC -//SPRING//DTD BEAN//EN
 http://www.springframework.org/dtd/spring-beans.dtd;
 beans

 bean id=testController
 class=org.springframework.web.servlet.mvc.ParameterizableViewController
 property name=viewName value=test/
 /bean

bean id=urlMapping
 class=org.springframework.web.servlet.handler.SimpleUrlHandlerMapping
property name=mappings
props
prop key=/test.htmltestController/prop
 /props
/property
/bean

bean id=viewResolver
 class=org.springframework.web.servlet.view.InternalResourceViewResolver
property name=prefix
value/WEB-INF/jsp//value
/property
property name=suffix
value.jsp/value
/property
property name=viewClass

 valueorg.springframework.web.servlet.view.JstlView/value
/property
/bean


 /beans








 On 10/30/06, Caldarale, Charles R [EMAIL PROTECTED] wrote:
   From: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
   Subject: RE: Servlet Mappings
  
   What's the directory structure under ROOT?  Is ROOT under
   your Host's appBase?  For that matter, what's the
   directory structure under appBase?
 
  Should have mentioned that your images directory should be under ROOT,
  not appBase.  If it's under appBase, images is being deployed as a
  separate webapp, which is probably not your intent.
 
   - 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]




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



2 context paths for one application?

2006-10-31 Thread Peter Neu
Hello,

is there a way to configure two context paths for the same application?

Like this: 

localhost/path1/servlet1

localhost/path2/public/servlet2


cheers,
Pete



-
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 configuration

2006-10-31 Thread bcochofel



Christopher Schultz-2 wrote:
 
 Bruno,
 
 Alias /jsp-examples /srv/www/tomcat5/base/webapps/jsp-examples
 JkMount /jsp-examples/*.jsp  ajp13
 JkMount /jsp-examples/j_security_check ajp13 
 
 These three ought to do the trick. Which files aren't being served by
 Apache httpd?
 

Well I add the line:

JkMount /jsp-examples ajp13

I now I can get  http://localhost/jsp-examples http://localhost/jsp-examples 
to work also...
Thanks
-- 
View this message in context: 
http://www.nabble.com/mod_jk-configuration-tf2539505.html#a7091265
Sent from the Tomcat - User mailing list archive at Nabble.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]



Re: mod_jk configuration

2006-10-31 Thread bcochofel

Now I have an even stranger behavior...

I can only JkMount /jsp-examples, I did the same to /tomcat-docs,
/servlets-examples and /cocoon and I get :

Forbidden
You don't have permission to access /tomcat-docs/ on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an
ErrorDocument to handle the request.

Here's my /etc/apache2/conf.d/jk.conf: 
http://www.nabble.com/file/3921/jk.conf jk.conf 

My httpd.conf comes with SuSE and has several include options...
-- 
View this message in context: 
http://www.nabble.com/mod_jk-configuration-tf2539505.html#a7091397
Sent from the Tomcat - User mailing list archive at Nabble.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]



TR: servlet not found since i replace tomcat 4.1.30 by tomcat 4.1.34

2006-10-31 Thread Philippe Couas
 

Hi 

 

it seems allowLinking has changed ?

 

Regards

Philippe

 

 

  _  

De : Philippe Couas [mailto:[EMAIL PROTECTED] 
Envoyé : lundi 30 octobre 2006 19:30
À : 'tomcat-user@jakarta.apache.org'
Objet : servlet not found since i replace tomcat 4.1.30 by tomcat 4.1.34 

 

Hi

 

I want replace tomcat 4.1.30 by tomcat by tomcat 4.1.34

I have error 404 class not found on my servlet ??

It always in lib directory , where is my mistake

 

Regards

Philippe



Location for libraries need for resources in Context.xml

2006-10-31 Thread David Goodenough
With Tomcat 5.5 you can now define things like JDBC DataSources in 
META-INF/context.xml in your war files.  JDBC DataSources need 
drivers, and obviously they can still be stored in common/lib, but
given that they are defined, or rather their use is requested, 
through the war file, can the drivers also be put in the war
file?  The same question would then apply to other resources like
beans etc.  

Putting the files in the war would have the effect of making the
application self contained, so would there be any downsides to
allowing this if it is currently not allowed?

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]



How to install admin package in Tomcat

2006-10-31 Thread Mário Gamito

Hi,

I've installed Tomcat 5.5.20.

Now, i want to install the admin package. I've done this once, but i confess
that i don't recall anymore how i've done it.

My question is, where should i put the files from the admin tarball ?
The one i've downloaded is apache-tomcat-5.5.20-admin.tar.gz
I have Tomcat running in /usr/local/tomcat


Another questions regards the admin password. How can i set it ?

Any help would be appreciated.

Warm Regards,
Mário Gamtio


JNDIRealm exception

2006-10-31 Thread [EMAIL PROTECTED]
Problem with JNDIRealm 

 

I successfully authenticate my users against active Directory 
(single domain). But now I have a setup with trusted domains and the 
authentication fails with the following exception.

Everything is working fine if my user is in the domain ar-net.ch. 

Now I want to authenticate a user in the Domain teufen.ar-net.ch. 
As I see with Ethereal, referrals are followed and the user is found. 
But the user is not authenticated and the log shows the following 
exception.

Tomcat server is 5.5.15 and java is 1.5.0_06

 

Thank you for any clue

 

 

Exception performing authentication

javax.naming.InvalidNameException: Invalid name: ldap:

at javax.naming.ldap.Rfc2253Parser.doParse(Unknown 
Source)

at javax.naming.ldap.Rfc2253Parser.parseDn(Unknown 
Source)

at javax.naming.ldap.LdapName.parse(Unknown Source)

at javax.naming.ldap.LdapName.init(Unknown Source)

at com.sun.jndi.ldap.LdapNameParser.parse(Unknown 
Source)

at org.apache.catalina.realm.JNDIRealm.getUserBySearch
(JNDIRealm.java:1079)

at org.apache.catalina.realm.JNDIRealm.getUser
(JNDIRealm.java:958)

at org.apache.catalina.realm.JNDIRealm.authenticate
(JNDIRealm.java:907)

at org.apache.catalina.realm.JNDIRealm.authenticate
(JNDIRealm.java:808)

at org.apache.catalina.authenticator.FormAuthenticator.
authenticate(FormAuthenticator.java:257)

at org.apache.catalina.authenticator.AuthenticatorBase.
invoke(AuthenticatorBase.java:416)

at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:126)

at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:105)

at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:107)

at org.apache.catalina.connector.CoyoteAdapter.service
(CoyoteAdapter.java:148)

at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:869)

at org.apache.coyote.http11.
Http11BaseProtocol$Http11ConnectionHandler.processConnection
(Http11BaseProtocol.java:667)

at org.apache.tomcat.util.net.PoolTcpEndpoint.
processSocket(PoolTcpEndpoint.java:527)

at org.apache.tomcat.util.net.
LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)

at org.apache.tomcat.util.threads.
ThreadPool$ControlRunnable.run(ThreadPool.java:684)

at java.lang.Thread.run(Unknown Source)

31.10.2006 08:57:59 org.apache.catalina.realm.JNDIRealm close

 

Here is the config?

 

Realm  name=myrealm 

className=org.apache.catalina.realm.JNDIRealm debug=99

connectionName=CN=dasquery,OU=Herisau-AR-NET,DC=ar-net,DC=ch

connectionPassword=not public

connectionURL=ldap://s1.ar-net.ch:389; 

userBase=DC=ar-net,DC=ch

userSubtree=true 

userSearch=userPrincipalName=
{0}

roleName=cn

roleSearch=(member={0})

roleBase=OU=DASGROUPS,OU=Herisau-AR-NET,DC=ar-net,DC=ch

referrals=follow

/



-
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: StandartSession.accessCount bug?

2006-10-31 Thread Mark Thomas
Michael Kantarovich wrote:
 Guys, 
  
 Did you consider to use java.util.concurrent.atomic.AtomicLong ?

No, since this is a Java 5 class and TC5 will run on a 1.4 JVM
providing a couple of additional JARs are present.

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]



Re: 2 context paths for one application?

2006-10-31 Thread Mark Thomas
When starting a new thread (ie sending a message to the list about a
new topic) please do not reply to an existing message and change the
subject line. To many of the list archiving services and mail clients
used by list subscribers this  makes your new message appear as part
of the old thread. This makes it harder for other users to find
relevant information when searching the lists.

This is known as thread hijacking and is behaviour that is frowned
upon on this list. Frequent offenders will be removed from the list.
It should also be noted that many list subscribers automatically
ignore any messages that hijack another thread.

The correct procedure is to create a new message with a new subject.
This will start a new thread.

Mark
tomcat-user-owner


-
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 install admin package in Tomcat

2006-10-31 Thread Mark Thomas
Mário Gamito wrote:
 Hi,
 
 I've installed Tomcat 5.5.20.
 
 Now, i want to install the admin package. I've done this once, but i
 confess
 that i don't recall anymore how i've done it.
 
 My question is, where should i put the files from the admin tarball ?
 The one i've downloaded is apache-tomcat-5.5.20-admin.tar.gz
 I have Tomcat running in /usr/local/tomcat

Expand the admin tarball in exactly the same directory as you did the
Tomcat tarball.

 Another questions regards the admin password. How can i set it ?

Assuming an out of the box config, tomcat-users.xml in the conf
directory. You need to add the admin role to at least one user.

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]



Re: Location for libraries need for resources in Context.xml

2006-10-31 Thread David Smith
The simple answer is no, you cannot store driver jar files in your 
webapp's .war file unless you want to setup and manage your own database 
pool.  Basically tomcat's internal classloader has to have access to the 
driver in addition to your webapp which is why it has to be in 
common/lib to begin with. 

If you want (and this is probably a better design), write a 
ServletContextListener to setup your own favorite pool and store the 
resulting DataSource object in the servlet context.


--David

David Goodenough wrote:

With Tomcat 5.5 you can now define things like JDBC DataSources in 
META-INF/context.xml in your war files.  JDBC DataSources need 
drivers, and obviously they can still be stored in common/lib, but
given that they are defined, or rather their use is requested, 
through the war file, can the drivers also be put in the war

file?  The same question would then apply to other resources like
beans etc.  


Putting the files in the war would have the effect of making the
application self contained, so would there be any downsides to
allowing this if it is currently not allowed?

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]

 




-
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: StandartSession.accessCount bug?

2006-10-31 Thread Christopher Schultz
Mark,

 Contended locks are much slower, so it's important to know.

 It was contended. I have added the uncontended figures: 75ns and 225ns.

What do the two different values mean?

Also, did your +50ns figure mean that the /overhead/ was +50ns, or that
waiting for the other thread to release the lock (which would include
execution of the method itself) took 50ms longer. Since those threads
cannot really run concurrently due to the synchronization, your timing
should be affected by that fact, instead of merely the added overhead.

 150ns per request (on my hardware) is still probably more than we want
 to add to every request.

Really? If you say so...

 Are Tomcat sessions pluggable?
 [snip]
 That would work. However (and this is just my view) making it an
 optional feature of the standard implementation would be less work,
 easier to maintain and less prone to user configuration error.

Yeah, but there were people begging not to add another configuration
option. It's got to be a config option in either case.

 I agree it needs to be fixed. As do the other 180 odd currently open
 bugs ;)

Fair enough, but this one is easy. It's not like it's going to take
weeks of full-time work to develop and test a fix for this bug.

 Performance is something that does get a fair amount of
 attention from the Tomcat committers and the fix for this needs to
 keep that in mind.  From my perspective this is a feature/performance
 trade-off where we can provide a configuration option for users to
 make their own decision.

I understand the focus on performance, but this is a straight-up bug.
Their tag line ought not to be Tomcat: doesn't work, but boy is it
fast. :(

-chris




signature.asc
Description: OpenPGP digital signature


Re: mod_jk configuration

2006-10-31 Thread Christopher Schultz
Bruno,

 Now I have an even stranger behavior...
 
 I can only JkMount /jsp-examples, I did the same to /tomcat-docs,
 /servlets-examples and /cocoon and I get :
 
 Forbidden
 You don't have permission to access /tomcat-docs/ on this server.
 Additionally, a 403 Forbidden error was encountered while trying to use an
 ErrorDocument to handle the request.

Tomcat is probably redirecting (302) /tomcat-docs to /tomcat-docs/
(note the trailing slash). Then, Apache httpd gets the new request and
refuses to serve it for whatever reason (probably a missing Allow
directive).

You probably need to have:

JkMount /tomcat-docs   ajp13
JkMount /tomcat-docs/  ajp13

 Here's my /etc/apache2/conf.d/jk.conf: 
 http://www.nabble.com/file/3921/jk.conf jk.conf 

(These are never coming through. How are you trying to attach files?)

-chris




signature.asc
Description: OpenPGP digital signature


RE: (FIXED) RE: tomcat can't serve HTML pages more than 48K in size

2006-10-31 Thread Caldarale, Charles R
 From: Alistair McDonald [mailto:[EMAIL PROTECTED] 
 Subject: (FIXED) RE: tomcat can't serve HTML pages more than 
 48K in size 
 
 Thanks for that. Solved the problem nicely.

By the way, I just tested with a 78k static HTML page on a near stock
5.5.20, and did not experience any problems in delivering the page.
Perhaps the issue you encountered with 5.5.9 is fixed in a later level.

 - 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]



Re: FW: question regarding 'mod_jk: error flushing'

2006-10-31 Thread Durk Strooisma
Hi all!

I'm wondering the same.

I've got four servers (two production machines and their testing counter
parts) running SUSE Linux Enterprise Server 9 with Apache 2, Tomcat 5, and
ModJK. Below the relevant packages are shown:

apache2   2.0.49-27.59
apache2-prefork   2.0.49-27.59
apache2-jakarta-tomcat-connectors 5.0.19-29.1
jakarta-tomcat5.0.19-29.1

Since June 2006 I'm getting lots of mod_jk: Error flushing \n on one
production system (and its testing system as well), but everything seems to
work fine... The other production system isn't affected.

It's kind of annoying that there's no timestamp shown in the error message.
Debugging is really tough this way. I'm wondering what it means and whether
it's harmless or not. Like Kevin states, nowhere on the internet this
question seems to answered.

Thanks in advance!

Durk

 Hello there,

 Does anyone know what is this 'mod_jk: error flushing' about? I am using
 Tomcat 5.0, Apache and Mod_JK in production environment and keep getting
 this error in error log. I do google search and find lots of persons
 asking this question but no answer. Can anybody having experience with
 this shed a light on what it might be and how to resolve it?

 Thanks a lot,

 Kevin Song



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



Problems with Tomcat 5.0.27 and Simple JNDI Examples

2006-10-31 Thread Mike Jackson


Hi folks,

I have been trying to get to grips with JNDI but cannot get data sources or 
bean factories - using the standard examples in the Tomcat user doc - but 
cannot get hardly anything to work.


I have the following declared in TOMCAT/webapps/axis/WEB-INF/web.xml after the 
session-mapping/ element and before the mime-mapping/ element.


resource-ref
  descriptionData Source Example/description
  res-ref-namejdbc/mikeDB/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
/resource-ref
resource-env-ref
  resource-env-ref-namesimpleValue/resource-env-ref-name
  resource-env-ref-typejava.lang.Integer/resource-env-ref-type
/resource-env-ref
resource-env-ref
  resource-env-ref-namevalue/someValue/resource-env-ref-name
  resource-env-ref-typejava.lang.String/resource-env-ref-type
/resource-env-ref
env-entry
  env-entry-namevalue/someDirectValue/env-entry-name
  env-entry-value10/env-entry-value
  env-entry-typejava.lang.Integer/env-entry-type
/env-entry
resource-env-ref
  descriptionObject factory for MyBean instances/description
  resource-env-ref-namebean/MyBeanFactory/resource-env-ref-name
  resource-env-ref-typecom.mycompany.MyBean/resource-env-ref-type
/resource-env-ref

In TOMCAT/conf/server.xml there is...

Server...
 GlobalNamingResources
   Environment name=simpleValue type=java.lang.Integer value=30/

I have the following TOMCAT/webapps/axis/META-INF/context.xml file:

Context debug=0 docBase=/home/michaelj/test/tomcatAxis/webapps/axis 
reloadable=true


 Resource name=jdbc/mikeDB
   auth=Container
   type=javax.sql.DataSource/
 ResourceParams name=jdbc/mikeDB
parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
   parameter
 nameusername/name
 valuedaitester/value
/parameter
parameter
 namepassword/name
 valueIt35tda1/value
/parameter
parameter
 namedriverClassName/name
 valueorg.gjt.mm.mysql.Driver/value
/parameter
parameter
 nameurl/name
 valuejdbc:mysql://coal.epcc.ed.ac.uk:3306/daitest/value
/parameter
  /ResourceParams
  Environment name=value/someValue
value=10
type=java.lang.String
override=true/
 ResourceLink name=simpleValue
global=simpleValue
type=java.lang.Integer/
 Resource name=bean/MyBeanFactory auth=Container
   type=com.mycompany.MyBean/
 ResourceParams name=bean/MyBeanFactory
parameter
  namefactory/name
  valueorg.apache.naming.factory.BeanFactory/value
/parameter
parameter
  namebar/name
  value23/value
/parameter
  /ResourceParams
/Context

I have my database driver in both TOMCAT/common/lib and 
TOMCAT/webapps/axis/WEB-INF/lib and my example bean in TOMCAT/common/classes 
and TOMCAT/webapps/axis/WEB-INF/classes.


Now when I run the following within a web service

 Context initCtx = new InitialContext();
 Context envCtx = (Context)initCtx.lookup(java:comp/env);

the context is accessed fine. But when I then do ctx.lookup() for each
of my declared resources:

 jdbc/mikeDB
 bean/MyBeanFactory
 value/someValue
 value/someDirectValue
 simpleValue

Then I get the following

-For jdbc/mikeDB I get
 object [EMAIL PROTECTED] as expected. -However 
running getConnection() on this throws

 Cannot create JDBC driver of class '' for connect URL 'null'
-For bean/MyBeanFactory
 value/someValue
 simpleValue
 I get:
 Cannot create resource instance
-The only one that works is value/someDirectValue for which
 I get 10 as expected.

Can anyone offer any clue as to why this is going wrong? Is there some piece of 
configuration I'm missing or have done wrong? Most of these examples were cut 
and paste from the user doc so I'm suprised that virtually nothing is returned 
from lookup() sucessfully.


Thanks,

mike

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



war file

2006-10-31 Thread Mário Gamito

Hi,

I've installed Tomcat and now i have this contineo.war file in the webapps
directory that it is supposed to become a web site.
Of course i'm a Tomcat newbie :(

Asking for your apologies in advance for such a newbie question, what am i
supposed to do with this file ?

Any help would be appreciated.

Best regards,
Mário Gamito


RE: Tomcat 6 and shared/lib, common/ and conf/catalina/localhost?

2006-10-31 Thread Per Johnsson

Thank you.

There was no mention in the doc about the removed libs.. I'm always
beeing little bit confused when things disapear whithout any mention it.

/Regards Per Jonsson
 

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: den 31 oktober 2006 14:52
To: Tomcat Users List
Subject: RE: Tomcat 6 and shared/lib, common/ and
conf/catalina/localhost?

 From: Per Johnsson [mailto:[EMAIL PROTECTED]
 Subject: Tomcat 6 and shared/lib, common/ and conf/catalina/localhost?
 
 I downloaded Tomcat 6 (the alpha I presume) the zipped version and I I

 noticed there was no directory for shared/lib, common/ and no 
 conf/Catalina. I Googled and read the doc and got no clue if there is 
 some changes in the lib structure which you should be aware of.

Read the doc again:
http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html

and this thread:
http://marc.theaimsgroup.com/?t=11618463222r=1w=2

Modify conf/catalina.properties as desired.

 Is the conf/Catalina created when first run and depending on the 
 server.xml?

It's only created when needed.  In previous versions of Tomcat, it was
always there to hold manager.xml and host-manager.xml, but in 6.0 these
apps are in the regular webapps directory and their Context tags are
stored with the app.

 - 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]



This e-mail and the information it contains may be privileged and/or
confidential.  It is for the intended addressee(s) only.
The unauthorised use, disclosure or copying of this e-mail, or any information 
it contains, is prohibited. 
If you are not an intended recipient, please contact the sender and delete the 
material 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: Tomcat 6 and shared/lib, common/ and conf/catalina/localhost?

2006-10-31 Thread Caldarale, Charles R
 From: Per Johnsson [mailto:[EMAIL PROTECTED] 
 Subject: RE: Tomcat 6 and shared/lib, common/ and 
 conf/catalina/localhost?
 
 There was no mention in the doc about the removed libs..

The diagram in the doc clearly shows the revised default class loader
hierarchy:

  Bootstrap
  |
   System
  |
   Common
   / \
  Webapp1   Webapp2 ... 

You can always put the extra layers and nodes back with changes to
conf/catalina.properties if you wish, but the new way is more efficient.

 - 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]



Re: war file

2006-10-31 Thread David Delbecq
I bet you put a .war file an expected to see the site working. It's not
that easy :)

The easiest way to deploy you .war in tomcat is to go to the manager
webapp (http://your host:your port/manager/html) and use the
'deploy' part. For the manager to allow you to work on tomcat
configuration, you need first to define an administrator account (and of
course install the manager web application if not already done).

All instructions here:
http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html
Mário Gamito a écrit :
 Hi,

 I've installed Tomcat and now i have this contineo.war file in the
 webapps
 directory that it is supposed to become a web site.
 Of course i'm a Tomcat newbie :(

 Asking for your apologies in advance for such a newbie question, what
 am i
 supposed to do with this file ?

 Any help would be appreciated.

 Best regards,
 Mário Gamito



-
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 install admin package in Tomcat

2006-10-31 Thread David Smith
Match up the directory structure in the .tar.gz file against tomcat's.  
The webapp itself goes in server/webapps with the manager webapp and the 
admin.xml file goes in conf/Catalina/localhost.


This is the second time inside a week this question has come up and it 
is answered in the FAQ:

http://wiki.apache.org/tomcat/HowTo#head-f50555909547d981d0e2b030323632b26047013e

--David

Mário Gamito wrote:


Hi,

I've installed Tomcat 5.5.20.

Now, i want to install the admin package. I've done this once, but i 
confess

that i don't recall anymore how i've done it.

My question is, where should i put the files from the admin tarball ?
The one i've downloaded is apache-tomcat-5.5.20-admin.tar.gz
I have Tomcat running in /usr/local/tomcat


Another questions regards the admin password. How can i set it ?

Any help would be appreciated.

Warm Regards,
Mário Gamtio




-
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: war file

2006-10-31 Thread David Delbecq
For manager, it's the manager role that is needed, not the admin role.

for 404, it says what it should, no such file :D
When you access manager you will see where it is mapped. There is a link
for all webapp deployed. I suggest you read the doc about the manager i
gave you a link to.

Mário Gamito a écrit :
 Hi David,

 On 10/31/06, David Delbecq [EMAIL PROTECTED] wrote:

 I bet you put a .war file an expected to see the site working. It's not
 that easy :)

 The easiest way to deploy you .war in tomcat is to go to the manager
 webapp (http://your host:your port/manager/html) and use the
 'deploy' part.

 It asks me for a login and a password which i don't know :(
 I've defined a user with the admin role in tomcat-users.xml, but
 they're not
 the right credentials :(

 The one thing i've done was placing the .war file in the webapps
 directory,
 then restart the server.
 This way, it created a new directory with all the files.
 Unfortunatelly, i get a 404.

 I've copied this directory to webapps/ROOT, but got the 404 all the same.

 Any ideas ?

 Best Regards,
 Mário Gamito



-
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: war file

2006-10-31 Thread Mikolaj Rydzewski

Mário Gamito wrote:

It asks me for a login and a password which i don't know :(
I've defined a user with the admin role in tomcat-users.xml, but 
they're not

the right credentials :(

It should me manager role, not admin one.

--
Mikolaj Rydzewski [EMAIL PROTECTED]



smime.p7s
Description: S/MIME Cryptographic Signature


Re: JNDIRealm exception

2006-10-31 Thread Martin Gainty
Hello


can we please see the statements leading up to NameParser.parse() method call
are you able to ldapsearch using DC and OU parameters without CN?

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: [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Tuesday, October 31, 2006 7:00 AM
Subject: JNDIRealm exception


 Problem with JNDIRealm 
 
 
 
 I successfully authenticate my users against active Directory 
 (single domain). But now I have a setup with trusted domains and the 
 authentication fails with the following exception.
 
 Everything is working fine if my user is in the domain ar-net.ch. 
 
 Now I want to authenticate a user in the Domain teufen.ar-net.ch. 
 As I see with Ethereal, referrals are followed and the user is found. 
 But the user is not authenticated and the log shows the following 
 exception.
 
 Tomcat server is 5.5.15 and java is 1.5.0_06
 
 
 
 Thank you for any clue
 
 
 
 
 
 Exception performing authentication
 
 javax.naming.InvalidNameException: Invalid name: ldap:
 
at javax.naming.ldap.Rfc2253Parser.doParse(Unknown 
 Source)
 
at javax.naming.ldap.Rfc2253Parser.parseDn(Unknown 
 Source)
 
at javax.naming.ldap.LdapName.parse(Unknown Source)
 
at javax.naming.ldap.LdapName.init(Unknown Source)
 
at com.sun.jndi.ldap.LdapNameParser.parse(Unknown 
 Source)
 
at org.apache.catalina.realm.JNDIRealm.getUserBySearch
 (JNDIRealm.java:1079)
 
at org.apache.catalina.realm.JNDIRealm.getUser
 (JNDIRealm.java:958)
 
at org.apache.catalina.realm.JNDIRealm.authenticate
 (JNDIRealm.java:907)
 
at org.apache.catalina.realm.JNDIRealm.authenticate
 (JNDIRealm.java:808)
 
at org.apache.catalina.authenticator.FormAuthenticator.
 authenticate(FormAuthenticator.java:257)
 
at org.apache.catalina.authenticator.AuthenticatorBase.
 invoke(AuthenticatorBase.java:416)
 
at org.apache.catalina.core.StandardHostValve.invoke
 (StandardHostValve.java:126)
 
at org.apache.catalina.valves.ErrorReportValve.invoke
 (ErrorReportValve.java:105)
 
at org.apache.catalina.core.StandardEngineValve.invoke
 (StandardEngineValve.java:107)
 
at org.apache.catalina.connector.CoyoteAdapter.service
 (CoyoteAdapter.java:148)
 
at org.apache.coyote.http11.Http11Processor.process
 (Http11Processor.java:869)
 
at org.apache.coyote.http11.
 Http11BaseProtocol$Http11ConnectionHandler.processConnection
 (Http11BaseProtocol.java:667)
 
at org.apache.tomcat.util.net.PoolTcpEndpoint.
 processSocket(PoolTcpEndpoint.java:527)
 
at org.apache.tomcat.util.net.
 LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
 
at org.apache.tomcat.util.threads.
 ThreadPool$ControlRunnable.run(ThreadPool.java:684)
 
at java.lang.Thread.run(Unknown Source)
 
 31.10.2006 08:57:59 org.apache.catalina.realm.JNDIRealm close
 
 
 
 Here is the config?
 
 
 
 Realm  name=myrealm 
 
 className=org.apache.catalina.realm.JNDIRealm debug=99
 
 connectionName=CN=dasquery,OU=Herisau-AR-NET,DC=ar-net,DC=ch
 
 connectionPassword=not public
 
 connectionURL=ldap://s1.ar-net.ch:389; 
 
 userBase=DC=ar-net,DC=ch
 
 userSubtree=true 
 
 userSearch=userPrincipalName=
 {0}
 
 roleName=cn
 
 roleSearch=(member={0})
 
 roleBase=OU=DASGROUPS,OU=Herisau-AR-NET,DC=ar-net,DC=ch
 
 referrals=follow
 
 /
 
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


Forcing a sync when a cluster member reconnects

2006-10-31 Thread Eric Demorsy

Hi,

I have configured a cluster of 2 tomcat servers and session sync is 
working fine, except for one point: if I unplug the network cable of one 
of the machines and plug it back, Tomcat does detect the fact that a 
member left the cluster, and also detects its return just fine, but no 
sync occurs when I plug back the cable. Thus, if a user query comes 
inbetween, the 2 servers of my cluster won't be syncronized. Is there a 
way to force a sync when a new cluster member is added ?


Thanks,
Eric

-
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 configuration

2006-10-31 Thread bcochofel



Christopher Schultz-2 wrote:
 
 Here's my /etc/apache2/conf.d/jk.conf: 
 http://www.nabble.com/file/3921/jk.conf jk.conf 
 
 (These are never coming through. How are you trying to attach files?)
 

I'm using Upload File... option. Here's a copy/paste:

# simple configuration for apache (for AJP connector, modul mod_jk.so)

IfModule mod_jk.c

# workers file
JkWorkersFile /etc/tomcat5/base/workers.properties
# log file
JkLogFile /usr/share/tomcat5/logs/mod_jk.log

# Set the jk log level [debug/error/info]
JkLogLevelinfo
# Select the log format
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
# JkOptions indicate to send SSL KEY SIZE,
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat set the request format
JkRequestLogFormat %w %V %T

### servlets-examples 

Alias /servlets-examples
/srv/www/tomcat5/base/webapps/servlets-examples
JkMount /servlets-examples ajp13
JkMount /servlets-examples/*  ajp13
#JkMount /servlets-examples/j_security_check ajp13

### jps-examples ##

Alias /jsp-examples /srv/www/tomcat5/base/webapps/jsp-examples
JkMount /jsp-examples ajp13
JkMount /jsp-examples/*.jsp  ajp13
JkMount /jsp-examples/j_security_check ajp13

### cocoon 

Alias /cocoon /srv/www/tomcat5/base/webapps/cocoon
JkMount /cocoon ajp13
JkMount /cocoon/*  ajp13
#JkMount /cocoon/j_security_check ajp13

 tomcat-docs ##

Alias /tomcat-docs /srv/www/tomcat5/base/webapps/tomcat-docs
JkMount /tomcat-docs ajp13
JkMount /tomcat-docs/*  ajp13
#JkMount /tomcat-docs/j_security_check ajp13

 security ##

# The following line prohibits users from directly accessing WEB-INF
Location /jsp-examples/WEB-INF/
AllowOverride None
deny from all
/Location
Location /servlets-examples/WEB-INF/
AllowOverride None
deny from all
/Location

/IfModule

-- 
View this message in context: 
http://www.nabble.com/mod_jk-configuration-tf2539505.html#a7096982
Sent from the Tomcat - User mailing list archive at Nabble.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]



RE: Can't login as manager

2006-10-31 Thread Caldarale, Charles R
 From: Mário Gamito [mailto:[EMAIL PROTECTED] 
 Subject: Can't login as manager
 
 I can't login in the above URL with the credentials gamito/abc123
 I've alrady restarted the server.

Verify that your changes persisted after the Tomcat restart.  Tomcat rewrites 
conf/tomcat-users.xml, and your modifications may have been lost if you updated 
it while Tomcat was running.  Also verify that Tomcat still has permission to 
read/write the file after you made changes.

 - 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]



Tomcat Ajp13 Connector hang

2006-10-31 Thread Ni Chen
Hi Folks,
We are having an issue that Ajp13 Connector being unresponsive. It happened 
about once a week. We are running one Apache 2.0, three Tomcat 4.1.27 and 
mod_jk 1.2.5 / Ajp13 on HP 11i boxes. 
We noticed that every time Ajp13 Connector received an exception (see below) 
when setting socket options, serverSocket was closed and reopened, 
===
serverSocket in Ajp13Connector got an exception when socket.setSoLinger(). 
2006-10-24 15:31:31 Ajp13Connector[9015] accept: 
java.net.SocketException: Invalid Character In Attribute Name.
 at java.net.PlainSocketImpl.socketSetOption(Native Method)
 at java.net.PlainSocketImpl.setOption(PlainSocketImpl.java:240)
 at java.net.Socket.setSoLinger(Socket.java:817)
 at org.apache.ajp.tomcat4.Ajp13Connector.run(Ajp13Connector.java:891)
 at java.lang.Thread.run(Thread.java:534)
2006-10-24 15:31:31 Ajp13Connector[9015] run():  not stopped, so reopening 
server socket
2006-10-24 15:31:31 Ajp13Connector[9015] Opening server socket on all host IP 
addresses
2006-10-24 15:31:31 Ajp13Connector[9015] accepting socket...
==
Ajp13 Connector was not able to process new connection requests any more. If we 
telnet it, we got timeout, and socket status is SYN_SENT. If we restart Tomcat, 
it works again.
Our Ajp13 Connector setting:
Connector className=org.apache.ajp.tomcat4.Ajp13Connector
   port=9015
   minProcessors=250
   maxProcessors=250
   acceptCount=50
   debug=7/
We don’t have special settings in worker.properties except 
worker.loadbalancer.stick_session=1
When this issue happens, Tomcat continues work on the established connections 
to handle requests, but eventually all sockets will be closed by Processors, 
and then Tomcat hang since no new connection could be established. However, we 
still see around 80 established connections in the netstat. 
Could it be other processes we forked in the tomcat that holding the 
connection, and then it caused socket file descriptor dead lock or unavailable?

Any comments are welcome!
Mao



-
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: war file

2006-10-31 Thread Mário Gamito

Hi David,

On 10/31/06, David Delbecq [EMAIL PROTECTED] wrote:


I bet you put a .war file an expected to see the site working. It's not
that easy :)

The easiest way to deploy you .war in tomcat is to go to the manager
webapp (http://your host:your port/manager/html) and use the
'deploy' part.


It asks me for a login and a password which i don't know :(
I've defined a user with the admin role in tomcat-users.xml, but they're not
the right credentials :(

The one thing i've done was placing the .war file in the webapps directory,
then restart the server.
This way, it created a new directory with all the files.
Unfortunatelly, i get a 404.

I've copied this directory to webapps/ROOT, but got the 404 all the same.

Any ideas ?

Best Regards,
Mário Gamito


RE: Tomcat 6 and shared/lib, common/ and conf/catalina/localhost?

2006-10-31 Thread Caldarale, Charles R
 From: Per Johnsson [mailto:[EMAIL PROTECTED] 
 Subject: Tomcat 6 and shared/lib, common/ and conf/catalina/localhost?
 
 I downloaded Tomcat 6 (the alpha I presume) the zipped version and I I
 noticed there was no directory for shared/lib, common/ and no
 conf/Catalina. I Googled and read the doc and got no clue if there is
 some changes in the lib structure which you should be aware of.

Read the doc again:
http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html

and this thread:
http://marc.theaimsgroup.com/?t=11618463222r=1w=2

Modify conf/catalina.properties as desired.

 Is the conf/Catalina created when first run and depending on the
 server.xml?

It's only created when needed.  In previous versions of Tomcat, it was
always there to hold manager.xml and host-manager.xml, but in 6.0 these
apps are in the regular webapps directory and their Context tags are
stored with the app.

 - 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]



Re: some bug

2006-10-31 Thread Javier Aparicio

HI, I'm in a similar situation. I had several applications running perfectly
in Tomcat 5.5.20 but when I try to configure the server with the APR and try
to get the certificate list in request only can get the CA certificate (not
the user certificate).

My connector configuration is the following:
Connector port=8443 maxHttpHeaderSize=8192
  maxThreads=150 minSpareThreads=25 maxSpareThreads=75
  enableLookups=false disableUploadTimeout=true
  acceptCount=100 scheme=https secure=true
  SSLVerifyClient=require SSLEngine=on SSLVerifyDepth=3
sslProtocol=TLSv1
  SSLOptions=+StdEnvVars +CompatEnvVars +ExportCertData
  SSLCertificateFile=${catalina.base}/conf/localhost_pem.crt
  SSLCertificateKeyFile=${catalina.base}/conf/localhost.key
  SSLCACertificateFile=${catalina.base}/conf/SSLCACertificateFile.pem
  SSLCACertificatePath=${catalina.base}/conf/ssl.crt/
  SSLCertificateChainFile=${catalina.base}/conf/SSLCACertificateFile.pem
  SSLCertificateChainPath=${catalina.base}/conf/ssl.crt/
  SSLCADNRequestFile=${catalina.base}/conf/SSLCACertificateFile.pem
  SSLCADNRequestPath=${catalina.base}/conf/ssl.crt/ /

My test page try to show all variables I've could to think...

=== JSP ===
%@ page pageEncoding=ISO-8859-1 autoFlush=true %
%@ page contentType=text/html; charset=ISO-8859-1 %
%@ page errorPage=/error.jsp %
%@ page import=java.util.* %
%@ page import=java.security.cert.X509Certificate %
%

System.out.println(Informacion de entorno.);

//-- Recogemos parametros
X509Certificate[] userCertificates  = (X509Certificate[])
request.getAttribute(javax.servlet.request.X509Certificate);
if ( userCertificates == null ){ throw new Exception(Es necesario un
certificado de Ciudadano para el acceso seguro a la aplicación.); }

StringBuffer sbCer = new StringBuffer();
for( int iUserCerts=0; iUserCerts  userCertificates.length; 
iUserCerts++
){
sbCer.append(pCertificado[ + iUserCerts + ]:br +
userCertificates[iUserCerts].getSubjectDN().getName() + /p);
}


//-- Lectura de Atributos del request
StringBuffer sbAtr = new StringBuffer();
Enumeration en = request.getAttributeNames();
  while( en.hasMoreElements() ){
String key = en.nextElement().toString();
Object val = request.getAttribute(key);
sbAtr.append(p + key + :   + val + /p);
}
en = null;


//-- Lectura de Parametros del request
StringBuffer sbPar = new StringBuffer();
en = request.getParameterNames();
  while( en.hasMoreElements() ){
String key = en.nextElement().toString();
Object val = request.getParameter(key);
sbPar.append(p + key + :   + val + /p);
}
en = null;


//-- Lectura de Headers del request
StringBuffer sbHea = new StringBuffer();
en = request.getHeaderNames();
  while( en.hasMoreElements() ){
String key = en.nextElement().toString();
Object val = request.getHeader(key);
sbHea.append(p + key + :   + val + /p);
}
en = null;

//-- Lectura de Propiedades del Sistema
StringBuffer sbPro = new StringBuffer();
en = System.getProperties().keys();
  while( en.hasMoreElements() ){
String key = en.nextElement().toString();
Object val = System.getProperty(key);
sbPro.append(p + key + :   + val + /p);
}
en = null;


%
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
html
head
titleInfo/title
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
/head

body
table border=1 cellpadding=1 cellspacing=0
tr
tdnbsp;CERTIFICADOS:/td
tdnbsp;%= sbCer.toString() %/td
/tr
tr
tdnbsp;ATRIBUTOS:/td
tdnbsp;%= sbAtr.toString() %/td
/tr
tr
tdnbsp;PARAMETROS:/td
tdnbsp;%= sbPar.toString() %/td
/tr
tr
tdnbsp;CABECERAS:/td
tdnbsp;%= sbHea.toString() %/td
/tr
tr
tdnbsp;SYSTEM:/td
tdnbsp;%= sbPro.toString() %/td
/tr
/table
/body
/html


=== /JSP ===



Any sugestions?

Thanks in advance!!



Сергей Ковтун wrote:
 
 В , Caldarale, Charles R [EMAIL PROTECTED] писал:
 
 SSL configuration is different with APR (tcnative-1.dll).
 I have adjusted and now all works, for exception of one
 now I cannot obtain the data of the certificate of the client in Servlet
 X509Certificate [] 

Re: war file

2006-10-31 Thread Mário Gamito

Hi,

For manager, it's the manager role that is needed, not the admin role.

My tomcat-users.xml file is:

?xml version='1.0' encoding='utf-8'?
tomcat-users
 role rolename=tomcat/
 role rolename=role1/
 role rolename=manager/
 role rolename=admin/
 user username=tomcat password=tomcat roles=tomcat/
 user username=both password=tomcat roles=tomcat,role1/
 user username=role1 password=tomcat roles=role1/
 user username=manager password=123qwe roles=manager/
/tomcat-users


but i can't login as manager :(

Is there anything wrong with it ?

Warm Regards,
Mário Gamito


RE: StandartSession.accessCount bug?

2006-10-31 Thread Michael Kantarovich
So you could use concurrency utilities as an external jar (back port
from Java5) which is available for 1.4. 
They claim being able updating longs without locking java-level locks
...

http://dcl.mathcs.emory.edu/util/backport-util-concurrent/


-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 31, 2006 2:32 PM
To: Tomcat Users List
Subject: Re: StandartSession.accessCount bug?

Michael Kantarovich wrote:
 Guys,
  
 Did you consider to use java.util.concurrent.atomic.AtomicLong ?

No, since this is a Java 5 class and TC5 will run on a 1.4 JVM providing
a couple of additional JARs are present.

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]



Session is lost

2006-10-31 Thread Eugene Razorenov

Hello,
please help me to find the reason of the problem?
I have a strange situations with sessions.
   Server: Jboss(Tomcat 5.5.17)
   Servlet engine version: 2.4
   Java version: 1.4.2-b28
When I submit the Form using method POST, I get new session instead of 
my current session. I see it from method doFilter() in LoginFilter. The 
Form are submitted from JSP (fileUpload.jsp) that was opened by 
JavaScript command window.showModalDialog(...)
Tomcat works by using cookies. The current session is not expired, JSP 
(fileUpload.jsp) gets right session and right cookies. I have tried to 
transfer url to Server in format 
http://localhost:8080/xxx/xxx/fileUpload.jsp;jsessionid=x; 
but Server works by using Cookies only, not URL-rewriting, so it doesn't 
help me.

Why Server creates new session in my situation?

When fileUpload.jsp is loaded, I can get next information:
from cookies: true
from url: false
is new: false
is valid: true
session is not expired

There is some code fragments:

actions.xml
..
action url=fileUpload.do 
screen=properties/common/fileupload/fileUpload.jsp

classefi.base.web.framework.AckAction/class
/action
action url=loadFile.do screen=properties/form/loadFile.jsp
classefi.processDef.web.LoadFileAction/class
/action
..

web.xml contents:

filter-mapping
filter-nameLoginFilter/filter-name
url-pattern*.do/url-pattern
/filter-mapping
filter-mapping
filter-nameCompression Filter/filter-name
url-pattern*.do/url-pattern
/filter-mapping
filter-mapping
filter-nameLoginFilter/filter-name
url-pattern*.jsp/url-pattern
/filter-mapping
filter-mapping
filter-nameCompression Filter/filter-name
url-pattern*.jsp/url-pattern
/filter-mapping


LoginFilter.java contents:

public void doFilter(
ServletRequest request,
ServletResponse response,
FilterChain chain)
throws IOException, ServletException {
HttpServletRequest hreq = (HttpServletRequest) request;
String currentURL =
hreq.getRequestURI().substring(hreq.getContextPath().length() + 1);
if (! requiresAuthentication(currentURL)) {
chain.doFilter(request, response); // proceed to resource
return;
}
String loggedIn =
(String) hreq.getSession().getAttribute(WebKeys.LOGGED_IN_STRING);
if (loggedIn != null) {
chain.doFilter(request, response);
return;
} else {
filterConfig.getServletContext().getRequestDispatcher(this.loginPage).forward(
request, response);
return;
}
}
}


fileUpload.jsp - the jsp page in modal Dialog window:

form name=form action=loadFile.do method=POST 
enctype=multipart/form-data onsubmit=checkData();



--
Thanks,
Eugene Razorenov


-
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 can't serve HTML pages more than 48K in size

2006-10-31 Thread Caldarale, Charles R
 From: Alistair McDonald [mailto:[EMAIL PROTECTED] 
 Subject: tomcat can't serve HTML pages more than 48K in size
 
 Tomcat happily serves up pages up to 48K in size, but above 
 that size it returns an error to the browser:

There's an interesting 48k setting in conf/web.xml for the
DefaultServlet that might be pertinent:

sendfileSizeIf the connector used supports sendfile, this
represents the minimal file size in KB for
which sendfile will be used. Use a negative
value to always disable sendfile.  [48]

Might want to turn on debugging for that servlet and see if anything
shows up in the logs.  Set it larger than 10 to see everything.

 - 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]



Re: mod_jk configuration

2006-10-31 Thread Christopher Schultz
Bruno,

bcochofel wrote:
 Christopher Schultz-2 wrote:
 Here's my /etc/apache2/conf.d/jk.conf: 
 http://www.nabble.com/file/3921/jk.conf jk.conf 
 (These are never coming through. How are you trying to attach files?)

 
 I'm using Upload File... option.

Hmm... I didn't know that one could upload file to an email...
consider using copy/paste in the future. It seems to have worked, here.

 ### jps-examples ##
 Alias /jsp-examples /srv/www/tomcat5/base/webapps/jsp-examples
 JkMount /jsp-examples ajp13
 JkMount /jsp-examples/*.jsp  ajp13
 JkMount /jsp-examples/j_security_check ajp13

Note that the URI /jsp-examples/ is not covered by these mappings.
Apache httpd (and Tomcat) will do exactly what you ask of them, but no
more. If the URI is off by a single character (in this case, a trailing
'/'), then the request won't be forwarded to Tomcat.

 ### cocoon 
 Alias /cocoon /srv/www/tomcat5/base/webapps/cocoon
 JkMount /cocoon ajp13
 JkMount /cocoon/*  ajp13

No, this one ought to work with a trailing /, since you have a mapping
for /cocoon/*. This includes /cocoon/.

You seem to be missing this mapping for the jsp-examples webapp, but
the others have it.

Just be careful about what you do and do not map. You can usually find
the problem by reading your own configuration closely.

Hope that helps,
-chris




signature.asc
Description: OpenPGP digital signature


Servlet RMI problem File Permission

2006-10-31 Thread anil


Hi -

I've been trying to solve a problem for quite some time now and I can't seem
to find the solution.

Basically I have a servlet running under tomcat (5.5.17) which is acting as
an RMI client, looking up to a EJB running under jboss (3.2.5).

I can successfully connect to the EJB via a stand-alone application but when
I try and connect to the EJB via a servlet I run into problems. Basically
the stack trace is as follows:


javax.naming.NoInitialContextException: Cannot instantiate class:
org.jnp.interfaces.NamingContextFactory [Root exception is
java.security.AccessControlException: access denied (java.io.FilePermission
\C:\Program Files\Apache\apache-tomcat-5.5.17\common\lib\jbossall-client.jar
read)]
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at
com.semantico.depp.drm.manager.impl.AdobeDRMManager.applyPolicy(AdobeDRMManager.java:326)
at
com.semantico.depp.reader.servlets.SendDRMFile.doGet(SendDRMFile.java:118)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
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
com.semantico.depp.acs.filters.authentication.CredentialsGatherer.doHttpFilter(CredentialsGatherer.java:103)
at 
com.semantico.depp.acs.filters.HTTPFilter.doFilter(HTTPFilter.java:68)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
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
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
Caused by: java.security.AccessControlException: access denied
(java.io.FilePermission \C:\Program
Files\Apache\apache-tomcat-5.5.17\common\lib\jbossall-client.jar read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.net.URLClassLoader$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.getPermissions(Unknown Source)
at java.security.SecureClassLoader.getProtectionDomain(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 java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1339)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)

As you can see the issue seems to be a FilePermissions one, but I don't
really understand why.

Firstly, I'm not running tomcat with the security manager (or atleast I
don't think I am - I am running it through the eclipse plugin and I have the
'launch with security manager' setting 

AW: Re: JNDIRealm exception

2006-10-31 Thread [EMAIL PROTECTED]

This is the code (JNDIRealm)

// Get the entry's distinguished name
NameParser parser = context.getNameParser();
Name contextName = parser.parse(context.
getNameInNamespace());
Name baseName = parser.parse(userBase);

// Bugzilla 32269
Name entryName = parser.parse(new CompositeName(result.
getName()).get(0));

Name name = contextName.addAll(baseName);
name = name.addAll(entryName);
String dn = name.toString();


The line 1079 where the exception occurs is right after the 
//Bugzilla statement. In Attachment you find the whole JNDIRealm.
java



Ursprüngliche Nachricht
Von: [EMAIL PROTECTED]
Datum: 31.10.2006 15:14
An: Tomcat Users Listusers@tomcat.apache.org, [EMAIL PROTECTED]
ch
Betreff: Re: JNDIRealm exception

Hello


can we please see the statements leading up to NameParser.parse() 
method call
are you able to ldapsearch using DC and OU parameters without CN?

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: [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Tuesday, October 31, 2006 7:00 AM
Subject: JNDIRealm exception


 Problem with JNDIRealm 
 
 
 
 I successfully authenticate my users against active Directory 
 (single domain). But now I have a setup with trusted domains and 
the 
 authentication fails with the following exception.
 
 Everything is working fine if my user is in the domain ar-net.
ch. 
 
 Now I want to authenticate a user in the Domain teufen.ar-net.
ch. 
 As I see with Ethereal, referrals are followed and the user is 
found. 
 But the user is not authenticated and the log shows the 
following 
 exception.
 
 Tomcat server is 5.5.15 and java is 1.5.0_06
 
 
 
 Thank you for any clue
 
 
 
 
 
 Exception performing authentication
 
 javax.naming.InvalidNameException: Invalid name: ldap:
 
at javax.naming.ldap.Rfc2253Parser.doParse(Unknown 
 Source)
 
at javax.naming.ldap.Rfc2253Parser.parseDn(Unknown 
 Source)
 
at javax.naming.ldap.LdapName.parse(Unknown Source)
 
at javax.naming.ldap.LdapName.init(Unknown Source)
 
at com.sun.jndi.ldap.LdapNameParser.parse(Unknown 
 Source)
 
at org.apache.catalina.realm.JNDIRealm.
getUserBySearch
 (JNDIRealm.java:1079)
 
at org.apache.catalina.realm.JNDIRealm.getUser
 (JNDIRealm.java:958)
 
at org.apache.catalina.realm.JNDIRealm.authenticate
 (JNDIRealm.java:907)
 
at org.apache.catalina.realm.JNDIRealm.authenticate
 (JNDIRealm.java:808)
 
at org.apache.catalina.authenticator.
FormAuthenticator.
 authenticate(FormAuthenticator.java:257)
 
at org.apache.catalina.authenticator.
AuthenticatorBase.
 invoke(AuthenticatorBase.java:416)
 
at org.apache.catalina.core.StandardHostValve.invoke
 (StandardHostValve.java:126)
 
at org.apache.catalina.valves.ErrorReportValve.invoke
 (ErrorReportValve.java:105)
 
at org.apache.catalina.core.StandardEngineValve.
invoke
 (StandardEngineValve.java:107)
 
at org.apache.catalina.connector.CoyoteAdapter.
service
 (CoyoteAdapter.java:148)
 
at org.apache.coyote.http11.Http11Processor.process
 (Http11Processor.java:869)
 
at org.apache.coyote.http11.
 Http11BaseProtocol$Http11ConnectionHandler.processConnection
 (Http11BaseProtocol.java:667)
 
at org.apache.tomcat.util.net.PoolTcpEndpoint.
 processSocket(PoolTcpEndpoint.java:527)
 
at org.apache.tomcat.util.net.
 LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:
80)
 
at org.apache.tomcat.util.threads.
 ThreadPool$ControlRunnable.run(ThreadPool.java:684)
 
at java.lang.Thread.run(Unknown Source)
 
 31.10.2006 08:57:59 org.apache.catalina.realm.JNDIRealm close
 
 
 
 Here is the config?
 
 
 
 Realm  name=myrealm 
 
 className=org.apache.catalina.realm.JNDIRealm debug=99
 
 connectionName=CN=dasquery,OU=Herisau-AR-NET,DC=ar-net,DC=ch
 
 connectionPassword=not public
 
 connectionURL=ldap://s1.ar-net.ch:389; 
 
 userBase=DC=ar-net,DC=ch
 
 userSubtree=true 
 
 userSearch=userPrincipalName=
 {0}
 
 roleName=cn
 
 roleSearch=(member={0})
 
 roleBase=OU=DASGROUPS,OU=Herisau-AR-NET,DC=ar-net,DC=ch
 
 referrals=follow
 
 /
 
 
 
 
-
 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, 

Re: mod_jk configuration

2006-10-31 Thread bcochofel



Christopher Schultz-2 wrote:
 
 Hmm... I didn't know that one could upload file to an email...
 consider using copy/paste in the future. It seems to have worked, here.
 

I'm using www.nabble.com...


Christopher Schultz-2 wrote:
 
 ### jps-examples ##
 Alias /jsp-examples /srv/www/tomcat5/base/webapps/jsp-examples
 JkMount /jsp-examples ajp13
 JkMount /jsp-examples/*.jsp  ajp13
 JkMount /jsp-examples/j_security_check ajp13
 
 Note that the URI /jsp-examples/ is not covered by these mappings.
 Apache httpd (and Tomcat) will do exactly what you ask of them, but no
 more. If the URI is off by a single character (in this case, a trailing
 '/'), then the request won't be forwarded to Tomcat.
 

Well, this one works great, with or without the trailing /...


Christopher Schultz-2 wrote:
 
 ### cocoon 
 Alias /cocoon /srv/www/tomcat5/base/webapps/cocoon
 JkMount /cocoon ajp13
 JkMount /cocoon/*  ajp13
 
 No, this one ought to work with a trailing /, since you have a mapping
 for /cocoon/*. This includes /cocoon/.
 

This one works and all the others but tomcat does the job for all the files
(static content and all)
What I wan't to do is let Apache serve static content and tomcat serve
dynamic one...
In the /jsp-examples everything works fine... I have images, index.html and
I can run .jsp...
This is the strange problem I've mentioned.

-- 
View this message in context: 
http://www.nabble.com/mod_jk-configuration-tf2539505.html#a7098777
Sent from the Tomcat - User mailing list archive at Nabble.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]



Re: Problems with Tomcat 5.0.27 and Simple JNDI Examples

2006-10-31 Thread David Smith

A couple of thoughts:

1. There should only be one mysql driver .jar file and it should be in 
common/lib.  Please remove the one in your WEB-INF/lib directory
2. The driver org.gjt.mm.mysql.Driver is depricated (has been for a VERY 
long time).  Update it to com.mysql.jdbc.Driver.
3. You might want to consider obscuring your database password when 
posting to the list.


Not sure about the bean factories or the value resources as I don't work 
with them.


--David

Mike Jackson wrote:


Hi folks,

I have been trying to get to grips with JNDI but cannot get data 
sources or bean factories - using the standard examples in the Tomcat 
user doc - but cannot get hardly anything to work.


I have the following declared in TOMCAT/webapps/axis/WEB-INF/web.xml 
after the session-mapping/ element and before the mime-mapping/ 
element.


resource-ref
  descriptionData Source Example/description
  res-ref-namejdbc/mikeDB/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
/resource-ref
resource-env-ref
  resource-env-ref-namesimpleValue/resource-env-ref-name
  resource-env-ref-typejava.lang.Integer/resource-env-ref-type
/resource-env-ref
resource-env-ref
  resource-env-ref-namevalue/someValue/resource-env-ref-name
  resource-env-ref-typejava.lang.String/resource-env-ref-type
/resource-env-ref
env-entry
  env-entry-namevalue/someDirectValue/env-entry-name
  env-entry-value10/env-entry-value
  env-entry-typejava.lang.Integer/env-entry-type
/env-entry
resource-env-ref
  descriptionObject factory for MyBean instances/description
  resource-env-ref-namebean/MyBeanFactory/resource-env-ref-name
  resource-env-ref-typecom.mycompany.MyBean/resource-env-ref-type
/resource-env-ref

In TOMCAT/conf/server.xml there is...

Server...
 GlobalNamingResources
   Environment name=simpleValue type=java.lang.Integer value=30/

I have the following TOMCAT/webapps/axis/META-INF/context.xml file:

Context debug=0 
docBase=/home/michaelj/test/tomcatAxis/webapps/axis reloadable=true


 Resource name=jdbc/mikeDB
   auth=Container
   type=javax.sql.DataSource/
 ResourceParams name=jdbc/mikeDB
parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
   parameter
 nameusername/name
 valuedaitester/value
/parameter
parameter
 namepassword/name
 valueIt35tda1/value
/parameter
parameter
 namedriverClassName/name
 valueorg.gjt.mm.mysql.Driver/value
/parameter
parameter
 nameurl/name
 valuejdbc:mysql://coal.epcc.ed.ac.uk:3306/daitest/value
/parameter
  /ResourceParams
  Environment name=value/someValue
value=10
type=java.lang.String
override=true/
 ResourceLink name=simpleValue
global=simpleValue
type=java.lang.Integer/
 Resource name=bean/MyBeanFactory auth=Container
   type=com.mycompany.MyBean/
 ResourceParams name=bean/MyBeanFactory
parameter
  namefactory/name
  valueorg.apache.naming.factory.BeanFactory/value
/parameter
parameter
  namebar/name
  value23/value
/parameter
  /ResourceParams
/Context

I have my database driver in both TOMCAT/common/lib and 
TOMCAT/webapps/axis/WEB-INF/lib and my example bean in 
TOMCAT/common/classes and TOMCAT/webapps/axis/WEB-INF/classes.


Now when I run the following within a web service

 Context initCtx = new InitialContext();
 Context envCtx = (Context)initCtx.lookup(java:comp/env);

the context is accessed fine. But when I then do ctx.lookup() for each
of my declared resources:

 jdbc/mikeDB
 bean/MyBeanFactory
 value/someValue
 value/someDirectValue
 simpleValue

Then I get the following

-For jdbc/mikeDB I get
 object [EMAIL PROTECTED] as expected. 
-However running getConnection() on this throws

 Cannot create JDBC driver of class '' for connect URL 'null'
-For bean/MyBeanFactory
 value/someValue
 simpleValue
 I get:
 Cannot create resource instance
-The only one that works is value/someDirectValue for which
 I get 10 as expected.

Can anyone offer any clue as to why this is going wrong? Is there some 
piece of configuration I'm missing or have done wrong? Most of these 
examples were cut and paste from the user doc so I'm suprised that 
virtually nothing is returned from lookup() sucessfully.


Thanks,

mike

-
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: war file

2006-10-31 Thread Mário Gamito

Hi,

On 10/31/06, Mikolaj Rydzewski [EMAIL PROTECTED] wrote:


Mário Gamito wrote:
 It asks me for a login and a password which i don't know :(
 I've defined a user with the admin role in tomcat-users.xml, but
 they're not
 the right credentials :(
It should me manager role, not admin one.
Yes, i already have this lines in tomcat-users.xml:



 role rolename=manager/
 user username=manager password=123qwe roles=manager/

but i can't login, i don't know why :(

Any ideas ?

Warm Regards,
Mário Gamito


Can't login as manager

2006-10-31 Thread Mário Gamito

Hi,

I'm trying to login as manager in Tomcat, but i can't.
The URL is: http://lx0scr1:8080/manager/html/

My tomcat-users.xml file is:

?xml version='1.0' encoding='utf-8'?
tomcat-users
 role rolename=tomcat/
 role rolename=role1/
 role rolename=manager/
 role rolename=admin/
 user username=gamito password=abc123 fullName=Mario Gamito
roles=manager/
 user username=tomcat password=tomcat roles=tomcat/
 user username=role1 password=tomcat roles=role1/
 user username=both password=tomcat roles=tomcat,role1/
 user username=admin password=123qwe roles=admin/
/tomcat-users
--

I can't login in the above URL with the credentials gamito/abc123

I've alrady restarted the server.

Any help would be appreciated.

Warm Regards,
Mário Gamito


RE: war file

2006-10-31 Thread Caldarale, Charles R
 From: Mário Gamito [mailto:[EMAIL PROTECTED] 
 Subject: Re: war file
 
 The one thing i've done was placing the .war file in the 
 webapps directory, then restart the server.

That should be sufficient, if autoDeploy is enabled (it is by default).

 This way, it created a new directory with all the files.

Where did it create the new directory?  This should only happen if unpackWars 
is set to true.

 Unfortunatelly, i get a 404.

What is the name of the .war file?  What URL do you use to try to access it?  
What's in the WEB-INF/web.xml file inside the .war?

 I've copied this directory to webapps/ROOT

A completely incorrect thing to do.  You need to clean out that mess before 
proceeding.

 - 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]



tomcat can't serve HTML pages more than 48K in size

2006-10-31 Thread Alistair McDonald

Hi all.

I have a tomcat 5.5.9 installation set up. I only use it to serve HTML
pages - no JSP. The HTML is doxygen generated, and validates as HTML 4.01
according to the w3 validator.

Tomcat happily serves up pages up to 48K in size, but above that size it
returns an error to the browser:

BEGIN ERROR MESSAGE
HTTP Status 404 - /builds/pages/html/classes.html

type Status report

message /builds/pages/html/classes.html

description The requested resource (/builds/pages/html/classes.html) is
not available.
Apache Tomcat/5.5.9
END ERROR MESSAGE


I can take a file just under 48K in size, and it's served OK. Then, I can
edit the file, making it more than 48K, and tomcat fails to serve it. It's
not the permissions on the file, only the size that changes.

There is nothing in the error log pertaining to the 404 error, even with
debug information being logged.

Does anyone have any idea what I can do to fix this?

Cheers,
Alistair
-- 
Alistair McDonald, InRevo Ltd (http://www.inrevo.com)
Author of the SpamAssassin book: (http://www.packtpub.com/spamassassin/)
Tel: 07017 467 396 (Office) / 07812 829 020 (Mobile)


-
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 configuration

2006-10-31 Thread Christopher Schultz
Bruno,

 Hmm... I didn't know that one could upload file to an email...
 consider using copy/paste in the future. It seems to have worked, here.
 
 I'm using www.nabble.com...

Ah. I think the list will clip-out attachments. I'm not sure of the
rules, but copy/paste pretty much always works.

 JkMount /cocoon/*  ajp13
 
 This one works and all the others but tomcat does the job for all the files
 (static content and all)

That's because you said anything that starts with /cocoon/ should go
to Tomcat. If you don't want Tomcat to serve those files, then don't use
that kind of JkMount directive.

 What I wan't to do is let Apache serve static content and tomcat serve
 dynamic one...

Apache httpd can only test based upon URI... it has no idea if a
resource will be static or dynamic. You have to map your URIs appropriately.

 In the /jsp-examples everything works fine... I have images, index.html and
 I can run .jsp...
 This is the strange problem I've mentioned.

It's not strange at all: you told Tomcat to handle everything (for
example) for /cocoon/*. That's /everything/, regardless of it's
static-ness. If you know that cocoon is required for 25 different URIs,
then simply list them all. Or, if you know that cocoon only serves
content for URIs more like this:

/cocoon/a/b/c/*.html

...then only map that portion of the URI space into Tomcat.

Apache httpd is doing /exactly/ what you've asked it to do. You just
need to configure it to do what you want it to do.

-chris



signature.asc
Description: OpenPGP digital signature


(FIXED) RE: tomcat can't serve HTML pages more than 48K in size

2006-10-31 Thread Alistair McDonald
Chuck,

Thanks for that. Solved the problem nicely.

Cheers,

Alistair


 From: Alistair McDonald [mailto:[EMAIL PROTECTED]
 Subject: tomcat can't serve HTML pages more than 48K in size

 Tomcat happily serves up pages up to 48K in size, but above
 that size it returns an error to the browser:

 There's an interesting 48k setting in conf/web.xml for the
 DefaultServlet that might be pertinent:

 sendfileSizeIf the connector used supports sendfile, this
 represents the minimal file size in KB for
 which sendfile will be used. Use a negative
 value to always disable sendfile.  [48]

 Might want to turn on debugging for that servlet and see if anything
 shows up in the logs.  Set it larger than 10 to see everything.

  - 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]




-- 
Alistair McDonald, InRevo Ltd (http://www.inrevo.com)
Author of the SpamAssassin book: (http://www.packtpub.com/spamassassin/)
Tel: 07017 467 396 (Office) / 07812 829 020 (Mobile)


-
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: Problems with Tomcat 5.0.27 and Simple JNDI Examples

2006-10-31 Thread Mike Jackson


Hi David,

On Tue, 31 Oct 2006, David Smith wrote:


A couple of thoughts:
1. There should only be one mysql driver .jar file and it should be in 
common/lib.  Please remove the one in your WEB-INF/lib directory
2. The driver org.gjt.mm.mysql.Driver is depricated (has been for a VERY long 
time).  Update it to com.mysql.jdbc.Driver.


OK thanks.

3. You might want to consider obscuring your database password when posting 
to the list.


Somewhere between composing the e-mail and sending I forgot the 
obfuscation step.


mike

Not sure about the bean factories or the value resources as I don't work with 
them.


--David

Mike Jackson wrote:


Hi folks,

I have been trying to get to grips with JNDI but cannot get data sources or 
bean factories - using the standard examples in the Tomcat user doc - but 
cannot get hardly anything to work.


I have the following declared in TOMCAT/webapps/axis/WEB-INF/web.xml after 
the session-mapping/ element and before the mime-mapping/ element.


resource-ref
  descriptionData Source Example/description
  res-ref-namejdbc/mikeDB/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
/resource-ref
resource-env-ref
  resource-env-ref-namesimpleValue/resource-env-ref-name
  resource-env-ref-typejava.lang.Integer/resource-env-ref-type
/resource-env-ref
resource-env-ref
  resource-env-ref-namevalue/someValue/resource-env-ref-name
  resource-env-ref-typejava.lang.String/resource-env-ref-type
/resource-env-ref
env-entry
  env-entry-namevalue/someDirectValue/env-entry-name
  env-entry-value10/env-entry-value
  env-entry-typejava.lang.Integer/env-entry-type
/env-entry
resource-env-ref
  descriptionObject factory for MyBean instances/description
  resource-env-ref-namebean/MyBeanFactory/resource-env-ref-name
  resource-env-ref-typecom.mycompany.MyBean/resource-env-ref-type
/resource-env-ref

In TOMCAT/conf/server.xml there is...

Server...
 GlobalNamingResources
   Environment name=simpleValue type=java.lang.Integer value=30/

I have the following TOMCAT/webapps/axis/META-INF/context.xml file:

Context debug=0 docBase=/home/michaelj/test/tomcatAxis/webapps/axis 
reloadable=true


 Resource name=jdbc/mikeDB
   auth=Container
   type=javax.sql.DataSource/
 ResourceParams name=jdbc/mikeDB
parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
   parameter
 nameusername/name
 valuedaitester/value
/parameter
parameter
 namepassword/name
 valueIt35tda1/value
/parameter
parameter
 namedriverClassName/name
 valueorg.gjt.mm.mysql.Driver/value
/parameter
parameter
 nameurl/name
 valuejdbc:mysql://coal.epcc.ed.ac.uk:3306/daitest/value
/parameter
  /ResourceParams
  Environment name=value/someValue
value=10
type=java.lang.String
override=true/
 ResourceLink name=simpleValue
global=simpleValue
type=java.lang.Integer/
 Resource name=bean/MyBeanFactory auth=Container
   type=com.mycompany.MyBean/
 ResourceParams name=bean/MyBeanFactory
parameter
  namefactory/name
  valueorg.apache.naming.factory.BeanFactory/value
/parameter
parameter
  namebar/name
  value23/value
/parameter
  /ResourceParams
/Context

I have my database driver in both TOMCAT/common/lib and 
TOMCAT/webapps/axis/WEB-INF/lib and my example bean in 
TOMCAT/common/classes and TOMCAT/webapps/axis/WEB-INF/classes.


Now when I run the following within a web service

 Context initCtx = new InitialContext();
 Context envCtx = (Context)initCtx.lookup(java:comp/env);

the context is accessed fine. But when I then do ctx.lookup() for each
of my declared resources:

 jdbc/mikeDB
 bean/MyBeanFactory
 value/someValue
 value/someDirectValue
 simpleValue

Then I get the following

-For jdbc/mikeDB I get
 object [EMAIL PROTECTED] as expected. 
-However running getConnection() on this throws

 Cannot create JDBC driver of class '' for connect URL 'null'
-For bean/MyBeanFactory
 value/someValue
 simpleValue
 I get:
 Cannot create resource instance
-The only one that works is value/someDirectValue for which
 I get 10 as expected.

Can anyone offer any clue as to why this is going wrong? Is there some 
piece of configuration I'm missing or have done wrong? Most of these 
examples were cut and paste from the user doc so I'm suprised that 
virtually nothing is returned from lookup() sucessfully.


Thanks,

mike

-
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]



---
Dr. Michael (Mike) 

RE: tomcat can't serve HTML pages more than 48K in size

2006-10-31 Thread CANADAFAST INC.
Hello!
   
  I am experiencing some strange html problems in tomcat. I am using the Apache 
Tomcat 5.5.20 Server
   
  The problem is strange to describe. I am trying to enable some vidoe clips 
files to be downloaded by users, but unfortunatley instead of downloading it 
opens up the garbage text on the webpage, just like if u try to open a media 
file in notepad or wordpad. It does not allow to download the media files.
   
  But when I try running the html page outside tomcat or in another server, it 
opens up perfectly.
   
   
  I am using .rmvb and .wmv format clips.
   
   
  I am using this type of basic coding.
   
  !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1 - transitional.dtd
html xmlns=http://www.w3.org/1999/xhtml;
  
html
head
  title download video/title
  /head
   body
 
brbrbr
 
a href=video1.rmvb  Clip1 /a
   brbr
a href=video2.wmv Clip2 /a
/body
  
/html
   
   
  Thank u
   
  

Caldarale, Charles R [EMAIL PROTECTED] wrote:
   From: Alistair McDonald [mailto:[EMAIL PROTECTED] 
 Subject: (FIXED) RE: tomcat can't serve HTML pages more than 
 48K in size 
 
 Thanks for that. Solved the problem nicely.

By the way, I just tested with a 78k static HTML page on a near stock
5.5.20, and did not experience any problems in delivering the page.
Perhaps the issue you encountered with 5.5.9 is fixed in a later level.

- 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]



 
-
 Check out the New Yahoo! Mail - Fire up a more powerful email and get things 
done faster. 

Re: tomcat can't serve HTML pages more than 48K in size

2006-10-31 Thread Christopher Schultz
Canadafest,

 Hello!

 I am trying to enable some video clips files to be downloaded by
 users, but unfortunately instead of downloading it opens up the
 garbage text on the webpage, just like if u try to open a media file
 in notepad or wordpad.

#1: Don't hijack threads. Please post a new message.
#2: You have the wrong MIME type being sent as a response header.

-chris



signature.asc
Description: OpenPGP digital signature


Re: (FIXED) RE: tomcat can't serve HTML pages more than 48K in size

2006-10-31 Thread mast
I have exactly  the same problem with a 5.5.17 server and changing the 
sendfileSize doesn t seem to fix anything

it return this error with file above a certain size :
java.lang.NoSuchMethodError: 
org.apache.naming.resources.ResourceAttributes.getCanonicalPath()Ljava/lang/String;


org.apache.catalina.servlets.DefaultServlet.checkSendfile(DefaultServlet.java:1530)

org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:843)

org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:354)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
- Original Message - 
From: Caldarale, Charles R [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org; [EMAIL PROTECTED]
Sent: Tuesday, October 31, 2006 7:00 PM
Subject: RE: (FIXED) RE: tomcat can't serve HTML pages more than 48K in size



From: Alistair McDonald [mailto:[EMAIL PROTECTED]
Subject: (FIXED) RE: tomcat can't serve HTML pages more than
48K in size

Thanks for that. Solved the problem nicely.


By the way, I just tested with a 78k static HTML page on a near stock
5.5.20, and did not experience any problems in delivering the page.
Perhaps the issue you encountered with 5.5.9 is fixed in a later level.

- 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: StandartSession.accessCount bug?

2006-10-31 Thread Eric Haszlakiewicz
On Tue, Oct 31, 2006 at 08:38:37AM -0500, Christopher Schultz wrote:
 Also, did your +50ns figure mean that the /overhead/ was +50ns, or that
 waiting for the other thread to release the lock (which would include
 execution of the method itself) took 50ms longer. Since those threads
 cannot really run concurrently due to the synchronization, your timing
 should be affected by that fact, instead of merely the added overhead.

uh.. I read that as 50 _m_s, not ns.  

eric

-
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: [Solved] cheersVery basic web server hosting question

2006-10-31 Thread CANADAFAST INC.
My problem was solved. Thank u everyone who tried to help me.
   
  Seems like port 80 was being blocked by my ISP, I was running tomcat on my 
sony vaio laptop, seems like it has some software which is blocking the ports 
for anonymous requests.
   
  I tried in my PC and its working fine now. cheerss!!
   
  For people who do not have a static IP address from their ISPs can visit 
TZO.com OR DynDNS.org since, they provide services changing IP address and 
updates your domain info dynamically.
   
   
  Thank you
   
   
  
David Smith [EMAIL PROTECTED] wrote:
  I understand the frustration, but at the same time, this is a more or 
less basic web/network administration question. You need to read your 
cable router manual for how to forward traffic to a specific port (80) 
to a specific machine on the inside of your firewall or setup your 
server system to be in the DMZ. You'll also have to learn how to 
register a DNS domain name if you haven't already and point name servers 
to the public IP port your cable router is on.

There is one point that could be considered tomcat specific. You may 
need to set proxyName and proxyPort on the connector in your server.xml 
receiving traffic from your cable router. It's mostly so the outside 
people get correct redirect responses and the links are written correctly.

--David

CANADAFAST INC. wrote:

I don't care if anyone finds this question interesting or not. I just want a 
solution, if it were in the linksys manual then I would not have posted the 
question, I tried solving the problem by calling the linksys tech support, 
also had a chat session with them, but they don't understand the problem 
itself.
 

Pid 
wrote:
 The reason no-one is finding this an interesting question is that it's
not really anything to do with Tomcat.

Your LinkSys router probably has a manual, or at least some basic
instructions for how to map external ports to the internal server.




CANADAFAST INC. wrote:
 

Hello!


I am a new tomcat 5.5 user. I have created some JSPs and they run perfectly 
in my PC using tomcat.

I want to make my PC a webserver, so that ppl from outside can access my JSPs 
through tomcat 5.5 running on my system.

My PC is connected to a router and my router is connected to a cable modem 
which has a static ip address from my cable ISP.

But after that I don't know what to do further. How should I configure my 
tomcat, so that ppl from outside can access my JSP website.

hOW SHOULD i access my pc from outside through my linksys router from port 
8080 in which tomcat is running on my pc.


Thank you


-
Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.
 



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



 
-
We have the perfect Group for you. Check out the handy changes to Yahoo! 
Groups.
 



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



 
-
Access over 1 million songs - Yahoo! Music Unlimited Try it today.

OutOfMemory Exceptions and HTTP Processor Threads

2006-10-31 Thread Ryan Gies

What I observe is:

a) A certain amount of free memory is required to instantiate a web application
b) Concurrent requests are handled by separate HTTP Processor threads
c) The maxSpareThreads attribute of the HTTP Connector is not honored until GC

And when I:

1) Deploy three helloworld Turbine applications
2) Use JMeter to hit the first webapp with 100 concurrent threads
3) Subsequently hit the second and third webapps with the same test plan

I will get OutOfMemory Exceptions because there is no free memory to instantiate 
the 3rd webapp, as the idle HTTP Connectors have consumed all available memory.


So I ask, Am I understanding this correctly?  Is this known and specified 
behavior?


---
using apache-tomcat-5.5.20 out-of-the-box (tar.gz)
with jdk1.5.0_09 and starting it up with:
catalina.sh jpda start -Dcom.sun.management.jmxremote -Xmx30m -Xms30m
sample apps created as:
maven -Dturbine.app.name=helloworld turbine:setup

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



tomcat ssl not work

2006-10-31 Thread Eric Yin

Hi,

I just installed Fedora 5 and Tomcat 5.5 which is included in the 
Fedora 5 DVD. Tomcat works well for the port 8080. you can visit 
http://joconda.ciise.concordia.ca:8080 to see. But for SSL (8443) it 
doesn't work. I configure accoding to 
http://tomcat.apache.org/tomcat-5.5-doc/ssl-howto.html . I use keytool 
to create a new keystore from scratch: $JAVA_HOME/bin/keytool -genkey 
-alias tomcat -keyalg RSA


Since I can not find keytool from Fedora 5 jdk1.4.2 and I download 
J2SE(TM) Development Kit 5.0 Update 9: jdk-1_5_0_09-linux-i586.bin and 
install it and use the keytool from this kit.


I don't run httpd at all.

Can you help me why https://joconda.ciise.concordia.ca:8443 doesn't work?

thanks alot,

Eric.


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



experiencing problems with html/media files in tomcat

2006-10-31 Thread CANADAFAST INC.
Hello!
   
  I am experiencing some strange html problem in tomcat. I am using the Apache 
Tomcat 5.5.20 Server
   
  The problem is strange to describe. I am trying to enable some vidoe clips 
files to be downloaded by users, but unfortunatley instead of downloading it 
opens up the garbage text on the webpage, just like if u try to open a media 
file in notepad or wordpad. It does not allow to download the media files.
   
  But when I try running the html page outside tomcat or in another server, it 
opens up perfectly.
   
   
  I am using .rmvb and .wmv format clips.
   
   
  I am using this type of basic coding.
   
  !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1 - transitional.dtd
html xmlns=http://www.w3.org/1999/xhtml;
  
html
head
  title download video/title
  /head

brbrbr
 
a href=video1.rmvb  Clip1 /a
   brbr
a href=video2.wmv Clip2 /a
  
/html
   
   
  Thank u


 
-
Want to start your own business? Learn how on  Yahoo! Small Business. 

Re: getContextPath

2006-10-31 Thread mast

Well i have try with a valid configuration and i still get the same problem

with a 5.5.9 server
ContextPath: /test
ServletPath: /test.jsp
PathInfo: null
RequestURI: /test/test.jsp
QueryString: null

with a 5.517 server
ContextPath:
ServletPath: /test/test.jsp
PathInfo: null
RequestURI: /test/test.jsp
QueryString: null

- Original Message - 
From: mast [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, October 30, 2006 12:31 AM
Subject: Re: getContextPath





There was a change at some point that resulted in any directory under
the webapps directory being deployed as an application. You would see
this behaviour if you had configured a host appBase to be the same as
a context docBase - a configuration that is invalid.

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]




Hmm i understand but this configuration was invalid in 5.5.9 too so they 
did some change no ?


-
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: getContextPath

2006-10-31 Thread Caldarale, Charles R
 From: mast [mailto:[EMAIL PROTECTED] 
 Subject: Re: getContextPath
 
 with a 5.5.9 server
 ContextPath: /test
 ServletPath: /test.jsp
 
 with a 5.517 server
 ContextPath:
 ServletPath: /test/test.jsp

What APIs are you using to determine ContextPath and ServletPath?

 - 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]



Re: getContextPath

2006-10-31 Thread mast

i use a simple jsp file with :
ContextPath:  %= request.getContextPath() %br
ServletPath:  %= request.getServletPath() %br

- Original Message - 
From: Caldarale, Charles R [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, October 31, 2006 8:11 PM
Subject: RE: getContextPath


From: mast [mailto:[EMAIL PROTECTED] 
Subject: Re: getContextPath


with a 5.5.9 server
ContextPath: /test
ServletPath: /test.jsp

with a 5.517 server
ContextPath:
ServletPath: /test/test.jsp


What APIs are you using to determine ContextPath and ServletPath?

- 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: tomcat ssl not work

2006-10-31 Thread Caldarale, Charles R
 From: Eric Yin [mailto:[EMAIL PROTECTED] 
 Subject: tomcat ssl not work
 
 Since I can not find keytool from Fedora 5 jdk1.4.2 and I download 
 J2SE(TM) Development Kit 5.0 Update 9: jdk-1_5_0_09-linux-i586.bin
 and install it and use the keytool from this kit.

It's risky to use a JDK tool from one level with another JDK, especially
an older one.  Strongly suggest your remove the JDK that came with
Fedora and install the proper one from Sun - don't just take one program
from it.

While you're at it, I would also recommend throwing away the repackaged
Tomcat that comes with Fedora and downloading and installing a real one
from the tomcat.apache.org web site.

 - 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]



RE: (FIXED) RE: tomcat can't serve HTML pages more than 48K in size

2006-10-31 Thread Caldarale, Charles R
 From: mast [mailto:[EMAIL PROTECTED] 
 Subject: Re: (FIXED) RE: tomcat can't serve HTML pages more 
 than 48K in size 
 
 I have exactly  the same problem with a 5.5.17 server and 
 changing the sendfileSize doesn t seem to fix anything

What happens if you set it to -1?

 it return this error with file above a certain size :
 java.lang.NoSuchMethodError: 
 org.apache.naming.resources.ResourceAttributes.getCanonicalPath()

The relevant code appears to be the same in both 5.5.17 and 5.5.20, and
I don't hit the problem, but I could be missing something.  There is a
getCanonicalPath() method in the ResourceAttributes class, so I don't
understand how you got the above error.  Regardless, setting
sendfileSize to -1 should avoid it.

 - 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]



JK 1.2.19 IIS (Win Server 2003 R2) letter case problem in uriworkermap.properties

2006-10-31 Thread James Garrison
With JK 1.2.19 installed on Windows Server 2003 R2, and
given the following in uriworkermap.properties:

/Autoweb=perseus9010
/Autoweb/*=perseus9010
/autoweb=perseus9010
/autoweb/*=perseus9010

Requests are handled as follows:

/Autoweb  -- tomcat -- redirect to /Autoweb/
/Autoweb/ -- tomcat -- redirect to /Autoweb/index.html

This is operating correctly.  But:

/autoweb  -- tomcat -- redirect to /autoweb/
/autoweb/ -- IIS returns 404 (request NOT sent to tomcat)

with an explicit request to /autoweb/index.html IIS also
returns 404 without attempting to send the request to tomcat
via JK. 

What is most interesting is that reversing the uriworkermap
entries so the /autoweb lines come first reverses the
behavior.  I.e. with

/autoweb=perseus9010
/autoweb/*=perseus9010
/Autoweb=perseus9010
/Autoweb/*=perseus9010

IIS now serves /autoweb correctly but /Autoweb breaks.

Is this a known problem in JK?

-- 
James GarrisonAthens Group, Inc.
mailto:[EMAIL PROTECTED]5608 Parkcrest Dr
http://www.athensgroup.comAustin, TX 78731
SKYPE callto:jhg-athensgroup  (512) 345-0600 x150
PGP Key ID: 0x22E8DA2A


-
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: OutOfMemory Exceptions and HTTP Processor Threads

2006-10-31 Thread Caldarale, Charles R
 From: Ryan Gies [mailto:[EMAIL PROTECTED] 
 Subject: OutOfMemory Exceptions and HTTP Processor Threads
 
 I will get OutOfMemory Exceptions because there is no free 
 memory to instantiate the 3rd webapp, as the idle HTTP
 Connectors have consumed all available memory.

May or may not have anything to do with the Thread objects.  You could
be running out of PermGen space.  Read the FAQ entry on the subject:
http://tomcat.apache.org/faq/memory.html

 catalina.sh jpda start -Dcom.sun.management.jmxremote -Xmx30m -Xms30m

That's an awfully small heap size to have the JVM work with.  The
default on even tiny machines is 64m.

 - 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]



RE: (FIXED) RE: tomcat can't serve HTML pages more than 48K in size

2006-10-31 Thread Caldarale, Charles R
 From: mast [mailto:[EMAIL PROTECTED] 
 Subject: Re: (FIXED) RE: tomcat can't serve HTML pages more 
 than 48K in size 
 
 i have put this in the web.xml of the server
 init-param
 param-namesendfileSize/param-name
 param-value-1/param-value
 /init-param

Where exactly did you put the above?  It should go in the servlet
section for the DefaultServlet of conf/web.xml (approximately between
lines 71 and 82 in an unmodified one).

 - 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]



Re: (FIXED) RE: tomcat can't serve HTML pages more than 48K in size

2006-10-31 Thread mast

From: Caldarale, Charles R [EMAIL PROTECTED]
Subject: Re: (FIXED) RE: tomcat can't serve HTML pages more



Where exactly did you put the above?  It should go in the servlet
section for the DefaultServlet of conf/web.xml (approximately between
lines 71 and 82 in an unmodified one).


i see i had put it  about the 228 line, i have try where you said and it 
works great 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: Tomcat Ajp13 Connector hang

2006-10-31 Thread Rainer Jung
Hi Mao (or Ni or Chen?),

your environment seems *very* outdated. Please update to Tomcat 4.1.34
und mod_jk 1.2.19. If the problem still shows up, please post relevant
parts of your configs (Apache and tomcat side) and check via netstat, if
tomcat still listens on the Ajp13 port.

Regards,

Rainer

Ni Chen schrieb:
 Hi Folks,
 We are having an issue that Ajp13 Connector being unresponsive. It happened 
 about once a week. We are running one Apache 2.0, three Tomcat 4.1.27 and 
 mod_jk 1.2.5 / Ajp13 on HP 11i boxes. 
 We noticed that every time Ajp13 Connector received an exception (see below) 
 when setting socket options, serverSocket was closed and reopened, 
 ===
 serverSocket in Ajp13Connector got an exception when socket.setSoLinger(). 
 2006-10-24 15:31:31 Ajp13Connector[9015] accept: 
 java.net.SocketException: Invalid Character In Attribute Name.
  at java.net.PlainSocketImpl.socketSetOption(Native Method)
  at java.net.PlainSocketImpl.setOption(PlainSocketImpl.java:240)
  at java.net.Socket.setSoLinger(Socket.java:817)
  at org.apache.ajp.tomcat4.Ajp13Connector.run(Ajp13Connector.java:891)
  at java.lang.Thread.run(Thread.java:534)
 2006-10-24 15:31:31 Ajp13Connector[9015] run():  not stopped, so reopening 
 server socket
 2006-10-24 15:31:31 Ajp13Connector[9015] Opening server socket on all host IP 
 addresses
 2006-10-24 15:31:31 Ajp13Connector[9015] accepting socket...
 ==
 Ajp13 Connector was not able to process new connection requests any more. If 
 we telnet it, we got timeout, and socket status is SYN_SENT. If we restart 
 Tomcat, it works again.
 Our Ajp13 Connector setting:
 Connector className=org.apache.ajp.tomcat4.Ajp13Connector
port=9015
minProcessors=250
maxProcessors=250
acceptCount=50
debug=7/
 We don’t have special settings in worker.properties except 
 worker.loadbalancer.stick_session=1
 When this issue happens, Tomcat continues work on the established connections 
 to handle requests, but eventually all sockets will be closed by Processors, 
 and then Tomcat hang since no new connection could be established. However, 
 we still see around 80 established connections in the netstat. 
 Could it be other processes we forked in the tomcat that holding the 
 connection, and then it caused socket file descriptor dead lock or 
 unavailable?
 
 Any comments are welcome!
 Mao
 
 
 
 -
 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 Ajp13 Connector hang

2006-10-31 Thread Ni Chen
Hi Rainer,

Thanks a lot for looking into this. I understand this is old configuration. But 
it is in production, and I don't see any change log/fix related to this issue 
in either later version of mod_jk or Tomcat 4. The other thing is we do launch 
netstat after it hang, and we saw AJP Connector is listening, but Telnet go 
timeout. I mean if it is not listening, I would expect message: refused by 
remost host.

Is ther any tool or system logs we can see/use to see why no ACK packet 
returned back from server where Tomcat is running since we saw TCP connection 
is in SYN_SENT on client side (Apache)?

Thanks again,
Mao



- Original Message 
From: Rainer Jung [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, October 31, 2006 2:51:40 PM
Subject: Re: Tomcat Ajp13 Connector hang


Hi Mao (or Ni or Chen?),

your environment seems *very* outdated. Please update to Tomcat 4.1.34
und mod_jk 1.2.19. If the problem still shows up, please post relevant
parts of your configs (Apache and tomcat side) and check via netstat, if
tomcat still listens on the Ajp13 port.

Regards,

Rainer

Ni Chen schrieb:
 Hi Folks,
 We are having an issue that Ajp13 Connector being unresponsive. It happened 
 about once a week. We are running one Apache 2.0, three Tomcat 4.1.27 and 
 mod_jk 1.2.5 / Ajp13 on HP 11i boxes. 
 We noticed that every time Ajp13 Connector received an exception (see below) 
 when setting socket options, serverSocket was closed and reopened, 
 ===
 serverSocket in Ajp13Connector got an exception when socket.setSoLinger(). 
 2006-10-24 15:31:31 Ajp13Connector[9015] accept: 
 java.net.SocketException: Invalid Character In Attribute Name.
  at java.net.PlainSocketImpl.socketSetOption(Native Method)
  at java.net.PlainSocketImpl.setOption(PlainSocketImpl.java:240)
  at java.net.Socket.setSoLinger(Socket.java:817)
  at org.apache.ajp.tomcat4.Ajp13Connector.run(Ajp13Connector.java:891)
  at java.lang.Thread.run(Thread.java:534)
 2006-10-24 15:31:31 Ajp13Connector[9015] run():  not stopped, so reopening 
 server socket
 2006-10-24 15:31:31 Ajp13Connector[9015] Opening server socket on all host IP 
 addresses
 2006-10-24 15:31:31 Ajp13Connector[9015] accepting socket...
 ==
 Ajp13 Connector was not able to process new connection requests any more. If 
 we telnet it, we got timeout, and socket status is SYN_SENT. If we restart 
 Tomcat, it works again.
 Our Ajp13 Connector setting:
 Connector className=org.apache.ajp.tomcat4.Ajp13Connector
port=9015
minProcessors=250
maxProcessors=250
acceptCount=50
debug=7/
 We don’t have special settings in worker.properties except 
 worker.loadbalancer.stick_session=1
 When this issue happens, Tomcat continues work on the established connections 
 to handle requests, but eventually all sockets will be closed by Processors, 
 and then Tomcat hang since no new connection could be established. However, 
 we still see around 80 established connections in the netstat. 
 Could it be other processes we forked in the tomcat that holding the 
 connection, and then it caused socket file descriptor dead lock or 
 unavailable?
 
 Any comments are welcome!
 Mao
 
 
 
 -
 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: getContextPath

2006-10-31 Thread Caldarale, Charles R
 From: mast [mailto:[EMAIL PROTECTED] 
 Subject: Re: getContextPath
 
 i use a simple jsp file with :
 ContextPath:  %= request.getContextPath() %br
 ServletPath:  %= request.getServletPath() %br

 with a 5.5.9 server
 ContextPath: /test
 ServletPath: /test.jsp
 
 with a 5.517 server
 ContextPath:
 ServletPath: /test/test.jsp

Did you change how the app was deployed between 5.5.9 and 5.5.17?  It
appears that in your 5.5.17 version, your app is under the ROOT
directory, rather than under your Host's appBase.

 - 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]



Re: JK 1.2.19 IIS (Win Server 2003 R2) letter case problem in uriworkermap.properties

2006-10-31 Thread Rainer Jung
It was not knwon (at least not to me) before your mail, but you are
right. We changed URL case sensitivity for mod_jk 1.2.19, because URLs
should be case sensitive, but we missed one place.

Could you please open a bug in bugzilla,

http://issues.apache.org/bugzilla/enter_bug.cgi?product=Tomcat%205

so that we can track the problem more easily? The bug applies to mod_jk
on all platforms and for all web server types. If multiple mount
patterns are equal except for the case, only the first url pattern will
be made active, but with the target worker of the last pattern.

Here's a workaround for your configuration:

/Autoweb=perseus9010
/Autoweb/*=perseus9010
/autoweb|/*=perseus9010

The keys on the left side are used in a case insensitive way as a key in
a hash table. If there are multiple same keys, the first key wins and
the value is set to the last one.

Since mod_jk 1.2.19 there is a convenience notation to combine
/something and /something/*. You can simple write /something|/* which
gets internally resolved as both patterns. Fortunately the hash table is
build early, so that this counts as a different key. It's only a
workaround! We'll fix the bug for the next release.

Thanks for reporting the problem.

Regards,

Rainer

James Garrison schrieb:
 With JK 1.2.19 installed on Windows Server 2003 R2, and
 given the following in uriworkermap.properties:
 
 /Autoweb=perseus9010
 /Autoweb/*=perseus9010
 /autoweb=perseus9010
 /autoweb/*=perseus9010
 
 Requests are handled as follows:
 
 /Autoweb  -- tomcat -- redirect to /Autoweb/
 /Autoweb/ -- tomcat -- redirect to /Autoweb/index.html
 
 This is operating correctly.  But:
 
 /autoweb  -- tomcat -- redirect to /autoweb/
 /autoweb/ -- IIS returns 404 (request NOT sent to tomcat)
 
 with an explicit request to /autoweb/index.html IIS also
 returns 404 without attempting to send the request to tomcat
 via JK. 
 
 What is most interesting is that reversing the uriworkermap
 entries so the /autoweb lines come first reverses the
 behavior.  I.e. with
 
 /autoweb=perseus9010
 /autoweb/*=perseus9010
 /Autoweb=perseus9010
 /Autoweb/*=perseus9010
 
 IIS now serves /autoweb correctly but /Autoweb breaks.
 
 Is this a known problem in JK?
 

-
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: getSystemResource not working in servlet

2006-10-31 Thread Caldarale, Charles R
 From: Allen,Eva [mailto:[EMAIL PROTECTED] 
 Subject: getSystemResource not working in servlet
 
 URL rulesURL = ClassLoader.getSystemResource(x.xml);

This only retrieves resources accessible to the System class loader,
which typically only looks at the $TOMCAT_HOME/bin directory.

 but I'd much prefer to do it the right way if I could.  Any hints?

From within a webapp, you would normally use getResourceAsStream().
Take a look at the FAQ:
http://wiki.apache.org/tomcat/HowTo#head-45c3314139cb900ddd43dde2ff67153
2e6e844bc

 - 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]



JNDI Could not find datasource

2006-10-31 Thread Dave Kennedy

ENV: Tomcat 5.5.17, Eclipse 3.2, Hibernate 3.2

The application runs in Eclipse, but not standalone in Tomcat
What does Tomcat need to find the datasource?
Error:
13:09:03,936  INFO NamingHelper:26 - JNDI InitialContext properties:{}
13:09:03,936 FATAL DatasourceConnectionProvider:55 - Could not find 
datasource: java:comp/env/jdbc/hfydb

javax.naming.NameNotFoundException: Name jdbc is not bound in this Context

?xml version='1.0' encoding='utf-8'?
!DOCTYPE hibernate-configuration PUBLIC
-//Hibernate/Hibernate Configuration DTD//EN
http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd;

hibernate-configuration
session-factory
!-- Use a Tomcat 5.5 JNDI datasource - see Context.xml --
property name=connection.datasource
java:comp/env/jdbc/hfydb
/property

!-- Echo all executed SQL to stdout --
property name=show_sqltrue/property
property name=dialectorg.hibernate.dialect.MySQLDialect/property
property name=current_session_context_classthread/property
	property 
name=cache.provider_classorg.hibernate.cache.NoCacheProvider/property


!-- Drop and re-create the database schema on startup --
property name=hibernate.hbm2ddl.autoupdate/property

!-- Mapping files --
mapping resource=mapping/tutorial.hbm.xml/
mapping resource=mapping/office.hbm.xml/
mapping resource=mapping/property.hbm.xml/
mapping resource=mapping/address.hbm.xml/
mapping resource=mapping/room.hbm.xml/
mapping resource=mapping/type.hbm.xml/
/session-factory
/hibernate-configuration


13:09:03,936  INFO NamingHelper:26 - JNDI InitialContext properties:{}
13:09:03,936 FATAL DatasourceConnectionProvider:55 - Could not find 
datasource: java:comp/env/jdbc/hfydb

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:139)
at org.apache.naming.NamingContext.lookup(NamingContext.java:780)
at org.apache.naming.NamingContext.lookup(NamingContext.java:139)
at org.apache.naming.NamingContext.lookup(NamingContext.java:780)
at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:136)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
	at 
org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52)
	at 
org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
	at 
org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56)
	at 
org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:397)

at 
org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62)
at 
org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1933)
	at 
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1216)

at tomcatJndi.HibernateUtil.clinit(HibernateUtil.java:27)
at action.SearchPropertyAction.execute(SearchPropertyAction.java:35)
	at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
	at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)

at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
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 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
	at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
	at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
	at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)

at 

JNDI Realm and Active Directory root search

2006-10-31 Thread Matt Warren
I'm trying to get a JNDI Realm working as one might expect with Active
Directory.

Tomcat 5.5.20
Java 1.5.06
Windows 2000 Server

The basic issue is that searching from a domain root dc=company,dc=com and
using userSubtree=true results in:

Oct 31, 2006 3:18:20 PM org.apache.catalina.realm.JNDIRealm authenticate
SEVERE: Exception performing authentication
javax.naming.PartialResultException: Unprocessed Continuation Reference(s);
remaining name 'dc=company,dc=com'

If I use a more specific search base of ou=Employees,dc=company,dc=com and
then the userSubtree is irrelevant, it works fine.

Problem is our AD structure demands that users be in two different OU's and
thus the search must be done from the root. I understand that AD does not
handle referrals as expected and that could be contributing.

A related ref here:
http://forum.java.sun.com/thread.jspa?threadID=386553messageID=1677974
And here:
http://marc.theaimsgroup.com/?l=tomcat-devm=110080212903359w=2

a post on the first thread by jainee offers that possibly using
NamingEnumeration.hasMoreElements() and NamingEnumeration.nextElement()

Instead of 
NamingEnumeration.hasMore() and NamingEnumeration.next()

in the JNDIRealm.java class fixes the problem.

Is this a bug? Anyone have pointers on a solution through configuration?


-
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 Ajp13 Connector hang

2006-10-31 Thread Rainer Jung
Hi Mao,

Try to send a QUIT signal to the jvm. It will produce a java thread
stack dump on STDOUT. The normal tomcat sart scripts redirect stdout to
catalina.out, so the result goes there.

After kill -QUIT PID (replace PID by the pid of the process) you can
inspect the dump in catalina.out to find out, what all the threads in
your connector worker pool are doing.

If your JVM is older than 1.4.2 or a very early 1.4.2 release, sending a
QUIT signal might pose a risk on your process. All jvm releases of the
last two years including patch releases of 1.4.2 can produce thread
dumps without any problems.

Regards,

Rainer

Ni Chen schrieb:
 Hi Rainer,
 
 Thanks a lot for looking into this. I understand this is old configuration. 
 But it is in production, and I don't see any change log/fix related to this 
 issue in either later version of mod_jk or Tomcat 4. The other thing is we do 
 launch netstat after it hang, and we saw AJP Connector is listening, but 
 Telnet go timeout. I mean if it is not listening, I would expect message: 
 refused by remost host.
 
 Is ther any tool or system logs we can see/use to see why no ACK packet 
 returned back from server where Tomcat is running since we saw TCP connection 
 is in SYN_SENT on client side (Apache)?
 
 Thanks again,
 Mao
 
 
 
 - Original Message 
 From: Rainer Jung [EMAIL PROTECTED]
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Tuesday, October 31, 2006 2:51:40 PM
 Subject: Re: Tomcat Ajp13 Connector hang
 
 
 Hi Mao (or Ni or Chen?),
 
 your environment seems *very* outdated. Please update to Tomcat 4.1.34
 und mod_jk 1.2.19. If the problem still shows up, please post relevant
 parts of your configs (Apache and tomcat side) and check via netstat, if
 tomcat still listens on the Ajp13 port.
 
 Regards,
 
 Rainer
 
 Ni Chen schrieb:
 Hi Folks,
 We are having an issue that Ajp13 Connector being unresponsive. It happened 
 about once a week. We are running one Apache 2.0, three Tomcat 4.1.27 and 
 mod_jk 1.2.5 / Ajp13 on HP 11i boxes. 
 We noticed that every time Ajp13 Connector received an exception (see below) 
 when setting socket options, serverSocket was closed and reopened, 
 ===
 serverSocket in Ajp13Connector got an exception when socket.setSoLinger(). 
 2006-10-24 15:31:31 Ajp13Connector[9015] accept: 
 java.net.SocketException: Invalid Character In Attribute Name.
  at java.net.PlainSocketImpl.socketSetOption(Native Method)
  at java.net.PlainSocketImpl.setOption(PlainSocketImpl.java:240)
  at java.net.Socket.setSoLinger(Socket.java:817)
  at org.apache.ajp.tomcat4.Ajp13Connector.run(Ajp13Connector.java:891)
  at java.lang.Thread.run(Thread.java:534)
 2006-10-24 15:31:31 Ajp13Connector[9015] run():  not stopped, so reopening 
 server socket
 2006-10-24 15:31:31 Ajp13Connector[9015] Opening server socket on all host 
 IP addresses
 2006-10-24 15:31:31 Ajp13Connector[9015] accepting socket...
 ==
 Ajp13 Connector was not able to process new connection requests any more. If 
 we telnet it, we got timeout, and socket status is SYN_SENT. If we restart 
 Tomcat, it works again.
 Our Ajp13 Connector setting:
 Connector className=org.apache.ajp.tomcat4.Ajp13Connector
port=9015
minProcessors=250
maxProcessors=250
acceptCount=50
debug=7/
 We don’t have special settings in worker.properties except 
 worker.loadbalancer.stick_session=1
 When this issue happens, Tomcat continues work on the established 
 connections to handle requests, but eventually all sockets will be closed by 
 Processors, and then Tomcat hang since no new connection could be 
 established. However, we still see around 80 established connections in the 
 netstat. 
 Could it be other processes we forked in the tomcat that holding the 
 connection, and then it caused socket file descriptor dead lock or 
 unavailable?

 Any comments are welcome!
 Mao



 -
 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: Tomcat Ajp13 Connector hang

2006-10-31 Thread Mao Ni
Hi Rainer,
Thanks a lot for looking into this. I understand this is old configuration. But 
it is in production, and I don't see any change log/fix related to this issue 
in either later version of mod_jk or Tomcat 4. The other thing is we do launch 
netstat after it hang, and we saw AJP Connector is listening, but Telnet go 
timeout. I mean if it is not listening, I would expect message: refused by 
remost host.
Is ther any tool or system logs we can see/use to see why no ACK packet 
returned back from server where Tomcat is running since we saw TCP connection 
is in SYN_SENT on client side (Apache)?
Thanks again,
Mao

- Original Message 
From: Rainer Jung [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, October 31, 2006 2:51:40 PM
Subject: Re: Tomcat Ajp13 Connector hang


Hi Mao (or Ni or Chen?),

your environment seems *very* outdated. Please update to Tomcat 4.1.34
und mod_jk 1.2.19. If the problem still shows up, please post relevant
parts of your configs (Apache and tomcat side) and check via netstat, if
tomcat still listens on the Ajp13 port.

Regards,

Rainer

Ni Chen schrieb:
 Hi Folks,
 We are having an issue that Ajp13 Connector being unresponsive. It happened 
 about once a week. We are running one Apache 2.0, three Tomcat 4.1.27 and 
 mod_jk 1.2.5 / Ajp13 on HP 11i boxes. 
 We noticed that every time Ajp13 Connector received an exception (see below) 
 when setting socket options, serverSocket was closed and reopened, 
 ===
 serverSocket in Ajp13Connector got an exception when socket.setSoLinger(). 
 2006-10-24 15:31:31 Ajp13Connector[9015] accept: 
 java.net.SocketException: Invalid Character In Attribute Name.
  at java.net.PlainSocketImpl.socketSetOption(Native Method)
  at java.net.PlainSocketImpl.setOption(PlainSocketImpl.java:240)
  at java.net.Socket.setSoLinger(Socket.java:817)
  at org.apache.ajp.tomcat4.Ajp13Connector.run(Ajp13Connector.java:891)
  at java.lang.Thread.run(Thread.java:534)
 2006-10-24 15:31:31 Ajp13Connector[9015] run():  not stopped, so reopening 
 server socket
 2006-10-24 15:31:31 Ajp13Connector[9015] Opening server socket on all host IP 
 addresses
 2006-10-24 15:31:31 Ajp13Connector[9015] accepting socket...
 ==
 Ajp13 Connector was not able to process new connection requests any more. If 
 we telnet it, we got timeout, and socket status is SYN_SENT. If we restart 
 Tomcat, it works again.
 Our Ajp13 Connector setting:
 Connector className=org.apache.ajp.tomcat4.Ajp13Connector
port=9015
minProcessors=250
maxProcessors=250
acceptCount=50
debug=7/
 We don’t have special settings in worker.properties except 
 worker.loadbalancer.stick_session=1
 When this issue happens, Tomcat continues work on the established connections 
 to handle requests, but eventually all sockets will be closed by Processors, 
 and then Tomcat hang since no new connection could be established. However, 
 we still see around 80 established connections in the netstat. 
 Could it be other processes we forked in the tomcat that holding the 
 connection, and then it caused socket file descriptor dead lock or 
 unavailable?
 
 Any comments are welcome!
 Mao
 
 
 
 -
 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: JK 1.2.19 IIS (Win Server 2003 R2) letter case problem in uriworkermap.properties

2006-10-31 Thread James Garrison
A bug has been filed, as requested.  The workaround fixed the problem
for me.

Thanks for the quick response!

-- 
James GarrisonAthens Group, Inc.
mailto:[EMAIL PROTECTED]5608 Parkcrest Dr
http://www.athensgroup.comAustin, TX 78731
SKYPE callto:jhg-athensgroup  (512) 345-0600 x150
PGP Key ID: 0x22E8DA2A


-
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: getContextPath

2006-10-31 Thread mast
in the 5.5.17 version my app is under the ROOT directory yes (that s the 
correct way like we told before no ?)

to give another example with exactly the same deployement (both under ROOT)
with a 5.5.17 and a 5.5.20
5.5.17 :
ContextPath: /test
ServletPath: /test.jsp
PathInfo: null
RequestURI: /test/test.jsp

5.5.20
ContextPath:
ServletPath: /test/test.jsp
PathInfo: null
RequestURI: /test/test.jsp


so exactly the same problem that between the 5.5.9 and 5.5.17
both the 5.5.9 and 5.5.20 appear to work in the good way but the 5.5.17 
still has the same problem

my conf is the same for both :
Host name=mydomain.com appBase=/usr/local/tomcat5/webapps/users1 
unpackWARs=true  autoDeploy=true /
for both the 5.5.20 and 5.5.17 so what can explain that the variable aren't 
identical?



- Original Message - 
From: Caldarale, Charles R [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, October 31, 2006 9:14 PM
Subject: RE: getContextPath



From: mast [mailto:[EMAIL PROTECTED]
Subject: Re: getContextPath

i use a simple jsp file with :
ContextPath:  %= request.getContextPath() %br
ServletPath:  %= request.getServletPath() %br

with a 5.5.9 server
ContextPath: /test
ServletPath: /test.jsp

with a 5.517 server
ContextPath:
ServletPath: /test/test.jsp


Did you change how the app was deployed between 5.5.9 and 5.5.17?  It
appears that in your 5.5.17 version, your app is under the ROOT
directory, rather than under your Host's appBase.

- 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: getContextPath

2006-10-31 Thread Caldarale, Charles R
 From: mast [mailto:[EMAIL PROTECTED] 
 Subject: Re: getContextPath
 
 in the 5.5.17 version my app is under the ROOT directory yes 
 (that s the correct way like we told before no ?)

Depends on what you mean by under.  If your app IS the ROOT directory,
then getContextPath() should return an empty string.  You cannot put one
webapp under another; each webapp is intended to be independent.

 my conf is the same for both :
  Host name=mydomain.com 
 appBase=/usr/local/tomcat5/webapps/users1 
 unpackWARs=true  autoDeploy=true /
 for both the 5.5.20 and 5.5.17 so what can explain that the 
 variable aren't identical?

Do you have a test.xml lurking around in conf/[engine]/[host] in one of
them?  Would that test.xml have a Context element with a docBase
pointing to ROOT/test?  If so, that's incorrect.

 - 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]



Re: getContextPath

2006-10-31 Thread mast

From: Caldarale, Charles R [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, October 31, 2006 10:37 PM
Subject: RE: getContextPath
Do you have a test.xml lurking around in conf/[engine]/[host] in one of
them?  Would that test.xml have a Context element with a docBase
pointing to ROOT/test?  If so, that's incorrect.


each webapps is independant my app is the ROOT directory now i define host 
like that :

appBase=/usr/local/tomcat5/webapps/users1
appBase=/usr/local/tomcat5/webapps/users2
each one have their own ROOT directory
but for the actual problem   i dont have any test.xml file or anything else 
on engine (or elsewhere that i can see)
both the 5.5.20 and 5.5.17 are new tomcat installed exactly the same way no 
docbase or anything else that i can see



-
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: JK 1.2.19 IIS (Win Server 2003 R2) letter case problem in uriworkermap.properties

2006-10-31 Thread Rainer Jung
Hi James,

I committed a patch for the problem. If you are able to compile the
plugin, you can check out the file from subversion, or apply the
following patch to version 1.2.19. Check for split mail lines in the patch.

Regards,

Rainer

Index: native/common/jk_map.c
===
--- native/common/jk_map.c  (revision 439824)
+++ native/common/jk_map.c  (revision 469665)
@@ -35,17 +35,11 @@
 #define JK_MAP_REFERENCE(.reference)
 #define JK_MAP_REFERENCE_SZ (strlen(JK_MAP_REFERENCE))

-#ifdef AS400
-#define CASE_MASK 0xbfbfbfbf
-#else
-#define CASE_MASK 0xdfdfdfdf
-#endif
-
 /* Compute the checksum for a key, consisting of the first
- * 4 bytes, normalized for case-insensitivity and packed into
- * an int...this checksum allows us to do a single integer
+ * 4 bytes, packed into an int.
+ * This checksum allows us to do a single integer
  * comparison as a fast check to determine whether we can
- * skip a strcasecmp
+ * skip a strcmp
  */
 #define COMPUTE_KEY_CHECKSUM(key, checksum)\
 {  \
@@ -67,7 +61,6 @@
 c = (unsigned int)*++k;\
 checksum |= c; \
 }  \
-checksum = CASE_MASK; \
 }

 struct jk_map
@@ -342,7 +335,7 @@
 unsigned int key;
 COMPUTE_KEY_CHECKSUM(name, key)
 for (i = 0; i  m-size; i++) {
-if (m-keys[i] == key  strcasecmp(m-names[i], name) == 0) {
+if (m-keys[i] == key  strcmp(m-names[i], name) == 0) {
 break;
 }
 }
@@ -661,7 +654,7 @@
 *(to+remain)   = '.';
 *(to+remain+1) = '\0';

-rc = jk_map_resolve_references(m, m-values[i],
0, ++depth, l);
+rc = jk_map_resolve_references(m, m-values[i],
0, depth+1, l);
 if (rc == JK_FALSE) {
 break;
 }

-
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: getContextPath

2006-10-31 Thread mast

Hmm well it seem i have made a mistake
the server.xml is correct and my configuration under ROOT too but it seem 
that if i put some file before the ROOT directory tomcat take that as the 
defaut context?

i explain :
i have put like i said :
appBase=/usr/local/tomcat5/webapps/users1
there i have create a ROOT directory /usr/local/tomcat5/webapps/users1/ROOT/ 
(WEB-INF etc after the ROOT)
but i had a WEB-INF and META-INF in the same directory as the ROOT too and 
they seem to have been taken instead of the one in the ROOT one (is it 
normal?)

now all works fine sorry to have make you loose time.



- Original Message - 
From: mast [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, October 31, 2006 10:51 PM
Subject: Re: getContextPath



From: Caldarale, Charles R [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, October 31, 2006 10:37 PM
Subject: RE: getContextPath
Do you have a test.xml lurking around in conf/[engine]/[host] in one of
them?  Would that test.xml have a Context element with a docBase
pointing to ROOT/test?  If so, that's incorrect.


each webapps is independant my app is the ROOT directory now i define host 
like that :

appBase=/usr/local/tomcat5/webapps/users1
appBase=/usr/local/tomcat5/webapps/users2
each one have their own ROOT directory
but for the actual problem   i dont have any test.xml file or anything 
else on engine (or elsewhere that i can see)
both the 5.5.20 and 5.5.17 are new tomcat installed exactly the same way 
no docbase or anything else that i can see



-
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: getContextPath

2006-10-31 Thread Caldarale, Charles R
 From: mast [mailto:[EMAIL PROTECTED] 
 Subject: Re: getContextPath
 
 but i had a WEB-INF and META-INF in the same directory as the 
 ROOT too and they seem to have been taken instead of the one
 in the ROOT one (is it normal?)

Not sure what you mean by normal, but since the setup was in error,
there are no guarantees that Tomcat will do anything useful with it.

Glad you finally figured it out.

 - 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]



log file servlet

2006-10-31 Thread Tony Smith
I am thinking about writing a log file servlet where
I can check the log file of the tomcat session from my
web browser. Thus I do not need to use console and vi
to check it. 

Is there already something to do this and I am just
reinvent the wheel or this is totally a bad idea?

If I do this, how can I get the log file location from
a servlet?

thanks,

qq




 

Everyone is raving about the all-new Yahoo! Mail 
(http://advision.webevents.yahoo.com/mailbeta/)


-
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: getContextPath

2006-10-31 Thread mast
little correction it seem that if i put a directory in the same way as the 
ROOT directory tomcat use it instead of the other

exemple :
/usr/local/tomcat5/webapps/users1/ROOT/test/test.jsp
/usr/local/tomcat5/webapps/users1/test/test.jsp

tomcat use the second one (and their appear the ContextPath: /test )
is this the normal way of tomcat working? if so all is ok thanks for all
- Original Message - 
From: mast [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, October 31, 2006 11:04 PM
Subject: Re: getContextPath



Hmm well it seem i have made a mistake
the server.xml is correct and my configuration under ROOT too but it seem 
that if i put some file before the ROOT directory tomcat take that as the 
defaut context?

i explain :
i have put like i said :
appBase=/usr/local/tomcat5/webapps/users1
there i have create a ROOT directory 
/usr/local/tomcat5/webapps/users1/ROOT/ (WEB-INF etc after the ROOT)
but i had a WEB-INF and META-INF in the same directory as the ROOT too and 
they seem to have been taken instead of the one in the ROOT one (is it 
normal?)

now all works fine sorry to have make you loose time.



- Original Message - 
From: mast [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, October 31, 2006 10:51 PM
Subject: Re: getContextPath



From: Caldarale, Charles R [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, October 31, 2006 10:37 PM
Subject: RE: getContextPath
Do you have a test.xml lurking around in conf/[engine]/[host] in one of
them?  Would that test.xml have a Context element with a docBase
pointing to ROOT/test?  If so, that's incorrect.


each webapps is independant my app is the ROOT directory now i define 
host like that :

appBase=/usr/local/tomcat5/webapps/users1
appBase=/usr/local/tomcat5/webapps/users2
each one have their own ROOT directory
but for the actual problem   i dont have any test.xml file or anything 
else on engine (or elsewhere that i can see)
both the 5.5.20 and 5.5.17 are new tomcat installed exactly the same way 
no docbase or anything else that i can see



-
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: getContextPath

2006-10-31 Thread Caldarale, Charles R
 From: mast [mailto:[EMAIL PROTECTED] 
 Subject: Re: getContextPath
 
  /usr/local/tomcat5/webapps/users1/ROOT/test/test.jsp
  /usr/local/tomcat5/webapps/users1/test/test.jsp
 
 tomcat use the second one (and their appear the ContextPath: /test )
 is this the normal way of tomcat working? if so all is ok 

Yes, any directory or .war file directly under the appBase is considered
to be a webapp and is deployed as such.  I don't know if the spec
documents which one should take precedence, but it seems like asking for
trouble to do such a thing.

 - 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]



RE: log file servlet

2006-10-31 Thread Caldarale, Charles R
 From: Tony Smith [mailto:[EMAIL PROTECTED] 
 Subject: log file servlet
 
 Is there already something to do this and I am just
 reinvent the wheel or this is totally a bad idea?

Try Lambda Probe (www.lambdaprobe.org).

 - 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]



Datasource following appBase changes

2006-10-31 Thread Scott Cowley
Hi.
How come when I put contexts one directory below my appBase I can
still get .html and .jsp's served, but the DataSource can't be found?
e.g. webapps/tests/test.jsp.

- Thank you for any help!

from javax.servlet.ServletException:
Name jdbc is not bound in this context

There is a context.xml file in META-INF, as well as a web.xml file
in WEB-INF.

Tomcat 5.5.20, default install, no changes to server.xml
(appBase=webapps).


-
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: Datasource following appBase changes

2006-10-31 Thread Scott Cowley
Quick correction on that previous post:
e.g. webapps/Production/tests.test.jsp. 

-Original Message-
From: Scott Cowley [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 31, 2006 3:40 PM
To: users@tomcat.apache.org
Subject: Datasource following appBase changes

Hi.
How come when I put contexts one directory below my appBase I can
still get .html and .jsp's served, but the DataSource can't be found?
e.g. webapps/tests/test.jsp.

- Thank you for any help!

from javax.servlet.ServletException:
Name jdbc is not bound in this context

There is a context.xml file in META-INF, as well as a web.xml file
in WEB-INF.

Tomcat 5.5.20, default install, no changes to server.xml
(appBase=webapps).


-
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]



war problem

2006-10-31 Thread mast
Hi, i have read some documentation about automatically unpacking war file but i 
still have a problem with it, so i put in the host tag :
unpackWARs=true
and then i put my war under the ROOT directory. and there it s not deployed
but if i put it in the same directory of the ROOT it s deployed (but of course 
it s not good because it create his own directory in the same level as ROOT)

what s the point i am missing? (seem i still get some context problem :) )

to resume :
/usr/local/tomcat5/webapps/users/ROOT/mypack.war - never deployed
/usr/local/tomcat5/webapps/users/mypack.war  deployed but create his own 
directory META-INF etc in the same level as root which is problematic
my host configuration ist still the same :
Host name=myhost.com appBase=/usr/local/tomcat5new/webapps/users 
unpackWARs=true  autoDeploy=true /

Re: war problem

2006-10-31 Thread Christopher Schultz
Mast,

 i put my war under the ROOT directory.

Er! Wrong answer. The ROOT directory is the directory which contains the
(expanded) ROOT webapp, not a directory where WAR files should be
dropped in order to deply them as the root webapp. If you put a WAR file
in there, Tomcat will ignore it. It would be just like putting it under
a directory called hjskdfhl and expecting it to deploy.

 if i put it in the same directory of the ROOT it s deployed (but of
 course it s not good because it create his own directory in the same
 level as ROOT)

If you are trying to deploy a webapp as the root webapp (i.e. one that
does not require any context name as part of the URL (like /my-app/...),
then you need to put it in the deploy directory -- the same place
where the ROOT directory is, and call it ROOT.war.

You might also want to remove the ROOT directory before you try to
deploy that WAR file, as they will undoubtedly conflict.

-chris



signature.asc
Description: OpenPGP digital signature


Re: getContextPath

2006-10-31 Thread David Smith
At each stage of request resolution, the longest match wins.  At the 
point where the request is routed to a particular webapp, it matches the 
webapp whose context matches more of the request path than any other.  
IE in your case, if there is a root webapp with context  and a webapp 
with context test, the webapp at context test will receive the 
request.  If you want further clarification, see in the default ROOT 
webapp that ships with tomcat.  There's a placeholder /admin/index.html 
that's only active as long as the admin webapp isn't installed.


--David

mast wrote:
little correction it seem that if i put a directory in the same way as 
the ROOT directory tomcat use it instead of the other

exemple :
/usr/local/tomcat5/webapps/users1/ROOT/test/test.jsp
/usr/local/tomcat5/webapps/users1/test/test.jsp

tomcat use the second one (and their appear the ContextPath: /test )
is this the normal way of tomcat working? if so all is ok thanks for all
- Original Message - From: mast [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, October 31, 2006 11:04 PM
Subject: Re: getContextPath



Hmm well it seem i have made a mistake
the server.xml is correct and my configuration under ROOT too but it 
seem that if i put some file before the ROOT directory tomcat take 
that as the defaut context?

i explain :
i have put like i said :
appBase=/usr/local/tomcat5/webapps/users1
there i have create a ROOT directory 
/usr/local/tomcat5/webapps/users1/ROOT/ (WEB-INF etc after the ROOT)
but i had a WEB-INF and META-INF in the same directory as the ROOT 
too and they seem to have been taken instead of the one in the ROOT 
one (is it normal?)

now all works fine sorry to have make you loose time.



- Original Message - From: mast [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, October 31, 2006 10:51 PM
Subject: Re: getContextPath



From: Caldarale, Charles R [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, October 31, 2006 10:37 PM
Subject: RE: getContextPath
Do you have a test.xml lurking around in conf/[engine]/[host] in 
one of

them?  Would that test.xml have a Context element with a docBase
pointing to ROOT/test?  If so, that's incorrect.


each webapps is independant my app is the ROOT directory now i 
define host like that :

appBase=/usr/local/tomcat5/webapps/users1
appBase=/usr/local/tomcat5/webapps/users2
each one have their own ROOT directory
but for the actual problem   i dont have any test.xml file or 
anything else on engine (or elsewhere that i can see)
both the 5.5.20 and 5.5.17 are new tomcat installed exactly the same 
way no docbase or anything else that i can see



-
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: (FIXED) war problem

2006-10-31 Thread mast

i understand thanks for the tips
problem solved
- Original Message - 
From: Christopher Schultz [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, October 31, 2006 11:56 PM
Subject: Re: war problem



-
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: Datasource following appBase changes

2006-10-31 Thread Scott Cowley

Appreciate the prompt reply, Chuck!
That answers a lot of questions.
I was hoping I could put two subdirectories, Development and Production,
below the appBase and have Tomcat serve out of them. I also hoped to have a
path for each app within each of them!
This makes it harder to set up a departmental development space.
Shoot. Oh well, have a nice Halloween!
-sc

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
Sent: Tue 10/31/2006 4:08 PM
To: Tomcat Users List
Subject: RE: Datasource following appBase changes
 
 From: Scott Cowley [mailto:[EMAIL PROTECTED] 
 Subject: RE: Datasource following appBase changes
 
 Quick correction on that previous post:
 e.g. webapps/Production/tests.test.jsp. 
 
 -Original Message-
 From: Scott Cowley [mailto:[EMAIL PROTECTED] 
 Subject: Datasource following appBase changes
 
 How come when I put contexts one directory below my appBase I can
 still get .html and .jsp's served, but the DataSource can't be found?

There's no such thing as a context one directory below appBase; webapps
must be in the appBase directory.

In the example you give above, your context (webapp) is Production, and
within it is an oddly-named JSP.  The JSP may work, but the embedded
period may give you problems.

Where are your web.xml and context.xml files located?

 - 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]

Problem redirecting appbase on a network drive

2006-10-31 Thread Didier CROUTZ

Hello,

I'm using an Apache Tomcat version 5.5.2 on a Windows XP Pro SP2.

I'm trying to redirect applications directory on a network drive  
mounted with Windows net use command.


To do this I've made the following modifications into the server.xml file:
Host name=localhost debug=0 appBase=webapps npackWARs=true  
toDeploy=true

changed to
Host name=localhost debug=0 appBase=H:\Tomcat unpackWARs=true  
autoDeploy=true
The webapps directory content has been copied into H:\Tomcat (H: is a  
network drive).


That doesn't work, http:\\127.0.0.1:8080\ leads to nowhere. I've  
done the same operation on a local drive and it worked fine.


Does anybody has an idea about this problem ?

Thanks a lot,
Regards,

Didier Croutz.



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



log question and lambda probe

2006-10-31 Thread mast
Hi again, i have download the lambda probe to see how it was and i have notice 
some things with log,
in their context.xml file there is :
 Logger className=org.apache.catalina.logger.FileLogger
prefix=probe.
suffix=.out
timestamp=true/

well that work wells but put the log under the logs directory of tomcat i 
wonder if there is no way to put it elsewhere ? (like in the same webapps that 
want the log)
i have try with :
Logger className=org.apache.catalina.logger.FileLogger
directory=/usr/local/tomcat5/webapps/users3/ROOT/
prefix=probe.
suffix=.out
timestamp=true/

without any succes, is it possible or must i forget this ?

one other problem i have with this application (the same problem that i talk 
two days ago about permission) is that we need to put the user/password under 
the tomcat-users.xml file, and like Chuck said this file must be readable by 
tomcat user.

so the server that will serve the probe application (or any other of my 
context) is user tomcat and so any jsp script that a user that has an access to 
the server can read the tomcat-users.xml file because that s the same owner 
(don t know if i explain well)

i have heard about the security manager maybe it s the solution (but not sure 
because when i run in security mode many webapps doesn't work anymore)

well if someone has an advice about that 
that question may seem silly but i am concerned with security and doesn t find 
any answer that i could really use until now.
Thx


Re: Problem redirecting appbase on a network drive

2006-10-31 Thread Martin Gainty
each machine needs to install its own copy of tomcat and have its own copy of 
server.xml configured for that machine and not to other tomcat machines
consequent browser resolutions need to point to the specific tomcat installed 
machine e.g.
http://machine1:Port/manager
http://machine2:Port/manager

Martin --
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: Didier CROUTZ [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Tuesday, October 31, 2006 6:26 PM
Subject: Problem redirecting appbase on a network drive


 Hello,
 
 I'm using an Apache Tomcat version 5.5.2 on a Windows XP Pro SP2.
 
 I'm trying to redirect applications directory on a network drive  
 mounted with Windows net use command.
 
 To do this I've made the following modifications into the server.xml file:
 Host name=localhost debug=0 appBase=webapps npackWARs=true  
 toDeploy=true
 changed to
 Host name=localhost debug=0 appBase=H:\Tomcat unpackWARs=true  
 autoDeploy=true
 The webapps directory content has been copied into H:\Tomcat (H: is a  
 network drive).
 
 That doesn't work, http:\\127.0.0.1:8080\ leads to nowhere. I've  
 done the same operation on a local drive and it worked fine.
 
 Does anybody has an idea about this problem ?
 
 Thanks a lot,
 Regards,
 
 Didier Croutz.
 
 
 
 -
 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: Datasource following appBase changes

2006-10-31 Thread Caldarale, Charles R
 From: Scott Cowley [mailto:[EMAIL PROTECTED] 
 Subject: RE: Datasource following appBase changes
 
 I was hoping I could put two subdirectories, Development 
 and Production, below the appBase and have Tomcat serve
 out of them.

Most people run separate instances of Tomcat for this purpose, since
they don't want to risk any chance of a wayward development app
impacting the production environment.  If you really want to run both
under the same Tomcat, consider using virtual hosts to separate
production and development, with each Host element having its own
appBase.

 - 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]



RE: Problem redirecting appbase on a network drive

2006-10-31 Thread Caldarale, Charles R
 From: Martin Gainty [mailto:[EMAIL PROTECTED] 
 Subject: Re: Problem redirecting appbase on a network drive
 
 each machine needs to install its own copy of tomcat and have 
 its own copy of server.xml configured for that machine and 
 not to other tomcat machines

What the hell are you talking about?  That has absolutely nothing to do
with the question asked.  Did you even bother to read it?

 - 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]



RE: Problem redirecting appbase on a network drive

2006-10-31 Thread Caldarale, Charles R
 From: Didier CROUTZ [mailto:[EMAIL PROTECTED] 
 Subject: Problem redirecting appbase on a network drive
 
 I'm using an Apache Tomcat version 5.5.2 on a Windows XP Pro SP2.

If it's really 5.5.2 and not 5.5.20, you should move up; lots of bug
fixes since then.

 Host name=localhost debug=0 appBase=H:\Tomcat 

Try using a forward slash after the H:, not a backwards one - even on
Windows.

 That doesn't work, http:\\127.0.0.1:8080\ leads to nowhere.

Also use forward slashes in URLs.

 - 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]



haaving trouble html in tomcat 5.5.20

2006-10-31 Thread Zeina Aoun
I am having trouble with html in tomcat. I am using the Apache Tomcat 5.5.20 
Server
 
The problem is hard to describe. I am trying to enable some video clip files to 
be downloaded by users, but unfortunatley instead of downloading it opens up 
the garbage text on the webpage, just like if u try to open a media file in 
notepad or wordpad. It does not allow to download the media files.
 
But when I try running the html page outside tomcat or in another server, it 
opens up perfectly.
 
 
I am using .rmvb and .wmv format clips.
 
 
I am using this type of basic coding.
 
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1 - transitional.dtd
html xmlns=http://www.w3.org/1999/xhtml;

html
head
title download video/title
/head
 
 
brbrbr
 
a href=video1.rmvb  Clip1 /a
   brbr
a href=video2.wmv Clip2 /a
 div 

/html
 
 
Thank u



  1   2   >