RE: setting application variables

2005-07-29 Thread Mufaddal Khumri
You could have a ContextListener for your web application. You could
then read the properties from your property file and put them in the
application context so that all your JSP pages have access to them.

In order to implement a ContextListener you need to write a class that
implements the ServletContextListener interface.

You will have to make an entry in your web.xml about the same.

Hope this helps,
Mufaddal.
-Original Message-
From: Josh Howe [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 29, 2005 1:14 PM
To: tomcat-user@jakarta.apache.org
Subject: setting application variables

 

Hi,

 

I'm very new to Tomcat and JSP. Can anybody tell me how I can initialize
some application variables from a file so that they are available to all
of the asp pages in my application as soon as it starts? Thanks! 


--
This email and any files transmitted with it are confidential 
and intended solely for the use of the individual or entity 
to whom they are addressed. If you have received this 
email in error please notify the system manager. Please
note that any views or opinions presented in this email 
are solely those of the author and do not necessarily
represent those of the company. Finally, the recipient
should check this email and any attachments for the 
presence of viruses. The company accepts no liability for
any damage caused by any virus transmitted by this email.
Consult your physician prior to the use of any medical
supplies or product.
--


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat and SSL

2005-07-18 Thread Mufaddal Khumri
Hello,

I wanted to verify if I am understanding this right.

The website has certain sections of it using HTTPS (secure) and certain
sections use only HTTP (unsecure).

1. A new session resulting from a call to request.getSession(true) in a
secure area of a website is invalidated automatically when the session
transitions from the secure to an unsecure area of the website.

2. A new session resulting from a call to request.getSession(true) in an
unsecure area of a website is untouched when the session transitions
from the unsecure to a secure area of the website and from the unsecure
to a secure area of the website.

Am I understanding 1 and 2 right?

Thanks,
Mufaddal.

--
This email and any files transmitted with it are confidential 
and intended solely for the use of the individual or entity 
to whom they are addressed. If you have received this 
email in error please notify the system manager. Please
note that any views or opinions presented in this email 
are solely those of the author and do not necessarily
represent those of the company. Finally, the recipient
should check this email and any attachments for the 
presence of viruses. The company accepts no liability for
any damage caused by any virus transmitted by this email.
Consult your physician prior to the use of any medical
supplies or product.
--


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat session deserialization issue ?

2005-07-12 Thread Mufaddal Khumri
Hello all,

 

We have a webapp deployed on Tomcat 5.5.7 and Apache/2.0.53. We have
serialized our sessions. We get this error in our log on start of the
webapp:

 

WARN  - Cannot serialize session attribute SESSION_DATA for session
1948F0D64D1B2679896325B06457A075

java.io.NotSerializableException:
org.apache.catalina.connector.RequestFacade

at java.io.ObjectOutputStream.writeObject0(Unknown Source)

at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)

at java.io.ObjectOutputStream.writeSerialData(Unknown Source)

at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown
Source)

at java.io.ObjectOutputStream.writeObject0(Unknown Source)

at java.io.ObjectOutputStream.writeObject(Unknown Source)

at
org.apache.catalina.session.StandardSession.writeObject(StandardSession.
java:1436)

at
org.apache.catalina.session.StandardSession.writeObjectData(StandardSess
ion.java:911)

at
org.apache.catalina.session.StandardManager.doUnload(StandardManager.jav
a:516)

at
org.apache.catalina.session.StandardManager.unload(StandardManager.java:
462)

at
org.apache.catalina.session.StandardManager.stop(StandardManager.java:66
4)

at
org.apache.catalina.core.StandardContext.stop(StandardContext.java:4261)

at
org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:89
2)

at
org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1147
)

at
org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1119)

at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:31
2)

at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu
pport.java:119)

at
org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1051)

at
org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1063)

at
org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:445)

at
org.apache.catalina.core.StandardService.stop(StandardService.java:512)

at
org.apache.catalina.core.StandardServer.stop(StandardServer.java:717)

at org.apache.catalina.startup.Catalina.stop(Catalina.java:586)

at org.apache.catalina.startup.Catalina.start(Catalina.java:561)

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:271)

at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)

WARN  - Cannot serialize session attribute SESSION_DATA for session
1DB7954590DC27243A584C999392B7FD

java.io.NotSerializableException:
org.apache.catalina.connector.RequestFacade

at java.io.ObjectOutputStream.writeObject0(Unknown Source)

at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)

at java.io.ObjectOutputStream.writeSerialData(Unknown Source)

at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown
Source)

at java.io.ObjectOutputStream.writeObject0(Unknown Source)

at java.io.ObjectOutputStream.writeObject(Unknown Source)

at
org.apache.catalina.session.StandardSession.writeObject(StandardSession.
java:1436)

at
org.apache.catalina.session.StandardSession.writeObjectData(StandardSess
ion.java:911)

at
org.apache.catalina.session.StandardManager.doUnload(StandardManager.jav
a:516)

at
org.apache.catalina.session.StandardManager.unload(StandardManager.java:
462)

at
org.apache.catalina.session.StandardManager.stop(StandardManager.java:66
4)

at
org.apache.catalina.core.StandardContext.stop(StandardContext.java:4261)

at
org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:89
2)

at
org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1147
)

at
org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1119)

at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:31
2)

at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu
pport.java:119)

at
org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1051)

at
org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1063)

at
org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:445)

at
org.apache.catalina.core.StandardService.stop(StandardService.java:512)

at
org.apache.catalina.core.StandardServer.stop(StandardServer.java:717)

at org.apache.catalina.startup.Catalina.stop(Catalina.java:586)

at org.apache.catalina.startup.Catalina.start(Catalina.java:561)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at 

RE: Setting an environment variable in tomcat 5.5 service?

2005-05-12 Thread Mufaddal Khumri
Que: Am I understanding this right, the environment entries you can set
in tomcat web.xml are not the same as the ones you would be setting from
under Windows-startup-control panel-system-Advanced??

Basically I am trying to set a environment variable to a particular
file. In my webapp I use some third party libraries that make some JNI
calls that require that environment variable to be set.

Thanks,


-Original Message-
From: Gurumoorthy [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 11, 2005 11:00 PM
To: Tomcat Users List
Subject: Re: Setting an environment variable in tomcat 5.5 service?

You cant use System.env ... you have to use JNDI to to get the variable
names
Search google ... with words JNDI variables tomcat ...

Something like this ...

Context initialContext = new InitialContext();
String value = initialContext.lookup(java:env/ + VAR_NAME ) ;

Regards
Guru
- Original Message -
From: Mufaddal Khumri [EMAIL PROTECTED]
To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Wednesday, May 11, 2005 10:31 PM
Subject: RE: Setting an environment variable in tomcat 5.5 service?


Yes, I did.

-Original Message-
From: Lutz Zetzsche [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 11, 2005 2:16 PM
To: Tomcat Users List
Subject: Re: Setting an environment variable in tomcat 5.5 service?

Am Mittwoch, 11. Mai 2005 18:26 schrieb Mufaddal Khumri:
 Thank you for the reply. I am trying to set in web.xml using:

   env-entry
 env-entry-nameMY_ENV_VAR/env-entry-name
 env-entry-valueC:/config/one.xml/env-entry-value
 env-entry-typejava.lang.String/env-entry-type
   /env-entry

 I am placing this right above the /web-app ending tag.

[...]

 Any clues as to why my env-entry is not taking effect?

Did you restart Tomcat?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
This email and any files transmitted with it are confidential
and intended solely for the use of the individual or entity
to whom they are addressed. If you have received this
email in error please notify the system manager. Please
note that any views or opinions presented in this email
are solely those of the author and do not necessarily
represent those of the company. Finally, the recipient
should check this email and any attachments for the
presence of viruses. The company accepts no liability for
any damage caused by any virus transmitted by this email.
Consult your physician prior to the use of any medical
supplies or product.


--


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Setting an environment variable in tomcat 5.5 service?

2005-05-11 Thread Mufaddal Khumri
Thank you for the reply. I am trying to set in web.xml using:

  env-entry
env-entry-nameMY_ENV_VAR/env-entry-name
env-entry-valueC:/config/one.xml/env-entry-value
env-entry-typejava.lang.String/env-entry-type
  /env-entry

I am placing this right above the /web-app ending tag.

My environment variable is not being set. I check this by printing out
all the environment variables from my webapp:
...
...
Map env = System.getenv();
Iterator it = new TreeSet(env.keySet()).iterator();
   ...


Any clues as to why my env-entry is not taking effect?

Thanks,

-Original Message-
From: Lutz Zetzsche [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 10, 2005 2:01 PM
To: Tomcat Users List
Subject: Re: Setting an environment variable in tomcat 5.5 service?

Hi Mufaddal,

Am Dienstag, 10. Mai 2005 21:33 schrieb Mufaddal Khumri:
 I have Tomcat 5.5 running as a service on Windows XP. Where in Tomcat
 can I set an environment variable?

 I can set an environment variable by going to Control Panel - System
 - Advanced - Environment variables, but I want to do it in
 Catalina.sh or equivalent.

 In my Tomcat/bin folder I have got: bootstrap.jar,
 commons-logging-api.jar, tomcat5.exe, tomcat5w.exe. I do not see a
 Catalina.sh or equivalent.

You have different options where to set environment variables. Choosing 
the right place for your variable declaration depends on your 
intention.

You can set environment variables here:

1.
In $CATALINA_HOME/conf/server.xml,
using the Environment element nested inside the GlobalNamingResources 
element:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/globalresources.h
tml

2.
In context files in different places, i.e. 
$CATALINA_HOME/conf/context.xml or 
$CATALINA_HOME/conf/[enginename]/[hostname]/[webappname].xml,
using the Environment element nested inside the Context element:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html#Envi
ronment%20Entries

3.
In $CATALINA_HOME/webapps/[webappname]/WEB-INF/web.xml, like 
demonstrated here:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html#Envi
ronment%20Entries


Best wishes

Lutz

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
This email and any files transmitted with it are confidential 
and intended solely for the use of the individual or entity 
to whom they are addressed. If you have received this 
email in error please notify the system manager. Please
note that any views or opinions presented in this email 
are solely those of the author and do not necessarily
represent those of the company. Finally, the recipient
should check this email and any attachments for the 
presence of viruses. The company accepts no liability for
any damage caused by any virus transmitted by this email.
Consult your physician prior to the use of any medical
supplies or product.
--


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Setting an environment variable in tomcat 5.5 service?

2005-05-11 Thread Mufaddal Khumri
Yes, I did. 

-Original Message-
From: Lutz Zetzsche [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 11, 2005 2:16 PM
To: Tomcat Users List
Subject: Re: Setting an environment variable in tomcat 5.5 service?

Am Mittwoch, 11. Mai 2005 18:26 schrieb Mufaddal Khumri:
 Thank you for the reply. I am trying to set in web.xml using:

   env-entry
 env-entry-nameMY_ENV_VAR/env-entry-name
 env-entry-valueC:/config/one.xml/env-entry-value
 env-entry-typejava.lang.String/env-entry-type
   /env-entry

 I am placing this right above the /web-app ending tag.

[...]

 Any clues as to why my env-entry is not taking effect?

Did you restart Tomcat?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
This email and any files transmitted with it are confidential 
and intended solely for the use of the individual or entity 
to whom they are addressed. If you have received this 
email in error please notify the system manager. Please
note that any views or opinions presented in this email 
are solely those of the author and do not necessarily
represent those of the company. Finally, the recipient
should check this email and any attachments for the 
presence of viruses. The company accepts no liability for
any damage caused by any virus transmitted by this email.
Consult your physician prior to the use of any medical
supplies or product.
--


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Setting an environment variable in tomcat 5.5 service?

2005-05-10 Thread Mufaddal Khumri
Hi,

I have Tomcat 5.5 running as a service on Windows XP. Where in Tomcat
can I set an environment variable?

I can set an environment variable by going to Control Panel - System -
Advanced - Environment variables, but I want to do it in Catalina.sh or
equivalent. 

In my Tomcat/bin folder I have got: bootstrap.jar,
commons-logging-api.jar, tomcat5.exe, tomcat5w.exe. I do not see a
Catalina.sh or equivalent.

Thanks.


--
This email and any files transmitted with it are confidential 
and intended solely for the use of the individual or entity 
to whom they are addressed. If you have received this 
email in error please notify the system manager. Please
note that any views or opinions presented in this email 
are solely those of the author and do not necessarily
represent those of the company. Finally, the recipient
should check this email and any attachments for the 
presence of viruses. The company accepts no liability for
any damage caused by any virus transmitted by this email.
Consult your physician prior to the use of any medical
supplies or product.
--


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat 5.5 hot deploy question

2005-04-08 Thread Mufaddal Khumri
Hi,

From what I understand if I want a webapp to be auto deployed from a war
file under tomcat I should have the following:

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

The problem is that when I copy a new mywebapp.war file in to tomcat I
see a half exploded Or deleted mywebapp folder. By this I mean that the
mywebapp folder contains only certain folders and files. 

Any clues as to why this maybe happening? Is tomcat holding on to some
jar files because some objects are being refrenced still or something
like that? I am guessing here wildly because I cant seem to resolve this
issue. What am I missing?

Thanks

--
This email and any files transmitted with it are confidential 
and intended solely for the use of the individual or entity 
to whom they are addressed. If you have received this 
email in error please notify the system manager. Please
note that any views or opinions presented in this email 
are solely those of the author and do not necessarily
represent those of the company. Finally, the recipient
should check this email and any attachments for the 
presence of viruses. The company accepts no liability for
any damage caused by any virus transmitted by this email.
Consult your physician prior to the use of any medical
supplies or product.
--


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [SPAM] - RE: Tomcat 5.5 hot deploy question - Found word(s) list error in the Text body

2005-04-08 Thread Mufaddal Khumri
I changed my Host definition to:

  Host name=localhost appBase=webapps
   unpackWARs=true autoDeploy=true
   antiJarLocking=true antiResourceLocking=true
   xmlValidation=false xmlNamespaceAware=false


No change. I use an ant script to war up mywebapp and copy it under
tomcat. The very first time I do this everything works fine. The second
time I try to deploy my war file Tomcat complains that it cannot find
the web.xml file. (I am tailing my stdout file).

Any clues?

-Original Message-
From: David Owens [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 08, 2005 1:47 PM
To: Tomcat Users List
Subject: [SPAM] - RE: Tomcat 5.5 hot deploy question - Found word(s)
list error in the Text body

Most likely a jar or resource file is locked, and tomcat cannot undeploy
the last app.  Try turning on antiJarLocking and antiResourceLocking.

|)ave

-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 08, 2005 2:38 PM
To: Tomcat Users List
Subject: Tomcat 5.5 hot deploy question 

Hi,

From what I understand if I want a webapp to be auto deployed from a war
file under tomcat I should have the following:

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

The problem is that when I copy a new mywebapp.war file in to tomcat I
see a half exploded Or deleted mywebapp folder. By this I mean that the
mywebapp folder contains only certain folders and files. 

Any clues as to why this maybe happening? Is tomcat holding on to some
jar files because some objects are being refrenced still or something
like that? I am guessing here wildly because I cant seem to resolve this
issue. What am I missing?

Thanks


--
This email and any files transmitted with it are confidential 
and intended solely for the use of the individual or entity 
to whom they are addressed. If you have received this 
email in error please notify the system manager. Please
note that any views or opinions presented in this email 
are solely those of the author and do not necessarily
represent those of the company. Finally, the recipient
should check this email and any attachments for the 
presence of viruses. The company accepts no liability for
any damage caused by any virus transmitted by this email.
Consult your physician prior to the use of any medical
supplies or product.

--


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [SPAM] - RE: [SPAM] - RE: Tomcat 5.5 hot deploy question - Found word(s) list error in the Text body - Found word(s) list error in the subject

2005-04-08 Thread Mufaddal Khumri
Yes.

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 08, 2005 2:11 PM
To: 'Tomcat Users List'
Subject: [SPAM] - RE: [SPAM] - RE: Tomcat 5.5 hot deploy question -
Found word(s) list error in the Text body - Found word(s) list error in
the subject

Is your Tomcat server on Windows box?

-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED] 
Sent: April 8, 2005 4:58 PM
To: Tomcat Users List
Subject: RE: [SPAM] - RE: Tomcat 5.5 hot deploy question - Found word(s)
list error in the Text body


I changed my Host definition to:

  Host name=localhost appBase=webapps
   unpackWARs=true autoDeploy=true
   antiJarLocking=true antiResourceLocking=true
   xmlValidation=false xmlNamespaceAware=false


No change. I use an ant script to war up mywebapp and copy it under
tomcat.
The very first time I do this everything works fine. The second time I
try
to deploy my war file Tomcat complains that it cannot find the web.xml
file.
(I am tailing my stdout file).

Any clues?

-Original Message-
From: David Owens [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 08, 2005 1:47 PM
To: Tomcat Users List
Subject: [SPAM] - RE: Tomcat 5.5 hot deploy question - Found word(s)
list
error in the Text body

Most likely a jar or resource file is locked, and tomcat cannot undeploy
the
last app.  Try turning on antiJarLocking and antiResourceLocking.

|)ave

-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 08, 2005 2:38 PM
To: Tomcat Users List
Subject: Tomcat 5.5 hot deploy question 

Hi,

From what I understand if I want a webapp to be auto deployed from a war
file under tomcat I should have the following:

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

The problem is that when I copy a new mywebapp.war file in to tomcat I
see a
half exploded Or deleted mywebapp folder. By this I mean that the
mywebapp
folder contains only certain folders and files. 

Any clues as to why this maybe happening? Is tomcat holding on to some
jar
files because some objects are being refrenced still or something like
that?
I am guessing here wildly because I cant seem to resolve this issue.
What am
I missing?

Thanks


--
This email and any files transmitted with it are confidential 
and intended solely for the use of the individual or entity 
to whom they are addressed. If you have received this 
email in error please notify the system manager. Please
note that any views or opinions presented in this email 
are solely those of the author and do not necessarily
represent those of the company. Finally, the recipient
should check this email and any attachments for the 
presence of viruses. The company accepts no liability for
any damage caused by any virus transmitted by this email. Consult your
physician prior to the use of any medical supplies or product.

--


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


!DSPAM:4256f040152786596096882!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [SPAM] - RE: [SPAM] - RE: Tomcat 5.5 hot deploy question - Found word(s) list error in the Text body - Found word(s) list error in the subject

2005-04-08 Thread Mufaddal Khumri
Is this a known issue on Windows XP? What is the work around if there is
any?

Thanks.

-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 08, 2005 2:12 PM
To: Tomcat Users List
Subject: RE: [SPAM] - RE: [SPAM] - RE: Tomcat 5.5 hot deploy question -
Found word(s) list error in the Text body - Found word(s) list error in
the subject

Yes.

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 08, 2005 2:11 PM
To: 'Tomcat Users List'
Subject: [SPAM] - RE: [SPAM] - RE: Tomcat 5.5 hot deploy question -
Found word(s) list error in the Text body - Found word(s) list error in
the subject

Is your Tomcat server on Windows box?

-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED] 
Sent: April 8, 2005 4:58 PM
To: Tomcat Users List
Subject: RE: [SPAM] - RE: Tomcat 5.5 hot deploy question - Found word(s)
list error in the Text body


I changed my Host definition to:

  Host name=localhost appBase=webapps
   unpackWARs=true autoDeploy=true
   antiJarLocking=true antiResourceLocking=true
   xmlValidation=false xmlNamespaceAware=false


No change. I use an ant script to war up mywebapp and copy it under
tomcat.
The very first time I do this everything works fine. The second time I
try
to deploy my war file Tomcat complains that it cannot find the web.xml
file.
(I am tailing my stdout file).

Any clues?

-Original Message-
From: David Owens [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 08, 2005 1:47 PM
To: Tomcat Users List
Subject: [SPAM] - RE: Tomcat 5.5 hot deploy question - Found word(s)
list
error in the Text body

Most likely a jar or resource file is locked, and tomcat cannot undeploy
the
last app.  Try turning on antiJarLocking and antiResourceLocking.

|)ave

-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 08, 2005 2:38 PM
To: Tomcat Users List
Subject: Tomcat 5.5 hot deploy question 

Hi,

From what I understand if I want a webapp to be auto deployed from a war
file under tomcat I should have the following:

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

The problem is that when I copy a new mywebapp.war file in to tomcat I
see a
half exploded Or deleted mywebapp folder. By this I mean that the
mywebapp
folder contains only certain folders and files. 

Any clues as to why this maybe happening? Is tomcat holding on to some
jar
files because some objects are being refrenced still or something like
that?
I am guessing here wildly because I cant seem to resolve this issue.
What am
I missing?

Thanks


--
This email and any files transmitted with it are confidential 
and intended solely for the use of the individual or entity 
to whom they are addressed. If you have received this 
email in error please notify the system manager. Please
note that any views or opinions presented in this email 
are solely those of the author and do not necessarily
represent those of the company. Finally, the recipient
should check this email and any attachments for the 
presence of viruses. The company accepts no liability for
any damage caused by any virus transmitted by this email. Consult your
physician prior to the use of any medical supplies or product.

--


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


!DSPAM:4256f040152786596096882!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JAVA_OPTS and Xmx Xms

2005-01-04 Thread Mufaddal Khumri
You can stick this code in somewhere:
Runtime r = Runtime.getRuntime();

System.out.println(Free Memory:  + r.freeMemory());
System.out.println(Total Memory:  + r.totalMemory());
If your settings are taking effect you will see the results accordingly.
On Jan 4, 2005, at 2:42 PM, joon yoo wrote:
Yes
On Tue, 04 Jan 2005 16:40:33 -0500, Ben Souther [EMAIL PROTECTED] 
wrote:
Are you running Tomcat as a Windows Service?
\
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Mufaddal Khumri


Re: JAVA_OPTS

2004-11-15 Thread Mufaddal Khumri
Specify -Xms128M and -Xmx384M ... the M stands for megabytes.
On Nov 15, 2004, at 10:22 AM, Steven Lister wrote:
First time caller, long time listener.  :)
Have a couple of questions about JAVA_OPT settings in catalina.sh.
First one is I was looking at -server cached and tested that out and 
got nothing, tomcat didnt start a process.
Next is -Xms128 -Xmx384 gives me an error of  Error occurred during 
initialization of VM  Too small initial heap
Tomcat wont start with either of these flags set in JAVA_OPTS.
--
___
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Mufaddal 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat and -server option

2004-11-15 Thread Mufaddal Khumri
My observations have been similar as well. We discussed this on the 
Java Apple list as well and it seems that different vendors implement 
this differently.

On Nov 15, 2004, at 5:59 AM, Ronald Klop wrote:
java.library.path=/usr/local/j2sdk1.4.2_05/jre/lib/i386/client:...
   ^^
java.vm.name=Java HotSpot(TM) Client VM
 ^^
Ronald.
On Wed Nov 10 19:28:39 CET 2004 Mufaddal Khumri [EMAIL PROTECTED] 
wrote:
Hi,
I have specified the -server option in my catalina.sh using JAVA_OPTS.
JAVA_OPTS=-server -Djava.awt.headless=true -Xms1g -Xmx1g 
-Dfile.encoding=ISO-8859-1
When I log into the manager app in tomcat I can see that its taking 
the correct memory settings , but I could not find a way to verify 
that it is taking the -server flag into consideration. Is there a way 
to make sure that my JVM is taking the -server flag into 
consideration?
Additional info:
Tomcat Version: Apache Tomcat/5.0.27
JVM Version: 1.4.2_05-141.3
JVM Vendor: Apple Computer, Inc.
OS Name: Mac OS X
OS Version: 10.3.5
OS Architecture: ppc
Thanks.

Mufaddal Khumri
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JAVA_OPTS

2004-11-15 Thread Mufaddal Khumri
I do not know what VM you are using. If you are using Windows and have 
tomcat as a service on there you will have to specify the -server 
option in the registry. If you are using  Mac OS X you can specify it 
in the JAVA_OPTS

As far as what the -server option will do for you , that depends on 
your VM vendor.

On Nov 15, 2004, at 10:35 AM, Steven Lister wrote:
Thanks for the quick reply.
the sound you probably heard a couple of minutes ago was my head 
repeatedly hitting my desk.
the Xms and Xms was a mispelling.  :(
export JAVA_OPTS='-server -Xms128m -Xmx384m -Djava.awt.headless=true'

Does anyone know -server cached if that is mispelled or wrong tense?
- Original Message -
From: Shapira, Yoav
To: Tomcat Users List
Subject: RE: JAVA_OPTS
Date: Mon, 15 Nov 2004 12:23:36 -0500

Hi,
First one is I was looking at -server cached and tested that out and 
got
nothing, tomcat didnt start a process.
You probably mistyped the JAVA_OPTS setting.
Next is -Xms128 -Xmx384 gives me an error of  Error occurred during
initialization of VM  Too small initial heap
Tomcat wont start with either of these flags set in JAVA_OPTS.
Definitely mistyped the JAVA_OPTS setting there: add m after 128 and 
384 to make it megabytes.

Yoav

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

--
___
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Mufaddal
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat and -server option

2004-11-12 Thread Mufaddal Khumri
Hi,
I have: JAVA_OPTS=-server -Djava.awt.headless=true -Xms1g -Xmx1g 
-Dfile.encoding=ISO-8859-1 in catalina.sh

I just tried:
logger.info(java.vm.name:  + System.getProperty(java.vm.name));
and i get:
INFO - java.vm.name: Java HotSpot(TM) Client VM
Why is the -server option not taking effect?
Does java.vm.name display the mode the JVM is executing in or its name 
of the JVM installed on my machine? (because if its just the name of 
the JVM installed on my machine the -server option must be taking 
effect)

Thanks.
On Nov 12, 2004, at 1:53 PM, Shapira, Yoav wrote:
Hi,
Cool, good tip.
Yoav Shapira http://www.yoavshapira.com

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
Sent: Friday, November 12, 2004 3:14 PM
To: Tomcat Users List
Subject: RE: Tomcat and -server option
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Subject: RE: Tomcat and -server option
Is there a way to make sure that my JVM is taking
the -server flag into consideration?
I'm not aware of a programmatic way to verify this.
The Java property java.vm.name (use System.getProperty(java.vm.name)
to
retrieve it) contains either Java HotSpot(TM) Server VM or Java
HotSpot(TM) Client VM when using Sun JVMs.  Other vendors will, of
course,
set this property differently.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE
PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the 
e-mail
and
its attachments from all computers.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Mufaddal Khumri
Software Developer
Waves In Motion
Phone: 602 956 7080 x 26
Email: [EMAIL PROTECTED]


Tomcat and -server option

2004-11-10 Thread Mufaddal Khumri
Hi,
I have specified the -server option in my catalina.sh using JAVA_OPTS.
JAVA_OPTS=-server -Djava.awt.headless=true -Xms1g -Xmx1g 
-Dfile.encoding=ISO-8859-1

When I log into the manager app in tomcat I can see that its taking the 
correct memory settings , but I could not find a way to verify that it 
is taking the -server flag into consideration. Is there a way to make 
sure that my JVM is taking the -server flag into consideration?

Additional info:
Tomcat Version: Apache Tomcat/5.0.27
JVM Version: 1.4.2_05-141.3
JVM Vendor: Apple Computer, Inc.
OS Name: Mac OS X
OS Version: 10.3.5
OS Architecture: ppc
Thanks.

Re: exception in clustering

2004-11-09 Thread Mufaddal Khumri
Hi,
I am using Apache - modjk -Tomcat 5 configuration.
The tomcat manager app uses BASIC authentication. When I point my 
browser to /myurl/manager the browser pops up a dialog box for the 
username and password. Upon entering the correct information it logs me 
into the manager app.

I am trying to now use JMeter to log in to the manager app:
URL: my.machine.com
port: 80
path:/manager
username u1
password p1
When I try to execute the above in JMeter it fails.
How do I log into the manager app using JMeter?
Thanks.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Manager App and basic authentication

2004-11-09 Thread Mufaddal Khumri
Hi,
(Sorry, I posted this message under the wrong thread before)
I am using Apache - modjk -Tomcat 5 configuration.
The tomcat manager app uses BASIC authentication. When I point my 
browser to /myurl/manager the browser pops up a dialog box for the 
username and password. Upon entering the correct information it logs me 
into the manager app.

I am trying to now use JMeter to log in to the manager app:
URL: my.machine.com
port: 80
path:/manager
username u1
password p1
When I try to execute the above in JMeter it fails.
How do I log into the manager app using JMeter?
Thanks.

Mufaddal Khumri
Software Developer
Waves In Motion
Phone: 602 956 7080 x 26
Email: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Server.xml optimization question.

2004-11-08 Thread Mufaddal Khumri
Hi,
I have got the following connector in my server.xml file:
Connector port=9090
   maxThreads=150 minSpareThreads=25 
maxSpareThreads=75
   enableLookups=false redirectPort=8443 
acceptCount=100
   debug=0 connectionTimeout=2
   disableUploadTimeout=true /

I am trying to do some performance tune up and would like to see the 
effects of changing values of the attributes above. Are there any 
comprehensive webpages, documents regarding how to optimize the 
performance of your webapp by tweaking the server.xml parameters 
available somewhere?

Thanks.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Tomcat in server mode question

2004-11-08 Thread Mufaddal Khumri
Hi,
I am trying to run Tomcat 5.0.27 in server mode on a Win XP 
Professional machine.

Tomcat is installed as a service on this box. I can start and stop it 
and everything works fine. As soon as I specify the -server option 
Tomcat wont start

I do this by right clicking on the tomcat service icon and selecting 
Configure -- Java: Java options and add the -server option there.

Am I doing this right or am i missing something?
Thanks.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Log4j question

2004-10-29 Thread Mufaddal Khumri
Hi,
I am new to Log4j and am trying to read the configuration settings from 
WEB-INF/classes/log4j.properties

I am using Tomcat 5.0.27. I have been trying to do this in my 
contextListener:

public void contextInitialized(ServletContextEvent sce)
{   
String fileName = sc.getRealPath(/) + /WEB-INF/log4j.properties;
PropertyConfigurator.configureAndWatch(fileName,2000);
..
}
As soon as I include those lines in my webapps context listener, my 
webapp does not start on starting tomcat. When i comment
those lines off it starts normally. Any ideas whats going on here?

Mufaddal Khumri
Software Developer
Waves In Motion
Phone: 602 956 7080 x 26
Email: [EMAIL PROTECTED]

Re: Log4j question

2004-10-29 Thread Mufaddal Khumri
Sorry, mistake on my part. The Log4j.properties is under /classes . 
Works fine now.

On Oct 29, 2004, at 9:29 AM, Mufaddal Khumri wrote:
Hi,
I am new to Log4j and am trying to read the configuration settings 
from WEB-INF/classes/log4j.properties

I am using Tomcat 5.0.27. I have been trying to do this in my 
contextListener:

public void contextInitialized(ServletContextEvent sce)
{   
String fileName = sc.getRealPath(/) + /WEB-INF/log4j.properties;
PropertyConfigurator.configureAndWatch(fileName,2000);
..
}
As soon as I include those lines in my webapps context listener, my 
webapp does not start on starting tomcat. When i comment
those lines off it starts normally. Any ideas whats going on here?

Mufaddal Khumri
Software Developer
Waves In Motion
Phone: 602 956 7080 x 26
Email: [EMAIL PROTECTED]
Mufaddal Khumri
Software Developer
Waves In Motion
Phone: 602 956 7080 x 26
Email: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Log4j question

2004-10-29 Thread Mufaddal Khumri
Hi,
If I use getResourceAsStream() and then make a call to 
PropertyConfigurator.configure(properties). Is there a way to watch for 
changes in this property file? How do I use getResourceAsStream and 
have the ability to configure the log4j.properties file at run time?

On Oct 29, 2004, at 9:40 AM, Shapira, Yoav wrote:
Hi,
Don't use getRealPath, it won't work when running from a packed WAR.
Use Class#getResource(AsStream) or the equivalent methods in
ServletContext.
Yoav Shapira http://www.yoavshapira.com

-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
Sent: Friday, October 29, 2004 12:35 PM
To: Tomcat Users List
Subject: Re: Log4j question
Sorry, mistake on my part. The Log4j.properties is under /classes .
Works fine now.
On Oct 29, 2004, at 9:29 AM, Mufaddal Khumri wrote:
Hi,
I am new to Log4j and am trying to read the configuration settings
from WEB-INF/classes/log4j.properties
I am using Tomcat 5.0.27. I have been trying to do this in my
contextListener:
public void contextInitialized(ServletContextEvent sce)
{
String fileName = sc.getRealPath(/) + /WEB-
INF/log4j.properties;
PropertyConfigurator.configureAndWatch(fileName,2000);
..
}
As soon as I include those lines in my webapps context listener, my
webapp does not start on starting tomcat. When i comment
those lines off it starts normally. Any ideas whats going on here?
Mufaddal Khumri
Software Developer
Waves In Motion
Phone: 602 956 7080 x 26
Email: [EMAIL PROTECTED]
Mufaddal Khumri
Software Developer
Waves In Motion
Phone: 602 956 7080 x 26
Email: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Mufaddal Khumri
Software Developer
Waves In Motion
Phone: 602 956 7080 x 26
Email: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Log4j with Tomcat webapp

2004-10-29 Thread Mufaddal Khumri
Hi,
I am trying to use this under Tomcat 5.0.27.
I have the following log4j.properties file under WEB-INF/conf/
# initialise root logger with level DEBUG and call it A1
log4j.rootLogger=DEBUG, A1
# set the appender to be FileAppender
log4j.appender.A1=org.apache.log4j.FileAppender
log4j.appender.A1.file=cw.log
# set set that layout to be SimpleLayout
log4j.appender.A1.layout=org.apache.log4j.SimpleLayout
I have the following in my web.xml
servlet
servlet-nameLog4jInitServlet/servlet-name
servlet-classcom.somepackage.Log4jInitServlet/servlet-class
load-on-startup1/load-on-startup
init-param
param-namelog4j-configuration/param-name
param-valueconf/log4j.properties/param-value
/init-param
init-param
 param-namelog4j-log-path/param-name
 param-valueWEB-INF/log/param-value
/init-param
/servlet
I do the following in my Log4jInitServlet:
...
String baseDir = getServletContext().getRealPath( / );
String logPath = config.getInitParameter(log4j-log-path);
logPath = baseDir + logPath;
File logPathDir = new File( logPath );
System.setProperty( log.home, logPath );
PropertyConfigurator.configureAndWatch( confFile );
...
When I start my tomcat engine, I do not get any exceptions but my log 
file does not get created? Am I missing something in my 
log4j.properties file while specifying log4j.appender.A1.file ? or 
something else? I do not get any exceptions in catalina.out.

I am trying to understand if this problem is due to my configuration of 
Tomcat or the configuration of my logger?

Mufaddal Khumri


webapp exceptions redirect them to webapps log

2004-10-29 Thread Mufaddal Khumri
Hi,
I am using Tomcat 5.0.27. I am using a FileLogger as the appender 
(log4j) to write my logs to under WEB-INF/log.

How do I configure tomcat to send output resulting from exceptions in 
my webapp to this log file? Do I have to configure server.xml to do so?

Mufaddal Khumri
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Log4j with Tomcat .. (3 questions)

2004-10-28 Thread Mufaddal Khumri
Hi,
Am new to log4j. Am using Tomcat 5 and my webapp-myNiceWebApp is in 
Tomcat/webapps/myNiceWebApp

I have a class that I have the following code in:
Logger logger = Logger.getLogger(Helper.class);
SimpleLayout layout = new SimpleLayout();

FileAppender appender = null;
try
{
appender = new FileAppender(layout,output1.txt,false);
}
catch(Exception e)
{
e.printStackTrace();
}

logger.addAppender(appender);
logger.setLevel((Level)Level.DEBUG);

logger.debug(some message);
Que 1. Where does the file output1.txt get created?
Que 2. How does log4j know where to create it and can it be controlled?
Que 3. I am going to use a configuration file either use the 
DOMConfigurator or PropertyConfigurator to load the log4j properties. 
Where do i place this file log4j configuration file?

Thanks,


Re: Log4j with Tomcat .. (3 questions)

2004-10-28 Thread Mufaddal Khumri
I just did that. I have a log4j.properties file with the following:
# initialise root logger with level DEBUG and call it A1
log4j.rootLogger=DEBUG, A1
# set the appender to be FileAppender
log4j.appender.A1=org.apache.log4j.FileAppender
# set set that layout to be SimpleLayout
log4j.appender.A1.layout=org.apache.log4j.SimpleLayout
I have this in the java code:
Logger logger = Logger.getLogger(Helper.class);
PropertyConfigurator.configure(log4j.properties);
I get the following exception:
java.io.FileNotFoundException: log4j.properties (No such file or  
directory)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.init(FileInputStream.java:106)
	at java.io.FileInputStream.init(FileInputStream.java:66)
	at  
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.j 
ava:297)
		

On Oct 28, 2004, at 4:56 PM, Ben Souther wrote:
Log4j looks on your class path for a properties file
log4j.properties.  If you put the file in WEB-INF/classes
it will find it.
Here's a real simple example:
log4j.rootCategory=DEBUG, dest1
log4j.appender.dest1=org.apache.log4j.RollingFileAppender
log4j.appender.dest1.file=/usr/local/tomcat/logs/myapp.log
log4j.appender.dest1.layout=org.apache.log4j.PatternLayout
log4j.appender.dest1.layout.ConversionPattern=%-5p: %m%n


On Thu, 2004-10-28 at 19:08, Mufaddal Khumri wrote:
Hi,
Am new to log4j. Am using Tomcat 5 and my webapp-myNiceWebApp is in
Tomcat/webapps/myNiceWebApp
I have a class that I have the following code in:
Logger logger = Logger.getLogger(Helper.class);
SimpleLayout layout = new SimpleLayout();

FileAppender appender = null;
try
{
appender = new FileAppender(layout,output1.txt,false);
}
catch(Exception e)
{
e.printStackTrace();
}

logger.addAppender(appender);
logger.setLevel((Level)Level.DEBUG);

logger.debug(some message);
Que 1. Where does the file output1.txt get created?
Que 2. How does log4j know where to create it and can it be  
controlled?
Que 3. I am going to use a configuration file either use the
DOMConfigurator or PropertyConfigurator to load the log4j properties.
Where do i place this file log4j configuration file?

Thanks,


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Mufaddal Khumri
Software Developer
Waves In Motion
Phone: 602 956 7080 x 26
Email: [EMAIL PROTECTED]


Re: Log4j with Tomcat .. (3 questions)

2004-10-28 Thread Mufaddal Khumri
I just did that. I have a WEB-INF/classes/log4j.properties file with  
the following:

# initialise root logger with level DEBUG and call it A1
log4j.rootLogger=DEBUG, A1
# set the appender to be FileAppender
log4j.appender.A1=org.apache.log4j.FileAppender
# set set that layout to be SimpleLayout
log4j.appender.A1.layout=org.apache.log4j.SimpleLayout
I have this in the java code:
Logger logger = Logger.getLogger(Helper.class);
PropertyConfigurator.configure(log4j.properties);
I get the following exception:
java.io.FileNotFoundException: log4j.properties (No such file or  
directory)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.init(FileInputStream.java:106)
	at java.io.FileInputStream.init(FileInputStream.java:66)
	at  
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.j 
ava:297)
		

On Oct 28, 2004, at 4:56 PM, Ben Souther wrote:
Log4j looks on your class path for a properties file
log4j.properties.  If you put the file in WEB-INF/classes
it will find it.
Here's a real simple example:
log4j.rootCategory=DEBUG, dest1
log4j.appender.dest1=org.apache.log4j.RollingFileAppender
log4j.appender.dest1.file=/usr/local/tomcat/logs/myapp.log
log4j.appender.dest1.layout=org.apache.log4j.PatternLayout
log4j.appender.dest1.layout.ConversionPattern=%-5p: %m%n


On Thu, 2004-10-28 at 19:08, Mufaddal Khumri wrote:
Hi,
Am new to log4j. Am using Tomcat 5 and my webapp-myNiceWebApp is in
Tomcat/webapps/myNiceWebApp
I have a class that I have the following code in:
Logger logger = Logger.getLogger(Helper.class);
SimpleLayout layout = new SimpleLayout();

FileAppender appender = null;
try
{
appender = new FileAppender(layout,output1.txt,false);
}
catch(Exception e)
{
e.printStackTrace();
}

logger.addAppender(appender);
logger.setLevel((Level)Level.DEBUG);

logger.debug(some message);
Que 1. Where does the file output1.txt get created?
Que 2. How does log4j know where to create it and can it be  
controlled?
Que 3. I am going to use a configuration file either use the
DOMConfigurator or PropertyConfigurator to load the log4j properties.
Where do i place this file log4j configuration file?

Thanks,


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Mufaddal Khumri
Software Developer
Waves In Motion
Phone: 602 956 7080 x 26
Email: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Fork question.

2004-10-27 Thread Mufaddal Khumri
I am using Tomcat 5.0.27. In the default web.xml we have:
servlet
servlet-namejsp/servlet-name

servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class
init-param
param-namefork/param-name
param-valuefalse/param-value
/init-param
init-param
param-namexpoweredBy/param-name
param-valuefalse/param-value
/init-param
load-on-startup3/load-on-startup
/servlet

Now is there a way to set fork = true in my web.xml in my webapp that 
will override this value. Is there a way to override this fork value 
without modifying the default web.xml?

Regards,
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Server.xml configuration question.

2004-10-26 Thread Mufaddal Khumri
Hi,
I am using Tomcat 5.0.27. I want to configure my server.xml such that:
1. all system.outs from my webapp
2. all error and exceptions due to my webapp
get written to logs/mywebapp.log under CATALINA_HOME
This is the except from my server.xml file that I have written:
...
...
Engine name=Catalina defaultHost=localhost
  !-- Define the default virtual host --
  Host name=localhost debug=0 appBase=webapps
   unpackWARs=true autoDeploy=true
Logger className=org.apache.catalina.logger.FileLogger
directory=logs  prefix=mywebapp. suffix=.log
	   timestamp=true/
Logger className=org.apache.catalina.logger.SystemErrLogger/
Logger className=org.apache.catalina.logger.SystemOutLogger/
Context path=/mywebapp docBase=mywebapp debug=0
 reloadable=true crossContext=true/
  /Host
   /Engine
   ...
   ...
On running tomcat, I still get all my system.outs and error messages in 
catalina.out. How do I
configure my server.xml to get these messages in mywebapp.log ?

Thanks.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Server.xml configuration question.

2004-10-26 Thread Mufaddal Khumri
Yes at some point I do need to switch to log4j. I set the 
swallowOutput=true
...
...
Engine name=Catalina defaultHost=localhost
  !-- Define the default virtual host --
  Host name=localhost debug=0 appBase=webapps
   unpackWARs=true autoDeploy=true
Context path=/mywebapp docBase=mywebapp debug=0
  	   swallowOutput=true
 reloadable=true crossContext=true
	Logger className=org.apache.catalina.logger.FileLogger
 		 directory=logs  prefix=mywebapp. suffix=.log
	   		timestamp=true/
	Context/
  /Host
   /Engine
   ...
   ...
When i start tomcat now, I still get some of the system.out from my 
webapp written to catalina.out.
My webapp implements ServletContextListener and HttpSessionListener, 
the output of the implementation class for ServletContextListener gets 
written to catalina.out.

Que 1. Is there a way to write this output also to the file I am 
specifying?

Que 2. Also I notice that when I use FileLogger, it creates a new file 
each day, is there a way to tell it to create only one big huge file 
and keep appending to it (like catalina.out) ?

Thanks,
On Oct 26, 2004, at 12:02 PM, Shapira, Yoav wrote:
Hi,
Add swallowOutput=true to your Context element.  It also makes the
SystemOutLogger/SystemErrLogger definitions redundant IIRC.
Then when you have a chance switch to using a real logging toolkit like
log4j.
Yoav Shapira http://www.yoavshapira.com

-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 26, 2004 3:02 PM
To: Tomcat Users List
Subject: Server.xml configuration question.
Hi,
I am using Tomcat 5.0.27. I want to configure my server.xml such that:
1. all system.outs from my webapp
2. all error and exceptions due to my webapp
get written to logs/mywebapp.log under CATALINA_HOME
This is the except from my server.xml file that I have written:
...
...
Engine name=Catalina defaultHost=localhost
  !-- Define the default virtual host --
  Host name=localhost debug=0 appBase=webapps
   unpackWARs=true autoDeploy=true
Logger className=org.apache.catalina.logger.FileLogger
directory=logs  prefix=mywebapp. suffix=.log
   timestamp=true/
Logger
className=org.apache.catalina.logger.SystemErrLogger/
Logger
className=org.apache.catalina.logger.SystemOutLogger/
Context path=/mywebapp docBase=mywebapp debug=0
 reloadable=true crossContext=true/
  /Host
   /Engine
   ...
   ...
On running tomcat, I still get all my system.outs and error messages 
in
catalina.out. How do I
configure my server.xml to get these messages in mywebapp.log ?

Thanks.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Mufaddal Khumri
Software Developer
Waves In Motion
Phone: 602 956 7080 x 26
Email: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Server.xml configuration question.

2004-10-26 Thread Mufaddal Khumri
Yes, most definitely I have to use the log4j library.
I just rechecked my server.xml and I am still baffled as to why the 
output is going to catalina.out ?

Heres the entire server.xml:
---START
Server port=8005 shutdown=SHUTDOWN
  Service name=Catalina
Connector port=9090
   maxThreads=150 minSpareThreads=25 
maxSpareThreads=75
   enableLookups=false redirectPort=8443 
acceptCount=100
   debug=0 connectionTimeout=2
   disableUploadTimeout=true /

!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 --
Connector port=8009
   enableLookups=false redirectPort=8443 debug=0
   protocol=AJP/1.3 /
!-- This is here for compatibility only, not required --
!--Connector port=8009 protocol=AJP/1.3 /--
Engine name=Catalina defaultHost=localhost
  !-- Define the default virtual host --
  Host name=localhost debug=0 appBase=webapps
   unpackWARs=true autoDeploy=true
Context path=/mywebapp docBase=mywebapp debug=0
 swallowOutput=true
 reloadable=true crossContext=false
Logger className=org.apache.catalina.logger.FileLogger
directory=logs  prefix=mywebapp. 
suffix=.log
timestamp=false/
/Context
  /Host
/Engine
  /Service
/Server
Any Ideas?
---FINISH
On Oct 26, 2004, at 12:35 PM, Shapira, Yoav wrote:
Hi,
When i start tomcat now, I still get some of the system.out from my
webapp written to catalina.out.
No.  That can't be right.  The output you're seeing is coming from
somewhere else, or your configuration is otherwise messed up.
My webapp implements ServletContextListener and HttpSessionListener,
the output of the implementation class for ServletContextListener gets
written to catalina.out.
Que 1. Is there a way to write this output also to the file I am
specifying?
I have the same use-case, and it goes to my Logger.
Que 2. Also I notice that when I use FileLogger, it creates a new file
each day, is there a way to tell it to create only one big huge file
and keep appending to it (like catalina.out) ?
You don't have fine-grained control over the log file rotation.  This 
is
yet another reason why you shouldn't delay in moving to log4j.

Have I mentioned that the Logger elements are gone altogether in Tomcat
5.5, so this is largely a waste of your time?
Yoav

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Mufaddal Khumri
Software Developer
Waves In Motion
Phone: 602 956 7080 x 26
Email: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Server.xml configuration question.

2004-10-26 Thread Mufaddal Khumri
Hi,
No change. Moved it to the host and also moved it under Engine to see 
if that changes anything. Still the same results.

Regards,
On Oct 26, 2004, at 12:54 PM, Shapira, Yoav wrote:
Hi,
I just rechecked my server.xml and I am still baffled as to why the
output is going to catalina.out ?
Because the Logger is inside your Context, it applies only to that
Context.  It does not apply to other Contexts within your Host, such as
those created by autoDeploy.  Try moving Logger from the Context to
the Host.
Yoav

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Mufaddal Khumri
Software Developer
Waves In Motion
Phone: 602 956 7080 x 26
Email: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


forward to a form with enctype=multipart/form-data fails

2004-09-28 Thread Mufaddal Khumri
Hi,
I have the following code in a  Servlet:
// ...
   // 
request.setAttribute(sPhoto, new Integer(setPhoto));
error(/c/shared/UserPhoto.jsp,
 Uploaded Images should be of type JPG or GIF and maximum  
of 800KB,
  request, response);
// .
// 

   private void error(String path, String message,  
HttpServletRequest request, HttpServletResponse response)
	{
		try
		{
			request.setAttribute(errorMsg, message);

			 
getServletConfig().getServletContext().getRequestDispatcher(path).forwar 
d(request, response);
		}
		catch(Exception ex)
		{
			ex.printStackTrace();
		}
	}

I have a multipart form on the UserPhoto.jsp.
	form name=editPhoto method=post action=/c/shared/ImageServlet  
enctype=multipart/form-data
 
	
		%
		String errorMsg = (String)request.getAttribute(errorMsg);
		if(errorMsg != null  errorMsg.equals(null) == false)
		{
		%
			cw:errorBoxAn error occurred while updating user photograph  
settings. %=errorMsg%/cw:errorBox
		%
		}
		%
	.
 
  /form

When I submit this form to the servlet above and then the servlet sets  
the attribute sPhoto and forwards the request back to the jsp, I get  
the
following error:

HTTP Status 404 - /c/shared/UserPhoto.jsp
type Status report
message /c/shared/UserPhoto.jsp
description The requested resource (/c/shared/UserPhoto.jsp) is not  
available.
Apache Tomcat/5.0.28

I do not understand why the forwarded request to the JSP does not find  
the JSP?

Any help on this is appreciated.
Regards,
Mufaddal Khumri
Software Developer
Waves In Motion
Phone: 602 956 7080 x 26
Email: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: forward to a form with enctype=multipart/form-data fails

2004-09-28 Thread Mufaddal Khumri
Yes. :) I do. Thats what is confusing the hell out of me.
Thanks.
On Sep 28, 2004, at 9:22 AM, Ben Souther wrote:
Do you have a JSP at:
/c/shared/UserPhoto.jsp
?

On Tue, 2004-09-28 at 12:15, Mufaddal Khumri wrote:
Hi,
I have the following code in a  Servlet:
 // ...
// 
 request.setAttribute(sPhoto, new Integer(setPhoto));
 error(/c/shared/UserPhoto.jsp,
  Uploaded Images should be of type JPG or GIF and  
maximum
of 800KB,
   request, response);
 // .
 // 

private void error(String path, String message,
HttpServletRequest request, HttpServletResponse response)
{
try
{
request.setAttribute(errorMsg, message);
			
getServletConfig().getServletContext().getRequestDispatcher(path).forw 
ar
d(request, response);
		}
		catch(Exception ex)
		{
			ex.printStackTrace();
		}
	}

I have a multipart form on the UserPhoto.jsp.
form name=editPhoto method=post action=/c/shared/ImageServlet
enctype=multipart/form-data
  

%
String errorMsg = (String)request.getAttribute(errorMsg);
if(errorMsg != null  errorMsg.equals(null) == false)
{
%
cw:errorBoxAn error occurred while updating user photograph
settings. %=errorMsg%/cw:errorBox
%
}
%
.
  
   /form
When I submit this form to the servlet above and then the servlet sets
the attribute sPhoto and forwards the request back to the jsp, I get
the
following error:
HTTP Status 404 - /c/shared/UserPhoto.jsp
type Status report
message /c/shared/UserPhoto.jsp
description The requested resource (/c/shared/UserPhoto.jsp) is not
available.
Apache Tomcat/5.0.28
I do not understand why the forwarded request to the JSP does not find
the JSP?
Any help on this is appreciated.
Regards,
Mufaddal Khumri
Software Developer
Waves In Motion
Phone: 602 956 7080 x 26
Email: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Mufaddal Khumri
Software Developer
Waves In Motion
Phone: 602 956 7080 x 26
Email: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: forward to a form with enctype=multipart/form-data fails

2004-09-28 Thread Mufaddal Khumri
Yes :) . It is.
My ImageServlet gets a form submission of a form thats  
enctype=multipart/form-data.

	I am using the DiskFileUpload class from Apache using the  
commons-fileupload-1.0.jar

DiskFileUpload upload = new DiskFileUpload();


List items = upload.parseRequest(request);
...

	Since the request contains a multipart form submission, I can get data  
from that request object once. The
	DiskFileUpload object does this for me and returns a List object i.e.  
items.

	In doing so my request object looses all the parameters that I had  
sent with it.

Now, when I do the following:
	path = /c/shared/UserPhoto.jsp;
	
	
	request.setAttribute(errorMsg, message);
	 
getServletConfig().getServletContext().getRequestDispatcher(path).forwar 
d(request, response);
	
	This forward fails  . And I am still at a loss of explanation.

Any help is appreciated.
Regards,



Now doing this in my
On Sep 28, 2004, at 10:07 AM, Shapira, Yoav wrote:
Hi,
And is /c/shared within the docBase of your webapp? ;)
Yoav Shapira
Millennium Research Informatics

-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 1:06 PM
To: Tomcat Users List
Subject: Re: forward to a form with enctype=multipart/form-data  
fails

Yes. :) I do. Thats what is confusing the hell out of me.
Thanks.
On Sep 28, 2004, at 9:22 AM, Ben Souther wrote:
Do you have a JSP at:
/c/shared/UserPhoto.jsp
?

On Tue, 2004-09-28 at 12:15, Mufaddal Khumri wrote:
Hi,
I have the following code in a  Servlet:
 // ...
// 
 request.setAttribute(sPhoto, new Integer(setPhoto));
 error(/c/shared/UserPhoto.jsp,
  Uploaded Images should be of type JPG or GIF and
maximum
of 800KB,
   request, response);
 // .
 // 
private void error(String path, String message,
HttpServletRequest request, HttpServletResponse response)
{
try
{
request.setAttribute(errorMsg, message);

getServletConfig().getServletContext().getRequestDispatcher(path).forw
ar
d(request, response);
}
catch(Exception ex)
{
ex.printStackTrace();
}
}
I have a multipart form on the UserPhoto.jsp.
	form name=editPhoto method=post
action=/c/shared/ImageServlet
enctype=multipart/form-data
  

%
String errorMsg =
(String)request.getAttribute(errorMsg);
if(errorMsg != null  errorMsg.equals(null) == false)
{
%
cw:errorBoxAn error occurred while updating
user
photograph
settings. %=errorMsg%/cw:errorBox
%
}
%
.
  
   /form
When I submit this form to the servlet above and then the servlet
sets
the attribute sPhoto and forwards the request back to the jsp, I
get
the
following error:
HTTP Status 404 - /c/shared/UserPhoto.jsp
type Status report
message /c/shared/UserPhoto.jsp
description The requested resource (/c/shared/UserPhoto.jsp) is not
available.
Apache Tomcat/5.0.28
I do not understand why the forwarded request to the JSP does not
find
the JSP?
Any help on this is appreciated.
Regards,
Mufaddal Khumri
Software Developer
Waves In Motion
Phone: 602 956 7080 x 26
Email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Mufaddal Khumri
Software Developer
Waves In Motion
Phone: 602 956 7080 x 26
Email: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Mufaddal Khumri
Software Developer
Waves In Motion
Phone: 602 956 7080 x 26
Email: [EMAIL PROTECTED]


Re: forward to a form with enctype=multipart/form-data fails

2004-09-28 Thread Mufaddal Khumri
Yes. I had tried that before my first email here. It had worked.
Right now I have a work around that I am using by using  
response.sendRedirect(...). I still
havent got it to work with the forward.

On Sep 28, 2004, at 10:37 AM, Ben Souther wrote:
Are you able to hit UserPhoto.jsp from your browser?
If so, bring it up and paste the URL from your browser's address  
window.

On Tue, 2004-09-28 at 13:26, Mufaddal Khumri wrote:
Yes :) . It is.
My ImageServlet gets a form submission of a form thats
enctype=multipart/form-data.
I am using the DiskFileUpload class from Apache using the
commons-fileupload-1.0.jar
DiskFileUpload upload = new DiskFileUpload();


List items = upload.parseRequest(request);
...

	Since the request contains a multipart form submission, I can get  
data
from that request object once. The
	DiskFileUpload object does this for me and returns a List object i.e.
items.

In doing so my request object looses all the parameters that I had
sent with it.
Now, when I do the following:
	path = /c/shared/UserPhoto.jsp;
	
	
	request.setAttribute(errorMsg, message);
	
getServletConfig().getServletContext().getRequestDispatcher(path).forw 
ar
d(request, response);
	
	This forward fails  . And I am still at a loss of explanation.

Any help is appreciated.
Regards,



Now doing this in my
On Sep 28, 2004, at 10:07 AM, Shapira, Yoav wrote:
Hi,
And is /c/shared within the docBase of your webapp? ;)
Yoav Shapira
Millennium Research Informatics

-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 1:06 PM
To: Tomcat Users List
Subject: Re: forward to a form with enctype=multipart/form-data
fails
Yes. :) I do. Thats what is confusing the hell out of me.
Thanks.
On Sep 28, 2004, at 9:22 AM, Ben Souther wrote:
Do you have a JSP at:
/c/shared/UserPhoto.jsp
?

On Tue, 2004-09-28 at 12:15, Mufaddal Khumri wrote:
Hi,
I have the following code in a  Servlet:
 // ...
// 
 request.setAttribute(sPhoto, new Integer(setPhoto));
 error(/c/shared/UserPhoto.jsp,
  Uploaded Images should be of type JPG or GIF and
maximum
of 800KB,
   request, response);
 // .
 // 
private void error(String path, String message,
HttpServletRequest request, HttpServletResponse response)
{
try
{
request.setAttribute(errorMsg, message);

getServletConfig().getServletContext().getRequestDispatcher(path).for 
w
ar
d(request, response);
}
catch(Exception ex)
{
ex.printStackTrace();
}
}
I have a multipart form on the UserPhoto.jsp.
	form name=editPhoto method=post
action=/c/shared/ImageServlet
enctype=multipart/form-data
  

%
String errorMsg =
(String)request.getAttribute(errorMsg);
if(errorMsg != null  errorMsg.equals(null) == false)
{
%
cw:errorBoxAn error occurred while updating
user
photograph
settings. %=errorMsg%/cw:errorBox
%
}
%
.
  
   /form
When I submit this form to the servlet above and then the servlet
sets
the attribute sPhoto and forwards the request back to the jsp, I
get
the
following error:
HTTP Status 404 - /c/shared/UserPhoto.jsp
type Status report
message /c/shared/UserPhoto.jsp
description The requested resource (/c/shared/UserPhoto.jsp) is  
not
available.
Apache Tomcat/5.0.28

I do not understand why the forwarded request to the JSP does not
find
the JSP?
Any help on this is appreciated.
Regards,
Mufaddal Khumri
Software Developer
Waves In Motion
Phone: 602 956 7080 x 26
Email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:  
[EMAIL PROTECTED]



--- 
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:  
[EMAIL PROTECTED]

Mufaddal Khumri
Software Developer
Waves In Motion
Phone: 602 956 7080 x 26
Email: [EMAIL PROTECTED]
 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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

forward to a jsp with multipart form fails.

2004-09-27 Thread Mufaddal Khumri
Hi,
I have the following code in a  Servlet:
// ...
   // 
request.setAttribute(sPhoto, new Integer(setPhoto));
error(/c/shared/UserPhoto.jsp,
 Uploaded Images should be of type JPG or GIF and maximum  
of 800KB,
  request, response);
// .
// 

   private void error(String path, String message,  
HttpServletRequest request, HttpServletResponse response)
	{
		try
		{
			request.setAttribute(errorMsg, message);

			 
getServletConfig().getServletContext().getRequestDispatcher(path).forwar 
d(request, response);
		}
		catch(Exception ex)
		{
			ex.printStackTrace();
		}
	}

I have a multipart form on the UserPhoto.jsp.
	form name=editPhoto method=post action=/c/shared/ImageServlet  
enctype=multipart/form-data
 
	
		%
		String errorMsg = (String)request.getAttribute(errorMsg);
		if(errorMsg != null  errorMsg.equals(null) == false)
		{
		%
			cw:errorBoxAn error occurred while updating user photograph  
settings. %=errorMsg%/cw:errorBox
		%
		}
		%
	.
 
  /form

When I submit this form to the servlet above and then the servlet sets  
the attribute sPhoto and forwards the request back to the jsp, I get  
the
following error:

HTTP Status 404 - /c/shared/UserPhoto.jsp
type Status report
message /c/shared/UserPhoto.jsp
description The requested resource (/c/shared/UserPhoto.jsp) is not  
available.
Apache Tomcat/5.0.28

I do not understand why the forwarded request to the JSP does not find  
the JSP?

Any help on this is appreciated.
Regards,
Mufaddal.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


favicon question

2004-07-09 Thread Mufaddal Khumri
I have a webapp deployed under tomcat + apache.
I have a taglib in which i have the following:
out.print(link rel='shortcut icon' 
href='/mywebapp/images/favicon.ico' type='image/x-icon');

The favicon.ico is a 16 * 16 icon file.
The favicon shows up in Safari on the Mac , but not on netscape, or IE 
. On windows it does not show up in either IE or Netscape.

I have not put the favicon in the webservers root from where it can get 
it by default. As you can see I have it in mywebapp/images folder.

Does anybody know why this does not work? Or do browsers dont have 
support for this much ?

Regards.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Design question ..

2004-06-21 Thread Mufaddal Khumri
Hi,
Yes , first come first is something that I prefer too. But I will need 
a singleton java object with a synchronized method to do the 
transaction. The transaction would involve 1. Check data 2. Register 3. 
commit data to database. After the method completes i can send them a 
confirmation.

The downside to this approach is that if lots of users are registering 
for courses online , they might experience a delay.

On Jun 21, 2004, at 12:47 PM, Peter Lin wrote:
There's a couple of different ways to handle this.
1. do not do it in real time. this is the easiest solution, but it
means a human has to be the one who figures who gets what class.

2. use JMS to update each user's session and make it so that once the
class has no more entries, no one else can add it to their cart. Say
user 1 submits before user 2. if user 1 registers before 2, a message
is sent to the java bean in memory to update the cart
3. process the orders on a first come first serve basis, but do not
gaurantee the person is signed up for it. In the response email state,
you will get a confirmation of successful regisration.  This is
usually the easiest way to assuming you send confirmation in
reasonable amount of time. This implies the transaction are processed
async with some kind of queue
4. check availability before starting the transaction. this means some
kind of locking at the row level.
I'm sure there are other ways of doing it. Personally, I prefer
handling the transaction on a first come first serve basis and send
out confirmation in reasonable time.
peter

On Mon, 21 Jun 2004 12:37:04 -0700, Mufaddal Khumri
[EMAIL PROTECTED] wrote:
Hi,
I am in the process of writing a webapp that allows users to make a
payment and register for a course. Using Apache -- Tomcat --- MySQL.
The question is a design question i guess, unless there is something 
in
Tomcat that I can leverage, which i might not know.  I know that this
is a design question , but since I am using Tomcat as my JSP/Servlet
container and since the participants here are experts in this field , 
I
thought that I might get some good pointers here.

Lets take this scenario:
User 1 and User 2 are trying to register for a course called
Taekwando. The fee for registering is X amount. Also there is 
another
course called Majagutamba and it costs Y amount. Both theses courses
have exactly 1 seat remaining.

Now lets say user 1 adds both these courses in his shopping cart, and
user 2 does the same, since user 1 has not completed his transaction
and paid the enrollment table wont have an entry for user1. (The
Enrollment table keeps track of which user is enrolled in which
course). Therefore both users have both those courses in their 
shopping
carts. Now both of them proceed to checkout. They enter their credit
card information and say submit. Both those users make payments and 
get
enrolled for both those courses!!! Which is wrong , since both those
courses could only enroll 1 more person, instead two new users were
just added.

To avoid the above problem one could implement a singleton 
synchronized
Transaction object that would process shopping cart checkout in a
queue. The problem with this approach are:
1. If anything goes wrong with any one transaction, it would hold up
the entire queue. (Well we can have some sort of timeouts and take 
care
of that.)
2. Since this is a syncrhonized singleton and if the traffic for
registering for the courses is high, this would be a slow process for
which the user will have to wait.

Is there a better solution, algorithm, to do this ? Any help is
appreciated.
Thanks,
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Mufaddal Khumri
Software Developer
Waves In Motion
Phone: 602 956 7080 x 26
Email: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Design question ..

2004-06-21 Thread Mufaddal Khumri
I understand this method of doing it and I understand the pseudo code 
too. I believe this code will be in a synchronized method that should 
be placed in a singleton object. The code validates information. One 
example validation could be getting current registrations for the 
course and seeing if there is place left for this new user to enroll in 
that course. If this method is not synchronized then two different 
users
could be in this same function validating their data and then they 
would try to register for the course too.

If the number of users using the system to register for courses is high 
this singleton object encapsulating this synchronized method, would e a 
bottle neck. Is there any other solution or is this standard 
implementation?

On Jun 21, 2004, at 12:54 PM, Jérôme Duval wrote:
Most commercial databases implement a solution to this problem since 
it is
fairly common. For MySQL, you must use the InnoDB engine (at least for 
now).
You use the concept of transaction. To do this, you must turn the 
AutoCommit
mode to off (some client have this mode off by default, some do not. 
Check
your documentation. If you are going through JDBC Connections are 
always in
AutoCommit(true)!). You must also set the Transaction Mode to
Transaction_Serializable which locks table so that no one else then 
you can
read the data in your tables.

The code looks something like this:
try {
//Validate information
//Add the record in the table
//Bill the customer
//commit transaction
} catch (SQLException) {
//rollback the transaction cause something went wrong
} finally {
//close the connection
}
Where you bill the customer is dicussable (it is related to the 
transaction
but does not require DB access). It's all up to you really. A couple of
things to notice:

- TRANSACTION_SERIALIZABLE is the most demanding mode for your database
server.
- If you forget even one commit() or rollback() you might lose data to
locking.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Mufaddal Khumri
Software Developer
Waves In Motion
Phone: 602 956 7080 x 26
Email: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Design question ..

2004-06-21 Thread Mufaddal Khumri
Hi Frank
I understand this approach. The problem is that the course table has a 
field called maxregistration if this field is set to -1 it means that 
there is no limit. If there is a value in this field, it will be = 1. 
I have another table called Enrollments. This table has courseId, 
userId information. It keeps track of what user is enrolled in what 
course. I have a waitinglist table which has userId, courseId, 
timestamp. It keeps track of what users are waiting to be enrolled in a 
course that has met its capacity. The instructor can give override to 
users in waitinglist for a table. An override transfers a user from the 
WaitingList table to the Enrollment table. This means that at any given 
time the enrollment table could have more than course.maxregistration 
users enrolled for a course.

Could you give me an example of a constraint that I could put on my 
tables so that it does not allow registrations more than 
course.maxregistration?

On Jun 21, 2004, at 12:56 PM, Frank Zammetti wrote:
Probably the easiest way to handle this is simply to have a constraint 
on your database that says a record cannot be added if some field is 0 
(or a unique constraint, depending on how your table is keyed).  Then, 
just catch the exception in your code and check to see if it's a 
violation of your rule, then return a message to the user saying the 
class has filled up.

Simply put, don't worry about them putting the class in the shopping 
cart.  Make sure you have a note on the site that says they are NOT 
actually registered until the shopping cart is processed.  Then, let 
the database handle the concurrency issues (which they are very good 
at!) and you don't have to complicate your code any.

I generally like staying away from database-level rules like this, 
just in case you tie yourself to a particular vendor, but something 
like this is pretty safe, and is tailor-made for such a mechanism.

Frank

From: Mufaddal Khumri [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Design question ..
Date: Mon, 21 Jun 2004 12:37:04 -0700
Hi,
I am in the process of writing a webapp that allows users to make a 
payment and register for a course. Using Apache -- Tomcat --- MySQL.

The question is a design question i guess, unless there is something 
in Tomcat that I can leverage, which i might not know.  I know that 
this is a design question , but since I am using Tomcat as my 
JSP/Servlet container and since the participants here are experts in 
this field , I thought that I might get some good pointers here.

Lets take this scenario:
User 1 and User 2 are trying to register for a course called 
Taekwando. The fee for registering is X amount. Also there is 
another course called Majagutamba and it costs Y amount. Both 
theses courses have exactly 1 seat remaining.

Now lets say user 1 adds both these courses in his shopping cart, and 
user 2 does the same, since user 1 has not completed his transaction 
and paid the enrollment table wont have an entry for user1. (The 
Enrollment table keeps track of which user is enrolled in which 
course). Therefore both users have both those courses in their 
shopping carts. Now both of them proceed to checkout. They enter 
their credit card information and say submit. Both those users make 
payments and get enrolled for both those courses!!! Which is wrong , 
since both those courses could only enroll 1 more person, instead two 
new users were just added.

To avoid the above problem one could implement a singleton 
synchronized Transaction object that would process shopping cart 
checkout in a queue. The problem with this approach are:
1. If anything goes wrong with any one transaction, it would hold up 
the entire queue. (Well we can have some sort of timeouts and take 
care of that.)
2. Since this is a syncrhonized singleton and if the traffic for 
registering for the courses is high, this would be a slow process for 
which the user will have to wait.

Is there a better solution, algorithm, to do this ? Any help is 
appreciated.

Thanks,
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
MSN Movies - Trailers, showtimes, DVD's, and the latest news from 
Hollywood! 
http://movies.msn.click-url.com/go/onm00200509ave/direct/01/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Mufaddal Khumri
Software Developer
Waves In Motion
Phone: 602 956 7080 x 26
Email: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Design question ..

2004-06-21 Thread Mufaddal Khumri
Yes, I could not said it better. I am not using clusters, but I  
certainly do want to stay away from the singleton and synchronization  
approach. It does have to be done at the database or with an extra  
table called Enrollment_Temp or something. Basically, when a user  
adds the course to his cart, an entry would be made in the  
Enrollment_Temp table and the current timestamp would be written to one  
column in this table. The current number of enrollments would thus be  
the sum of such entries in the Enrollment_temp and Enrollment table. If  
the user completes his transaction this entry from the enrollment_temp  
table can be moved to the enrollment table. This raises the question  
that there would be certain users who would not complete their  
transaction. Such users would cause entries in the Enrollment_temp  
table. We can have a timeout on the life of such entries in the  
enrollment_temp table. Have a thread clean the Enrollment_temp table if  
a condition like now  timestamp stored + 30 minutes.

If a user has a course in his or her shopping cart and does not  
complete his transaction, and if this was the last seat. For the next  
30 minutes from the time he adds that course to his shopping cart, it  
wont be available to anybody.

Q 1. Is this a good approach and is this judicious enough for users to  
use?
Q 2. Can any improvements made to this approach?

On Jun 21, 2004, at 4:07 PM, Frank Zammetti wrote:
If your thinking in terms of singletons and synchronized blocks, it  
seems like you are thinking along the lines of doing this all  
in-memory.  You CAN do that, but it's generally not a good idea.

First, I don't know if your dealing with a clustered environment, but  
if you are you'll find that you have synchronization issues to deal  
with.

Second, the obvious: if power goes out, everything is lost.  If your  
dealing with a database, there's at least the possibility of  
recovering things.

Third, any time you introduce a synchronized block in a J2EE-based  
application you have to ask yourself if your design isn't flawed  
because you are supposed to let the container handle all threading  
issues and your code should always be thread-safe.  I myself have  
broken this rule on occassion, and I believe it to be valid to do  
sometimes, but you need to be sure it's truly the right anwer.

Assuming you decide it is, realize that any synchronized block of code  
means your introducing a bottleneck to the application.  You may  
decide it's insignificant, but you are essentially serializing all  
requests that go through that critical section, so you need to really  
make sure it's the right thing to do.  In a recent app, I had a  
critical section during logon.  This is very different than something  
that's a transaction within the app that might happen a number of  
times for a given user since the logon shouldn't be happening very  
often and you probably won't get too many users doing it concurrently,  
so it's not a big issue as compared to something that might be  
happening a lot for many different users.

This really strikes me as something that should be done in a database,  
whether your letting the database handle the concurrance issues or you  
do so in your code yourself, but either way, that's really the way I'd  
be looking.

Frank
From: Mufaddal Khumri [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Re: Design question ..
Date: Mon, 21 Jun 2004 14:34:51 -0700
Hi,
Yes , first come first is something that I prefer too. But I will  
need a singleton java object with a synchronized method to do the  
transaction. The transaction would involve 1. Check data 2. Register  
3. commit data to database. After the method completes i can send  
them a confirmation.

The downside to this approach is that if lots of users are  
registering for courses online , they might experience a delay.

On Jun 21, 2004, at 12:47 PM, Peter Lin wrote:
There's a couple of different ways to handle this.
1. do not do it in real time. this is the easiest solution, but it
means a human has to be the one who figures who gets what class.

2. use JMS to update each user's session and make it so that once the
class has no more entries, no one else can add it to their cart. Say
user 1 submits before user 2. if user 1 registers before 2, a message
is sent to the java bean in memory to update the cart
3. process the orders on a first come first serve basis, but do not
gaurantee the person is signed up for it. In the response email  
state,
you will get a confirmation of successful regisration.  This is
usually the easiest way to assuming you send confirmation in
reasonable amount of time. This implies the transaction are processed
async with some kind of queue

4. check availability before starting the transaction. this means  
some
kind of locking at the row level.

I'm sure there are other ways of doing it. Personally, I prefer
handling

Simple question regarding Body Tags

2004-04-22 Thread Mufaddal Khumri
I am using Tomcat 4.1.29

I have a bodytag called Page

In the constructor of this Tag I do this:

HttpSession session = null;

try
{
session = pageContext.getSession();
}
catch(Exception ex)
{
ex.printStackTrace();
}
When I use this tag on a JSP page and try to access this jsp page, I  
get the following:

org.apache.jasper.JasperException
at  
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja 
va:254)
at  
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java: 
295)
at  
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at  
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica 
tionFilterChain.java:247)
at  
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt 
erChain.java:193)
at  
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv 
e.java:256)
at  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i 
nvokeNext(StandardPipeline.java:643)
at  
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 
480)
at  
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at  
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv 
e.java:191)
at  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i 
nvokeNext(StandardPipeline.java:643)
at  
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 
480)
at  
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at  
org.apache.catalina.core.StandardContext.invoke(StandardContext.java: 
2417)
at  
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java 
:180)
at  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i 
nvokeNext(StandardPipeline.java:643)
at  
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa 
lve.java:171)
at  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i 
nvokeNext(StandardPipeline.java:641)
at  
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java 
:172)
at  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i 
nvokeNext(StandardPipeline.java:641)
at  
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java: 
577)
at  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i 
nvokeNext(StandardPipeline.java:641)
at  
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 
480)
at  
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at  
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. 
java:174)
at  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i 
nvokeNext(StandardPipeline.java:643)
at  
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 
480)
at  
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at  
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193)
at  
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:309)
at  
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:387)
at  
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:673)
at  
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java: 
615)
at  
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:786)
at  
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool 
.java:666)
at java.lang.Thread.run(Thread.java:552)

root cause
javax.servlet.ServletException
at  
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex 
tImpl.java:531)
at org.apache.jsp.Home_jsp._jspService(Home_jsp.java:276)
at  
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at  
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja 
va:210)
at  
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java: 
295)
at  
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at  
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica 
tionFilterChain.java:247)
at  
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt 
erChain.java:193)
at  

Re: Deployer problem

2004-02-10 Thread Mufaddal Khumri
JSP 2.0 has no .tld files any more. Neither do you need to edit your 
web.xml file. You need to copy your tags to WEB-INF/tags directory.

x1.tag file, must reside in WEB-INF/tags

The jsp pages will have the following change:

%@ taglib prefix=someTag tagdir=/WEB-INF/tags %

someTag:x1

/someTag:x1

Hope this helps

Mufaddal.

On Feb 10, 2004, at 2:22 PM, Chanan Braunstein wrote:

 Hello,
	I am trying to use the client deployer to compile my web-app. There
is not much help on the issue, and for someone like me that never used 
ant
before it is hard to figure out what to do... However here is what I 
did so
far:

Download ant  tomcat 5 deployer. Copied the deployer lib files into 
ant
lib. Added ant\bin to my PATH (Windows) copied build.xml from the 
deployer
to my webapp directory. Copied the lib folder from ant to my webapp
directory (I guess I could have put the path in the command line for 
ant,
but I was too lazy and I wanted to see if it works first), edited the
build.xml to point to the name of my web-app. And then executed ant 
from the
command line.

Here is my output:

compile:
 [copy] Copying 1965 files to C:\Tomcat 
5.0\webapps\build\webapp\knovel2
 [copy] Copied 33 empty directories to 1 empty directory under 
C:\Tomcat
5.0
\webapps\build\webapp\knovel2
  [jasper2] Feb 10, 2004 4:15:09 PM org.apache.jasper.JspC 
initClassLoader
  [jasper2] WARNING: TLD files should not be placed in /WEB-INF/lib
  [jasper2] Feb 10, 2004 4:15:09 PM org.apache.jasper.JspC 
initClassLoader
  [jasper2] WARNING: TLD files should not be placed in /WEB-INF/lib
  [jasper2] Feb 10, 2004 4:15:09 PM org.apache.jasper.JspC 
initClassLoader
  [jasper2] WARNING: TLD files should not be placed in /WEB-INF/lib
  [jasper2] Feb 10, 2004 4:15:09 PM org.apache.jasper.JspC 
initClassLoader
  [jasper2] WARNING: TLD files should not be placed in /WEB-INF/lib

BUILD FAILED
C:\Tomcat 5.0\webapps\build.xml:73: 
java.lang.ExceptionInInitializerError

So questions:

1) What is up with not putting tld files in the lib folder? Where is a
better location?
2) why did the build fail? And how do I fix it?
	Thanks,

Chanan Braunstein
Knovel Corp.
Web Development Manager
607-773-1840 x672
http://www.knovel.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Problem adding access log valve.

2004-02-05 Thread Mufaddal Khumri
Hi

I have the following in my server.xml

  !-- Define the default virtual host --
  Host name=localhost debug=0 appBase=webapps
   unpackWARs=true autoDeploy=true
Logger className=org.apache.catalina.logger.FileLogger
 directory=logs  prefix=localhost_log. suffix=.txt
timestamp=true/
Logger className=org.apache.catalina.valves.AccessLogValve
 directory=logs/acesslogs
 pattern=%a %A %b %B %h %H %l %m %p %q %r %s %S %t %u 
%U %v
 prefix=access_log. suffix=.txt
	timestamp=true/

Context path=/mywebapp docBase=mywebapp debug=0
 reloadable=true crossContext=true/
  /Host

I added the AccessLogValve above and now Tomcat does not start? What 
did I do wrong?

Tomcat works fine if I remove the accessvalvelog i added above.

Thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


How to set session timeout?

2004-01-20 Thread Mufaddal Khumri
From where can you set the session timeout ? In other words where in 
Tomcat can you control the session timeout ?

Thanks

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: How to set session timeout?

2004-01-20 Thread Mufaddal Khumri
session-config
session-timeout1/session-timeout
/session-config
Can we set the session-timeout less than a minute?

Thanks

On Jan 20, 2004, at 3:30 PM, Filip Hanik wrote:

in web.xml in your web application (WEB-INF/web.xml)

Filip
- Original Message -
From: Mufaddal Khumri [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, January 20, 2004 2:27 PM
Subject: How to set session timeout?

From where can you set the session timeout ? In other words where in
Tomcat can you control the session timeout ?
Thanks

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: How to set session timeout?

2004-01-20 Thread Mufaddal Khumri
Whats the default value set for session timeout?? (tomcat 4.1.29)?

ie if I do not specify the session-timeout whats the default ?

Thanks

On Jan 20, 2004, at 3:30 PM, Filip Hanik wrote:

in web.xml in your web application (WEB-INF/web.xml)

Filip
- Original Message -
From: Mufaddal Khumri [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, January 20, 2004 2:27 PM
Subject: How to set session timeout?

From where can you set the session timeout ? In other words where in
Tomcat can you control the session timeout ?
Thanks

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Need an Idea - appending #tag after someurl.jsp ?

2004-01-16 Thread Mufaddal Khumri
The servlet is doing a forward to the JSP. How is it possible then?

On Jan 15, 2004, at 3:55 PM, Hume, John - NA US HQ Delray wrote:

Is the servlet doing a RequestDispatcher.forward or HTTP redirecting?  
It
seems a response.sendRedirect (HTTP redirect) would work, assuming 
your JSP
doesn't need the data from the form POST request.  If it DOES need to 
share
the request with the servlet, then I believe the HTML form action will 
have
to include the #tag.

The other way to go would be JavaScript in the JSP that looks at a 
request
parameter or something else in the URI, which doesn't strike me as 
pretty,
but others may like.  Note that JavaScript won't see request 
parameters that
you add in a RequestDispatcher.forward, so here again the form (if 
it's a
GET) or form action (if it's a POST) would have to include something 
for the
JS to see.

-john.

-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 15, 2004 5:45 PM
To: Tomcat Users List
Subject: Need an Idea - appending #tag after someurl.jsp ?
hi,

I have a page called First.jsp. I have a a name='tag' on it. When i
submit a form to a servlet, the servlet needs to forward me to
First.jsp#tag. Problem is i get the following message when i try to do
this:
type: Status report
message: /First.jsp#tag
description: The requested resource (/First.jsp#tag) is not available.
if it were: First.html#tag it would have worked, but for a jsp .. Any
Ideas to get the same effect?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Need an Idea - appending #tag after someurl.jsp ?

2004-01-16 Thread Mufaddal Khumri
I set a request attribute before forwarding the request to JSP.  Does 
anybody have some javascript that would allow me to jump to a an anchor 
within that page ?

On Jan 15, 2004, at 3:55 PM, Hume, John - NA US HQ Delray wrote:

Is the servlet doing a RequestDispatcher.forward or HTTP redirecting?  
It
seems a response.sendRedirect (HTTP redirect) would work, assuming 
your JSP
doesn't need the data from the form POST request.  If it DOES need to 
share
the request with the servlet, then I believe the HTML form action will 
have
to include the #tag.

The other way to go would be JavaScript in the JSP that looks at a 
request
parameter or something else in the URI, which doesn't strike me as 
pretty,
but others may like.  Note that JavaScript won't see request 
parameters that
you add in a RequestDispatcher.forward, so here again the form (if 
it's a
GET) or form action (if it's a POST) would have to include something 
for the
JS to see.

-john.

-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 15, 2004 5:45 PM
To: Tomcat Users List
Subject: Need an Idea - appending #tag after someurl.jsp ?
hi,

I have a page called First.jsp. I have a a name='tag' on it. When i
submit a form to a servlet, the servlet needs to forward me to
First.jsp#tag. Problem is i get the following message when i try to do
this:
type: Status report
message: /First.jsp#tag
description: The requested resource (/First.jsp#tag) is not available.
if it were: First.html#tag it would have worked, but for a jsp .. Any
Ideas to get the same effect?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Need an Idea - appending #tag after someurl.jsp ?

2004-01-15 Thread Mufaddal Khumri
hi,

I have a page called First.jsp. I have a a name='tag' on it. When i 
submit a form to a servlet, the servlet needs to forward me to 
First.jsp#tag. Problem is i get the following message when i try to do 
this:

type: Status report
message: /First.jsp#tag
description: The requested resource (/First.jsp#tag) is not available.
if it were: First.html#tag it would have worked, but for a jsp .. Any 
Ideas to get the same effect?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Need an Idea - appending #tag after someurl.jsp ?

2004-01-15 Thread Mufaddal Khumri
Could you elaborate? you presented just a normal a href ..  tag. I am 
trying to jump to an anchor within First.jsp when I am forwarded from a 
servlet. Any ideas?

On Jan 15, 2004, at 4:47 PM, Howard Watson wrote:

I have some links that pass parameters like this:

a href=IPclientSelect.jsp?task=AddAdd Client IPs/a

[EMAIL PROTECTED] 01/15/04 03:45PM 
hi,

I have a page called First.jsp. I have a a name='tag' on it. When i
submit a form to a servlet, the servlet needs to forward me to
First.jsp#tag. Problem is i get the following message when i try to do
this:
type: Status report
message: /First.jsp#tag
description: The requested resource (/First.jsp#tag) is not available.
if it were: First.html#tag it would have worked, but for a jsp .. Any
Ideas to get the same effect?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


http to https how ?

2004-01-12 Thread Mufaddal Khumri
Hi,

Have a page First.jsp

When a user comes to http://my.domain.com/First.jsp ... I would like to 
redirect him or her to https://my.domain.com/First.jsp.

How do I do this on my jsp ? I tried % 
request.redirect(https://my.domain.com/First.jsp;) % , but i get an 
exception saying

cannot resolve symbol
symbol  : method redirect (java.lang.String)
location: interface javax.servlet.http.HttpServletResponse
response.redirect(path);
Thanks.

Re:CORRECTION http to https how ?

2004-01-12 Thread Mufaddal Khumri
I meant response.redirect(path)

On Jan 12, 2004, at 5:11 PM, Mufaddal Khumri wrote:

Hi,

Have a page First.jsp

When a user comes to http://my.domain.com/First.jsp ... I would like 
to redirect him or her to https://my.domain.com/First.jsp.

How do I do this on my jsp ? I tried % 
request.redirect(https://my.domain.com/First.jsp;) % , but i get an 
exception saying

cannot resolve symbol
symbol  : method redirect (java.lang.String)
location: interface javax.servlet.http.HttpServletResponse
response.redirect(path);
Thanks.

including a .jsp from within a taglib.

2003-11-26 Thread Mufaddal Khumri
Hi,

I have a one.jsp on which i am using a taglib called pf:mytag 
somepath='path'/

Inside the taghandler class i do the following:

try
{   
pageContext.include(path);
}
catch(ServletException ex)
{
ex.printStackTrace();
}
path holds the path to another .jsp file that i want to include.  I 
have made sure that my taglib does get the path string.

pageContext.include(path) does not work for me. Have I to do something 
more than this? Where am i going wrong?

Thanks.

Taglib problem with more information ...

2003-11-26 Thread Mufaddal Khumri
Hi,

I have two taglibs.
1. myTag1
2. myTag2
Both taglibs essentially do the following:

I have a one.jsp on which i am using a taglib called pf:mytag 
somepath='path'/

Inside the taghandler class i do the following:

try
{   
pageContext.include(path);
}
catch(ServletException ex)
{
ex.printStackTrace();
}
path holds the path to another .jsp file that i want to include.  I 
have made sure that my taglib does get the path string.

This works for myTag1 but does not work for myTag2 ???

The difference between myTag1 and myTag2 is this:

myTag1 is a simple tag. myTag2 is a body Tag. Also myTag2 extends a 
base taghandler class called myBaseTag.

pageContext.include(path) does not work for me in myTag2. Have I to do 
something more than this? Where am i going wrong?

Thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


URL rewriting question ..

2003-11-18 Thread Mufaddal Khumri
In order to enable URL rewriting as opposed to storing cookies 
automatically we need to use the encodeURL(String url) or 
encodeRedirectURL(String url) method in the Servlets and/or JSPs. Is 
there a more easier way to do this as opposed to going thru the entire 
webapp and doing this for every URL or redirection ? Are there some 
configuration settings in Tomcat 4.1.x that can be set in say the 
server.xml or web.xml that can be used ?

Thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: URL rewriting question ..

2003-11-18 Thread Mufaddal Khumri
Wouldnt it be nice a feature like this that one can turn on or off 
globally in a container like tomcat ? The existing way to granularly do 
it should remain, but a global way to do it would be nice ..

On Tuesday, November 18, 2003, at 09:13  AM, Christopher Schultz wrote:

Mufaddal,
Are there some configuration settings in Tomcat 4.1.x that can be set 
in say the server.xml or web.xml that can be used ?
Nope. Tomcat won't look through your responses for things that look 
like URLs and append all the things you need (like sessison id, etc.).

However, if you are using a framework like Struts, you can use the tag 
libraries provided to add both the context path as well as any 
necessary session information to the URLs.

Unfortunarely, that still requires you to go back through all your 
pages and change all the links :(

-chris

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Tomcat 5 release date ?

2003-11-14 Thread Mufaddal Khumri
Hi,

Is there a way to find the projected released date for Tomcat 5 ?

Thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: concurrent user threading problem

2003-11-13 Thread Mufaddal Khumri
Hi Tamsin:

I might face the same problem like you did. I am just wondering if you 
are still trying to find a way to make your webapp run on the new 
hardware with hyperthreading turned on? If yes, what if the compiler 
used to compile your code wasnt optimised for a hyperthreaded 
environment ? I might be wrong, but maybe compiling tomcat or / and 
compiling your webapp with a compiler that does optimizations for a 
hyperthreaded environment might solve the issue. If you are doing some 
tests in this regards and have results do let me know.

Thanks.

On Thursday, November 13, 2003, at 05:21  AM, tamsin wrote:

phew. problem resolved!

for info, we switched the kernel on the new server to use a single
processor (no hyperthreading) and it is now fine.
very strange that the problem occured though, i don't know what part of
the system didn't like the hyperthreading.
tamsin



hi all,
orry for the long mail; i'm at my witts end here, and just wanted to
check that i'm not losing my marbles!
we have been running a commercial app on tomcat for the last two 
years.
we've had intermittent out of memory problems processing large pages
meaning we've had to reboot occasionally (the app produces xml,
transforms it using xslt to output html), but in general the 
performance
has been good and the app has been stable. as the business has been
growing, we recently upgraded to a new funky dell server, 
multiprocessor
with
hyperthreading, but this seems to have exacerbated the problem
dramatically:
we now have a situation where if a single user requests a page, it is
lightening fast, but once there are two requests at the same time, 
both
are about 100 times slower; i would expect twice slower at most. once
returning to only one request at a time, the speed recovers 
immediately.
in top you can see that java has 100% of the CPU time, and one of the 
4
effective CPU's is maxed out.

so i'm desperately trying to track down the cause of this problem; i'm
guessing it must be some kind of race condition. we have reviewed all
our code, ensured that methods accessing shared objects are
synchronized, been through all the config, removed most of the logging
etc etc, and upgraded to tomcat 4.1.29 and all to no avail; we don't
seem to be able to narrow down where the problem could be.
what i wanted to check was: the app has one servlet only, through 
which
all requests are processed. all requests go through the doGet method. 
to
try and check if our code was to blame, we synchronised this method. 
my
understanding is that this would mean if two requests were received at
approximately the same time, one would have to wait until after the
first had been processed, meaning the two requests could not access 
any
of our code at the same time, and therefore the second would be say
twice as slow as the first. however, this is not the case, still they
are both about 100 times slower. this makes me think that it cannot be
an error in our code? but then tomcat seems to serve concurrent users 
on
other people's apps with no problem, so i can't believe tomcat is to
blame.

is my assumption about synchronizing the doGet method correct?  is 
there
anything special i should know about using tomcat on a multiprocessor
server? any suggestions at all greatfully received!

thanks,
tamsin
ps:
tomcat: 4.1.29
java: 1.4.2
postgresql: 7.3.4
saxon
xerces


- 
To
unsubscribe, e-mail: [EMAIL PROTECTED] For
additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Severe notification ...

2003-11-04 Thread Mufaddal Khumri
I have my webapp up and running and am stress testing it. After a while 
I get this:

Nov 4, 2003 1:50:12 PM org.apache.tomcat.util.threads.ThreadPool 
logFull
SEVERE: All threads are busy, waiting. Please increase maxThreads or 
check the servlet status75 75

I have no idea why all threads would be busy and waiting.

I could raise the value of maxThreads, but that would just delay the 
error from being reported. I need to get a dump of my tomcat threads 
and see where the bottleneck is. How do I do this ? Is there a facility 
in tomcat that would allow me to dump its threads and allow me to see 
where the threads are waiting and not moving on ? Is there a good 
utility i can use ?

Thanks.

Re: Severe notification ...

2003-11-04 Thread Mufaddal Khumri
Hi,

I am facing this problem in 4.1.18. I havent tried to upgrade yet, but 
would like to know if there is a way in Tomcat to get a dump of my 
tomcat threads and see where the bottleneck is. How do I do this ? Is 
there a facility in tomcat that would allow me to dump its threads and 
allow me to see where the threads are waiting and not moving on ? Is 
there a good utility i can use ?

Thanks.

On Tuesday, November 4, 2003, at 02:45  PM, Erik Wright wrote:

Hi,

I have had this problem exactly, and have been told that it is a bug 
in 4.1.24 to 4.1.27 that has been fixed in 4.1.29. Essentially, when 
working at or near the maximum connections (as defined in the 
Connector config in server.xml) some threads get permanently 
deadlocked or something. I didn't investigate much more than that.

I created my own workaround which is really a hack not worth sharing 
here. Perhaps when I have time I will upgrade to 4.1.29 and see if 
that fixes the problem.

If you do upgrade, please post your results to the list!

Erik

Mufaddal Khumri wrote:

I have my webapp up and running and am stress testing it. After a 
while I get this:

Nov 4, 2003 1:50:12 PM org.apache.tomcat.util.threads.ThreadPool 
logFull
SEVERE: All threads are busy, waiting. Please increase maxThreads or 
check the servlet status75 75

I have no idea why all threads would be busy and waiting.

I could raise the value of maxThreads, but that would just delay the 
error from being reported. I need to get a dump of my tomcat threads 
and see where the bottleneck is. How do I do this ? Is there a 
facility in tomcat that would allow me to dump its threads and allow 
me to see where the threads are waiting and not moving on ? Is there 
a good utility i can use ?

Thanks.


--
http://www.spectacle.ca/
The New Online Source for Live Music in Montreal
.::514.286.1699::.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: HOW CAN I USE THREADS IN TOMCAT

2003-11-03 Thread Mufaddal Khumri
Hi,

I have an instance of MyMailScheduler - mmsched in a ContextListener 
class for my webapp. mmsched spawns threads to do some work regarding 
sending emails. In my contextDestroy method I do : mmsched = null;

I was under the impression that if tomcat was shutdown or the webapp 
was stopped my threads would be automatically killed since mmsched 
would be garbage collected. Am I understanding this right or do I need 
to do something else ?

 My webapp does two mail related tasks for two different sets of data. 
Both tasks are identical and therefore I spawn two threads. The two 
threads do not share any data structures. Also do I need to make the 
run() method synchronized ?

Thanks.

On Monday, November 3, 2003, at 08:45  PM, IvanLatysh wrote:

Hello, Prince!
You wrote to Tomcat Users List [EMAIL PROTECTED] on 
Sat, 1 Nov 2003 13:21:42 +0530:

 P Hi,
 P  I need to send a mail automatically at 10 minutes interval. how 
can
 P i do this? how can i activate threads in tomcat?

Tomcat is a Java application, there are no difference of using threads 
with Tomcat or without it.
Simply expand Thread class, and run your thread.
But don't forget to notify and kill your thread when Tomcat is 
shutting down.

Here is a link that might help you.
http://developer.java.sun.com/developer/codesamples/thrds.html
---
Regards
Ivan[a]yourmail.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: HOW CAN I USE THREADS IN TOMCAT

2003-11-03 Thread Mufaddal Khumri
Hi,

The problem is that stop / suspend are deprecated. The destroy() method 
has yet not been implemented ? What does one do then?

I have a solution -

Keep a reference to the instances of the threads spawned in a 
hashtable. In contextDestroy make all these references null . Will this 
solution work ?

Thanks.

On Monday, November 3, 2003, at 09:27  PM, Shapira, Yoav wrote:

Howdy,

I have an instance of MyMailScheduler - mmsched in a ContextListener
class for my webapp. mmsched spawns threads to do some work regarding
sending emails. In my contextDestroy method I do : mmsched = null;
mmsched should have a close()/stop()/shutdown() method which stops its
threads.  You call this method, and then set mmsched to null.
I was under the impression that if tomcat was shutdown or the webapp
was stopped my threads would be automatically killed since mmsched
would be garbage collected. Am I understanding this right or do I need
to do something else ?
The JVM can't stop non-daemon threads.  Either make mmsched spawn 
daemon
threads, or make the mmsched stop() method interrupt and stop all its
threads.

 My webapp does two mail related tasks for two different sets of data.
Both tasks are identical and therefore I spawn two threads. The two
threads do not share any data structures. Also do I need to make the
run() method synchronized ?
You don't need to make the run() method synchronized.

Yoav Shapira



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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Problem receiving huge text in IE

2003-10-27 Thread Mufaddal Khumri
Hi,

Am using Tomcat 4.1.18. I have this  problem on IE on Windows and Mac. 
I am trying to get a huge amount of text from the database and want to 
stream it to the user/s browser. Netscape and Safari work fine and 
start displaying the text as soon as they start receiving it. IE waits 
for the full text to reach it and then displays the complete text at 
once. How do I get it to behave like netscape and safari where it 
starts displaying what it has already received ?. My code for doing 
this is below:


response.setContentType(text/html);
response.setHeader(Cache-Control, no-cache);
response.setHeader(Expires, 0);
response.flushBuffer();

PrintWriter out = response.getWriter();

out.println(htmlHead/Head);
out.println(body);
out.println(table width='100%');
for(...)
{
out.println(BIG lump of text);
out.flush();
response.flushBuffer();
}
out.flush();
response.flushBuffer();


Does anyone know why i am getting this problem with IE ? Have I to 
tweak something in my code or tomcat webapp settings ?

Thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Java/JSP/Servlet Programmer

2003-10-17 Thread Mufaddal Khumri
I feel that we have discussed this topic enough. Could you please take 
this OFF TOPIC elsewhere ?

On Saturday, October 18, 2003, at 02:46  AM, Ruben Gamez wrote:

Does anyone else think that what I'm asking for is so difficult?

-Original Message-
From: David Rees [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2003 4:54 PM
To: Tomcat Users List
Subject: RE: Java/JSP/Servlet Programmer
On Fri, October 17, 2003 at 1:27 pm, Ruben Gamez sent the following
The first is a written test which has J2SE, Servlet, and JSP
questions.
The second is a programming test, they must write a JSP page that form
posts to a Servlet, that retrieves ANYTHING from a Bean and outputs it
in the Servlet.  I have a lab computer set up with everything except
the
code.  They must also use notepad to do this.
Wow, sounds like entry level coding to me!  And you're having trouble
getting people to pass these things?
-Dave

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Error ?

2003-10-13 Thread Mufaddal Khumri
Hi,

I have noticed that when my jsp pages get compiled the first time i get 
the following error msgs:

ParserUtils: warning org.xml.sax.SAXParseException: URI was not 
reported to parser for entity [document]
ParserUtils: warning org.xml.sax.SAXParseException: No base URI; hope 
URI is absolute: http://java.sun.com/dtd/web-app_2_3.dtd
ParserUtils: warning org.xml.sax.SAXParseException: No base URI; hope 
this SYSTEM id is absolute: http://java.sun.com/dtd/web-app_2_3.dtd
ParserUtils: warning org.xml.sax.SAXParseException: URI was not 
reported to parser for entity [dtd]
ParserUtils: warning org.xml.sax.SAXParseException: missing system ID, 
using http://java.sun.com/dtd/web-app_2_3.dtd
ParserUtils: warning org.xml.sax.SAXParseException: URI was not 
reported to parser for entity [document]
ParserUtils: warning org.xml.sax.SAXParseException: No base URI; hope 
URI is absolute: http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd
ParserUtils: warning org.xml.sax.SAXParseException: No base URI; hope 
this SYSTEM id is absolute: 
http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd
ParserUtils: warning org.xml.sax.SAXParseException: URI was not 
reported to parser for entity [dtd]
ParserUtils: warning org.xml.sax.SAXParseException: missing system ID, 
using http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd

My webapp works fine though. I just want to try get rid of these 
messages? Does anybody know whats going on wrong?

Thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Error ?

2003-10-13 Thread Mufaddal Khumri
Hi,

Why would I get an error on this ? -No base URI; hope URI is absolute: 
http://java.sun.com/dtd/web-app_2_3.dtd ?

On Monday, October 13, 2003, at 01:27  PM, Mufaddal Khumri wrote:

Hi,

I have noticed that when my jsp pages get compiled the first time i 
get the following error msgs:

ParserUtils: warning org.xml.sax.SAXParseException: URI was not 
reported to parser for entity [document]
ParserUtils: warning org.xml.sax.SAXParseException: No base URI; hope 
URI is absolute: http://java.sun.com/dtd/web-app_2_3.dtd
ParserUtils: warning org.xml.sax.SAXParseException: No base URI; hope 
this SYSTEM id is absolute: http://java.sun.com/dtd/web-app_2_3.dtd
ParserUtils: warning org.xml.sax.SAXParseException: URI was not 
reported to parser for entity [dtd]
ParserUtils: warning org.xml.sax.SAXParseException: missing system ID, 
using http://java.sun.com/dtd/web-app_2_3.dtd
ParserUtils: warning org.xml.sax.SAXParseException: URI was not 
reported to parser for entity [document]
ParserUtils: warning org.xml.sax.SAXParseException: No base URI; hope 
URI is absolute: http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd
ParserUtils: warning org.xml.sax.SAXParseException: No base URI; hope 
this SYSTEM id is absolute: 
http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd
ParserUtils: warning org.xml.sax.SAXParseException: URI was not 
reported to parser for entity [dtd]
ParserUtils: warning org.xml.sax.SAXParseException: missing system ID, 
using http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd

My webapp works fine though. I just want to try get rid of these 
messages? Does anybody know whats going on wrong?

Thanks.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


2 Questions ..

2003-10-10 Thread Mufaddal Khumri
Hi,

Am running my webapp under tomcat 4.1.18. Everything was fine till  
yesterday. I am facing this issue today. I wrote a new taglib -  
nextPrevLink for a jsp page called PotatoList.jsp.

cw:nextPrevLink listSize='%= getTotalNumberOfPotatoes()%'
 offset='%=offset%'
 
displaySize='%=Constants.POTATO_LIST_DISPLAY_SIZE%'
 link='someLink'/
Now when i change the value of the Constants.POTATO_LIST_DISPLAY_SIZE  
in the Constants.java and reload my webapp thru the tomcat manager  
and go to PotatoList.jsp the taglib takes the old value of displaySize  
(I have a system.out.println() .. inside the class that implements  
the taglib).

Now if i change the PotatoList.jsp and save it again ... tomcat  
recompiles PotatoList.jsp when it comes across it. This time the taglib  
nextPrevLink takes the correct new value of Constants.  
POTATO_LIST_DISPLAY_SIZE.

 
_
QUE 1. How do I have my taglib take the updated values without having  
to recompile my jsp pages ?
 
_

Also I do not know if this is related. But when tomcat recompiles the  
PotatoList.jsp page above it shows me these lines in the log file:

ParserUtils: warning org.xml.sax.SAXParseException: URI was not  
reported to parser for entity [document]
ParserUtils: warning org.xml.sax.SAXParseException: No base URI; hope  
URI is absolute: http://java.sun.com/dtd/web-app_2_3.dtd
ParserUtils: warning org.xml.sax.SAXParseException: No base URI; hope  
this SYSTEM id is absolute: http://java.sun.com/dtd/web-app_2_3.dtd
ParserUtils: warning org.xml.sax.SAXParseException: URI was not  
reported to parser for entity [dtd]
ParserUtils: warning org.xml.sax.SAXParseException: missing system ID,  
using http://java.sun.com/dtd/web-app_2_3.dtd
ParserUtils: warning org.xml.sax.SAXParseException: URI was not  
reported to parser for entity [document]
ParserUtils: warning org.xml.sax.SAXParseException: No base URI; hope  
URI is absolute: http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd
ParserUtils: warning org.xml.sax.SAXParseException: No base URI; hope  
this SYSTEM id is absolute:  
http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd
ParserUtils: warning org.xml.sax.SAXParseException: URI was not  
reported to parser for entity [dtd]
ParserUtils: warning org.xml.sax.SAXParseException: missing system ID,  
using http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd

 
_
QUE 2. Why does this happen and how do I resolve this?
 
_

Thanks in advance,

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Attribute attribute invalid according to the specified TLD ??

2003-10-10 Thread Mufaddal Khumri
Hi,

Does anybody know why I would get the following exception:

org.apache.jasper.JasperException: /MyJsp.jsp(103,2) Attribute  
pramValues invalid according to the specified TLD
	at  
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHand 
ler.java:94)
	at  
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java 
:428)
	at  
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java 
:186)

MyJsp.jsp has the following tag library:

%
Vector vPName = new Vector();
Vector vPValue = new Vector();

vPName.addElement(selection);
vPValue.addElement(selection);
%
cw:nextPrevLink listSize='%=maxLength%'
 offset='%=offset%'
 
displaySize='%=Constants.USER_LIST_DISPLAY_SIZE%'
 link='/myOther.jsp'
 paramNames='%=vPName%'
 pramValues='%=vPValue%'/
	The tag entry in my .tld file is as below:

tag
namenextPrevLink/name
tag-classcom.cw.NextPrevLink/tag-class
body-contentempty/body-content
descriptionDisplays the next and previous link for any  
list/description
attribute
namelistSize/name
requiredtrue/required
rtexprvaluetrue/rtexprvalue
/attribute
attribute
nameoffset/name
requiredtrue/required
rtexprvaluetrue/rtexprvalue
/attribute
attribute
namedisplaySize/name
requiredtrue/required
rtexprvaluetrue/rtexprvalue
/attribute
attribute
namelink/name
requiredtrue/required
rtexprvaluetrue/rtexprvalue
/attribute
attribute
nameparamNames/name
requiredfalse/required
rtexprvaluetrue/rtexprvalue
/attribute
attribute
nameparamValues/name
requiredfalse/required
rtexprvaluetrue/rtexprvalue
/attribute
/tag		

Thanks.


taglib - 2 Questions.

2003-10-09 Thread Mufaddal Khumri
Hi,

Am running my webapp under tomcat 4.1.18. Everything was fine till 
yesterday (always is:)).

I am facing this issue today. I wrote a new taglib for a jsp page 
called PotatoList.jsp.

cw:nextPrevLink listSize='%= getTotalNumberOfPotatoes()%'
 offset='%=offset%'
 
displaySize='%=Constants.POTATO_LIST_DISPLAY_SIZE%'
 link='someLink'/
Now when i change the value of the Constants.POTATO_LIST_DISPLAY_SIZE 
in the Constants.java and reload my webapp thru the tomcat manager 
and go to PotatoList.jsp the taglib takes the old value of displaySize 
(I have a system.out.println() .. inside the class that implements 
the taglib).

Now if i change the PotatoList.jsp and save it again ... tomcat 
recompiles PotatoList.jsp when it comes across it. This time the taglib 
nextPrevLink takes the correct new value of Constants. 
POTATO_LIST_DISPLAY_SIZE.

1. How do I have my taglib take the updated values without having to 
recompile my jsp pages ?

Also I do not know if this is related. But when tomcat recompiles the 
PotatoList.jsp page above it shows me these lines in the log file:

ParserUtils: warning org.xml.sax.SAXParseException: URI was not 
reported to parser for entity [document]
ParserUtils: warning org.xml.sax.SAXParseException: No base URI; hope 
URI is absolute: http://java.sun.com/dtd/web-app_2_3.dtd
ParserUtils: warning org.xml.sax.SAXParseException: No base URI; hope 
this SYSTEM id is absolute: http://java.sun.com/dtd/web-app_2_3.dtd
ParserUtils: warning org.xml.sax.SAXParseException: URI was not 
reported to parser for entity [dtd]
ParserUtils: warning org.xml.sax.SAXParseException: missing system ID, 
using http://java.sun.com/dtd/web-app_2_3.dtd
ParserUtils: warning org.xml.sax.SAXParseException: URI was not 
reported to parser for entity [document]
ParserUtils: warning org.xml.sax.SAXParseException: No base URI; hope 
URI is absolute: http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd
ParserUtils: warning org.xml.sax.SAXParseException: No base URI; hope 
this SYSTEM id is absolute: 
http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd
ParserUtils: warning org.xml.sax.SAXParseException: URI was not 
reported to parser for entity [dtd]
ParserUtils: warning org.xml.sax.SAXParseException: missing system ID, 
using http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd

2. Why does this happen and how do I resolve this?

Thanks in advance,




pre compile and deploy - ?

2003-10-07 Thread Mufaddal Khumri
Hi,

I have a web app and am running it under Tomcat 4.1.18. This might be a 
very common issue that I am facing. Basically the first time a .jsp 
page gets hit .. it gets compiled into a .class file. This happens for 
every .jsp file in the webapp. Is there a way that I can tell tomcat to 
compile the .jsps in my webapp without anybody having to access the 
.jsp page ?

Thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: pre compile and deploy - ?

2003-10-07 Thread Mufaddal Khumri
Hi ,

I am having difficulty finding the documentation that explains using 
method 2. Do you have a URL or information regarding the same.

Thanks.

On Wednesday, October 8, 2003, at 04:26  AM, Filip Hanik wrote:

ok, maybe you can send me an example or give me access, I'm sure I can 
solve
it fairly quickly for you. Since I don't know your structure, I have 
no idea
what is going on :)

Filip

- Original Message -
From: Matt Raible [EMAIL PROTECTED]
To: 'Filip Hanik' [EMAIL PROTECTED]; Tomcat Users List
[EMAIL PROTECTED]; Matt Raible 
[EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 3:46 PM
Subject: RE: pre compile and deploy - ?

I tried #2 and move todir=${dir-path} failonerror=false didn't 
help, I
still get the same error:

do-jsp-compile:
 [echo] Compile JSP in:
C:\tools\jakarta-tomcat-4.1.27\webapps\telluride\WEB-INF\src\WEB-INF
 [echo] dir-path:
C:\tools\jakarta-tomcat-4.1.27\webapps\telluride\WEB-INF\src\WEB-INF
BUILD FAILED
file:C:/Source/webgeneral/tomcat-precompile-jsp.xml:81:
C:\tools\jakarta-tomcat-4.1.27\webapps\tellu
ride\WEB-INF\src\WEB-INF\org\apache\jsp not found.
Thanks,

Matt

-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 4:37 PM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Re: pre compile and deploy - ?
1.  I had to add the following on line 16 to get my JSPs to compile:
This line was already in the script? hmm, strange.
2. The move will fail if there are no files.
why dont you set teh failonerror attribute on the move.. command
Filip

- Original Message -
From: Matt Raible [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 3:17 PM
Subject: RE: pre compile and deploy - ?
Awesome Filip - #1 is just what I've been looking for.  I'm having a 
couple
of issues getting it working though:

1.  I had to add the following on line 16 to get my JSPs to compile:

fileset dir=${webapp.path}/WEB-INF/lib
include name=*.jar/
/fileset
2.  A bunch of my JSP pages are at WEB-INF/pages and I get the 
following
error because of this:

file:C:/Source/webgeneral/tomcat-precompile-jsp.xml:81:
C:\tools\jakarta-tomcat-4.1.27\webapps\tellu
ride\WEB-INF\src\WEB-INF\org\apache\jsp not found.
Here's line 81:
move todir=${dir-path}
fileset dir=${dir-path}/org/apache/jsp
include name=*.*/
/fileset
/move
Is there a way to get around this?  There's no files in the WEB-INF
directory.
Thanks,

Matt

-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 2:58 PM
To: Tomcat Users List
Subject: Re: pre compile and deploy - ?
two ways:

1. compile it into the tomcat work directory (expanded wars only)
(this option allows you to change JSPs on the fly)
http://cvs.apache.org/~fhanik/precompile.html
2. pre compile it according tomcat docs, see docs
(this option precompiles jsps into servlets, and you have define them 
in
web.xml)

Filip

- Original Message -
From: Mufaddal Khumri [EMAIL PROTECTED]
To: Tomcat List [EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 1:29 AM
Subject: pre compile and deploy - ?
Hi,

I have a web app and am running it under Tomcat 4.1.18. This might be a
very common issue that I am facing. Basically the first time a .jsp
page gets hit .. it gets compiled into a .class file. This happens for
every .jsp file in the webapp. Is there a way that I can tell tomcat to
compile the .jsps in my webapp without anybody having to access the
.jsp page ?
Thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


org.apache.catalina.startup.Bootstrap

2003-10-02 Thread Mufaddal Khumri
Hello,

I get a pop up icon for org.apache.catalina.startup.Bootstrap on
my doc on MAC OS X when I click on the link in my web app which 
generates
and sends a pdf file to the client browser. Once this popup is there 
the application
works as expected, but if I quit this popup, tomcat shuts off 
automatically.
Catalina.out doesn't show any log information for this action.

If I run the same web app on Windows XP I do not get any pop ups. Here 
is the
configuration of both platforms that I tested on,

Platform: Mac OS X (10.2.6), Tomcat 4.1.18, jdk 1.4.1
Platform: Windows XP, Tomcat 4.1.18, jdk 1.4.1
From my search on the web, for this strange pop up behaviour, I learnt 
that
org.apache.catalina.startup.Bootstrap is used to load the jar files at 
the application
level. Here is the list of jar files that I use and are in WEB-INF/lib 
forlder of my application:

1. avalon-framework.jar
2. Batik.jar
3. fop.jar
4. xalan.jar
5. mysql-connector.jar
(The first 4 are used in the pdf generation and the 5th jar is the 
mysql jdbc driver)

I don't want this popup icon to appear in my doc of MAC OS X. Can 
anybody
suggest as to what could be the reason for this pop up and what could be
done so that it would not show up?

Thanks,
Mufaddal.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Problem regarding a popup related to: org.apache.catalina.startup.Bootstrap

2003-09-30 Thread Mufaddal Khumri
Hello,

I get a pop up icon for org.apache.catalina.startup.Bootstrap on
my doc on MAC OS X when I click on the link in my web app which 
generates
and sends a pdf file to the client browser. Once this popup is there 
the application
works as expected, but if I quit this popup, tomcat shuts off 
automatically.
Catalina.out doesn't show any log information for this action.

If I run the same web app on Windows XP I do not get any pop ups. Here 
is the
configuration of both platforms that I tested on,

Platform: Mac OS X (10.2.6), Tomcat 4.1.18, jdk 1.4.1
Platform: Windows XP, Tomcat 4.1.18, jdk 1.4.1
From my search on the web, for this strange pop up behaviour, I learnt 
that
org.apache.catalina.startup.Bootstrap is used to load the jar files at 
the application
level. Here is the list of jar files that I use and are in WEB-INF/lib 
forlder of my application:

1. avalon-framework.jar
2. Batik.jar
3. fop.jar
4. xalan.jar
5. mysql-connector.jar
(The first 4 are used in the pdf generation and the 5th jar is the 
mysql jdbc driver)

I don't want this popup icon to appear in my doc of MAC OS X. Can 
anybody
suggest as to what could be the reason for this pop up and what could be
done so that it would not show up?

Thanks,
Mufaddal.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Standard error pages ?

2003-09-29 Thread Mufaddal Khumri
Hi,

I am using tomcat 4.1.18. I want to be able to redirect a user to a  
standard error page 500 when someone tries to access a .jsp in my  
webapp. Is there a standard mechanism to do this in tomcat or will i  
have to do:

  
response.sendRedirect(response.encodeRedirectURL(/mywebapp/error/ 
error500.jsp));

instead is there something like:

response.setError(500);
response.sendRedirect(); // This would result in a standard 500  
page being displayed instead of the error500.jsp page
 // i write.

Any pointers / code snipets ?

Thanks.



Problems with HttpSessionListener ..

2003-09-18 Thread Mufaddal Khumri
Hi,

I am trying to implement the HttpSessionListener (the same class 
implements ServletContextListener). The code for which is below.

1.  I open a browser window , use MyWebApp after logging in it.
2. I open the tomcat manager and reload my MyWebApp. I go to the 
console at this point and see the message - Session is already 
invalid. (see code below)
3. I go to my window in step 1. and click on a link to go to a 
particular .jsp page. I get a blank window. I check the session 
attributes at this point and my session attribute USER_AUTHORIZED 
exists and is true.

step 2 s result conflicts with step 3s result. (see code below).  
Invalidating the session does not propagate to the client ???  What 
am i doing wrong ?

	public void contextDestroyed(ServletContextEvent sce)
	{
		// Destroy sessions.
		if(sessions != null)
		{
			Iterator i = sessions.iterator();
		
			while (i.hasNext())
			{
HttpSession s = (HttpSession)i.next();
	
	try
	{
		if(s != null  s.getAttribute(USER_AUTHORISED) != null)
		{
			System.out.println(Invalidating session id =  + 
s.getId());
			s.invalidate();
		}
	}
	catch(IllegalStateException ex)
	{
		System.out.println(Session is already invalid.);
	}
			}
		}
		// End Destroy sessions.
	}

public void sessionCreated(HttpSessionEvent event)
{
if(sessions == null)
sessions = new HashSet();

sessions.add(event.getSession());
}

public void sessionDestroyed(HttpSessionEvent event)
{
if(sessions != null)
{
sessions.remove(event.getSession());
}
}


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Problems with HttpSessionListener ..

2003-09-18 Thread Mufaddal Khumri
No, it would not . But if i understand it right .. .the code below in 
server.xml should not persist any sessions.
		
  Manager 
className=org.apache.catalina.session.PersistentManager
  debug=0
  saveOnRestart=false
  maxActiveSessions=-1
  minIdleSwap=-1
  maxIdleSwap=-1
  maxIdleBackup=-1
Store 
className=org.apache.catalina.session.FileStore/
  /Manager

On Thursday, September 18, 2003, at 09:32  PM, Shapira, Yoav wrote:

Howdy,
Hypothetically speaking, would your listener code works if sessions 
were
persisted by the container prior to the contextDestroyed event? ;)

Yoav Shapira
Millennium ChemInformatics

-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 11:27 PM
To: Tomcat Users List
Subject: Problems with HttpSessionListener ..
Hi,

I am trying to implement the HttpSessionListener (the same class
implements ServletContextListener). The code for which is below.
1.  I open a browser window , use MyWebApp after logging in it.
2. I open the tomcat manager and reload my MyWebApp. I go to the
console at this point and see the message - Session is already
invalid. (see code below)
3. I go to my window in step 1. and click on a link to go to a
particular .jsp page. I get a blank window. I check the session
attributes at this point and my session attribute USER_AUTHORIZED
exists and is true.
step 2 s result conflicts with step 3s result. (see code below).
Invalidating the session does not propagate to the client ???  
What
am i doing wrong ?

public void contextDestroyed(ServletContextEvent sce)
{
// Destroy sessions.
if(sessions != null)
{
Iterator i = sessions.iterator();
while (i.hasNext())
{
HttpSession s = (HttpSession)i.next();
try
{
if(s != null 
s.getAttribute(USER_AUTHORISED)
!= null)
{
System.out.println(Invalidating session
id =
 +
s.getId());
s.invalidate();
}
}
catch(IllegalStateException ex)
{
System.out.println(Session is already
invalid.);
}
}
}
// End Destroy sessions.
}
public void sessionCreated(HttpSessionEvent event)
{
if(sessions == null)
sessions = new HashSet();
sessions.add(event.getSession());
}
public void sessionDestroyed(HttpSessionEvent event)
{
if(sessions != null)
{
sessions.remove(event.getSession());
}
}


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Problems with HttpSessionListener ..

2003-09-18 Thread Mufaddal Khumri
From my tests so far , i found that the user browser is storing 
cookies. So even when the container is not persisting sessions , the 
client browser tries to use the old session stored in the cookie.  I 
was under the impression that if the user has an old session and tries 
to reach MyWebApp , tomcat would detect an invalid session being used 
and invalidate the old session . How do I deal with this problem ?

On Thursday, September 18, 2003, at 09:16  AM, Mufaddal Khumri wrote:

No, it would not . But if i understand it right .. .the code below in 
server.xml should not persist any sessions.
		
  Manager 
className=org.apache.catalina.session.PersistentManager
  debug=0
  saveOnRestart=false
  maxActiveSessions=-1
  minIdleSwap=-1
  maxIdleSwap=-1
  maxIdleBackup=-1
Store 
className=org.apache.catalina.session.FileStore/
  /Manager

On Thursday, September 18, 2003, at 09:32  PM, Shapira, Yoav wrote:

Howdy,
Hypothetically speaking, would your listener code works if sessions 
were
persisted by the container prior to the contextDestroyed event? ;)

Yoav Shapira
Millennium ChemInformatics

-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 11:27 PM
To: Tomcat Users List
Subject: Problems with HttpSessionListener ..
Hi,

I am trying to implement the HttpSessionListener (the same class
implements ServletContextListener). The code for which is below.
1.  I open a browser window , use MyWebApp after logging in it.
2. I open the tomcat manager and reload my MyWebApp. I go to the
console at this point and see the message - Session is already
invalid. (see code below)
3. I go to my window in step 1. and click on a link to go to a
particular .jsp page. I get a blank window. I check the session
attributes at this point and my session attribute USER_AUTHORIZED
exists and is true.
step 2 s result conflicts with step 3s result. (see code below).
Invalidating the session does not propagate to the client ???  
What
am i doing wrong ?

public void contextDestroyed(ServletContextEvent sce)
{
// Destroy sessions.
if(sessions != null)
{
Iterator i = sessions.iterator();
while (i.hasNext())
{
HttpSession s = (HttpSession)i.next();
try
{
if(s != null 
s.getAttribute(USER_AUTHORISED)
!= null)
{
System.out.println(Invalidating session
id =
 +
s.getId());
s.invalidate();
}
}
catch(IllegalStateException ex)
{
System.out.println(Session is already
invalid.);
}
}
}
// End Destroy sessions.
}
public void sessionCreated(HttpSessionEvent event)
{
if(sessions == null)
sessions = new HashSet();
sessions.add(event.getSession());
}
public void sessionDestroyed(HttpSessionEvent event)
{
if(sessions != null)
{
sessions.remove(event.getSession());
}
}


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


cleaning up sessions ...

2003-09-17 Thread Mufaddal Khumri
I have got a ServletContextListener that does initialization and 
cleanup for my webapp. I was wondering if there was a way to invalidate 
all sessions to my webapp in this Listener ? If not, in what way can I 
invalidate all sessions when i start / reload my webapp ?

Thanks

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: cleaning up sessions ...

2003-09-17 Thread Mufaddal Khumri
When i specify saveOnRestart:false and reload or start my webapp, the 
users navigating the website now have an invalid session .. on top of 
all pages i do a checkAuthetication .. how do i check if the session is 
active or not ? .. so that i can detect that and redirect them to the 
login page , before letting them go to where they were trying to go.

Manager className=org.apache.catalina.session.PersistentManager
  debug=0
  saveOnRestart=false
  maxActiveSessions=-1
  minIdleSwap=-1
  maxIdleSwap=-1
  maxIdleBackup=-1
Store 
className=org.apache.catalina.session.FileStore/
 /Manager

On Thursday, September 18, 2003, at 12:30  AM, Shapira, Yoav wrote:

Howdy,
You can simply tell tomcat not to persist your sessions.  You don't 
have
to write any code.  Read the PersistentManager documentation and
comments in server.xml.

Yoav Shapira
Millennium ChemInformatics

-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 2:31 AM
To: Tomcat Users List
Subject: cleaning up sessions ...
I have got a ServletContextListener that does initialization and
cleanup for my webapp. I was wondering if there was a way to 
invalidate
all sessions to my webapp in this Listener ? If not, in what way can I
invalidate all sessions when i start / reload my webapp ?

Thanks

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: cleaning up sessions ...

2003-09-17 Thread Mufaddal Khumri
Hi,

Does the PersistentManager help not to persist sessions across 
container start or restart ? or does it do across webapplication reload 
/ restart ? (by container i mean Tomcat and by webapplication i mean a 
webapp that you run within Tomcat) From the documentation it seems that 
it helps not to persist the session across container restart or reload. 
If thats the case reloading my webapp only will not force the active 
sessions to that webapp to get destroyed or invalid.

Am i understanding this correctly ?

What I am trying to do:

I have a webapp called MyApp that runs in Tomcat. When i restart or 
reload this webapp - MyApp (not restart Tomcat ) ... i want to 
invalidate all sessions to this webapp - MyApp. It could very well 
happen that when i reload MyApp , there could be users using that 
application and have sessions to it. In my ServletContextListener for 
MyApp i do cleanup work and initialization work. At this point i want 
to invalidate all active user sessions too - i want to do this inorder 
to detect that and redirect them to the login page where they would get 
a new session and then i would allow them to go to where they were 
originally trying to go.

How do i achieve this ?

Thanks.

On Wednesday, September 17, 2003, at 12:34  PM, Mufaddal Khumri wrote:

When i specify saveOnRestart:false and reload or start my webapp, 
the users navigating the website now have an invalid session .. on top 
of all pages i do a checkAuthetication .. how do i check if the 
session is active or not ? .. so that i can detect that and redirect 
them to the login page , before letting them go to where they were 
trying to go.

Manager className=org.apache.catalina.session.PersistentManager
  debug=0
  saveOnRestart=false
  maxActiveSessions=-1
  minIdleSwap=-1
  maxIdleSwap=-1
  maxIdleBackup=-1
Store 
className=org.apache.catalina.session.FileStore/
 /Manager

On Thursday, September 18, 2003, at 12:30  AM, Shapira, Yoav wrote:

Howdy,
You can simply tell tomcat not to persist your sessions.  You don't 
have
to write any code.  Read the PersistentManager documentation and
comments in server.xml.

Yoav Shapira
Millennium ChemInformatics

-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 2:31 AM
To: Tomcat Users List
Subject: cleaning up sessions ...
I have got a ServletContextListener that does initialization and
cleanup for my webapp. I was wondering if there was a way to 
invalidate
all sessions to my webapp in this Listener ? If not, in what way can 
I
invalidate all sessions when i start / reload my webapp ?

Thanks

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: cleaning up sessions ...

2003-09-17 Thread Mufaddal Khumri
Exactly. I have a session attribute in my session that i set to true . 
and if that session attribute is not present or is false i redirect 
them to the authentication page.

I did the following to my server.xml :

Manager className=org.apache.catalina.session.PersistentManager
  debug=0
  saveOnRestart=false
  maxActiveSessions=-1
  minIdleSwap=-1
  maxIdleSwap=-1
  maxIdleBackup=-1
Store 
className=org.apache.catalina.session.FileStore/
 /Manager

Now  i go to the tomcat manager and reload my webapp . I am navigating 
the webapp in a browser when this happens (ie i am currently a user 
using a valid session ) .. after the webapp reloads ... i continue 
using the webapp by clicking on say a link ... which takes me to some 
other jsp page ... i do a check on top of this jsp page for this 
attribute ... and it still persists . This is what threw me off .. 
and i could not understand where i was doing what wrong ...

Any help appreciated

Thanks.

On Thursday, September 18, 2003, at 01:19  AM, Shapira, Yoav wrote:

Howdy,

all pages i do a checkAuthetication .. how do i check if the session 
is
active or not ? .. so that i can detect that and redirect them to the
Hmm... I would do this using attributes.  All attributes are unbound
when the session is invalidated.  So add an attribute to the session
when you authenticate people, and check for that attribute in your
pages.  If it's not present, redirect them to the authentication page.
Yoav Shapira



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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: cleaning up sessions ...

2003-09-17 Thread Mufaddal Khumri
To test I did the following:

1. started tomcat.
2. started a browser, logged into MyApp and used it.
3. stopped tomcat and restarted tomcat . (kept the browser window open).
4. went back to my browser window and tried to continue using my MyApp 
by clicking on one of the links to a jsp page. The browser showed me a 
blank window -
   AT THIS POINT I checked the session attribute and it was still 
existing. My code that redirects the user to the login page checks to 
see if this attribute is not there or is false. Since its present and 
is true it does not redirect the user. The only way i can redirect the 
user to the login page is by invalidating the session he or she is 
using . For this i made the change to the server.xml.

Any ideas why this isnt working ?

On Thursday, September 18, 2003, at 02:12  AM, Mike Curwen wrote:

You are doing nothing wrong... Tomcat will persist sessions between
restarts.
To check your code works correctly, don't restart Tomcat... close your
browser window and start a new instance of the browser (or let the
session time out in a single browser).

-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 2:53 AM
To: Tomcat Users List
Cc: [EMAIL PROTECTED]
Subject: Re: cleaning up sessions ...
Exactly. I have a session attribute in my session that i set
to true .
and if that session attribute is not present or is false i redirect
them to the authentication page.
I did the following to my server.xml :

Manager className=org.apache.catalina.session.PersistentManager
   debug=0
   saveOnRestart=false
   maxActiveSessions=-1
   minIdleSwap=-1
   maxIdleSwap=-1
   maxIdleBackup=-1
 Store
className=org.apache.catalina.session.FileStore/
  /Manager
Now  i go to the tomcat manager and reload my webapp . I am
navigating
the webapp in a browser when this happens (ie i am currently a user
using a valid session ) .. after the webapp reloads ... i continue
using the webapp by clicking on say a link ... which takes me to some
other jsp page ... i do a check on top of this jsp page for this
attribute ... and it still persists . This is what threw me off ..
and i could not understand where i was doing what wrong ...
Any help appreciated

Thanks.

On Thursday, September 18, 2003, at 01:19  AM, Shapira, Yoav wrote:

Howdy,

all pages i do a checkAuthetication .. how do i check if
the session
is
active or not ? .. so that i can detect that and redirect
them to the
Hmm... I would do this using attributes.  All attributes
are unbound
when the session is invalidated.  So add an attribute to
the session
when you authenticate people, and check for that attribute in your
pages.  If it's not present, redirect them to the
authentication page.
Yoav Shapira



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


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Trying another approach - HttpSessionListener Re: cleaning up sessions ...

2003-09-17 Thread Mufaddal Khumri
I am trying to implement the HttpSessionListener (the same class 
implements ServletContextListener. The code for which is below.

1.  I open a browser window , use MyApp after logging in.
2. I open the tomcat manager and reload my webapp. I go to the console 
at this point and see the message - Session is already invalid.
3. I go to my window in step 1. and click on a link to go to a 
particular .jsp page. I get a blank window. I check the session 
attributes at this point and my session attribute USER_AUTHORIZED 
exists and is true.

step 2 s result conflicts with step 3s result. Invalidating the session 
does not propagate to the client ???  What am i doing wrong ?

	public void contextDestroyed(ServletContextEvent sce)
	{
		// Destroy sessions.
		if(sessions != null)
		{
			Iterator i = sessions.iterator();
		
			while (i.hasNext())
			{
HttpSession s = (HttpSession)i.next();
	
	try
	{
		if(s != null  s.getAttribute(USER_AUTHORISED) != null)
		{
			System.out.println(Invalidating session id =  + 
s.getId());
			s.invalidate();
		}
	}
	catch(IllegalStateException ex)
	{
		System.out.println(Session is already invalid.);
	}
			}
		}
		// End Destroy sessions.
	}

public void sessionCreated(HttpSessionEvent event)
{
if(sessions == null)
sessions = new HashSet();

sessions.add(event.getSession());
}

public void sessionDestroyed(HttpSessionEvent event)
{
if(sessions != null)
{
sessions.remove(event.getSession());
}
}
On Wednesday, September 17, 2003, at 02:08  PM, Mufaddal Khumri wrote:

To test I did the following:

1. started tomcat.
2. started a browser, logged into MyApp and used it.
3. stopped tomcat and restarted tomcat . (kept the browser window 
open).
4. went back to my browser window and tried to continue using my MyApp 
by clicking on one of the links to a jsp page. The browser showed me a 
blank window -
   AT THIS POINT I checked the session attribute and it was still 
existing. My code that redirects the user to the login page checks to 
see if this attribute is not there or is false. Since its present and 
is true it does not redirect the user. The only way i can redirect the 
user to the login page is by invalidating the session he or she is 
using . For this i made the change to the server.xml.

Any ideas why this isnt working ?

On Thursday, September 18, 2003, at 02:12  AM, Mike Curwen wrote:

You are doing nothing wrong... Tomcat will persist sessions between
restarts.
To check your code works correctly, don't restart Tomcat... close your
browser window and start a new instance of the browser (or let the
session time out in a single browser).

-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 2:53 AM
To: Tomcat Users List
Cc: [EMAIL PROTECTED]
Subject: Re: cleaning up sessions ...
Exactly. I have a session attribute in my session that i set
to true .
and if that session attribute is not present or is false i redirect
them to the authentication page.
I did the following to my server.xml :

Manager className=org.apache.catalina.session.PersistentManager
   debug=0
   saveOnRestart=false
   maxActiveSessions=-1
   minIdleSwap=-1
   maxIdleSwap=-1
   maxIdleBackup=-1
 Store
className=org.apache.catalina.session.FileStore/
  /Manager
Now  i go to the tomcat manager and reload my webapp . I am
navigating
the webapp in a browser when this happens (ie i am currently a user
using a valid session ) .. after the webapp reloads ... i continue
using the webapp by clicking on say a link ... which takes me to some
other jsp page ... i do a check on top of this jsp page for this
attribute ... and it still persists . This is what threw me off ..
and i could not understand where i was doing what wrong ...
Any help appreciated

Thanks.

On Thursday, September 18, 2003, at 01:19  AM, Shapira, Yoav wrote:

Howdy,

all pages i do a checkAuthetication .. how do i check if
the session
is
active or not ? .. so that i can detect that and redirect
them to the
Hmm... I would do this using attributes.  All attributes
are unbound
when the session is invalidated.  So add an attribute to
the session
when you authenticate people, and check for that attribute in your
pages.  If it's not present, redirect them to the
authentication page.
Yoav Shapira



This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential,
proprietary and/or privileged.  This e-mail is intended
only for the
individual(s) to whom it is addressed, and may not be
saved, copied

Re: can a taglib include a .jsp file ?

2003-08-15 Thread Mufaddal Khumri
thanks a zillion, that worked :)

On Friday, August 15, 2003, at 09:17  AM, Bill Barker wrote:

Assuming that your Tag extends TagSupport try:
   pageContext.include(mySomething.jsp);
Mufaddal Khumri [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I know what the problem is and I know what I am trying to do wont get
translated... thats why i have asked for a better solution ! I asked 
if
there was a way ... the answer to that is a yes or no (since I might
have missed something) .

On Friday, August 15, 2003, at 03:03  AM, RANDAD,KAILASH
(HP-PaloAlto,ex1) wrote:
Basics, not clear!!!
JSP file gets translated to java file. During translation, tags 
include
related code gets converted to java code. Now, comes java compiler in
picture which does not know anything about jsp. So, how can you 
expect
or
design such wrong thing.

Solution to your problem - Better define the code in 
mySomething.jsp
as
java function and call that function in include file as well custom
tag, and
use one at a time.

Regards
KP
-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 14, 2003 1:45 AM
To: Tomcat List
Subject: can a taglib include a .jsp file ?
Hi,

I have a taglib that needs to include a .jsp file .. .how can i do 
so ?

if i try doing a out.println( %@ include file=\ +
mySomething.jsp
+ \ %) in my taglibrary called myTag it just spits out the exact
same line in the output. The same happens when i use a
out.println(jsp:include ).
I can have if else blocks instead my taglibrary and avoid including 
the
mySomething.jsp. Is there a better solution than this ?

Thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


can a taglib include a .jsp file ?

2003-08-14 Thread Mufaddal Khumri
Hi,

I have a taglib that needs to include a .jsp file .. .how can i do so ?

if i try doing a out.println(			%@ include file=\ + mySomething.jsp 
+ \ %) in my taglibrary called myTag it just spits out the exact 
same line in the output. The same happens when i use a 
out.println(jsp:include ).

I can have if else blocks instead my taglibrary and avoid including the 
mySomething.jsp. Is there a better solution than this ?

Thanks.

Re: can a taglib include a .jsp file ?

2003-08-14 Thread Mufaddal Khumri
I know what the problem is and I know what I am trying to do wont get 
translated... thats why i have asked for a better solution ! I asked if 
there was a way ... the answer to that is a yes or no (since I might 
have missed something) .

On Friday, August 15, 2003, at 03:03  AM, RANDAD,KAILASH 
(HP-PaloAlto,ex1) wrote:

Basics, not clear!!!
JSP file gets translated to java file. During translation, tags  
include
related code gets converted to java code. Now, comes java compiler in
picture which does not know anything about jsp. So, how can you expect 
or
design such wrong thing.

Solution to your problem - Better define the code in mySomething.jsp 
as
java function and call that function in include file as well custom 
tag, and
use one at a time.

Regards
KP
-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 14, 2003 1:45 AM
To: Tomcat List
Subject: can a taglib include a .jsp file ?
Hi,

I have a taglib that needs to include a .jsp file .. .how can i do so ?

if i try doing a out.println( %@ include file=\ +
mySomething.jsp
+ \ %) in my taglibrary called myTag it just spits out the exact
same line in the output. The same happens when i use a
out.println(jsp:include ).
I can have if else blocks instead my taglibrary and avoid including the
mySomething.jsp. Is there a better solution than this ?
Thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Does anyone know the cause of this exception ?

2003-08-14 Thread Mufaddal Khumri
The root cause below told me that the Cataglog_jsp.java threw an error  
at Line 75.

Line 75 in that file is:
JspRuntimeLibrary.include(request, response, /include/header.jsp,  
out, true);

The above code corresponds to the following line in Catalog.jsp:
jsp:include page=/include/header.jsp flush=true/
Does anybody know what could cause the error below?

Caused by: javax.net.ssl.SSLException: java.net.SocketException: Broken  
pipe
	at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA6275)
	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
	at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA6275)
	at  
org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.d 
oWrite(InternalOutputBuffer.java:668)
	at  
org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutp 
utFilter.java:166)
	at  
org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuff 
er.java:523)
	at org.apache.coyote.Response.doWrite(Response.java:524)
	at  
org.apache.coyote.tomcat4.OutputBuffer.realWriteBytes(OutputBuffer.java: 
384)
	at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:360)
	at org.apache.coyote.tomcat4.OutputBuffer.flush(OutputBuffer.java:345)
	at org.apache.coyote.tomcat4.CoyoteWriter.flush(CoyoteWriter.java:119)
	at  
org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:209)
	... 39 more
Caused by: java.net.SocketException: Broken pipe
	at java.net.SocketOutputStream.socketWrite0(Native Method)
	at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
	at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
	at com.sun.net.ssl.internal.ssl.OutputRecord.a(DashoA6275)
	... 50 more

2003-08-11 16:01:27 StandardWrapperValve[jsp]: Servlet.service() for  
servlet jsp threw exception
org.apache.jasper.JasperException: Connection has been shutdown:  
javax.net.ssl.SSLException: java.net.SocketException: Broken pipe
	at  
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja 
va:248)
	at  
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at  
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica 
tionFilterChain.java:247)
	at  
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt 
erChain.java:193)
	at  
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv 
e.java:260)
	at  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i 
nvokeNext(StandardPipeline.java:643)
	at  
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 
80)
	at  
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at  
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv 
e.java:191)
	at  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i 
nvokeNext(StandardPipeline.java:643)
	at  
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.ja 
va:246)
	at  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i 
nvokeNext(StandardPipeline.java:641)
	at  
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 
80)
	at  
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at  
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241 
5)
	at  
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java 
:180)
	at  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i 
nvokeNext(StandardPipeline.java:643)
	at  
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa 
lve.java:170)
	at  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i 
nvokeNext(StandardPipeline.java:641)
	at  
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java 
:172)
	at  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i 
nvokeNext(StandardPipeline.java:641)
	at  
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 
80)
	at  
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at  
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. 
java:174)
	at  
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i 
nvokeNext(StandardPipeline.java:643)
	at  
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 
80)
	at  
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at  
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
	at  
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:43 
2)
	at  
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC 

Suggestions ?

2003-08-01 Thread Mufaddal Khumri
Yes, thats a helpful function ... I was looking at :
http://jakarta.apache.org/taglibs/doc/string-doc/string-1.0.1/ 
index.html
to see if i can find a good tag library to use ... havent found one  
that i could use yet. Am hoping that someone on the list has pointers  
to some standard function or taglib.

Thanks.

On Friday, August 1, 2003, at 02:57  AM, Steph Richardson wrote:

I assume any html type tags that may be included in the text, you  
would want rendered as visible HTML tags in the browser. So use a
HTML encoding method. There doesn't seem to be a JRE standard for  
this, so something like this will do it :

	public static String HTMLEncode( String unenc )
	{
		final String[] tokens = new String[] {, , \, '};
		final String[] replacement = new String[] {lt;, gt;,  
quot;, #39;};

StringBuffer sb = new StringBuffer(unenc);
for(int i = 0; itokens.length; i++)
{
int idx = 0;
while((idx = sb.indexOf(tokens[i], idx)) != -1)
sb.replace(idx, idx + tokens[i].length(), 
replacement[i]);
}
return sb.toString();
}
-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 4:51 AM
To: Tomcat Users List
Subject: Suggestions ?
Hi,

Am using tomcat 4.1.24.

Have a XYZ.jsp with a form on it take data from the user. Once the  
user
clicks submit the data is stored in the  database and the data that  
the
user entered is shown to him on  ABC.jsp.

The problem is that the user can enter anything in the text field and
text area of the form on XYZ.jsp. For example in the description text
area he or she might enter - text, an http url, maybe html tags etc.
Now when i grab this data from the form and store it to the databse  
it
works fine, but when i grab the data from the database and render it  
on
ABC.jsp it gets messed up because the html tags in the data interfere
with the html of the page. Is there a way in tomcat escape such
characters or are there java methods that i could use to pass this
string through that would do the escaping for me ?

Thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Suggestions ?

2003-07-31 Thread Mufaddal Khumri
Hi,

Am using tomcat 4.1.24.

Have a XYZ.jsp with a form on it take data from the user. Once the user 
clicks submit the data is stored in the  database and the data that the 
user entered is shown to him on  ABC.jsp.

The problem is that the user can enter anything in the text field and 
text area of the form on XYZ.jsp. For example in the description text 
area he or she might enter - text, an http url, maybe html tags etc. 
Now when i grab this data from the form and store it to the databse it 
works fine, but when i grab the data from the database and render it on 
ABC.jsp it gets messed up because the html tags in the data interfere 
with the html of the page. Is there a way in tomcat escape such 
characters or are there java methods that i could use to pass this 
string through that would do the escaping for me ?

Thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Suggestions ?

2003-07-31 Thread Mufaddal Khumri
Yes, thats a helpful function ... I was looking at :
http://jakarta.apache.org/taglibs/doc/string-doc/string-1.0.1/index.html
to see if i can find a good tag library to use ... havent found one 
that i could use yet. Am hoping that someone on the list has pointers 
to some standard function or taglib.

Thanks.

On Friday, August 1, 2003, at 02:57  AM, Steph Richardson wrote:

I assume any html type tags that may be included in the text, you 
would want rendered as visible HTML tags in the browser. So use a
HTML encoding method. There doesn't seem to be a JRE standard for 
this, so something like this will do it :

	public static String HTMLEncode( String unenc )
	{
		final String[] tokens = new String[] {, , \, '};
		final String[] replacement = new String[] {lt;, gt;, quot;, 
#39;};

StringBuffer sb = new StringBuffer(unenc);
for(int i = 0; itokens.length; i++)
{
int idx = 0;
while((idx = sb.indexOf(tokens[i], idx)) != -1)
sb.replace(idx, idx + tokens[i].length(), 
replacement[i]);
}
return sb.toString();
}
-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 4:51 AM
To: Tomcat Users List
Subject: Suggestions ?
Hi,

Am using tomcat 4.1.24.

Have a XYZ.jsp with a form on it take data from the user. Once the 
user
clicks submit the data is stored in the  database and the data that 
the
user entered is shown to him on  ABC.jsp.

The problem is that the user can enter anything in the text field and
text area of the form on XYZ.jsp. For example in the description text
area he or she might enter - text, an http url, maybe html tags etc.
Now when i grab this data from the form and store it to the databse it
works fine, but when i grab the data from the database and render it 
on
ABC.jsp it gets messed up because the html tags in the data interfere
with the html of the page. Is there a way in tomcat escape such
characters or are there java methods that i could use to pass this
string through that would do the escaping for me ?

Thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Tomcat 4.1.24 causes refresh problem ... 4.1.18 does not.

2003-07-22 Thread Mufaddal Khumri
Hi,

Added :

%
response.setHeader(Cache-Control,no-cache);
response.setHeader(Pragma, no-cache);
response.setDateHeader(Expires, 1);
%
The problem still persists.

This problem does not occur with tomcat 4.1.18, but occurs with tomcat 
4.1.24. IE , Netscape
and Safari work fine with 4.1.18. Safari does not work well with 4.1.24 
in regards to refresh.

Am using safari on mac os X with tomcat 4.1.24 ...

I have two .jsp files - LocationInformation.jsp and EditLocation.jsp

LocationInformation.jsp shows me the information of a location from the 
database.
EditLocation.jsp is used to edit the information for a location and 
saved to the database.

On the LocationInformation.jsp I have a link to EditLocation.jsp. When 
I edit the location
information by entering data in the form on EditLocation.jsp and then 
say submit, the data
gets entered in the database and I take the user to the 
LocationInformation.jsp where it shows
the updated information from the database. When I click the link to 
EditLocation.jsp on this page,
it takes me to EditLocation.jsp and the form on EditLocation.jsp shows 
me the old information. When
I click the refresh button in the browser the form shows me the updated 
data.

Does anybody know why or how to solve this problem ?

Thanks.

On Tuesday, July 22, 2003, at 11:28  AM, Bill Barker wrote:

Probably Safari doesn't read META tags.  You could try instead:
%
response.setHeader(Cache-Control,no-cache);
response.setHeader(Pragma, no-cache);
response.setDateHeader(Expires, 1);
%
Mufaddal Khumri [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Well i have the following in all my jsp pages.

meta http-equiv=Cache-Control content=no-cache
meta http-equiv=Pragma content=no-cache
meta http-equiv=Expires content=0
Am using safari on mac os X ... Lets say I have a location. I edit the
location and submit the form .. the new data is entered in the 
database
and the new data is also reflected on the location description page.
The information shown on this page is correct. I have a link to edit
this location on this location information page (.jsp) ... when the
location edit form appears .. it has the old data and when i click
refresh .. it shows me the new data i had entered. This behaviour only
occurs with Safari. IE and Navigator are working fine. Does anybody
know why ?

On Tuesday, July 22, 2003, at 04:06  AM, Tim Funk wrote:

Heh?

Automagic refresh can be done via a meta tag. (Google is your friend)

Page caching is also easy. Again - google is your friend. (cache jsp)

-Tim

Mufaddal Khumri wrote:
hi,
Is there a way to control the refreshing of html pages in tomcat ?
Thanks.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Tomcat refresh configuration

2003-07-21 Thread Mufaddal Khumri
hi,

Is there a way to control the refreshing of html pages in tomcat ?

Thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat refresh configuration

2003-07-21 Thread Mufaddal Khumri
Well i have the following in all my jsp pages.

meta http-equiv=Cache-Control content=no-cache
meta http-equiv=Pragma content=no-cache
meta http-equiv=Expires content=0
Am using safari on mac os X ... Lets say I have a location. I edit the 
location and submit the form .. the new data is entered in the database 
and the new data is also reflected on the location description page. 
The information shown on this page is correct. I have a link to edit 
this location on this location information page (.jsp) ... when the 
location edit form appears .. it has the old data and when i click 
refresh .. it shows me the new data i had entered. This behaviour only 
occurs with Safari. IE and Navigator are working fine. Does anybody 
know why ?
	
On Tuesday, July 22, 2003, at 04:06  AM, Tim Funk wrote:

Heh?

Automagic refresh can be done via a meta tag. (Google is your friend)

Page caching is also easy. Again - google is your friend. (cache jsp)

-Tim

Mufaddal Khumri wrote:
hi,
Is there a way to control the refreshing of html pages in tomcat ?
Thanks.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Servlet Context Listener problem...

2003-07-15 Thread Mufaddal Khumri
Yes , my listener has been declared before anything else under  
web-app .. the problem persists .. any clues ?
On Tuesday, July 15, 2003, at 07:00  AM, Januski, Ken wrote:

Listeners must be declared before any servlets in web.xml. I'd check  
that
first.

-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
Sent: Monday, July 14, 2003 6:41 AM
To: Tomcat List
Subject: Servlet Context Listener problem...
Hi:

I implemented ServletContextListener in my class. I then wrote the xml
in the web.xml file and started tomcat. The error tomcat threw tells me
that it did not recognize the listener and listener-class elements ?? i
have them declared in the web.xml as:
web-app

!-- ServletContextListener --
listener
listener-class

com.wavesinmotion.cw.classes.jsphelpers.CourseWizardContextListener
/listener-class
/listener
/web-app
Any ideas where I am going wrong ?
Thanks.
Tomcat threw this error below:

SEVERE: Parse Error at line 10 column 12: Element type listener must
be declared.
org.xml.sax.SAXParseException: Element type listener must be  
declared.
	at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Erro 
r
HandlerWrapper.java:232)
	at
org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.ja 
v
a:173)
	at
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.ja 
v
a:371)
	at
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.ja 
v
a:305)
	at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(XMLDTDVal 
i
dator.java:1833)
	at
org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator 
.
java:724)
	at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement( 
X
MLDocumentFragmentScannerImpl.java:759)
	at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDi 
s
patcher.dispatch(XMLDocumentFragmentScannerImpl.java:1477)
	at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLD 
o
cumentFragmentScannerImpl.java:329)
	at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java: 
5
25)
	at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java: 
5
81)
	at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
	at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.jav 
a
:1175)
	at org.apache.commons.digester.Digester.parse(Digester.java:1495)
	at
org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConf 
i
g.java:282)
	at
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:639)
	at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig. 
j
ava:243)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleS 
u
pport.java:166)
	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:356 
7
)
	at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
	at
org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
	at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
	at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
	at
org.apache.catalina.core.StandardService.start(StandardService.java:497 
)
	at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
	at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
	at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja 
v
a:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso 
r
Impl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
Jul 14, 2003 3:56:11 PM org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 11 column 19: Element type listener-class
must be declared.
org.xml.sax.SAXParseException: Element type listener-class must be
declared.
	at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Erro 
r
HandlerWrapper.java:232)
	at
org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.ja 
v
a:173)
	at
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.ja 
v
a:371)
	at
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.ja 
v
a:305)
	at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(XMLDTDVal 
i
dator.java:1833)
	at
org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator 
.
java:724)
	at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement( 
X
MLDocumentFragmentScannerImpl.java:759)
	at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDi 
s
patcher.dispatch(XMLDocumentFragmentScannerImpl.java:1477

Resolved Re: Servlet Context Listener problem...

2003-07-15 Thread Mufaddal Khumri
CHANGED the reference to the dtd and it worked. That was the error 
because I was referencing the old dtd which does not recognize listener 
or listener-class.

I had:
?xml version=1.0 encoding=ISO-8859-1?
!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN
http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;
Changed it to:
?xml version=1.0 encoding=ISO-8859-1?
!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web 
Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;


contextDestroyed being called twice ???

2003-07-15 Thread Mufaddal Khumri
I have defined a listener class that implements:

	public void contextDestroyed(ServletContextEvent sce) { ... }

The problem is this method is being called twice when i use the tomcat 
admin manager to reload the webapplication by clicking on the Reload 
link. Why does this happen ? Is this correct behaviour ?

Thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  1   2   >