Re: Sharing compiled JSPs

2007-03-27 Thread Bernhard Fröhler

I believe you can configure the scratch directory of a host with its workDir 
attribute in server.xml.
Hope this helps

Bernhard

Steve Vangasse schrieb:

Yes but when you have multiple hosts, each one has it's own set of compiled 
JSPs under $CATALINA_HOME/work/Catalina/(hostname). I would like to have one 
scratch directory for the shared webapps that all the hosts can use. This way I 
can pre-compile just one set of JSPs.

-Steve

-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED] 
Sent: 27 March 2007 22:37

To: Tomcat Users List
Subject: Re: Sharing compiled JSPs

Steve-

jsps get pre-compiled to
$CATALINA_HOME/work/Catalina/localhost
generally in the form JSPName_jsp.java

Does this answer your question?

Martin--
---
This e-mail message (including attachments, if any) is intended for the use of the 
individual or entity to which it is addressed and may contain information that is 
privileged, proprietary , confidential and exempt >from disclosure. If you are 
not the intended recipient, you are notified that any dissemination, distribution 
or copying of this communication is strictly prohibited.
---
Le présent message électronique (y compris les pièces qui y sont annexées, le 
cas échéant) s'adresse au destinataire indiqué et peut contenir des 
renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le 
destinataire de ce document, nous vous signalons qu'il est strictement interdit 
de le diffuser, de le distribuer ou de le reproduire.
- Original Message -
From: "Steve Vangasse" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, March 27, 2007 6:14 PM
Subject: Sharing compiled JSPs


My application has a large number of contexts under virtual hosts that use the 
same set of webapps. At present, all the JSPs are compiled to a different 
scratch directory under tomcat/work for each context. Is it possible to use a 
shared scratch directory to save on perm gen memory and cut down the load on 
the Jasper compiler?
 
Thanks,
 
Steve


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


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



RE: Sharing compiled JSPs

2007-03-27 Thread Steve Vangasse
Yes but when you have multiple hosts, each one has it's own set of compiled 
JSPs under $CATALINA_HOME/work/Catalina/(hostname). I would like to have one 
scratch directory for the shared webapps that all the hosts can use. This way I 
can pre-compile just one set of JSPs.

-Steve

-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED] 
Sent: 27 March 2007 22:37
To: Tomcat Users List
Subject: Re: Sharing compiled JSPs

Steve-

jsps get pre-compiled to
$CATALINA_HOME/work/Catalina/localhost
generally in the form JSPName_jsp.java

Does this answer your question?

Martin--
---
This e-mail message (including attachments, if any) is intended for the use of 
the individual or entity to which it is addressed and may contain information 
that is privileged, proprietary , confidential and exempt from disclosure. If 
you are not the intended recipient, you are notified that any dissemination, 
distribution or copying of this communication is strictly prohibited.
---
Le présent message électronique (y compris les pièces qui y sont annexées, le 
cas échéant) s'adresse au destinataire indiqué et peut contenir des 
renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le 
destinataire de ce document, nous vous signalons qu'il est strictement interdit 
de le diffuser, de le distribuer ou de le reproduire.
- Original Message -
From: "Steve Vangasse" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, March 27, 2007 6:14 PM
Subject: Sharing compiled JSPs


My application has a large number of contexts under virtual hosts that use the 
same set of webapps. At present, all the JSPs are compiled to a different 
scratch directory under tomcat/work for each context. Is it possible to use a 
shared scratch directory to save on perm gen memory and cut down the load on 
the Jasper compiler?
 
Thanks,
 
Steve

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



FileUpload to different machine

2007-03-27 Thread Dave
Web application using JSF deployed on JBoss runing on Linux. Another server 
machine is Windows 2003. For file upload, all the file need to be stored in the 
windows machine. Questions: 
  how to access the windows' file system from Linux? 
  For file upload, can the file be uploaded directly into the windows machine 
even though the JBoss is running on the Linux machine? 
   
  Thanks
  dave
   
   

 
-
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.

RE: Issue #39631 in Tomcat 5.5.23?

2007-03-27 Thread uma_rk
Is there a way to make Tomcat verbose with regards to problems with parsing XML?
Also, why would a bad XML cause a Null Ptr Exception in Log4j ( I am not
using DOMConfigurator; I use log4j.properties to configure log4j).

Thanks,

/U

 -- Original message --
From: "Robert Harper" <[EMAIL PROTECTED]>
> This looks like it might have more to do with a malformed XML file.
> 
> Robert S. Harper
> Senior Engineer
> Information Access Technology, Inc.
> 1100 East 6600 South, Suite 300
> Salt Lake City Utah USA 84121-7411
> (801)265-8800 Ext. 255 
> FAX (801)265-8880
>  
> 
> This e-mail is intended only for the addressee and may contain confidential
> and/or privileged information. Any review, retransmission, or action taken
> upon this information by persons other than the intended recipient is
> prohibited by law. If you received this communication in error, please
> contact us immediately at 801-265-8800. Although this e-mail and any
> attachments are believed to be free of any virus or other defect, it is the
> responsibility of the recipient to ensure that anything received or opened
> is virus free. No responsibility is accepted by IAT for any loss or damage
> in the event that such a virus or defect exists.
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, March 27, 2007 1:38 PM
> To: users@tomcat.apache.org
> Subject: Issue #39631 in Tomcat 5.5.23?
> 
> 
> 
> I am running Tomcat 5.5.23 on a Windows XP machine with JDK6. I have only
> one webapp
> (others are standard webapps packaged with Tomcat). During Catalina
> bootstrap,
> I see the null pointer exception (trace below) that looks quite like #39631
> (SEE http://issues.apache.org/bugzilla/show_bug.cgi?id=39631).
> 
> I do not have any libraries in endorsed or shared directories. I am using
> ver 1.2.14
> of Log4j, ver 1.0.4 of commons logging and commons logging API
> (commons-logging-1.0.4.jar,
>  log4j-1.2.14.jar, commons-logging-api-1.0.4.jar).
> 
> Is this caused by incompatible jar versions? I am not sure how to
> troubleshoot this further.
> 
> Pl help,
> 
> Thanks,
> 
> /U
> 
> SEVERE: Context [/] startup failed due to previous errors
> Mar 26, 2007 9:08:38 PM org.apache.catalina.core.StandardContext processTlds
> SEVERE: Error reading tld listeners java.lang.NullPointerException
> java.lang.NullPointerException
> at org.apache.log4j.Category.isEnabledFor(Category.java:746)
> at
> org.apache.commons.logging.impl.Log4JLogger.isTraceEnabled(Log4JLogge
> r.java:327)
> at
> org.apache.catalina.startup.TldConfig.tldScanResourcePaths(TldConfig.
> java:582)
> at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:283)
> at
> org.apache.catalina.core.StandardContext.processTlds(StandardContext.
> java:4307)
> at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4
> 144)
> at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
> .java:760)
> at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:74
> 0)
> at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
> at
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.ja
> va:626)
> at
> org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.j
> ava:553)
> at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488
> )
> at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
> at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
> :311)
> at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
> eSupport.java:120)
> at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
> at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
> at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
> at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443
> )
> at
> org.apache.catalina.core.StandardService.start(StandardService.java:4
> 48)
> at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:700
> )
> at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
> Mar 26, 2007 9:08:38 PM org.apache.catalina.startup.ContextConfig
> processDefault
> WebConfig
> SEVERE: Parse error in default web.xml
> 
> -

Replacing tomcat-users.xml

2007-03-27 Thread Jean-Sebastien Pilon
Hello, 

I would like to replace the tomcat-users.xml file with something like
auth_ldap on apache's httpd.

I want to integrate the tomcat access to the manager, etc.. To Active
directory.

If any one has any hints, it would be appreciated.


TIA







NOTICE: This email contains privileged and confidential information and is 
intended only for the individual to whom it is addressed. If you are not the 
named addressee, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately by e-mail if you have received this 
transmission by mistake and delete this communication from your system. E-mail 
transmission cannot be guaranteed to be secured or error-free as information 
could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or 
contain viruses. 

AVIS: Le présent courriel contient des renseignements de nature privilégiée et 
confidentielle et n’est destiné qu'à la personne à qui il est adressé. Si vous 
n’êtes pas le destinataire prévu, vous êtes par les présentes avisés que toute 
diffusion, distribution ou reproduction de cette communication est strictement 
interdite.  Si vous avez reçu ce courriel par erreur, veuillez en aviser 
immédiatement l’expéditeur et le supprimer de votre système. Notez que la 
transmission de courriel ne peut en aucun cas être considéré comme inviolable 
ou exempt d’erreur puisque les informations qu’il contient pourraient être 
interceptés, corrompues, perdues, détruites, arrivées en retard ou incomplètes 
ou contenir un virus.  

-
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: Sharing compiled JSPs

2007-03-27 Thread Alon Belman

Steve,

The path for the scratch directory is configurable, so you can certainly try
to point them all at the same one and see what happens.  However it seems to
me the better solution would be to simply deploy precompiled jsps and avoid
this problem altogether -- unless there's something with your setup that
prevents that?

Both precompilation and jasper configuration are discussed in pretty good
detail here:
http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html#Production%20Configuration

On 3/27/07, Martin Gainty <[EMAIL PROTECTED]> wrote:


Steve-

jsps get pre-compiled to
$CATALINA_HOME/work/Catalina/localhost
generally in the form JSPName_jsp.java

Does this answer your question?

Martin--

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

---
Le présent message électronique (y compris les pièces qui y sont annexées,
le cas échéant) s'adresse au destinataire indiqué et peut contenir des
renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le
destinataire de ce document, nous vous signalons qu'il est strictement
interdit de le diffuser, de le distribuer ou de le reproduire.
- Original Message -
From: "Steve Vangasse" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, March 27, 2007 6:14 PM
Subject: Sharing compiled JSPs


My application has a large number of contexts under virtual hosts that
use the same set of webapps. At present, all the JSPs are compiled to a
different scratch directory under tomcat/work for each context. Is it
possible to use a shared scratch directory to save on perm gen memory
and cut down the load on the Jasper compiler?

Thanks,

Steve



Re: Sharing compiled JSPs

2007-03-27 Thread Martin Gainty
Steve-

jsps get pre-compiled to 
$CATALINA_HOME/work/Catalina/localhost
generally in the form JSPName_jsp.java

Does this answer your question?

Martin--
--- 
This e-mail message (including attachments, if any) is intended for the use of 
the individual or entity to which it is addressed and may contain information 
that is privileged, proprietary , confidential and exempt from disclosure. If 
you are not the intended recipient, you are notified that any dissemination, 
distribution or copying of this communication is strictly prohibited.
--- 
Le présent message électronique (y compris les pièces qui y sont annexées, le 
cas échéant) s'adresse au destinataire indiqué et peut contenir des 
renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le 
destinataire de ce document, nous vous signalons qu'il est strictement interdit 
de le diffuser, de le distribuer ou de le reproduire.
- Original Message - 
From: "Steve Vangasse" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, March 27, 2007 6:14 PM
Subject: Sharing compiled JSPs


My application has a large number of contexts under virtual hosts that
use the same set of webapps. At present, all the JSPs are compiled to a
different scratch directory under tomcat/work for each context. Is it
possible to use a shared scratch directory to save on perm gen memory
and cut down the load on the Jasper compiler?
 
Thanks,
 
Steve


Re: Nullpointer Exception when i try to start up

2007-03-27 Thread Rashmi Rubdi

On 3/27/07, Venky Vasant <[EMAIL PROTECTED]> wrote:


I double checked all the classpath,


There's no need to set classpath, for Tomcat 5.5 --- it automatically
detects it. Only setting JAVA_HOME, CATALINA_HOME and PATH to Java bin
and Catalina bin is enough.

Check your project's web.xml and make sure there are no errors in it.

Look in Tomcat Log Files for additional *helpful* error messages,
those will give a clue if something else is wrong.

-Rashmi

-
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: Basic Auth without web.xml not working

2007-03-27 Thread Berglas, Anthony
Thanks for your reply.

> Getting the user name and password
> 
> String authorization = request.getHeader("Authorization");
> if (authorization == null) return 0;
> 
> // Authorization headers looks like "Basic blahblah",
> // where blahblah is the base64 encoded username and
> // password. We want the part after "Basic ".
> String userInfo = authorization.substring(6).trim();
> BASE64Decoder decoder = new BASE64Decoder();
> String nameAndPassword = "";
> try{
> nameAndPassword = new
> String(decoder.decodeBuffer(userInfo));
> }catch ( IOException e ){}
> // Decoded part looks like "username:password".
> int index = nameAndPassword.indexOf(":");
> String user = nameAndPassword.substring(0, index);
> user = user.trim();
> if(user == null) return 0;
> String password = nameAndPassword.substring(index+1);
> password = password.trim();
> if(password == null) return 0;

Yes, but now how do you validate the password is correct and check which
roles?  (Don't want to parse tomcat-users.xml, and we would like to be
able to use the LDAP etc. plug ins.)  I don't think that JAAS is hooked
up at that level.

> 
> To trigger the browser the headers look like this
> response.setStatus(response.SC_UNAUTHORIZED);
> response.setHeader("WWW-Authenticate", "BASIC
> realm=\"User Check\"");

Yes, that's essentially what I do.  sendError is slightly better than
setStatus.

> 
> Tomcat seems to only check the Authorization: headers if there is some
>  explicitly declared in web.xml.  However, it
> appears that the  optimization has been incorrectly implemented
because
> it does not then recheck the header if request.isUserInRole(...) etc.
> are called.  So users cannot log into a system that uses
> request.isUserInRole(...).
> 
> More specifically,
> my simple application tests request.isUserInRole(...) and
> request.getRemoteUser().  If the user lacks permissions the
application
> sends a 401, and the user is prompted for a name/password which is
sent
> back as a Authorization: Basic dGltOlBhc3N3b3JkMQ==
> 
> So far so good.  But Tomcat then ignores the Authorization: header
which
> is correctly sent by the browser.
> 
> The web.xml has
> 
> BASIC
> Agile UI: tim/Password1
> 
> in it.
> 
> There is no  clause in the web.xml because I do
not
> want to declare them there.  (They are instead declared internally as
> part of a menuing system, which calls request.isUserInRole().)
> 
> A hack to make Tomcat look at the Authorization: header is to add the
> following to web.xml
> 
> 
> 
> dbtest
> /dbtest/*
> 
> 
> dummy
> 
> 
> 
> In which case it works if one accepts the unwanted dummy query.
> 
> Is it possible to tell Tomcat to always check the Authorization:?
> 
> Alternatively, is it possible to grant the dummy role to anonymous
> users?  Do anonymous users have any role that could be added to a
dummy
> ?
> 
> Is it possible for me to determine which users have which roles in my
> application so that I can check the header myself?  Ie. get at the
> tomcat-users.xml style info, in a (fairly) web server independent
> manner?
> 
> Or going the other way, is it possible for webapp to easily find out
> what roles are required for a given .jsp to run?  (We want to grey out
> menu items that a user has no access to.)
> 
> My general feeling is that attempting to use Java Servlet security is
> just wrong.  One should simply do it oneself.
> 
> Anthony
> 
> --
> Dr Anthony Berglas
> Ph. +61 7 3227 4410
> (Mob. +61 42 783 0248)
> [EMAIL PROTECTED]; [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: Basic Auth without web.xml not working

2007-03-27 Thread Berglas, Anthony
Thanks for the reply.

The underlying issue is that when Role R is required for Page P then
*TWO* things need to happen depending on whether the user is in role R.
These are

1. Allow or block access to page P.
2. Grey out or not grey out the menu item for page P.

We only want to specify the fact that Role R is required for Page P
ONCE.  Declarations in web.xml handle 1.  but not 2.  

That is why I want to do it "manually".  (Where "manual" means a few
lines of code in one specific method that is automatically called by all
pages as part of a larger infrastructure.)

> Well, since you haven't asked Tomcat to provide authorization, it
> doesn't care about authentication. That seems perfectly reasonable to
me.

Not so.  I have asked Tomcat to provide authorization by calling
request.isUserInRole(...).  And Tomcat fails.

IMHO it is a straight bug in an optimization.  isUserInRole etc. needs
to have an extra test:
  if (! authenticationHeaderProcessed() )
 processAuthenticationHeader();

I'll hack around it if there is no magic option.

Anthony

> Berglas, Anthony wrote:
> > Tomcat seems to only check the Authorization: headers if there is
some
> >  explicitly declared in web.xml.  However, it
> > appears that the  optimization has been incorrectly implemented
because
> > it does not then recheck the header if request.isUserInRole(...)
etc.
> > are called.  So users cannot log into a system that uses
> > request.isUserInRole(...).


-
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 Eclipse Integration

2007-03-27 Thread Jacob Rhoden

Venky Vasant wrote:

Some one please point me to a good link for setting up Eclipse 3.2.1 with 
tomcat 5.5
i am having hard time here 
  
After a hours of trying to get eclipse and tomcat to work together 
nicely, i gave up and just installed netbeans (: Some people have great 
success with eclipse, I kept on getting strange log error messages with 
plain vanilla install on Home Windows XP (although admittedly the hong 
kong edition of xp). I have nothing against eclips, but Netbeans "just 
works".


--
__
Jacob Rhoden - http://www.jacobrhoden.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: Tomcat Eclipse Integration

2007-03-27 Thread Huy Vo \(hvo\)
I have 3.2.1 with Tomcat 5.0.28 using Sysdeo plugin
http://www.sysdeo.com/eclipse/tomcatplugin.  Setup is straight-forward.

HTH.

===
Huy T. Vo
Voice:   408-853-0535
Fax:  408-853-1671

-Original Message-
From: Venky Vasant [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 27, 2007 4:34 PM
To: users@tomcat.apache.org
Subject: Tomcat Eclipse Integration

Some one please point me to a good link for setting up Eclipse 3.2.1
with tomcat 5.5 i am having hard time here 

Regards
Venkat


 


8:00? 8:25? 8:40? Find a flick in no time with the Yahoo! Search movie
showtime shortcut.
http://tools.search.yahoo.com/shortcuts/#news

-
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 Eclipse Integration

2007-03-27 Thread Venky Vasant
Some one please point me to a good link for setting up Eclipse 3.2.1 with 
tomcat 5.5
i am having hard time here 

Regards
Venkat


 

8:00? 8:25? 8:40? Find a flick in no time 
with the Yahoo! Search movie showtime shortcut.
http://tools.search.yahoo.com/shortcuts/#news

Sharing compiled JSPs

2007-03-27 Thread Steve Vangasse
My application has a large number of contexts under virtual hosts that
use the same set of webapps. At present, all the JSPs are compiled to a
different scratch directory under tomcat/work for each context. Is it
possible to use a shared scratch directory to save on perm gen memory
and cut down the load on the Jasper compiler?
 
Thanks,
 
Steve


RE: TOMCAT 5.0.28 stability

2007-03-27 Thread Bob Hall

--- Dwight Farris <[EMAIL PROTECTED]> wrote:

> Thanks for your response; I will look into the SQL
> code
> 
> Dwight
> 
> -Original Message-
> From: gb1071nx
> [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, March 27, 2007 9:47 AM
> To: Tomcat Users List
> Subject: RE: TOMCAT 5.0.28 stability
> 
> This is certainly not a tomcat stability problem,
> it's the application
> that has been coded poorly
> 
> > syntax to use near 's Time Management workshop
> 
> You've got some SQL code somewhere that looks like
> this: 
> 
> String sql = "INSERT INTO table (foo) VALUES('" +
> fooVar + "')";
> 
> And you're inserting data (fooVar variable contains)
> 
> "Manager's Time Management workshop"
> 
> Which results in SQL that looks like: 
> 
> INSERT INTO table (foo) VALUES('Manager's Time
> Management workshop')
> 
> Notice how the single quote results in mal-formed
> SQL? 
> 

Dwight,

Take a look at JDBC's PreparedStatement and use
the setString() method to set the "Manager's Time
Management workshop" value.

This will also serve to avoid SQL injection.

-Bob


 

TV dinner still cooling? 
Check out "Tonight's Picks" on Yahoo! TV.
http://tv.yahoo.com/

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



jsp-applet

2007-03-27 Thread Abdelmonaam Kallali
Hi everyone
I have an applet called by a jsp file but the applet is not initiated the
jsp file contains
rs1=stmt.executeQuery("select status, sum(counter) as counterSum, allDates
from(select * from(select distinct status, count(status) as counter
,dateOpened as allDates from ncrreport where unitSerNum!='no unit' and
dateOpened between curdate()-5 and curdate() group by allDates, status)as
opened union select * from  (select distinct status,
count(status),dateClosed as allDates from ncrreport where unitSerNum!='no
unit' and  dateClosed between curdate()-5 and curdate() group by allDates,
status)as closed )as allNcrs group by allDates, status");
while(rs1.next())
{
status = rs1.getString("status");
if((status.equals("closed")&& i%2==0)||(status.equals("open")&& i%2==1))
{
counter[i] = rs1.getString("counterSum");
dateOpened[i] = rs1.getString("allDates");
}
else if(i%2==0)
{
counter[i] = "0";
dateOpened[i] = rs1.getString("allDates");
counter[i+1] = rs1.getString("counterSum");
dateOpened[i+1] = dateOpened[i];
i++;
}
else 
{
counter[i] = "0";
dateOpened[i] = dateOpened[i-1];
counter[i+1] = rs1.getString("counterSum");
dateOpened[i+1] = rs1.getString("allDates");
i++;
}
i++;
}
for (j=0; j
This is an applet template:
<%=i%>
<%=allDates%>
<%=allCounters%>

   

   
  
  
  
   
  
  Unable to load applet  
 





and a java file

import java.awt.*;
import java.applet.*;
import java.sql.*;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.text.DateFormat;
import java.util.*;
import java.applet.Applet;
 class Fluctuations6 extends javax.swing.JApplet {
int i;
String[] dateOpened ;
String[] counterString;
String allDates;
String allCounters;
int[] counter;

public void init() 
{
i=Integer.parseInt(getParameter("increment"));
dateOpened=new String[10];
counterString=new String[10];
counter=new int[10];
for(int j=0;jmailto:[EMAIL PROTECTED] 
Sent: Monday, March 26, 2007 2:41 PM
To: Tomcat Users List
Subject: Re: Applet not initiated

Also I don't know if you're using strict XHTML.

The applet tag is not supported in XHTML as mentioned here :
http://www.w3schools.com/tags/tag_applet.asp

they recommend using the HTML object tag
http://www.w3schools.com/tags/tag_object.asp instead of applet tag.

-
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: Issue #39631 in Tomcat 5.5.23?

2007-03-27 Thread Robert Harper
This looks like it might have more to do with a malformed XML file.

Robert S. Harper
Senior Engineer
Information Access Technology, Inc.
1100 East 6600 South, Suite 300
Salt Lake City Utah USA 84121-7411
(801)265-8800 Ext. 255 
FAX (801)265-8880
 

This e-mail is intended only for the addressee and may contain confidential
and/or privileged information. Any review, retransmission, or action taken
upon this information by persons other than the intended recipient is
prohibited by law. If you received this communication in error, please
contact us immediately at 801-265-8800. Although this e-mail and any
attachments are believed to be free of any virus or other defect, it is the
responsibility of the recipient to ensure that anything received or opened
is virus free. No responsibility is accepted by IAT for any loss or damage
in the event that such a virus or defect exists.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 27, 2007 1:38 PM
To: users@tomcat.apache.org
Subject: Issue #39631 in Tomcat 5.5.23?



I am running Tomcat 5.5.23 on a Windows XP machine with JDK6. I have only
one webapp
(others are standard webapps packaged with Tomcat). During Catalina
bootstrap,
I see the null pointer exception (trace below) that looks quite like #39631
(SEE http://issues.apache.org/bugzilla/show_bug.cgi?id=39631).

I do not have any libraries in endorsed or shared directories. I am using
ver 1.2.14
of Log4j, ver 1.0.4 of commons logging and commons logging API
(commons-logging-1.0.4.jar,
 log4j-1.2.14.jar, commons-logging-api-1.0.4.jar).

Is this caused by incompatible jar versions? I am not sure how to
troubleshoot this further.

Pl help,

Thanks,

/U

SEVERE: Context [/] startup failed due to previous errors
Mar 26, 2007 9:08:38 PM org.apache.catalina.core.StandardContext processTlds
SEVERE: Error reading tld listeners java.lang.NullPointerException
java.lang.NullPointerException
at org.apache.log4j.Category.isEnabledFor(Category.java:746)
at
org.apache.commons.logging.impl.Log4JLogger.isTraceEnabled(Log4JLogge
r.java:327)
at
org.apache.catalina.startup.TldConfig.tldScanResourcePaths(TldConfig.
java:582)
at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:283)
at
org.apache.catalina.core.StandardContext.processTlds(StandardContext.
java:4307)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4
144)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:760)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:74
0)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.ja
va:626)
at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.j
ava:553)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488
)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:311)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:120)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443
)
at
org.apache.catalina.core.StandardService.start(StandardService.java:4
48)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700
)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Mar 26, 2007 9:08:38 PM org.apache.catalina.startup.ContextConfig
processDefault
WebConfig
SEVERE: Parse error in default web.xml

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



Issue #39631 in Tomcat 5.5.23?

2007-03-27 Thread uma_rk


I am running Tomcat 5.5.23 on a Windows XP machine with JDK6. I have only one 
webapp
(others are standard webapps packaged with Tomcat). During Catalina bootstrap,
I see the null pointer exception (trace below) that looks quite like #39631
(SEE http://issues.apache.org/bugzilla/show_bug.cgi?id=39631).

I do not have any libraries in endorsed or shared directories. I am using ver 
1.2.14
of Log4j, ver 1.0.4 of commons logging and commons logging API 
(commons-logging-1.0.4.jar,
 log4j-1.2.14.jar, commons-logging-api-1.0.4.jar).

Is this caused by incompatible jar versions? I am not sure how to troubleshoot 
this further.

Pl help,

Thanks,

/U

SEVERE: Context [/] startup failed due to previous errors
Mar 26, 2007 9:08:38 PM org.apache.catalina.core.StandardContext processTlds
SEVERE: Error reading tld listeners java.lang.NullPointerException
java.lang.NullPointerException
at org.apache.log4j.Category.isEnabledFor(Category.java:746)
at org.apache.commons.logging.impl.Log4JLogger.isTraceEnabled(Log4JLogge
r.java:327)
at org.apache.catalina.startup.TldConfig.tldScanResourcePaths(TldConfig.
java:582)
at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:283)
at org.apache.catalina.core.StandardContext.processTlds(StandardContext.
java:4307)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
144)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:74
0)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.ja
va:626)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.j
ava:553)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488
)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443
)
at org.apache.catalina.core.StandardService.start(StandardService.java:4
48)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700
)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Mar 26, 2007 9:08:38 PM org.apache.catalina.startup.ContextConfig processDefault
WebConfig
SEVERE: Parse error in default web.xml

-
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: Nullpointer Exception when i try to start up

2007-03-27 Thread Venky Vasant
yes they seem to be fine, i doing it from eclipse.
The similar environment ran fine with 4.0 version of tomcat

-venkat


- Original Message 
From: Rashmi Rubdi <[EMAIL PROTECTED]>
To: Tomcat Users List 
Sent: Tuesday, March 27, 2007 10:26:20 AM
Subject: Re: Nullpointer Exception when i try to start up


On 3/27/07, Venky Vasant <[EMAIL PROTECTED]> wrote:
> I double checked all the classpath, Configuration files,

What about JAVA_HOME and CATALINA_HOME ?

-Rashmi

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


 

Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
http://videogames.yahoo.com/platform?platform=120121

Re: Can't view examples

2007-03-27 Thread Joe Green

Yes the folders are there but they are empty. Does Apache Tomcat/6.0.10 come 
JSP/Servlet examples? 


>--- Original Message Follows ---
>From: "reno" 
>To: Tomcat Users List 
>Subject: Re: Can't view examples
>Date: Tue, 27 Mar 2007 09:37:47 +0200
>
>are you sure that the folders that you wanna see are on your machine?
>
>> Hi, 
>> 
>> I installed Apache Tomcat/6.0.10 on Win
>> XP Pro.  Tomcat Web Application Manager
>> shows status is OK. But when I click on Servlets and JSP Examples link on 
>> http://127.0.0.1:8080/, I get a 404 error.  I also get 404 errors
>> when I click on links /examples/, /host-manager and /manager. 
>> 
>> I do something wrong? I didn't get any error during installation. I was 
>> assuming that
>> Apache/Tomcat comes with sample examples. Can some
>> one give me some idea as what is going on? I am new to JSP and Apache/Tomcat.
>>  
>> Thanks
>> 
>> joe 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> -
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>
>


-
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 on Windows Server 2003 R2

2007-03-27 Thread Layton Berry

Thanks for the bugzilla link. I see how that would work now.

Layton


Per Johnsson wrote:

Hi!

Ok, but adding the path to javajre/bin I making the service finding the
dll which is in the bin directory.

I had the exact same problem and by adding the JAVA_HOME and PATH solved
my problems, then if it's a good thing to do I don't know.

There is a bugzilla describing the issue here:
http://issues.apache.org/bugzilla/show_bug.cgi?id=41538

Regards Per Jonsson
 
  



Re: Can't view examples

2007-03-27 Thread Rashmi Rubdi

On 27 Mar 2007 09:40:50 -0700, Joe Green <[EMAIL PROTECTED]> wrote:


Yes the folders are there but they are empty. Does Apache Tomcat/6.0.10 come > 
JSP/Servlet examples?


Yes, it should. At least the ZIP file I downloaded came with examples.

apache-tomcat-6.0.10\webapps\examples\ -- all examples are here --

-Rashmi

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



RE: TOMCAT 5.0.28 stability

2007-03-27 Thread Dwight Farris
Thanks for your response; I will look into the SQL code

Dwight

-Original Message-
From: gb1071nx [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 27, 2007 9:47 AM
To: Tomcat Users List
Subject: RE: TOMCAT 5.0.28 stability

This is certainly not a tomcat stability problem, it's the application
that has been coded poorly

> syntax to use near 's Time Management workshop

You've got some SQL code somewhere that looks like this: 

String sql = "INSERT INTO table (foo) VALUES('" + fooVar + "')";

And you're inserting data (fooVar variable contains)

"Manager's Time Management workshop"

Which results in SQL that looks like: 

INSERT INTO table (foo) VALUES('Manager's Time Management workshop')

Notice how the single quote results in mal-formed SQL? 




> -Original Message-
> From: Dwight Farris [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, March 27, 2007 11:34 AM
> To: 'Tomcat Users List'
> Subject: TOMCAT 5.0.28 stability
> 
> Hello Bob,
> I made the change in CATALINA_OPTS in catalina.sh; and I 
> searched the Catalina.out file for exceptions with the 
> following returning:
> 
>   java.sql.SQLException: You have an error in your SQL 
> syntax; check
> the   manual that corresponds to your MySQL server version 
> for the right
> syntax to use near 's Time Management workshop
> 
>   java.sql.SQLException: Illegal operation on empty result set...
> 
> If I am not mistaken, there appears to be an issue with 
> resource centered on data manipulation.  I am continuously 
> writing data from a data warehouse to a "local" MySQL data 
> repository.  I envision receiving a number of these types of 
> exceptions; however I am beginning to believe TOMCAT 5.0 has 
> an "issue" supporting the processes from MySQL.  
> 
> The premise of this assumption stems from the fact that I 
> have the same scenario running on a TOMCAT 5.5 development 
> platform and it will only stop running when the app fails on 5.0.  
> 
> Hope this makes some sense.
> 
> Dwight
> 
> __
> __
> If your webapp(s) really need a gig of memory, I sugggest 
> changing CATALINA_OPTS
> 
>  CATALINA_OPTS="$CATALINA_OPTS -Xms1024m -Xmx1024m"
> 
> Looks like you are using unix/linux.  Did you 'grep'
> for Exception and Error in catalina.out?
> 
> The Cohorts getName() messages don't look familiar to me.  Is 
> there a Cohorts class in one or more of your webapp's?
> 
> -Bob
> 
> 
> 
>  
> __
> __
> 
> Never miss an email again!
> Yahoo! Toolbar alerts you the instant new Mail arrives.
> http://tools.search.yahoo.com/toolbar/features/mail/
> 
> -
> 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: Paths in CSS files

2007-03-27 Thread Rashmi Rubdi

On 3/27/07, Mike Quilleash <[EMAIL PROTECTED]> wrote:

Thanks for the reply.

*I* don't want to use contexts but I'm sure some of our difficult
clients will ;)  Is virtual hosts Tomcat specific as we potentially need
to support other web containers too which might not have virtual host
capability.  Is is part of the servlet specification or just a Tomcat
specific feature?


You're welcome.

Virtual Hosts are in the Servlet 2.4 Specification under
section SRV.3.6 Multiple Hosts and Servlet Contexts

So they may be supported by other web containers besides Tomcat. But I
don't have a list of which web containers do and which don't.

But if your clients do insist on multiple Contexts, then there's no
need to use virtual hosts :-) , but I just wanted to let you know
about this option incase you didn't consider it already.

Another option is to use the JSTL 1.1.x c:url tag --- with this tag
there's no need to explicitly specify the Context.

For example:



${myImage}

The above prints /Context/images/AZWL.gif

In case you treat your CSS as a JSP file then , where ever you specify
the URL you would specify ${myImage}

-Rashmi



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]



RE: TOMCAT 5.0.28 stability

2007-03-27 Thread gb1071nx
This is certainly not a tomcat stability problem, it's the application
that has been coded poorly

> syntax to use near 's Time Management workshop

You've got some SQL code somewhere that looks like this: 

String sql = "INSERT INTO table (foo) VALUES('" + fooVar + "')";

And you're inserting data (fooVar variable contains)

"Manager's Time Management workshop"

Which results in SQL that looks like: 

INSERT INTO table (foo) VALUES('Manager's Time Management workshop')

Notice how the single quote results in mal-formed SQL? 




> -Original Message-
> From: Dwight Farris [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, March 27, 2007 11:34 AM
> To: 'Tomcat Users List'
> Subject: TOMCAT 5.0.28 stability
> 
> Hello Bob,
> I made the change in CATALINA_OPTS in catalina.sh; and I 
> searched the Catalina.out file for exceptions with the 
> following returning:
> 
>   java.sql.SQLException: You have an error in your SQL 
> syntax; check
> the   manual that corresponds to your MySQL server version 
> for the right
> syntax to use near 's Time Management workshop
> 
>   java.sql.SQLException: Illegal operation on empty result set...
> 
> If I am not mistaken, there appears to be an issue with 
> resource centered on data manipulation.  I am continuously 
> writing data from a data warehouse to a "local" MySQL data 
> repository.  I envision receiving a number of these types of 
> exceptions; however I am beginning to believe TOMCAT 5.0 has 
> an "issue" supporting the processes from MySQL.  
> 
> The premise of this assumption stems from the fact that I 
> have the same scenario running on a TOMCAT 5.5 development 
> platform and it will only stop running when the app fails on 5.0.  
> 
> Hope this makes some sense.
> 
> Dwight
> 
> __
> __
> If your webapp(s) really need a gig of memory, I sugggest 
> changing CATALINA_OPTS
> 
>  CATALINA_OPTS="$CATALINA_OPTS -Xms1024m -Xmx1024m"
> 
> Looks like you are using unix/linux.  Did you 'grep'
> for Exception and Error in catalina.out?
> 
> The Cohorts getName() messages don't look familiar to me.  Is 
> there a Cohorts class in one or more of your webapp's?
> 
> -Bob
> 
> 
> 
>  
> __
> __
> 
> Never miss an email again!
> Yahoo! Toolbar alerts you the instant new Mail arrives.
> http://tools.search.yahoo.com/toolbar/features/mail/
> 
> -
> 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: Apache and Tomcat bridging - Servlet enabled?

2007-03-27 Thread Propes, Barry L [GCG-NAOT]
sounds like you may have declared the servlet name, but not the servlet mapping?

I've accidentally left that out before on my web.xml file.


-Original Message-
From: Foo Shyn [mailto:[EMAIL PROTECTED]
Sent: Monday, March 26, 2007 9:28 PM
To: Tomcat Users List
Subject: Apache and Tomcat bridging - Servlet enabled?


Hi,

This question suddenly struck me when i'm trying to solve my server problem. 
Here goes:

Server settings: Apache 2 as front, Tomcat 4.1 as back, J2SDK 1.4.2
Let say that i'd configure that Apache so that whenever a request for 
www.abc.com will be redirected to the Tomcat's A context which contain a 
servlet TestServlet. The web.xml is there.

When i access the www.abc.com/TestServlet , the Apache throws me a 404 error 
(not Tomcat), which means that the Apache failed to redirect the request to A 
folder. But when i configure my servlet path as /TestServlet.jsp, and i use the 
path www.abc.com/TestServlet.jsp (not a jsp page!) to access the servlet, i 
manage to do so. 

Is this some settings problem on Apache? or my Tomcat problem?

Thanx.
Regards,
FooShyn

-
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 view examples

2007-03-27 Thread Propes, Barry L [GCG-NAOT]
were those commented out in the web.xml or server.xml file?

-Original Message-
From: Joe Green [mailto:[EMAIL PROTECTED]
Sent: Monday, March 26, 2007 8:53 PM
To: users@tomcat.apache.org
Subject: Can't view examples


Hi, 

I installed Apache Tomcat/6.0.10 on Win
XP Pro.  Tomcat Web Application Manager
shows status is OK. But when I click on Servlets and JSP Examples link on 
http://127.0.0.1:8080/, I get a 404 error.  I also get 404 errors
when I click on links /examples/, /host-manager and /manager. 

I do something wrong? I didn't get any error during installation. I was 
assuming that
Apache/Tomcat comes with sample examples. Can some
one give me some idea as what is going on? I am new to JSP and Apache/Tomcat.
 
Thanks

joe 







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


-
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 5.0.28 stability

2007-03-27 Thread Dwight Farris
Hello Bob,
I made the change in CATALINA_OPTS in catalina.sh; and I searched the
Catalina.out file for exceptions with the following returning:

java.sql.SQLException: You have an error in your SQL syntax; check
the manual that corresponds to your MySQL server version for the right
syntax to use near 's Time Management workshop

java.sql.SQLException: Illegal operation on empty result set...

If I am not mistaken, there appears to be an issue with resource centered on
data manipulation.  I am continuously writing data from a data warehouse to
a "local" MySQL data repository.  I envision receiving a number of these
types of exceptions; however I am beginning to believe TOMCAT 5.0 has an
"issue" supporting the processes from MySQL.  

The premise of this assumption stems from the fact that I have the same
scenario running on a TOMCAT 5.5 development platform and it will only stop
running when the app fails on 5.0.  

Hope this makes some sense.

Dwight


If your webapp(s) really need a gig of memory,
I sugggest changing CATALINA_OPTS

 CATALINA_OPTS="$CATALINA_OPTS -Xms1024m -Xmx1024m"

Looks like you are using unix/linux.  Did you 'grep'
for Exception and Error in catalina.out?

The Cohorts getName() messages don't look familiar
to me.  Is there a Cohorts class in one or more
of your webapp's?

-Bob



 


Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/

-
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: Paths in CSS files

2007-03-27 Thread Dhaval Patel
This is like one of those choice questions. As other mentioned, you can rename 
css file to jsp file and use custom jsp tags. Personally I would not use it 
because I use dreamweaver when I design page. So I need preview while working 
on css. Also I would like to make css code clean as well. Anyway that's just 
me. Also if there are separate developers and designers in the team, designers 
will find themselves comfortable with this approach as they can use their 
design tool nicely and would save their time. Developers will also get happy as 
they see less questions/bugs from designers.

As you have pointed out, redirect might cause interference with other 
application. To avoid that, you might have to put style, images, script, etc. 
in separate folder called "assets" or something. This way your design elements 
or extra files will be only in "assets" folder and your main web application 
structure will remain unchanged. Now you might have two images folder, one in 
your webapp as well as one inside "assets". Those two folder serve different 
purpose. The one that is inside "assets" will only serve images that used by 
style and has only design meaning. Now the "images" folder on main webapp has 
images which have business meaning. For example, if you are selling some 
product, it has product images, etc.

To me, it's just one decision which has to made. There are pros and cons of 
that but we we have to accept both.

Regards,
Dhaval

- Original Message 
From: Mike Quilleash  <[EMAIL PROTECTED]>
To: Tomcat Users List 
Sent: Tuesday, March 27, 2007 10:32:57 AM
Subject: RE: Paths in CSS files

Hi Dhaval,

I'd prefer to avoid relative addressing but I've read that the paths are
relative to the css, not the html (which would cause problems) that is
loading it so it may work ok.

Using a redirect in web.xml is an interesting option, however if my app
has to co-exist with another application on the same webserver, which
may be using the root context, then I might end up annoying the other
application too.  Would this even work (I'm no expert) but would the app
web.xml even be considered for URL requests that do not fall inside the
web app context path?

Thanks.

Mike.

-Original Message-
From: Dhaval Patel [mailto:[EMAIL PROTECTED] 
Sent: 27 March 2007 14:35
To: Tomcat Users List
Subject: Re: Paths in CSS files

Hi Mike,

Use relative address for images in your CSS. That's a quick way. 

The other way I can think of is to use redirect in web.xml of your
webapp in such a way that all request to /image/* goes to
context/image/*

Hope it helps.

Regards,
D


- Original Message 
From: Mike Quilleash  <[EMAIL PROTECTED]>
To: Tomcat Users List 
Sent: Tuesday, March 27, 2007 9:21:38 AM
Subject: Paths in CSS files

Hi all,
 
I have a question about accessing resources from within CSS files,
images mainly.  Take the following CSS snippet.
 
.bt {
 background:url(/image/box.png) no-repeat 100% 0;  margin:0 0 0 18px;
height:17px;  }

Particularly the url "/image/box.png".  Potentially my Tomcat web
application may be run with a context path so "/image/" becomes
"/contextpath/image" and all the CSS breaks.  Is there a way round this?
Or should I be placing the urls somewhere else?
 
Thanks.
 
Mike.
 

 This e-mail is bound by the terms and conditions described at
http://www.subexazure.com/mail-disclaimer.html






 


Get your own web address.  
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL

-
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 is bound by the terms and conditions described at 
http://www.subexazure.com/mail-disclaimer.html



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






 

Get your own web address.  
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL

-
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: Nullpointer Exception when i try to start up

2007-03-27 Thread Rashmi Rubdi

On 3/27/07, Venky Vasant <[EMAIL PROTECTED]> wrote:

I double checked all the classpath, Configuration files,


What about JAVA_HOME and CATALINA_HOME ?

-Rashmi

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



Nullpointer Exception when i try to start up

2007-03-27 Thread Venky Vasant
Hello i get this exception when i try to start

java.lang.NullPointerException
at org.apache.catalina.startup.Catalina.await(Catalina.java:615)
at org.apache.catalina.startup.Catalina.start(Catalina.java:575)
at org.apache.catalina.startup.Catalina.process(Catalina.java:183)
at org.apache.catalina.startup.Catalina.main(Catalina.java:165)

I double checked all the classpath, Configuration files,
I am in the process of moving 4.0 to 5.5 version
but i have changed all the jar files i was using before to the ones released in 
5.5

catalina
servlets-common
servlets-default
servlets-invoker
Servlets-manager  -  I did not find this one in 5.5
tomcat-ajp
tomcat-util

Some one let me know what possibly has missed or wrong here

Regards
Venkat


 

Get your own web address.  
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL

Re: Paths in CSS files

2007-03-27 Thread Darren
Something I've done before is rename my css files to jsp and use $ 
{pageContext.request.contextPath} within them.


<[EMAIL PROTECTED] contentType="text/css"%>
<[EMAIL PROTECTED] pageEncoding="UTF-8"%>

#header {
margin: 0px 0px 15px 0px;
height: 100px;
background: url(${pageContext.request.contextPath}/image/ 
logo.gif) top

}


On 27 Mar 2007, at 14:21, Mike Quilleash wrote:


Hi all,

I have a question about accessing resources from within CSS files,
images mainly.  Take the following CSS snippet.

.bt {
 background:url(/image/box.png) no-repeat 100% 0;
 margin:0 0 0 18px;
 height:17px;
 }

Particularly the url "/image/box.png".  Potentially my Tomcat web
application may be run with a context path so "/image/" becomes
"/contextpath/image" and all the CSS breaks.  Is there a way round  
this?

Or should I be placing the urls somewhere else?

Thanks.

Mike.


 This e-mail is bound by the terms and conditions described at  
http://www.subexazure.com/mail-disclaimer.html





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



Re: Paths in CSS files

2007-03-27 Thread Hassan Schroeder

On 3/27/07, Mike Quilleash <[EMAIL PROTECTED]> wrote:


I have a question about accessing resources from within CSS files,



Particularly the url "/image/box.png".  Potentially my Tomcat web
application may be run with a context path so "/image/" becomes
"/contextpath/image" and all the CSS breaks.  Is there a way round this?


background:url(${pageContext.request.contextPath}/image/box.png)
no-repeat 100% 0;

Parse those files as JSPs and the above will take care of it :-)

HTH,
--
Hassan Schroeder  [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: Paths in CSS files

2007-03-27 Thread Mike Quilleash
Thanks for the reply.

*I* don't want to use contexts but I'm sure some of our difficult
clients will ;)  Is virtual hosts Tomcat specific as we potentially need
to support other web containers too which might not have virtual host
capability.  Is is part of the servlet specification or just a Tomcat
specific feature?

Thanks.

Mike.

-Original Message-
From: Rashmi Rubdi [mailto:[EMAIL PROTECTED] 
Sent: 27 March 2007 15:15
To: Tomcat Users List
Subject: Re: Paths in CSS files

Another option is to host different applications on the root context and
access each application with a virtual host. With this set up you don't
need to change anything in your app.

But it is not clear if you do want to use contexts or if virtual hosts
is an alternative you would consider.

-Rashmi

-
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 is bound by the terms and conditions described at 
http://www.subexazure.com/mail-disclaimer.html


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



RE: Paths in CSS files

2007-03-27 Thread Mike Quilleash
Hi Dhaval,

I'd prefer to avoid relative addressing but I've read that the paths are
relative to the css, not the html (which would cause problems) that is
loading it so it may work ok.

Using a redirect in web.xml is an interesting option, however if my app
has to co-exist with another application on the same webserver, which
may be using the root context, then I might end up annoying the other
application too.  Would this even work (I'm no expert) but would the app
web.xml even be considered for URL requests that do not fall inside the
web app context path?

Thanks.

Mike.

-Original Message-
From: Dhaval Patel [mailto:[EMAIL PROTECTED] 
Sent: 27 March 2007 14:35
To: Tomcat Users List
Subject: Re: Paths in CSS files

Hi Mike,

Use relative address for images in your CSS. That's a quick way. 

The other way I can think of is to use redirect in web.xml of your
webapp in such a way that all request to /image/* goes to
context/image/*

Hope it helps.

Regards,
D


- Original Message 
From: Mike Quilleash  <[EMAIL PROTECTED]>
To: Tomcat Users List 
Sent: Tuesday, March 27, 2007 9:21:38 AM
Subject: Paths in CSS files

Hi all,
 
I have a question about accessing resources from within CSS files,
images mainly.  Take the following CSS snippet.
 
.bt {
 background:url(/image/box.png) no-repeat 100% 0;  margin:0 0 0 18px;
height:17px;  }

Particularly the url "/image/box.png".  Potentially my Tomcat web
application may be run with a context path so "/image/" becomes
"/contextpath/image" and all the CSS breaks.  Is there a way round this?
Or should I be placing the urls somewhere else?
 
Thanks.
 
Mike.
 

 This e-mail is bound by the terms and conditions described at
http://www.subexazure.com/mail-disclaimer.html






 


Get your own web address.  
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL

-
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 is bound by the terms and conditions described at 
http://www.subexazure.com/mail-disclaimer.html


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



Re: Paths in CSS files

2007-03-27 Thread Rashmi Rubdi

Another option is to host different applications on the root context
and access each application with a virtual host. With this set up you
don't need to change anything in your app.

But it is not clear if you do want to use contexts or if virtual hosts
is an alternative you would consider.

-Rashmi

-
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: Paths in CSS files

2007-03-27 Thread Dhaval Patel
Hi Mike,

Use relative address for images in your CSS. That's a quick way. 

The other way I can think of is to use redirect in web.xml of your webapp in 
such a way that all request to /image/* goes to context/image/*

Hope it helps.

Regards,
D


- Original Message 
From: Mike Quilleash  <[EMAIL PROTECTED]>
To: Tomcat Users List 
Sent: Tuesday, March 27, 2007 9:21:38 AM
Subject: Paths in CSS files

Hi all,
 
I have a question about accessing resources from within CSS files,
images mainly.  Take the following CSS snippet.
 
.bt {
 background:url(/image/box.png) no-repeat 100% 0;
 margin:0 0 0 18px;
 height:17px;
 }

Particularly the url "/image/box.png".  Potentially my Tomcat web
application may be run with a context path so "/image/" becomes
"/contextpath/image" and all the CSS breaks.  Is there a way round this?
Or should I be placing the urls somewhere else?
 
Thanks.
 
Mike.
 

 This e-mail is bound by the terms and conditions described at 
http://www.subexazure.com/mail-disclaimer.html






 

Get your own web address.  
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL

-
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: Requesting files with non-English/international characters in their names

2007-03-27 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Thomas,

Thomas Peter Berntsen wrote:
>> #2 [POST] should always work, assuming that you have UTF-8-ized your app.
> 
> Inline SCs display correctly, form submitted SC display with errors
> (displayed: æøå), browser detects UTF-8.

:(

> The JSP contains the following headers:
> 
> Placed as numero uno:
> <[EMAIL PROTECTED] pageEncoding="UTF-8" contentType="text/html; 
> charset=UTF-8" %>
> 
> In the HTML  section:
> 

What does your browser report as the character encoding here? So weird...

>> #3 should always work, since the directory listing should know what
>>encoding it is using, and set the content-type header correctly
>>(can you verify that the directory listing page display is using
>>UTF-8 by looking at the page's properties or whatever?)
> 
> Doesn't work out of the box with directory listings, even though the
> browser reports that the page is encoded with UTF-8.

:(

> My custom directory listing XSL transformer, sporting an explicit
>  doesn't work either. Again the
> browser acknowledges that UTF-8 is the name of the game.

Hmm. Did you write that XSL transform yourself? How are you invoking it?
Via Cocoon? Manually? If you don't tell the software (Cocoon serializer
or raw StreamResult) that you are using UTF-8, then the XML declaration
is meaningless. Just making sure you've done that correctly. Otherwise,
the client things it's reading UTF-8, but the server is writing
something else (ISO-8859-1, perhaps?).

Well, we're taking one more step... ;)

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGCRqM9CaO5/Lv0PARAtcAAJ9xTmgaMBlPx0XKPmo42g3SqywaugCeJQX5
PEbzV3+NPNhme17nPCBJmU4=
=JGSe
-END PGP SIGNATURE-

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



Paths in CSS files

2007-03-27 Thread Mike Quilleash
Hi all,
 
I have a question about accessing resources from within CSS files,
images mainly.  Take the following CSS snippet.
 
.bt {
 background:url(/image/box.png) no-repeat 100% 0;
 margin:0 0 0 18px;
 height:17px;
 }

Particularly the url "/image/box.png".  Potentially my Tomcat web
application may be run with a context path so "/image/" becomes
"/contextpath/image" and all the CSS breaks.  Is there a way round this?
Or should I be placing the urls somewhere else?
 
Thanks.
 
Mike.
 

 This e-mail is bound by the terms and conditions described at 
http://www.subexazure.com/mail-disclaimer.html



RE: Tomcat on Windows Server 2003 R2

2007-03-27 Thread Per Johnsson
Hi!

Ok, but adding the path to javajre/bin I making the service finding the
dll which is in the bin directory.

I had the exact same problem and by adding the JAVA_HOME and PATH solved
my problems, then if it's a good thing to do I don't know.

There is a bugzilla describing the issue here:
http://issues.apache.org/bugzilla/show_bug.cgi?id=41538

Regards Per Jonsson
 

-Original Message-
From: Layton Berry [mailto:[EMAIL PROTECTED] 
Sent: den 26 mars 2007 19:46
To: Tomcat Users List
Subject: Re: Tomcat on Windows Server 2003 R2

No, these environment variables are not needed unless you take the zip
file distribution of Tomcat 6 and try to run it in a command window.

The standard distribution uses a service, and the service requires the C
run time support package, ie., msvcr71.dll, but the distribution is not
including it.

A simple test on a machine with a working Tomcat 6 service can reproduce
the poster's original error messages. Just stop the service, find
msvcr71.dll in the windows SYSTEM32 directory and rename it temporarily.

(Assuming nothing else is using it.) Then start the service. The service
will not start, and the jakarta_service log file will show the poster's
error messages. Then restore the msvcr71.dll to the correct name and
start the service again. This time it will work.

If you are running the zip file distribution in a command window, you
are not running the windows service. In that case, your environment
variables are important.

Layton


Per Johnsson wrote:
> There is a known "bug" or missfeature in the java installer.
> Add in the system env JAVA_HOME=yourjrepath and ";%JAVA_HOME%/bin in 
> the end of PATH variable.
> 
> I hade the same problem with the java6 and tomcat but the abve solved 
> it.
> 
> /per jonsson
>  
> 
> -Original Message-
> From: Markus Franz [mailto:[EMAIL PROTECTED]
> Sent: den 25 mars 2007 20:00
> To: users@tomcat.apache.org
> Subject: Tomcat on Windows Server 2003 R2
> 
> Hi!
> 
> I am running Microsoft Windows Server 2003 R2 Standard x64 Edition 
> with JDK 6 (also x64 edition. My problem:
> 
> I successfully installed Tomcat 6 (with the Windows Service
installer).
> But everytime I try to start the service, it terminates without
notice.
> The jakarta log contains the following line (all in one line) for 
> every tried startup:
> 
> [2007-03-25 17:45:50] [947 prunsrv.c] [error] Failed creating java 
> C:\Program Files\Java\jdk1.6.0\jre\bin\server\jvm.dll
> [2007-03-25 17:45:50] [1202 prunsrv.c] [error] ServiceStart returned 1
> [2007-03-25 17:45:50] [info] Run service finished. 
> [2007-03-25 17:45:50] [info] Procrun finished. 
> 
> (The stderr and stdout logs are empty.)
> 
> What is the problem? How can I get my Tomcat running? I tried a x86 
> edition of Java 6, but this also does not work.
> 
> I would be very happy if there would be someone knowing how to solve 
> this problem...
> 
> Regards,
> Markus
> 
> PS: I tried Java 6 and Tomcat 6 on a Windows 2000 Machine, there's no 
> 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]
> 
> 
> **
> ** 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]
> 
> 

-
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: How do you change default log level from INFO to ERROR in Tomcat 5.0.28?

2007-03-27 Thread reno
Le mardi 27 mars 2007 à 10:29 +0200, Mirou, Antoine a écrit :

> Hello,
> 
> 
> > I just upgraded from 4.1.29 to 5.0.28, and now when I startup the
> Tomcat
> > Server, I see 15 some odd INFO messages being printed to the console
> > window.  I only want a couple system.outs that inform me that the
> Tomcat
> > Server has started.  How can I get rid of these messages?
> 
> Try to modify the logging.properties file in
> $JAVA_HOME/jre/lib/logging.properties
> 
> You can also define your own file and give it to the jvm by the argument
> (in JAVA_OPTS, for example) :
> -Djava.util.logging.config.file=/path/to/logging.properties
> 
> Change the log level in that file from "INFO" to "SEVERE", for example.
> 
> Regards,
> Antoine
> 

not sure that tomcat using logging from java. i think that 5.0.28 using
log4j 

check out if /shared/lib/log4j.properties. if it exists,
check out log4j manual to understand
how to use lo4gj stuff. here is some few helpful links:
(the examples are used for specific apps but you can easely use them for
tomcat)

http://www.vipan.com/htdocs/log4jhelp.html
http://logging.apache.org/log4j/docs/api/index.html

regards
F.


> 
> Afin de preserver l'environnement, merci de n'imprimer ce courriel qu'en cas 
> de necessite.
> 
> Please consider the environment before printing this mail.
> 
> -
> 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: Requesting files with non-English/international characters in their names

2007-03-27 Thread Thomas Peter Berntsen

Chris,

On 3/26/07, Christopher Schultz <[EMAIL PROTECTED]> wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Thomas,

Thomas Peter Berntsen wrote:
> Without the
> URIEncoding="UTF-8" parameter the Danish special characters are not
> echoed correctly, whereas _with_ the parameter everything in the
> request is echoed correctly.

Okay, good. I thought you were saying that the URIEncoding attribute
changed nothing. It sounds like it fixes most things, but not your
directory-listing thing.


Yes, it solves character issues with "normal" JSPs and forms, but not
directory listings and direct file requests.


> ...But the directory listing seems unaffected, along with the direct
> file requests which still return a 404.

Direct file requests might never be expected to work, because the
/browser/ never knows what URI encoding to use. You'll have to check
your browser's default URI encoding, and it might be different for every
browser. This is one of those places where the HTTP spec kinda falls on
its face. W3C says that UTF-8 should always be used
(http://www.w3.org/TR/html40/appendix/notes.html#non-ascii-chars) but
I'm guessing that there's a lot of inertia in web servers (Tomcat uses
ISO-8859-1 for instance) and browsers (I'm guessing).


Yeah, I think you're right on that one. Perhaps a hack for Tomcat
could be conceived that, when enabled, for Tomcat's part interprets
such requests as UTF-8 always.


> I also tried to change the GET to a POST in the form, and that results
> in characters getting misrepresented, no matter if the
> URIEncoding="UTF-8" parameter is specified in the connector or not.

:(

> Absolutely, here you go:
>
> 

Inline special characters (SCs) display correctly, form submitted SCs
display correctly, browser detects the page encoding as being UTF-8.


#2 should always work, assuming that you have UTF-8-ized your app.


Inline SCs display correctly, form submitted SC display with errors
(displayed: æøå), browser detects UTF-8.

The JSP contains the following headers:

Placed as numero uno:
<[EMAIL PROTECTED] pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" 
%>

In the HTML  section:



#3 should always work, since the directory listing should know what
   encoding it is using, and set the content-type header correctly
   (can you verify that the directory listing page display is using
   UTF-8 by looking at the page's properties or whatever?)


Doesn't work out of the box with directory listings, even though the
browser reports that the page is encoded with UTF-8.

My custom directory listing XSL transformer, sporting an explicit
 doesn't work either. Again the
browser acknowledges that UTF-8 is the name of the game.


#4 might not work, depending on a whole lot of things. We'll see.


Doesn't work :-)



- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGB88L9CaO5/Lv0PARAhiUAKCTlT6H0WTMK1u+Byje6HGkUhCGRwCfTpM5
hBgiBMAVm9ftKy55VHtn4Ic=
=lqEB
-END PGP SIGNATURE-

-
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 on Windows Server 2003 R2

2007-03-27 Thread Sabitha Divakaran
Thank u very much for ur reply
Now home page is working 


-Original Message-
From: Per Johnsson [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 26, 2007 5:27 PM
To: Tomcat Users List
Subject: RE: Tomcat on Windows Server 2003 R2


Yes, But either you add the 1.4 compliance package or use the java 1.5.

/Per Jonsson

-Original Message-
From: Sabitha Divakaran [mailto:[EMAIL PROTECTED] 
Sent: den 26 mars 2007 12:19
To: Tomcat Users List
Subject: RE: Tomcat on Windows Server 2003 R2

My java version is j2sdk1.4.1_03 and tomcat is 5.5


Is the tomcat 5.5 is not supporting the java 1.4 I mean more latest
java version is required for tomcat 5.5


-Original Message-
From: Per Johnsson [mailto:[EMAIL PROTECTED]
Sent: Monday, March 26, 2007 3:02 PM
To: Tomcat Users List
Subject: RE: Tomcat on Windows Server 2003 R2

There is a known "bug" or missfeature in the java installer.
Add in the system env JAVA_HOME=yourjrepath and ";%JAVA_HOME%/bin in the
end of PATH variable.

I hade the same problem with the java6 and tomcat but the abve solved
it.

/per jonsson
 

-Original Message-
From: Markus Franz [mailto:[EMAIL PROTECTED]
Sent: den 25 mars 2007 20:00
To: users@tomcat.apache.org
Subject: Tomcat on Windows Server 2003 R2

Hi!

I am running Microsoft Windows Server 2003 R2 Standard x64 Edition with
JDK 6 (also x64 edition. My problem:

I successfully installed Tomcat 6 (with the Windows Service installer).
But everytime I try to start the service, it terminates without notice.
The jakarta log contains the following line (all in one line) for every
tried startup:

[2007-03-25 17:45:50] [947 prunsrv.c] [error] Failed creating java
C:\Program Files\Java\jdk1.6.0\jre\bin\server\jvm.dll
[2007-03-25 17:45:50] [1202 prunsrv.c] [error] ServiceStart returned 1
[2007-03-25 17:45:50] [info] Run service finished. 
[2007-03-25 17:45:50] [info] Procrun finished. 

(The stderr and stdout logs are empty.)

What is the problem? How can I get my Tomcat running? I tried a x86
edition of Java 6, but this also does not work.

I would be very happy if there would be someone knowing how to solve
this problem...

Regards,
Markus

PS: I tried Java 6 and Tomcat 6 on a Windows 2000 Machine, there's no
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]




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]


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


-
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 do you change default log level from INFO to ERROR in Tomcat 5.0.28?

2007-03-27 Thread Mirou, Antoine
Hello,


> I just upgraded from 4.1.29 to 5.0.28, and now when I startup the
Tomcat
> Server, I see 15 some odd INFO messages being printed to the console
> window.  I only want a couple system.outs that inform me that the
Tomcat
> Server has started.  How can I get rid of these messages?

Try to modify the logging.properties file in
$JAVA_HOME/jre/lib/logging.properties

You can also define your own file and give it to the jvm by the argument
(in JAVA_OPTS, for example) :
-Djava.util.logging.config.file=/path/to/logging.properties

Change the log level in that file from "INFO" to "SEVERE", for example.

Regards,
Antoine


Afin de preserver l'environnement, merci de n'imprimer ce courriel qu'en cas de 
necessite.

Please consider the environment before printing this mail.

Ce message et toutes les pièces jointes (ci-après le « message ») sont 
confidentiels et établis à l’intention exclusive
de ses destinataires. Toute utilisation de ce message non conforme à sa 
destination, toute diffusion ou toute publication,
totale ou partielle, est interdite, sauf autorisation expresse. Si vous recevez 
ce message par erreur, merci de le
détruire sans en conserver de copie et d’en avertir immédiatement l’expéditeur. 
Internet ne permettant pas de garantir 
l’intégrité de ce message, la Caisse des Dépôts et Consignations décline toute 
responsabilité au titre de ce message s’il 
a été modifié, altéré, déformé ou falsifié. Par ailleurs et malgré toutes les 
précautions prises pour éviter la présence 
de virus dans nos envois, nous vous recommandons de prendre, de votre côté, les 
mesures permettant d'assurer la non-introduction 
de virus dans votre système informatique. 


This email message and any attachments (“the email”) are confidential and 
intended only for the recipient(s) indicated. 
If you are not an intented recipient, please be advised that any use, 
dissemination, forwarding or copying of this email 
whatsoever is prohibited without Caisse des Depots et Consignations's prior 
written consent. If you have received this 
email in error, please delete it without saving a copy and notify the sender 
immediately. Internet emails are not 
necessarily secured, and  declines responsibility for any changes that may have 
been made to this email after it was 
sent. While we take all reasonable precautions to ensure that viruses are not 
transmitted via emails, we recommend that 
you take your own measures to prevent viruses from entering your computer 
system.

-
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: Basic Auth without web.xml not working

2007-03-27 Thread org


Hi Tony,

Mmmm, kinda understand what you saying something like this, Tomcat wants 
to check the users at the FRONT DOOR, and either kick them back onto the 
street or let them in, but you want to let them ALL in and let some use the 
dining room and some use the kitchen you trying to be polite and put a 
NO ENTRY on the bathroom door before the user even tries. Interesting


To trigger the built in Authentication you have to make the users all part 
of a ComeInAndLookAround ROLE, but now everyone can get through any door, so 
you need to check the additional roles yourself to determine access that 
really defeats tomcats security, thus the problem I dont like this.


OR you need to leave the generic security alone, ie you have 
Page1AccessRole, Page2AccessRole, so that normal humans can administer the 
roles as Tomcat intended, and on each menu Item have 
IsUserAllowedToAccessPageX, if not grey it, else show it. In this case you 
would need to parse tomcat-users.xml which has the format like this username="admin" password="" roles="admin,manager"/> and it not difficult to 
find the roles for a user. Just some XML parsing I would go this way, 
because its in the expertise of the Tomcat Admin guy or girl.


OR you could do the above but with your own internal logic, so you protect 
access to pages with tomcat and then maybe have a separate file that lists 
users and menu access allowed... in which case you need to make your own 
config file, dB would work well. could be the right way depending on 
what you making.



OR you could decide FRONT DOOR checks are not for you and do it all 
yourself, in which case this code will get you going


Getting the user name and password

   String authorization = request.getHeader("Authorization");
   if (authorization == null) return 0;

   // Authorization headers looks like "Basic blahblah",
   // where blahblah is the base64 encoded username and
   // password. We want the part after "Basic ".
   String userInfo = authorization.substring(6).trim();
   BASE64Decoder decoder = new BASE64Decoder();
   String nameAndPassword = "";
   try{
   nameAndPassword = new 
String(decoder.decodeBuffer(userInfo));

   }catch ( IOException e ){}
   // Decoded part looks like "username:password".
   int index = nameAndPassword.indexOf(":");
   String user = nameAndPassword.substring(0, index);
   user = user.trim();
   if(user == null) return 0;
   String password = nameAndPassword.substring(index+1);
   password = password.trim();
   if(password == null) return 0;

To trigger the browser the headers look like this
   response.setStatus(response.SC_UNAUTHORIZED);
   response.setHeader("WWW-Authenticate", "BASIC 
realm=\"User Check\"");


The coding is a hassel, but you have a lot of control like Ok You Not 
Allowed In Here normally, but I'll let you in and grey all the menu's


I'm not sure what it is you trying to do, hope this gets you going...
regards,
Johnny




- Original Message - 
From: "Berglas, Anthony" <[EMAIL PROTECTED]>

To: 
Sent: Tuesday, March 27, 2007 2:22 AM
Subject: Basic Auth without web.xml  not working


Tomcat seems to only check the Authorization: headers if there is some
 explicitly declared in web.xml.  However, it
appears that the  optimization has been incorrectly implemented because
it does not then recheck the header if request.isUserInRole(...) etc.
are called.  So users cannot log into a system that uses
request.isUserInRole(...).

More specifically,
my simple application tests request.isUserInRole(...) and
request.getRemoteUser().  If the user lacks permissions the application
sends a 401, and the user is prompted for a name/password which is sent
back as a Authorization: Basic dGltOlBhc3N3b3JkMQ==

So far so good.  But Tomcat then ignores the Authorization: header which
is correctly sent by the browser.

The web.xml has
   
   BASIC
   Agile UI: tim/Password1
   
in it.

There is no  clause in the web.xml because I do not
want to declare them there.  (They are instead declared internally as
part of a menuing system, which calls request.isUserInRole().)

A hack to make Tomcat look at the Authorization: header is to add the
following to web.xml

   
   
   dbtest
   /dbtest/*
   
   
   dummy
   
   

In which case it works if one accepts the unwanted dummy query.

Is it possible to tell Tomcat to always check the Authorization:?

Alternatively, is it possible to grant the dummy role to anonymous
users?  Do anonymous users have any role that could be added to a dummy
?

Is it possible for me to determine which users have which roles in my
application so that I can check the header myself?  Ie. get at the
tomcat-users.xml style info, in a (fairly) web server independent

RE: Connections in tomcat resource "in busy" state forever

2007-03-27 Thread Drazen Nikolic
Hi James,

Thank you for this answer. Interesting approach to the problem. It appeared
that previous version of Oracle10g JDBC thin driver ver.10.2.0.2.0 has some
problems when facing network issues like no DB server available. We've
downloaded the last Oracle JDBC driver ver.10.2.0.3.0 and everithing worked
like it should (no stalling during processing record set when DB in not
available and removing of abandoned connections is actually working).

P.S. Your "HACK" approach is cool, but we could not do it that way, because,
you know, our customer policy is no new threads should be created within our
code! Personally, I do not quite understand that since our web apps natural
environment is a multithreaded world. Maybe I'm wrong, but anyhow, customer
is the king! :)

BR,
Drazen  



-Original Message-
From: James McIntosh [mailto:[EMAIL PROTECTED] 
Sent: 26 March 2007 00:35
To: Drazen Nikolic
Cc: 'Tomcat Users List'
Subject: RE: Connections in tomcat resource "in busy" state forever

Hi Drazen,

Looking at the Oracle site there is a new JDBC driver available which may
address this problem but I haven't had time to investigate. Here is their
bug fixes list:
http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/readme_
jdbc_10203.html


But if it doesn't solve it you could implement a HACK :)

You must put this method in a class with the package "oracle.jdbc.driver"
this allows you access to the
PhysicalConnection.abort() method which is package protected.
You must also override the "secure" in meta-inf/manifest.mf within the
oracle jar to allow your own class to work along side their jar.
  
public void abort(Connection conn) {

 try {

  if (conn instanceof PhysicalConnection) {
   System.out.println("Attempting to abort connection");
   PhysicalConnection pcon = (PhysicalConnection)conn;
   pcon.abort();
   System.out.println("Connection aborted");
  }

 } catch (Exception e) {
  System.out.println("Exception aborting connection: " + e);  }

}

Once you have done this wrap your query in a thread and if it takes too long
call your abort method.



Another thing which I have noticed with Oracle's JDBC driver is a TimeOut
Thread is started by the first query which the driver executes.
This gets a reference to the webapp class loader which calls it, when you
redeploy your application the webappclassloader is never garbaged because of
this reference.

To work round this you can call a query such as "select * from dual"
before the webapps are loaded using something like a
org.apache.catalina.LifecycleListener referenced in the "Server" tag within
the conf/server.xml. This gives the ownership of the thread to the common
class loader.


Kind regards
James



On Fri, 2007-03-23 at 13:30 +0100, Drazen Nikolic wrote:
>  Yes, David, you were right. The same behavior we got with direct JDBC 
> access.
> Our database server is Oracle 10.2.0.2.0 and we use thin JDBC driver 
> with the same version. Our JAVA environment is 1.5. Tomcat version 
> 5.5.17. There are no firewalls between Tomcat and Oracle (direct LAN
connection).
> 
> Currently we do not have a right solution to deal with the connections 
> which were in processing (getting the result set) when database goes 
> down. Those connections stays forever busy in the pool, and could not 
> be reused, as well as Tomcat thread which executed the statement to a
connection.
> Note that when database is not accessable, before executing the 
> statement, will not produce any "busy" connection in the pool and 
> never-ending Tomcat thread, since they will be auto removed by
validatonQuery (DBCP parameter).
> 
> We performed the similar tests with Oracle8i (8.1.7) and thin JDBC 
> driver for this Oracle version and got the same results.
> 
> Customer does not anymore claim this problem as a big issue, since 
> other applications installed there (developed by different companies) 
> share the same problem. We hope that DB server will be always 
> awailable... and that our application will not be on a heavy load in 
> the same time when DB server "suddenly" goes down.
> 
> Thank you for your answers.
> 
> BR,
> Drazen
> 
> -Original Message-
> From: David Smith [mailto:[EMAIL PROTECTED]
> Sent: 22 March 2007 18:01
> To: Tomcat Users List
> Subject: Re: Connections in tomcat resource "in busy" state forever
> 
> At the point you say this is stalling, we aren't dealing with tomcat 
> code (or even DBCP code).  The issue appears to be between your jdbc 
> driver and the database server.  You'd probably experience the exact 
> same behavior with the same query in a console java app w/o database 
> pooling.  Have you checked with the db vendor for any known issues in 
> your jdbc driver or database service?  Also what is the database server
doing at the moment this occurs?
> Are there any firewalls or other network issues that might bring this 
> on between tomcat and the db server?
> 
> --David
> 
> Drazen Nikolic wrote:
> 
> >Thank you Mark for 

Is it possible somehow for Tomcat to serve ASP.NET pages?

2007-03-27 Thread kz

Regards,

Khurram


RE: FW: TOMCAT 5.0.28 stability

2007-03-27 Thread Bob Hall

--- Dwight Farris <[EMAIL PROTECTED]> wrote:

> Thanks for responding; I see the following lines
> recurring often in the
> Catalina_out file:
> 
> 372yes
> In the for loop on myUsers2 variables in for loop:
> 374yes In ctx == null
> BEFORE THE QUERY IN Cohorts getName 
> 
> JVM version - 1.4.2_04-b05
> 
> Dwight 
> 
> --- Dwight Farris <[EMAIL PROTECTED]> wrote:
> 
> > Quick question about memory allocation - could the
> > issue described below be
> > a product of the settings in the following startup
> > allocation:
> > 
> >  
> > 
> > CATALINA_OPTS="$CATALINA_OPTS -Xms256m
> > -Xmx1024m"
> > 
> 
> A couple of questions:
> 
>  - Any Exceptions / Errors in the Tomcat log
> file(s)?
> 
>  - What version of Java?
> 
> I usally set starting and max memory the same; read
> somewhere that garbage collection is more efficient
> when that is done.
> 
> If you are running Java 5+ you may be running out
> of PermGen space - check the log file(s) and the
> archives for recommendations.
> 
> -Bob
> 

If your webapp(s) really need a gig of memory,
I sugggest changing CATALINA_OPTS

 CATALINA_OPTS="$CATALINA_OPTS -Xms1024m -Xmx1024m"

Looks like you are using unix/linux.  Did you 'grep'
for Exception and Error in catalina.out?

The Cohorts getName() messages don't look familiar
to me.  Is there a Cohorts class in one or more
of your webapp's?

-Bob



 

Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/

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