Re: Is there a solution to: jsessionid is ignored in a meta refresh?

2002-12-03 Thread Bill Barker
I've since changed my app that I used for the suggestion to not use
meta-refresh.  When it was working for me, I was using mod_jk 1.1.0 (the one
that ships with Tomcat 3.3.x), with:
JkOptions ForwardURICompat

The reason for this is that at the time I was only using TC 3.3.  This will
send to Tomcat the URL with the ';' already decoded.  At least with mod_jk
1.x, it shouldn't make that much of a difference, since the the mapping
logic should use the decoded URL to do the mapping (and, if I'm wrong, it's
a bug).

"Raiden" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Just to give everyone some information I tried Bill's idea to change
> the ; to a %3b on a different computer (has a newer Redhat o/s, same
> version of tomcat, a slightly older version of Apache, and possibly a
> slightly different version of mod_jk), and it worked fine... both when
> including additional path to a page, and when not.
>
> So, it appears that the error I was getting below on the first machine was
> due to a potentially buggy version/configuration in one of the above
> mentioned software packages... and I have not yet isolated which.  But,
> it does at least work correctly one one of my machines, which means the
> other machines should also work with this method once I find out what
> is configured incorrectly.
>
> Thanks Bill!
>
> -Raiden
>
>
>
> On Tue, 3 Dec 2002, Raiden wrote:
>
> > Hello,
> >
> > This ALMOST seems to work.  I can't tell if I'm having a problem with
> > Apache, or it's a problem with Tomcat.
> >
> > ## It works for a URL like:
> > #http://www.myserver.com/%3bjsessionid=BC2DC8F1FACFD95501ED6A2A0BC9F5E2
> > #
> >
> > ## But, it doesn't seem to work for a URL like:
> >
#http://www.myserver.com/login/index.jsp%3bjsessionid=BC2DC8F1FACFD95501ED6A
2A0BC9F5E2
> > #
> >
> > The addition of the "login/index.jsp" results in the following error:
> >
> >   HTTP Status 404 -
> >   /login/index.jsp%3bjsessionid=BC2DC8F1FACFD95501ED6A2A0BC9F5E2
> >
>
> --

> >
> >   type Status report
> >
> >   message /login/index.jsp%3bjsessionid=BC2DC8F1FACFD95501ED6A2A0BC9F5E2
> >
> >   description The requested resource
> >   (/login/index.jsp%3bjsessionid=BC2DC8F1FACFD95501ED6A2A0BC9F5E2) is
not
> >   available.
> >
> >
>
> --
--
> >
> >   Apache Tomcat/4.1.12
> >
> >
> > It looks like the %3b was translated for (or by?) Tomcat when there was
> > no speific page given.  Any ideas?
> >
> > Thanks,
> > Raiden
> >
> >
> >
> > On Mon, 2 Dec 2002, Bill Barker wrote:
> >
> > > Try encoding the ';' as follows:
> > >
> > > <%
> > >   String refresh =
> > > response.encodeURL("https://www.myserver.com/login/index.jsp";);
> > >   int jssid = refresh.indexOf(";jsessionid");
> > >   if(jssid > 0) {
> > > refresh = refesh.substring(0, jssid) + "%3b" +
> > > refresh.substring(jssid+1);
> > >   }
> > > %>
> > > 
> > >
> > > "Raiden" <[EMAIL PROTECTED]> wrote in message
> > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > > Hello,
> > > >
> > > > As is seen by searching the list archive, this problem has come up
quite a
> > > > bit, but there doesn't seem to be an agreed upon solution.
> > > >
> > > > The problem occurs in the following html code:
> > > >
> > > >  > > >
> > >
content="0;URL=https://www.myserver.com/login/index.jsp;jsessionid=3E9F55499
> > > DCAE154870AD0FAE5B30C20?source=test">
> > > >
> > > > The ;jsessionid is ignored by the browser.  So, it appears that you
cannot
> > > > maintain session through URL rewriting (cookies are off), if you use
a
> > > > meta refresh.
> > > >
> > > > One solution that I've seen is to replace the ; with a ?, so the
browser
> > > > will accept and process the entire URL... and then intercept the
browser's
> > > > request before it gets back to the tomcat instance, and change the ?
back
> > > > to a ; (since I'm using Apache... I'd use mod_rewrite)
> > > >
> > > > Are there any problems with this solution?  Would a browser ever
reject it
> > > > for having two ? 's?  (one for the ;jsessionid and one for the
normal
> > > > query string)
> > > >
> > > > This seems like a pretty rough solution.  Does anyone have any
better
> > > > ideas?
> > > >
> > > > Thanks,
> > > > Raiden
> > >
> > >
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:

> > > For additional commands, e-mail:

> > >
> >
> >
> > --
> > To unsubscribe, e-mail:

> > For additional commands, e-mail:

> >





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




Problems with Jk2

2002-12-03 Thread Theodore A. Jencks
Hi All,

I'm having a problem getting mod_jk2 to work properly.  I've read the docs and unless 
I don't understand something everything should be working fine.  Here are my config 
files:

Apache:
LoadModule jk2_module   lib/apache/mod_jk2.so
(Apache starts and runs fine)

workers2.properties:
[shm]
file=/var/log/httpd/shm.file
size=1048576

[channel.socket:localhost:8009]
port=8009
host=127.0.0.1

[channel.un:/opt/tomcat/work/jk2.socket]
tomcatId=localhost:8009
debug=0

[ajp13:localhost:8009]
channel=channel.un:/opt/tomcat/work/jk2.socket

[status:status]

[uri:/examples/*]
worker=ajp13:/opt/tomcat/work/jk2.socket

[uri:/status/*]
worker=status:status


server.xml:

  
  








  
factory
org.apache.catalina.users.MemoryUserDatabaseFactory
  
  
pathname
conf/tomcat-users.xml
  


  
  




   

  

  

  





  
  

  
  
  
  
usernamesa
password
driverClassName
  org.hsql.jdbcDriver
url
  jdbc:HypersonicSQL:database
  
  
  

  mail.smtp.host
  localhost

  
  

  

  


I then go to http://myserver.net/examples/jsp/foobar and try to run the JSP however 
apache just comes back with a file not found error.  I was under the impression that 
mod_jk2 would redirect to tomcat and serve the JSP file.  Can anyone shed some light 
on the misconfiguration.

Regards,
Theo
==
Theodore A. Jencks-- DigitalFacet, Inc. --
President P.O. Box 242
Tel:  925-362-0015Alamo, CA
Fax:  925-362-899594507
[EMAIL PROTECTED]
http://www.digitalfacet.com
==




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




Re: VIRTUAL HOST CONFIGURATION

2002-12-03 Thread karthikeyan.balasubramanian
Hi David  Brown,

  Thanks for your kind reply.  Let me explore further on Warp, if things
didnt go well  can I have your snippets of httpd.conf and server.xml file
and some explanation on how to host lots of domain in different directory
/home/userhomedirectory and some optimization tips.

  Thanks once again.

karthikeyan.
- Original Message -
From: "David Brown" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, December 03, 2002 10:49 PM
Subject: Re: VIRTUAL HOST CONFIGURATION


>
> karthikeyan.balasubramanian writes:
>
> > Hi All,
> >
> >   I have sucessfully integarated Apache with Tomcat using WarpConnecter.
But how do i go about from here to implement lots of Virtual Host for our
clients.  I  need to setup atleast 5 virtual hosts.  I couldnt actually
figure a way to host 5 real domains with JSP and Servlet support.
> >
> >   What are all the changes I need to do in the Httpd.conf and
Server.xml.  I dont want to keep users folder under
> > TOMCATHOME/Webapps/UserContext it will be under
/usr/home/users-home-directory.
> >
> >   Can anybody help me out on this.  If somebody out here who have hosted
some real domains rather then localhost thing
> > please advice.
> >
> >   Looking forward for yours response.
> >
> > karthikeyan.
>
>
> Hello, i'm hosting 4 public virtual domains. i am using mod_jk w/ apache
and
> JkMount in httpd.conf and the ajp13 connector. i have many servlets, java
> beans and jsp running in different protected application context
> directories, jdbc connection to oracle, etc. this works 4 me. i know about
> the WarpConnector but have not used it. i have seen a lot of controversy
on
> this ml about WarpConnector. maybe u could try the mail-archive to find
out
> more or just keep trying here. hope this helps, david.
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>



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




Re: SocketException

2002-12-03 Thread maninder s batth
netstat -a -p should do it , if you are from unix world.download nmap 
for windows . that will give you process and port information
just use keywords nmap for windows in google and ull get it

Ram Kochhar wrote:

Hi,
 I just installed the tomcat and have not done anything except to try to
run start.bat.  My operating system is
windows 98.  How do I found out about the port or another process.  I also
installed microsoft network
protocal  so that TCP/IP is installed but it did not help.  Tomcat version
4.1.9.  Thanks.


Ram Kochhar

- Original Message -
From: "Paul Campbell" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, December 02, 2002 10:32 PM
Subject: Re: SocketException


 

I have jdk1.4 and tomcat 4.1 and it runs with out a problem.

Did you make some changes to a config file?

Did you invoke some servlet, of jsp that led to the exception?

Is there another process that might be using the same port?

At 08:46 PM 12/2/02 -0800, you wrote:
   

Hi,
 I have installed tomcat 4.1 and I get the following SocketException
 

error
 

when I try to start the server.  I will
appreciate any help.  I have a stand alone machine with no modem or
 

network
 

card with jdk1.4.Thanks


Ram Kochhar

[EMAIL PROTECTED]

D:\Tomcat 4.1\bin>catalina.bat run
Using CATALINA_BASE:   d:\tomcat~1.1
Using CATALINA_HOME:   d:\tomcat~1.1
Using CATALINA_TMPDIR: d:\tomcat~1.1\temp
Using JAVA_HOME:   d:\jdk1.4
Nov 30, 2002 9:43:34 PM org.apache.commons.modeler.Registry loadRegistry
INFO: Loading registry information
Nov 30, 2002 9:43:34 PM org.apache.commons.modeler.Registry getRegistry
INFO: Creating new Registry instance
Nov 30, 2002 9:43:37 PM org.apache.commons.modeler.Registry getServer
INFO: Creating MBeanServer
Nov 30, 2002 9:43:40 PM org.apache.coyote.http11.Http11Protocol init
SEVERE: Error initializing endpoint
java.net.SocketException: Socket type not supported: create
  at java.net.ServerSocket.createImpl(ServerSocket.java:244)
  at java.net.ServerSocket.getImpl(ServerSocket.java:202)
  at java.net.ServerSocket.bind(ServerSocket.java:308)
  at java.net.ServerSocket.bind(ServerSocket.java:266)
  at java.net.ServerSocket.(ServerSocket.java:182)
  at java.net.ServerSocket.(ServerSocket.java:138)
  at
org.apache.tomcat.util.net.DefaultServerSocketFactory.createSocket(De
faultServerSocketFactory.java:96)
  at
org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoi
nt.java:263)
  at
org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:150)

  at
org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConnector.
java:1002)
  at
org.apache.catalina.core.StandardService.initialize(StandardService.j
ava:579)
  at
org.apache.catalina.core.StandardServer.initialize(StandardServer.jav
a:2244)
  at org.apache.catalina.startup.Catalina.start(Catalina.java:509)
  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.
java:39)
  at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:324)
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)

Catalina.start: LifecycleException:  Protocol handler initialization
 

failed:
 

jav
a.net.SocketException: Socket type not supported: create
LifecycleException:  Protocol handler initialization failed:
java.net.SocketExce
ption: Socket type not supported: create
  at
org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConnector.
java:1004)
  at
org.apache.catalina.core.StandardService.initialize(StandardService.j
ava:579)
  at
org.apache.catalina.core.StandardServer.initialize(StandardServer.jav
a:2244)
  at org.apache.catalina.startup.Catalina.start(Catalina.java:509)
  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.
java:39)
  at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:324)
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
Catalina.stop: LifecycleException:  This server has not yet been started
LifecycleException:  This server has not yet been started
  at
org.apache.catalina.core.StandardServer.stop(StandardServer.java:2211
)
  at org.apache.catalina.startup.Catalina.start(Catalina.java:541)
  at
 

org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
 

  at
   

Re: The page cannot be displayed, HTTP 500 - Internal server error

2002-12-03 Thread Nikola Milutinovic
Tomislav Miladinovic wrote:

Hi,

After so many tries to get Tomcat 4.1.12 works (get home page) I am still experiencing error (after browsing http://localhost:8080). I try change Catalina port to 80 (server.xml) but no difference.

The page cannot be displayed, HTTP 500 - Internal server error 

I didn't have this error with Tomcat 4.0.3 . Any help will be greatly appreciated.

Is Tomcat setup to serve requests on port TCP:80? Is it binding to that port at 
all? Try "netstat -a".

Nixie.



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



RE: Memory usage?

2002-12-03 Thread Schnitzer, Jeff
Ah, yes, of course - the oracle oci drivers have a native code
component.  Yuck.

Thanks!

Jeff Schnitzer
[EMAIL PROTECTED]
The Sims Online

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 03, 2002 11:00 PM
> To: Tomcat Users List
> Subject: RE: Memory usage?
> 
> you using JDBC?
> 
> Head of Operations AsiaPac
> elata
> Level 30
> 6 Battery Road
> Singapore
> 049909
> Office : +65 65509723
> Mobile : +65 91117814
> Fax: +65 65509725
> [EMAIL PROTECTED]
> http://www.elata.com
> 
> This e-mail is intended solely for the above mentioned recipient(s)
and it
> may contain confidential information.  If you have received this
e-mail in
> error, please notify us immediately and delete the e-mail from your
> system.
> Copying, distribution or other use of the information contained in
this
> e-mail is strictly prohibited.  Nothing in this e-mail amounts to a
> contractual commitment, or is otherwise legally binding on elata
unless
> confirmed by an authorised representative independently of this
e-mail.
> Registered in England, number 1961405
> 
> 
> 
> -Original Message-
> From: Schnitzer, Jeff [mailto:[EMAIL PROTECTED]]
> Sent: 04 December 2002 12:59
> To: [EMAIL PROTECTED]
> Subject: Memory usage?
> 
> 
> This is probably a more general java question:
> 
> My long-running Tomcat processes become huge.  I have the max heap set
> to -Xmx512m, yet after a day or so the virtual size of java reaches
> upwards of 2GB, and the resident size sometimes exceeds 1GB.
Shouldn't
> I get OutOfMemoryErrors sooner?  If it's not heap, what is in all that
> extra space?
> 
> I'm pretty certain that I just need to reduce my session timeout (it's
> way too long, and we get a _lot_ of traffic).  But the JVM behavior
> surprises me.  This is with the Sun JDK 1.4.1_01 on Linux.
> 
> Thanks,
> Jeff Schnitzer
> [EMAIL PROTECTED]
> The Sims Online
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:    [EMAIL PROTECTED]>
> For additional commands, e-mail:  [EMAIL PROTECTED]>
> 


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




Re: datasource setup

2002-12-03 Thread maninder s batth
i will pass onto you what i learnt from Craig, and its check common-dbcp 
implementation .  you will be able to set up your cloudscape pretty soon.
i just finished making some changes to my datasource class and factory 
class and it works fine with tomcat. Took me few hours, YMMV , but i
learnt few things :)
make sure you do check common-dbcp, i wasted precious time playing with 
server.xml , not knowing exactly what happens, till i read souce code
for dbcp and everything worked fine then.

work wrote:

Hi ,

   Does anyone have a working cloudscape Datasource setup with tc 4.0.x ?

   If so could you share the server.xml with me as I get an unable to create
resource error on ctx.lookup

   Any help with a cloudscape DS would really be apreciated.

   Mike





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

 


--
Your favorite stores, helpful shopping tools and great gift ideas. 
Experience the convenience of buying online with Shop@Netscape! 
http://shopnow.netscape.com/



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



RE: Memory usage?

2002-12-03 Thread mike.roberts
you using JDBC?

Head of Operations AsiaPac
elata
Level 30
6 Battery Road
Singapore
049909
Office : +65 65509723
Mobile : +65 91117814
Fax: +65 65509725
[EMAIL PROTECTED]
http://www.elata.com

This e-mail is intended solely for the above mentioned recipient(s) and it
may contain confidential information.  If you have received this e-mail in
error, please notify us immediately and delete the e-mail from your system.
Copying, distribution or other use of the information contained in this
e-mail is strictly prohibited.  Nothing in this e-mail amounts to a
contractual commitment, or is otherwise legally binding on elata unless
confirmed by an authorised representative independently of this e-mail.
Registered in England, number 1961405



-Original Message-
From: Schnitzer, Jeff [mailto:[EMAIL PROTECTED]]
Sent: 04 December 2002 12:59
To: [EMAIL PROTECTED]
Subject: Memory usage?


This is probably a more general java question:

My long-running Tomcat processes become huge.  I have the max heap set
to -Xmx512m, yet after a day or so the virtual size of java reaches
upwards of 2GB, and the resident size sometimes exceeds 1GB.  Shouldn't
I get OutOfMemoryErrors sooner?  If it's not heap, what is in all that
extra space?

I'm pretty certain that I just need to reduce my session timeout (it's
way too long, and we get a _lot_ of traffic).  But the JVM behavior
surprises me.  This is with the Sun JDK 1.4.1_01 on Linux.

Thanks,
Jeff Schnitzer
[EMAIL PROTECTED]
The Sims Online

--
To unsubscribe, e-mail:

For additional commands, e-mail:




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




Memory usage?

2002-12-03 Thread Schnitzer, Jeff
This is probably a more general java question:

My long-running Tomcat processes become huge.  I have the max heap set
to -Xmx512m, yet after a day or so the virtual size of java reaches
upwards of 2GB, and the resident size sometimes exceeds 1GB.  Shouldn't
I get OutOfMemoryErrors sooner?  If it's not heap, what is in all that
extra space?

I'm pretty certain that I just need to reduce my session timeout (it's
way too long, and we get a _lot_ of traffic).  But the JVM behavior
surprises me.  This is with the Sun JDK 1.4.1_01 on Linux.

Thanks,
Jeff Schnitzer
[EMAIL PROTECTED]
The Sims Online

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




RE: Can't start tomcat

2002-12-03 Thread work
that is correct.
I found this problem a year back with soap impl.
I used to quadruple the default and this seemed to work.


Head of Operations AsiaPac
elata
Level 30
6 Battery Road
Singapore
049909
Office : +65 65509723
Mobile : +65 91117814
Fax: +65 65509725
[EMAIL PROTECTED]
http://www.elata.com

This e-mail is intended solely for the above mentioned recipient(s) and it
may contain confidential information.  If you have received this e-mail in
error, please notify us immediately and delete the e-mail from your system.
Copying, distribution or other use of the information contained in this
e-mail is strictly prohibited.  Nothing in this e-mail amounts to a
contractual commitment, or is otherwise legally binding on elata unless
confirmed by an authorised representative independently of this e-mail.
Registered in England, number 1961405



-Original Message-
From: Tref Gare [mailto:[EMAIL PROTECTED]]
Sent: 04 December 2002 12:50
To: Tomcat Users List
Subject: RE: Can't start tomcat


I think it runs something like this.. but I'm running on vague cobweb
memories

Right click the title of your Dos window.. go to properties and adjust the
environment memory dedicated to that window.

Sorry I can't be clearer



--
Tref Gare
Development Consultant
Areeba
Level 19/114 William St, Melbourne VIC 3000
email: [EMAIL PROTECTED]
phone: +61 3 9642 5553
fax: +61 3 9642 1335
website: http://www.areeba.com.au
--
"This email is intended only for the use of the individual or entity named
above and contains information that is confidential. No confidentiality is
waived or lost by any mis-transmission. If you received this correspondence
in error, please notify the sender and immediately delete it from your
system. You must not disclose, copy or rely on any part of this
correspondence if you are not the intended recipient. Any communication
directed to clients via this message is subject to our Agreement and
relevant Project Schedule. Any information that is transmitted via email
which may offend may have been sent without knowledge or the consent of
Areeba."
--

-Original Message-
From: Peng Tuck Kwok [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 4 December 2002 4:39 PM
To: Tomcat Users List
Subject: Re: Can't start tomcat

Can't remmember the exact command but if you do a google search for
"Out of environment space" should bring a lot of relevant hits. That's
how I found the solution. Don't forget to restart your machine.

Aleks Kleyn wrote:
> I also followed this recommendation because I had similar problem. When I
> started startup.bat it responded me
> Out of environment space
> So this is problem:how I can extend environment space in windows NT?
> Aleks Kleyn
> http://www.geocities.com/aleks_kleyn
> - Original Message -
> From: "Yandell Cacton" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Tuesday, November 26, 2002 5:36 PM
> Subject: Re: Can't start tomcat
>
>
>
>>Hi,
>>
>>To see the error message, run the startup script using
>>DOS Window and manually type the startup command,
>>instead of double clicking the icon.
>>
>>My guess would be that the problem is that you haven't
>>setup CATALINA_HOME environment variable.
>>
>>Cheers,
>>Yandell.
>>
>> --- [EMAIL PROTECTED] wrote: > Hello,
>>
>>>I have downloaded tomcat 4.1.12. When I try to
>>>startup the server a DOS Window appears and
>>>disappears immediately and I have no comment about
>>>what's going on.
>>>
>>>Can anybody help me?
>>>
>>>
>>
>>-
>>
>>>NetCourrier, votre bureau virtuel sur Internet :
>>>Mail, Agenda, Clubs, Toolbar...
>>>Web/Wap : www.netcourrier.com
>>>Téléphone/Fax : 08 92 69 00 21 (0,34 ? TTC/min)
>>>Minitel: 3615 NETCOURRIER (0,15 ? TTC/min)
>>>
>>>
>>>--
>>>To unsubscribe, e-mail:
>>>
>>>For additional commands, e-mail:
>>>
>>>
>>http://www.yahoo.promo.com.au/hint/ - Yahoo! Hint Dropper
>>- Avoid getting hideous gifts this Christmas with Yahoo! Hint Dropper!
>>
>>--
>>To unsubscribe, e-mail:
>
> 
>
>>For additional commands, e-mail:
>
> 
>
>>
>
> -
> Introducing NetZero Long Distance
> 1st month Free!
> Sign up today at: www.netzerolongdistance.com
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>



--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:




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




RE: Can't start tomcat

2002-12-03 Thread Tref Gare
I think it runs something like this.. but I'm running on vague cobweb memories

Right click the title of your Dos window.. go to properties and adjust the environment 
memory dedicated to that window.  

Sorry I can't be clearer



--
Tref Gare
Development Consultant
Areeba
Level 19/114 William St, Melbourne VIC 3000
email: [EMAIL PROTECTED]
phone: +61 3 9642 5553
fax: +61 3 9642 1335
website: http://www.areeba.com.au
--
"This email is intended only for the use of the individual or entity named above and 
contains information that is confidential. No confidentiality is waived or lost by any 
mis-transmission. If you received this correspondence in error, please notify the 
sender and immediately delete it from your system. You must not disclose, copy or rely 
on any part of this correspondence if you are not the intended recipient. Any 
communication directed to clients via this message is subject to our Agreement and 
relevant Project Schedule. Any information that is transmitted via email which may 
offend may have been sent without knowledge or the consent of Areeba."
--

-Original Message-
From: Peng Tuck Kwok [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, 4 December 2002 4:39 PM
To: Tomcat Users List
Subject: Re: Can't start tomcat

Can't remmember the exact command but if you do a google search for
"Out of environment space" should bring a lot of relevant hits. That's 
how I found the solution. Don't forget to restart your machine.

Aleks Kleyn wrote:
> I also followed this recommendation because I had similar problem. When I
> started startup.bat it responded me
> Out of environment space
> So this is problem:how I can extend environment space in windows NT?
> Aleks Kleyn
> http://www.geocities.com/aleks_kleyn
> - Original Message -
> From: "Yandell Cacton" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Tuesday, November 26, 2002 5:36 PM
> Subject: Re: Can't start tomcat
> 
> 
> 
>>Hi,
>>
>>To see the error message, run the startup script using
>>DOS Window and manually type the startup command,
>>instead of double clicking the icon.
>>
>>My guess would be that the problem is that you haven't
>>setup CATALINA_HOME environment variable.
>>
>>Cheers,
>>Yandell.
>>
>> --- [EMAIL PROTECTED] wrote: > Hello,
>>
>>>I have downloaded tomcat 4.1.12. When I try to
>>>startup the server a DOS Window appears and
>>>disappears immediately and I have no comment about
>>>what's going on.
>>>
>>>Can anybody help me?
>>>
>>>
>>
>>-
>>
>>>NetCourrier, votre bureau virtuel sur Internet :
>>>Mail, Agenda, Clubs, Toolbar...
>>>Web/Wap : www.netcourrier.com
>>>Téléphone/Fax : 08 92 69 00 21 (0,34 ? TTC/min)
>>>Minitel: 3615 NETCOURRIER (0,15 ? TTC/min)
>>>
>>>
>>>--
>>>To unsubscribe, e-mail:
>>>
>>>For additional commands, e-mail:
>>>
>>>
>>http://www.yahoo.promo.com.au/hint/ - Yahoo! Hint Dropper
>>- Avoid getting hideous gifts this Christmas with Yahoo! Hint Dropper!
>>
>>--
>>To unsubscribe, e-mail:
> 
> 
> 
>>For additional commands, e-mail:
> 
> 
> 
>>
> 
> -
> Introducing NetZero Long Distance
> 1st month Free!
> Sign up today at: www.netzerolongdistance.com
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 



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


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




Datasource

2002-12-03 Thread work

Can anyone tell me if cloudscape (with j2ee) can in fact be used as a
jndi-datasource? with tomcat4.0.6
Head of Operations AsiaPac
elata
Level 30
6 Battery Road
Singapore
049909
Office : +65 65509723
Mobile : +65 91117814
Fax: +65 65509725
[EMAIL PROTECTED]
http://www.elata.com

This e-mail is intended solely for the above mentioned recipient(s) and it
may contain confidential information.  If you have received this e-mail in
error, please notify us immediately and delete the e-mail from your system.
Copying, distribution or other use of the information contained in this
e-mail is strictly prohibited.  Nothing in this e-mail amounts to a
contractual commitment, or is otherwise legally binding on elata unless
confirmed by an authorised representative independently of this e-mail.
Registered in England, number 1961405




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




datasource setup

2002-12-03 Thread work
Hi ,

Does anyone have a working cloudscape Datasource setup with tc 4.0.x ?

If so could you share the server.xml with me as I get an unable to create
resource error on ctx.lookup

Any help with a cloudscape DS would really be apreciated.

Mike





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




Re: Filters don't affect request dispatcher forward

2002-12-03 Thread Craig R. McClanahan


On 3 Dec 2002, Alexander Wallace wrote:

> Date: 03 Dec 2002 21:42:54 +0100
> From: Alexander Wallace <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: Re: Filters don't affect request dispatcher forward
>
> I have one extra question... Asumming one should not switch from https
> to http for security reasons... How does one handle the situation in
> which a user should login with a password (that one would like to
> encrypt so it can't be sniffed)? Should the whole app be run using
> https? Isn't that too hard on resources?
>

If you switch back, you're just as vulnerable as if you did the login
under non-SSL (in other words, the encryption of the username and
password on the SSL login gives you a *false* sense of security, not
anything real).  So why bother with all the extra effort in the first
place?

If you really care about the security of passwords, run the whole session
in SSL (and buy an extra CPU for your server, for goodness sake, if that
really matters).  If you don't care, life is much simpler if you just run
everything non-SSL.

If you decide to implement switching back to non-SSL on a public internet
app, please let me know where it is so I can avoid it.

> Does this not switching from https to http also apply when you have
> apache handling all the ssl comunication?
>

Yep ... the issue is the exposure of session id information in cleartext,
not the mechanics of how you processed it on your server.

>
> Thanks again in advance.

Craig


>
> On Tue, 2002-12-03 at 18:37, Alexander Wallace wrote:
> > Ok, thankyou for the advice, I will do that then. What i was trying to
> > do is actually what you are telling me i shouldn't.
> >
> > Again, thanks!
> >
> > On Tue, 2002-12-03 at 11:20, Craig R. McClanahan wrote:
> > >
> > >
> > > On 3 Dec 2002, Alexander Wallace wrote:
> > >
> > > > Date: 03 Dec 2002 10:21:19 -0600
> > > > From: Alexander Wallace <[EMAIL PROTECTED]>
> > > > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > > > To: Tomcat Users List <[EMAIL PROTECTED]>
> > > > Subject: Re: Filters don't affect request dispatcher forward
> > > >
> > > > Hey I love that! Thanks, let me try it!
> > > >
> > > > Now, with this solution, I figure i can't fore stuff that doesn't match
> > > > the "to be secured" pattern to go over http and not https if it is
> > > > requested, right? I still can live with that, but it would sure be
> > > > cool..
> > > >
> > >
> > > I'm not sure what you're really asking, but ...
> > >
> > > If you declare a security constraint with a transport guarantee, any URL
> > > that matches the specified pattern(s) can *only* be accessed via SSL.  Any
> > > URL that does not match the pattern can be accessed over *either* SSL or
> > > non-SSL.
> > >
> > > One additional note -- web applications that allow a user to switch from
> > > SSL back to non-SSL on the same session are broken.  What you've just done
> > > is allowed anyone snooping the network to swipe the session id and
> > > impersonate your user (for example, click the "buy" button again using the
> > > credit card number that was entered on a secure page).
> > >
> > > You should program your apps that, once a user switches from non-SSL to
> > > SSL, you never again accept a non-SSL request for that same session id.
> > > If the user needs to go back (for example, after checking out of an
> > > ecommerce site you want to buy some more stuff), start a new session first
> > > (and clear the confidential data you might have captured).
> > >
> > > > Thanks!
> > >
> > > Craig
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:   
> > > For additional commands, e-mail: 
> > >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:   
> > For additional commands, e-mail: 
> >
>
>
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
>
>


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




Re: Can't start tomcat

2002-12-03 Thread Peng Tuck Kwok
Can't remmember the exact command but if you do a google search for
"Out of environment space" should bring a lot of relevant hits. That's 
how I found the solution. Don't forget to restart your machine.

Aleks Kleyn wrote:
I also followed this recommendation because I had similar problem. When I
started startup.bat it responded me
Out of environment space
So this is problem:how I can extend environment space in windows NT?
Aleks Kleyn
http://www.geocities.com/aleks_kleyn
- Original Message -
From: "Yandell Cacton" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 26, 2002 5:36 PM
Subject: Re: Can't start tomcat




Hi,

To see the error message, run the startup script using
DOS Window and manually type the startup command,
instead of double clicking the icon.

My guess would be that the problem is that you haven't
setup CATALINA_HOME environment variable.

Cheers,
Yandell.

--- [EMAIL PROTECTED] wrote: > Hello,


I have downloaded tomcat 4.1.12. When I try to
startup the server a DOS Window appears and
disappears immediately and I have no comment about
what's going on.

Can anybody help me?




-


NetCourrier, votre bureau virtuel sur Internet :
Mail, Agenda, Clubs, Toolbar...
Web/Wap : www.netcourrier.com
Téléphone/Fax : 08 92 69 00 21 (0,34 ? TTC/min)
Minitel: 3615 NETCOURRIER (0,15 ? TTC/min)


--
To unsubscribe, e-mail:

For additional commands, e-mail:



http://www.yahoo.promo.com.au/hint/ - Yahoo! Hint Dropper
- Avoid getting hideous gifts this Christmas with Yahoo! Hint Dropper!

--
To unsubscribe, e-mail:





For additional commands, e-mail:








-
Introducing NetZero Long Distance
1st month Free!
Sign up today at: www.netzerolongdistance.com

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






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




Re: SocketException

2002-12-03 Thread Ram Kochhar
Hi,
  I just installed the tomcat and have not done anything except to try to
run start.bat.  My operating system is
 windows 98.  How do I found out about the port or another process.  I also
installed microsoft network
 protocal  so that TCP/IP is installed but it did not help.  Tomcat version
4.1.9.  Thanks.


Ram Kochhar

- Original Message -
From: "Paul Campbell" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, December 02, 2002 10:32 PM
Subject: Re: SocketException


>
> I have jdk1.4 and tomcat 4.1 and it runs with out a problem.
>
> Did you make some changes to a config file?
>
> Did you invoke some servlet, of jsp that led to the exception?
>
> Is there another process that might be using the same port?
>
> At 08:46 PM 12/2/02 -0800, you wrote:
> >Hi,
> >   I have installed tomcat 4.1 and I get the following SocketException
error
> >when I try to start the server.  I will
> >appreciate any help.  I have a stand alone machine with no modem or
network
> >card with jdk1.4.Thanks
> >
> >
> >Ram Kochhar
> >
> >[EMAIL PROTECTED]
> >
> > D:\Tomcat 4.1\bin>catalina.bat run
> >Using CATALINA_BASE:   d:\tomcat~1.1
> >Using CATALINA_HOME:   d:\tomcat~1.1
> >Using CATALINA_TMPDIR: d:\tomcat~1.1\temp
> >Using JAVA_HOME:   d:\jdk1.4
> >Nov 30, 2002 9:43:34 PM org.apache.commons.modeler.Registry loadRegistry
> >INFO: Loading registry information
> >Nov 30, 2002 9:43:34 PM org.apache.commons.modeler.Registry getRegistry
> >INFO: Creating new Registry instance
> >Nov 30, 2002 9:43:37 PM org.apache.commons.modeler.Registry getServer
> >INFO: Creating MBeanServer
> >Nov 30, 2002 9:43:40 PM org.apache.coyote.http11.Http11Protocol init
> >SEVERE: Error initializing endpoint
> >java.net.SocketException: Socket type not supported: create
> >at java.net.ServerSocket.createImpl(ServerSocket.java:244)
> >at java.net.ServerSocket.getImpl(ServerSocket.java:202)
> >at java.net.ServerSocket.bind(ServerSocket.java:308)
> >at java.net.ServerSocket.bind(ServerSocket.java:266)
> >at java.net.ServerSocket.(ServerSocket.java:182)
> >at java.net.ServerSocket.(ServerSocket.java:138)
> >at
> >org.apache.tomcat.util.net.DefaultServerSocketFactory.createSocket(De
> >faultServerSocketFactory.java:96)
> >at
> >org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoi
> >nt.java:263)
> >at
> >org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:150)
> >
> >at
> >org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConnector.
> >java:1002)
> >at
> >org.apache.catalina.core.StandardService.initialize(StandardService.j
> >ava:579)
> >at
> >org.apache.catalina.core.StandardServer.initialize(StandardServer.jav
> >a:2244)
> >at org.apache.catalina.startup.Catalina.start(Catalina.java:509)
> >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.
> >java:39)
> >at
> >sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> >sorImpl.java:25)
> >at java.lang.reflect.Method.invoke(Method.java:324)
> >at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
> >
> >Catalina.start: LifecycleException:  Protocol handler initialization
failed:
> >jav
> >a.net.SocketException: Socket type not supported: create
> >LifecycleException:  Protocol handler initialization failed:
> >java.net.SocketExce
> >ption: Socket type not supported: create
> >at
> >org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConnector.
> >java:1004)
> >at
> >org.apache.catalina.core.StandardService.initialize(StandardService.j
> >ava:579)
> >at
> >org.apache.catalina.core.StandardServer.initialize(StandardServer.jav
> >a:2244)
> >at org.apache.catalina.startup.Catalina.start(Catalina.java:509)
> >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.
> >java:39)
> >at
> >sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> >sorImpl.java:25)
> >at java.lang.reflect.Method.invoke(Method.java:324)
> >at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
> >Catalina.stop: LifecycleException:  This server has not yet been started
> >LifecycleException:  This server has not yet been started
> >at
> >org.apache.catalina.core.StandardServer.stop(StandardServer.java:2211
> >)
> >at org.apache.catalina.startup.Catalina.start(Catalina.java:541)
> >at

RE: Tomcat BOOK List Request

2002-12-03 Thread Ron Day
Are you sure a book will help !

-Original Message-
From: Steve R Burrus [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 03, 2002 5:14 PM
To: [EMAIL PROTECTED]
Subject: Tomcat BOOK List Request


 Hello, as Micael wanted me to do, I am making a formal request of the group
of
any and all good books on Tomcat technology! I want books specifically on
the
subject of deploying either JSP's and/or Servlets in the Tomcat container. I
have
gone WAY TOO DAMN LONG now with an utter inability to do this!

__
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com

--
To unsubscribe, e-mail:

For additional commands, e-mail:





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




Re: Can't start tomcat

2002-12-03 Thread Aleks Kleyn
I also followed this recommendation because I had similar problem. When I
started startup.bat it responded me
Out of environment space
So this is problem:how I can extend environment space in windows NT?
Aleks Kleyn
http://www.geocities.com/aleks_kleyn
- Original Message -
From: "Yandell Cacton" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 26, 2002 5:36 PM
Subject: Re: Can't start tomcat


> Hi,
>
> To see the error message, run the startup script using
> DOS Window and manually type the startup command,
> instead of double clicking the icon.
>
> My guess would be that the problem is that you haven't
> setup CATALINA_HOME environment variable.
>
> Cheers,
> Yandell.
>
>  --- [EMAIL PROTECTED] wrote: > Hello,
> >
> > I have downloaded tomcat 4.1.12. When I try to
> > startup the server a DOS Window appears and
> > disappears immediately and I have no comment about
> > what's going on.
> >
> > Can anybody help me?
> >
> >
> -
> > NetCourrier, votre bureau virtuel sur Internet :
> > Mail, Agenda, Clubs, Toolbar...
> > Web/Wap : www.netcourrier.com
> > Téléphone/Fax : 08 92 69 00 21 (0,34 ? TTC/min)
> > Minitel: 3615 NETCOURRIER (0,15 ? TTC/min)
> >
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> >
>
> http://www.yahoo.promo.com.au/hint/ - Yahoo! Hint Dropper
> - Avoid getting hideous gifts this Christmas with Yahoo! Hint Dropper!
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>

-
Introducing NetZero Long Distance
1st month Free!
Sign up today at: www.netzerolongdistance.com

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




Re: Filters don't affect request dispatcher forward

2002-12-03 Thread Alexander Wallace
I have one extra question... Asumming one should not switch from https
to http for security reasons... How does one handle the situation in
which a user should login with a password (that one would like to
encrypt so it can't be sniffed)? Should the whole app be run using
https? Isn't that too hard on resources?

Does this not switching from https to http also apply when you have
apache handling all the ssl comunication?


Thanks again in advance.

On Tue, 2002-12-03 at 18:37, Alexander Wallace wrote:
> Ok, thankyou for the advice, I will do that then. What i was trying to
> do is actually what you are telling me i shouldn't.
> 
> Again, thanks!
> 
> On Tue, 2002-12-03 at 11:20, Craig R. McClanahan wrote:
> > 
> > 
> > On 3 Dec 2002, Alexander Wallace wrote:
> > 
> > > Date: 03 Dec 2002 10:21:19 -0600
> > > From: Alexander Wallace <[EMAIL PROTECTED]>
> > > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > > To: Tomcat Users List <[EMAIL PROTECTED]>
> > > Subject: Re: Filters don't affect request dispatcher forward
> > >
> > > Hey I love that! Thanks, let me try it!
> > >
> > > Now, with this solution, I figure i can't fore stuff that doesn't match
> > > the "to be secured" pattern to go over http and not https if it is
> > > requested, right? I still can live with that, but it would sure be
> > > cool..
> > >
> > 
> > I'm not sure what you're really asking, but ...
> > 
> > If you declare a security constraint with a transport guarantee, any URL
> > that matches the specified pattern(s) can *only* be accessed via SSL.  Any
> > URL that does not match the pattern can be accessed over *either* SSL or
> > non-SSL.
> > 
> > One additional note -- web applications that allow a user to switch from
> > SSL back to non-SSL on the same session are broken.  What you've just done
> > is allowed anyone snooping the network to swipe the session id and
> > impersonate your user (for example, click the "buy" button again using the
> > credit card number that was entered on a secure page).
> > 
> > You should program your apps that, once a user switches from non-SSL to
> > SSL, you never again accept a non-SSL request for that same session id.
> > If the user needs to go back (for example, after checking out of an
> > ecommerce site you want to buy some more stuff), start a new session first
> > (and clear the confidential data you might have captured).
> > 
> > > Thanks!
> > 
> > Craig
> > 
> > 
> > --
> > To unsubscribe, e-mail:   
> > For additional commands, e-mail: 
> > 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 



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




RE: Can Filter-mappings be defined using regular expressions?

2002-12-03 Thread Noel J. Bergman
The Servlet Specification describes allowable mappings, and doesn't describe
regex support, which means that it isn't there.  You'd have to roll your
own, which you could implement with a controlling filter.

--- Noel


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




RE: JSP Last-modified/If-modified-since

2002-12-03 Thread Noel J. Bergman
> 1.  java.io.File.lastModified() already returns a long.
> Why are you dividing and multiplying by 1000L?

Just a hack for some oddity where some client worked better if I discarded
the milliseconds portion of the value (while preserving the magnitude).
When I searched the web, I found that Stuart MaClean from Univ. of Wash. had
done something similar.  YMMV.

> It looks to me like your "getLastModified()" method is returning the last
time this very jsp was edited.

Exactly.  If you don't want Conditional Get behavior, don't extend this
class at all!  Or if you do want Conditional Get behavior, but with a
different last modified value, then declare the latter in your page.

Glad that you found the post interesting.  If anyone decides to actually use
the code, I'd certainly appreciate hearing about it.

--- Noel


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




pre-compile, class package and Ant

2002-12-03 Thread hacking bear
Hello,

I attempt to use Ant1.5's jspc target to precompile my JSP page for Tomcat. 
I'm able to successfully compile the JSP into classes. but I found the 
resulting directory tree is different than that of Tomcat's automatic 
compilation. In the process of investigation, I found a few issues/question 
about Tomcat's way of generating classes from JSPs.

Say I have JSPs into two folders:
foo/
 p1.jsp
 error.jsp
bar/
 p2.jsp
error.jsp

Tomcat automatically compile them to classes (with package org.apache.jsp ) 
in the same directory structure:
foo/
 p1.java   p1.class
error.java   error.class
bar/
 p2.javap2.class
error.java   error.class

1. Does Tomcat assume all jsp classes be in package or.apache.jsp?

2. What happens to the two different error.class? They are different but 
they belong to the same package. Am I right? Would tomcat be able to load 
them separately?

3. JspC generates the java source files in the same structure as shown above 
but javac will generate class files in the normal java way like 
org/apache/jsp. Further the original folders of the JSP files are lost 
because all class files go to the same package; I couldn't even flatten-copy 
them to Tomcat's working directory. How could I get the same directory 
structure as Tomcat's using Ant? (I could do that in shell script by 
compiling-copying JSP file one by one.)

Thanks.
-HB


_
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail


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



Re: Tomcat BOOK List Request

2002-12-03 Thread micael
You should get a lot of them from this:

Servlets:
Java Servlet Programming, Hunter and Crawford
JSP:
I learned this the hard way (reading the source code) and never 
found a book I liked before learning it on my own.
Tomcat:
Apache- akarta -Tomcat, Goodwill
David Geary has one coming out, which probably will be good.
Taglibs (essential to JSP);
Get Geary's book on that one.
Struts:
Struts in Action (new book), really good.
XML (you have to learn this or forget it)
Read Bret McLaughlin's books with O'Reilly - All of them.


At 03:13 PM 12/3/2002 -0800, you wrote:
 Hello, as Micael wanted me to do, I am making a formal request of the 
group of
any and all good books on Tomcat technology! I want books specifically on the
subject of deploying either JSP's and/or Servlets in the Tomcat container. 
I have
gone WAY TOO DAMN LONG now with an utter inability to do this!

__
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com

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

Micael

---

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



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



Re: Tomcat BOOK List Request

2002-12-03 Thread Paul Campbell
At 06:32 PM 12/3/02 -0500, you wrote:
>At 12/3/2002 03:13 PM, you wrote:
>> Hello, as Micael wanted me to do, I am making a formal request of the group of
>
>
>1) http://jakarta.apache.org/tomcat/
>2) Core Servlets by Marty Hall
>3) Java Servlet Programming by Jason Hunter
>4) http://java.sun.com/products/jsp/tomcat/
>5) http://java.sun.com/products/jsp/tomcat/faq.html
>6) http://java.sun.com/products/servlet/
>7) http://java.sun.com/products/jsp/


Item 2 above http://pdf.coreservlets.com/ by Marty Hall

See also:
http://www.moreservlets.com/Using-Tomcat-4.html

JavaServerPages by Bergsten (Oreilly)




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




RE: Memory/Performance

2002-12-03 Thread developer
Thanks the reply, you taught me a couple things.  My email that is on this
list is on my home
computer and unfortunately the power has been out on my street all day so
I am just reading this now.  realize when I say 1 million unique hits I
mean unique page visits not unique users, its close but still not the
same.  I still think i am pretty cool though. hahaha.  

You are right I am using cookies to keep my sessionid in check.  I have
been doing some tests and watching the logs when I login I see the
SessionListener messages with all the session
created and all the attribute added info.  I have timed it and when a
session goes inactive for the session timeout time it then issues the
sessiondestroyed and attribute removed commands.  It certainly seems to
work properly, and it is not allocating a new session per page.  I might
add that session.invalidate just to be safe
though.  Looking at your suicide example and some of the responses from
others on the list I am wondering what constitutes too much in terms of
allocating session objects?  Is there anyway to trace how big sessions are
growing to?  


It is difficult dealing with these problems while I am on my production
box here, but when I initially
rolled out the tomcat powered site it didn't have quite as much going on
and was only like 20 jsp pages now it is a couple hundred pages and lots
more beans per session.  Tomcat was certainly a lot stabler when the site was
a lot more cut and dry.   I migrated recently from 3.2 to 4.1.12 hoping
that would help with some of these problems but the problems still seem
to be there just with different error messages.  I have another tomcat
server up running just some
servlets that never create any session objects.  That server seems never
to have any of these problems.   So I am certainly fishing for problems in
my jsp code.  I also tend to think there are more problems with the JDK
rather than tomcat.  

You know I get these warning constantly do you know what the heck that is
all about?

Dec 3, 2002 3:31:47 PM org.apache.jk.common.ChannelSocket 
processConnection
WARNING: server has closed the current connection (-1)


And I also get some of these, do you know what this means?:
Dec 3, 2002 1:23:20 PM org.apache.jk.server.JkCoyoteHandler action
SEVERE: Error in action code
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 org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:380)
at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:558)
at
org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:354)
at org.apache.coyote.Response.action(Response.java:216)
at org.apache.coyote.Response.finish(Response.java:336)
at
org.apache.coyote.tomcat4.CoyoteResponse.finishResponse(CoyoteResponse.java:504)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:224)
at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:256)
at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:361)
at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:563)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:535)
at
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:638)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
at java.lang.Thread.run(Thread.java:536)





 
thanks julius and everyone else
Please keep helping

ryan





On Mon, 2 Dec 2002, Julius Davies wrote:

> 
> 
> ryan,
> 
> Wow!  You get 1 million unique hits a month (1 unique hit every 2 seconds) handled 
>by a single pc running linux.  That's awesome!  When I was originally writing, I 
>didn't realize you were dealing with live, production issues...  I hope I can help.
> 
> In my office I don't have direct access to that kind of load, and so I have to 
>simulate it.  My original comments were more coming from that direction:  I pictured 
>you running some home-grown load test which forgot to take cookies into account, and 
>consequently was experiencing a memory spike.
> 
> In real production usage almost all the clients support cookies.  Very rare for a 
>person to have "cookies" disabled in their browser.  
> 
> >So you are saying that possible  it is not only creating a new session
> >per new user but per page each user accesses?
> >If so please teach me how to fix my problems with my coding.
> 
> The good news in reply to this: a new session per page access is (very) unlikely.  I 
>didn't mean to scare you.  I didn't realize the performance problems you were 
>reporting were real life.  My thinking originally had me imagining that a problem 
>like you were experiencing would come from over-zealous simulation.  The ba

Re: Is there a solution to: jsessionid is ignored in a meta refresh?

2002-12-03 Thread Raiden
Just to give everyone some information I tried Bill's idea to change
the ; to a %3b on a different computer (has a newer Redhat o/s, same
version of tomcat, a slightly older version of Apache, and possibly a
slightly different version of mod_jk), and it worked fine... both when
including additional path to a page, and when not.

So, it appears that the error I was getting below on the first machine was
due to a potentially buggy version/configuration in one of the above
mentioned software packages... and I have not yet isolated which.  But,
it does at least work correctly one one of my machines, which means the
other machines should also work with this method once I find out what
is configured incorrectly.

Thanks Bill!

-Raiden



On Tue, 3 Dec 2002, Raiden wrote:

> Hello,
>
> This ALMOST seems to work.  I can't tell if I'm having a problem with
> Apache, or it's a problem with Tomcat.
>
> ## It works for a URL like:
> #http://www.myserver.com/%3bjsessionid=BC2DC8F1FACFD95501ED6A2A0BC9F5E2
> #
>
> ## But, it doesn't seem to work for a URL like:
> 
>#http://www.myserver.com/login/index.jsp%3bjsessionid=BC2DC8F1FACFD95501ED6A2A0BC9F5E2
> #
>
> The addition of the "login/index.jsp" results in the following error:
>
>   HTTP Status 404 -
>   /login/index.jsp%3bjsessionid=BC2DC8F1FACFD95501ED6A2A0BC9F5E2
>
> --
>
>   type Status report
>
>   message /login/index.jsp%3bjsessionid=BC2DC8F1FACFD95501ED6A2A0BC9F5E2
>
>   description The requested resource
>   (/login/index.jsp%3bjsessionid=BC2DC8F1FACFD95501ED6A2A0BC9F5E2) is not
>   available.
>
>
> 
>
>   Apache Tomcat/4.1.12
>
>
> It looks like the %3b was translated for (or by?) Tomcat when there was
> no speific page given.  Any ideas?
>
> Thanks,
> Raiden
>
>
>
> On Mon, 2 Dec 2002, Bill Barker wrote:
>
> > Try encoding the ';' as follows:
> >
> > <%
> >   String refresh =
> > response.encodeURL("https://www.myserver.com/login/index.jsp";);
> >   int jssid = refresh.indexOf(";jsessionid");
> >   if(jssid > 0) {
> > refresh = refesh.substring(0, jssid) + "%3b" +
> > refresh.substring(jssid+1);
> >   }
> > %>
> > 
> >
> > "Raiden" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > Hello,
> > >
> > > As is seen by searching the list archive, this problem has come up quite a
> > > bit, but there doesn't seem to be an agreed upon solution.
> > >
> > > The problem occurs in the following html code:
> > >
> > >  > >
> > content="0;URL=https://www.myserver.com/login/index.jsp;jsessionid=3E9F55499
> > DCAE154870AD0FAE5B30C20?source=test">
> > >
> > > The ;jsessionid is ignored by the browser.  So, it appears that you cannot
> > > maintain session through URL rewriting (cookies are off), if you use a
> > > meta refresh.
> > >
> > > One solution that I've seen is to replace the ; with a ?, so the browser
> > > will accept and process the entire URL... and then intercept the browser's
> > > request before it gets back to the tomcat instance, and change the ? back
> > > to a ; (since I'm using Apache... I'd use mod_rewrite)
> > >
> > > Are there any problems with this solution?  Would a browser ever reject it
> > > for having two ? 's?  (one for the ;jsessionid and one for the normal
> > > query string)
> > >
> > > This seems like a pretty rough solution.  Does anyone have any better
> > > ideas?
> > >
> > > Thanks,
> > > Raiden
> >
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:   
> > For additional commands, e-mail: 
> >
>
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
>


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




Re: Tomcat BOOK List Request

2002-12-03 Thread Mark
At 12/3/2002 03:13 PM, you wrote:

 Hello, as Micael wanted me to do, I am making a formal request of the 
group of
any and all good books on Tomcat technology! I want books specifically on the
subject of deploying either JSP's and/or Servlets in the Tomcat container. 
I have
gone WAY TOO DAMN LONG now with an utter inability to do this!

__


1) http://jakarta.apache.org/tomcat/
2) Core Servlets by Marty Hall
3) Java Servlet Programming by Jason Hunter
4) http://java.sun.com/products/jsp/tomcat/
5) http://java.sun.com/products/jsp/tomcat/faq.html
6) http://java.sun.com/products/servlet/
7) http://java.sun.com/products/jsp/

If you're still unable to deploy a simple JSP or servlet after going 
through this material...well, I honestly don't know what to 
suggest.  Personally, I didn't have to buy a book to get an app to run 
under Tomcat.  Compile, create a .war, move it to /webapps, start TC, fire 
up the browser, you're there.

BTW - Micael helped me when I was a newbie. 


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



Re: Can Filter-mappings be defined using regular expressions?

2002-12-03 Thread Craig R. McClanahan


On Tue, 3 Dec 2002, Stephen Riek wrote:

> Date: Tue, 3 Dec 2002 23:12:47 + (GMT)
> From: Stephen Riek <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: Can Filter-mappings be defined using regular expressions?
>
>
>  There's got to be a better way of writing Filter-mapping than the following, where 
>I want to allow any URL that begins either with:
> a) /Products/*  or
> b) /<2 characters>/Products/*
>
> -->8--
>
> 
>   ProductsFilter
>   /Products/*
>  
>
> 
>   ProductsFilter
>   /en/Products/*
>  
>
>  
>   ProductsFilter
>   /de/Products/*
>  
>
>  
>   ProductsFilter
>   /fr/Products/*
>  
>
>  
>   ProductsFilter
>   /es/Products/*
>  
>
> -->8--
>
> Using */Products/* doesn't necessarily do it (and I think wouldn't work anyway) 
>since it would also collect match /SomeFolder/Another/Products which would be 
>incorrect.
>
> I don't mind using the above excep that it gets messy with multiple
> filters, and I was wondering if it could be more efficient for Tomcat
> written some other way.
>

An alternative strategy would be to map your filter to "/*" (so it
receives all requests) and then programmatically check the request URI in
the filter to decide whether or not to perform the redirection action.
You could use things like regular expressions, or whatever you wanted, to
make that sort of comparison.

> Thanks,
>
> Stephen.
>

Craig


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




Tomcat binding to port 80 on wrong IP address on W2K AdvancedServer?

2002-12-03 Thread Thomas Cameron
Howdy all -

I have a client who has an app which requires IIS (running on a W2K
Advanced Server).

Now, they want to add Tomcat for a Java web app which they have
developed in-house.  No big deal, I assign another IP address to the NIC
and tell Tomcat to use that IP address.

Unfortunately, now IIS fails to start saying the it can't bind - port in
use.  The stupid thing is that netstat -a does NOT show that anything is
listening on port 80 on the IP address that IIS is supposed to be
using.  Only on the IP address that Tomcat is supposed to use.  If I
stop Tomcat, IIS starts fine.  If I start IIS and then start Tomcat,
Tomcat says it started OK, but I can't open the web site that Tomcat is
serving.

I have double-checked that IIS is only supposed to bind to the IP
address I want it to.  I configured Tomcat thusly:



Anyone seen this?  Any pointers/advice/comments?

Thanks
Thomas


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




RE: SUCCESS w. Tomcat execution!

2002-12-03 Thread Price, Erik


> -Original Message-
> From: Jon Eaves [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 03, 2002 1:44 AM
> To: Tomcat Users List
> Subject: Re: SUCCESS w. Tomcat execution!
> 
> 
> Seriously Steve, unless you are a sadist and a masochist then
> please go and buy a book on Java Servlet development.

[...]

> Maybe everybody on the list could chip in a get Steve an
> Amazon voucher for a Servlet book ? I know it would save me
> the cost of downloading all the "help me" messages. ;-)

There is a free one, even formatted nicely into PDF, available at

http://pdf.coreservlets.com/

It's very good.  I read it.  A little dated, but you can figure out which things are a 
little different.


Erik

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




Tomcat BOOK List Request

2002-12-03 Thread Steve R Burrus
 Hello, as Micael wanted me to do, I am making a formal request of the group of
any and all good books on Tomcat technology! I want books specifically on the
subject of deploying either JSP's and/or Servlets in the Tomcat container. I have
gone WAY TOO DAMN LONG now with an utter inability to do this!

__
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com

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




Can Filter-mappings be defined using regular expressions?

2002-12-03 Thread Stephen Riek

 There's got to be a better way of writing Filter-mapping than the following, where I 
want to allow any URL that begins either with:
a) /Products/*  or 
b) /<2 characters>/Products/* 

-->8--


  ProductsFilter
  /Products/*
 


  ProductsFilter
  /en/Products/*
 

 
  ProductsFilter
  /de/Products/*
 

 
  ProductsFilter
  /fr/Products/*
 

 
  ProductsFilter
  /es/Products/*
 

-->8--

Using */Products/* doesn't necessarily do it (and I think wouldn't work anyway) since 
it would also collect match /SomeFolder/Another/Products which would be incorrect.

I don't mind using the above excep that it gets messy with multiple filters, and I was 
wondering if it could be more efficient for Tomcat written some other way.

Thanks,

Stephen.




-
With Yahoo! Mail you can get a bigger mailbox -- choose a size that fits your needs



RE: JSP Last-modified/If-modified-since

2002-12-03 Thread Julius Davies

Noel J. Bergman,

I was thinking about this same thing recently.  I really like what you've done.  I 
just have one concern - your default "getLastModified()" method seems incorrect to me:

>   protected long getLastModified(HttpServletRequest request)
>   {
>   long lm = (new
> java.io.File(getServletConfig().getServletContext().getRealPat
> h(request.getS
> ervletPath())).lastModified()) / 1000L * 1000L;
>   return lm;
>   }
> 

1.  java.io.File.lastModified() already returns a long.  Why are you dividing and 
multiplying by 1000L?

2.  It looks to me like your "getLastModified()" method is returning the last time 
this very jsp was edited.  To me that seems misleading:  suppose a developer 
mistakenly uses your feature, but their jsp is actually quite dynamic and its response 
changes with each new request.  They are going to have a helluva time figuring out why 
their jsp refuses to change its output.  I could be mistaken in my understanding of 
what's going on, though.

Instead I think your getLastModified() method should look like this instead:

protected long getLastModified(HttpServletRequest request)
{
return -1;
}

Notice from Javadoc:
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpServlet.html#getLastModified(javax.servlet.http.HttpServletRequest)

Returns:
a long integer specifying the time the HttpServletRequest object was last modified, in 
milliseconds since midnight, January 1, 1970 GMT, or -1 if the time is not known

Now you'll have to add a little bit of code to deal with the "-1" circumstance in your 
service() method.  Thanks for your post though - very interesting.  


Julius Davies, Programmer, CUCBC
Email: [EMAIL PROTECTED], Ph: 604.730.6385


> -Original Message-
> From: Noel J. Bergman [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 03, 2002 2:25 PM
> To: Tomcat User List
> Subject: JSP Last-modified/If-modified-since
> 
> 
> This seems to be an FAQ item without a good solution, at 
> least that I've
> noticed on the list.  Recently I had to address this myself, 
> moving some
> sites over to Tomcat.  Here is my solution, for critique.
> 
> First, I subclassed Jasper's HttpJspBase to add the desired behavior:
> 
> abstract public class LastModifiedJSP extends
> org.apache.jasper.runtime.HttpJspBase
> {
>   protected long getLastModified(HttpServletRequest request)
>   {
>   long lm = (new
> java.io.File(getServletConfig().getServletContext().getRealPat
> h(request.getS
> ervletPath())).lastModified()) / 1000L * 1000L;
>   return lm;
>   }
> 
>   public void service(ServletRequest req, ServletResponse res)
>   throws ServletException, IOException
>   {
>   HttpServletRequest request = (HttpServletRequest) req;
>   HttpServletResponse response = 
> (HttpServletResponse) res;
> 
>   long checkDate = 
> request.getDateHeader("If-Modified-Since");
>   long lastMod = getLastModified(request);
>   if (checkDate > 0 && lastMod <= checkDate)
>   {
>   
> response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
>   return;
>   }
>   response.setDateHeader("Last-Modified", lastMod);
> 
>   super.service(request, response);
>   }
> 
>   public String getServletInfo()
>   {
>   return "Base class for JSP pages that want 
> Conditional Get handling.
> Default getLastModified() returns lastModified() for JSP 
> source file.";
>   }
> }
> 
> then each page that wants to use this behavior includes:
> 
><%@ page extends="com.devtech.jsp.LastModifiedJSP" %>
> 
> That's it.  If a page wants to change its Last-Modified 
> behavior, it can
> optionally provide a getLastModified() method, just as a 
> servlet would do.
> And I will change the default behavior to also check included 
> pages via
> getIncludes().
> 
>   --- Noel
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 
> 

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




RE: How to control the cache setting in Tomcat?

2002-12-03 Thread Noel J. Bergman
> For the individual html page, we can turn on/off cache via META or header.
> But how can we do for the whole web application.

With a filter.

--- Noel

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




JSP Last-modified/If-modified-since

2002-12-03 Thread Noel J. Bergman
This seems to be an FAQ item without a good solution, at least that I've
noticed on the list.  Recently I had to address this myself, moving some
sites over to Tomcat.  Here is my solution, for critique.

First, I subclassed Jasper's HttpJspBase to add the desired behavior:

abstract public class LastModifiedJSP extends
org.apache.jasper.runtime.HttpJspBase
{
protected long getLastModified(HttpServletRequest request)
{
long lm = (new
java.io.File(getServletConfig().getServletContext().getRealPath(request.getS
ervletPath())).lastModified()) / 1000L * 1000L;
return lm;
}

public void service(ServletRequest req, ServletResponse res)
throws ServletException, IOException
{
HttpServletRequest request = (HttpServletRequest) req;
HttpServletResponse response = (HttpServletResponse) res;

long checkDate = request.getDateHeader("If-Modified-Since");
long lastMod = getLastModified(request);
if (checkDate > 0 && lastMod <= checkDate)
{
response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
return;
}
response.setDateHeader("Last-Modified", lastMod);

super.service(request, response);
}

public String getServletInfo()
{
return "Base class for JSP pages that want Conditional Get handling.
Default getLastModified() returns lastModified() for JSP source file.";
}
}

then each page that wants to use this behavior includes:

   <%@ page extends="com.devtech.jsp.LastModifiedJSP" %>

That's it.  If a page wants to change its Last-Modified behavior, it can
optionally provide a getLastModified() method, just as a servlet would do.
And I will change the default behavior to also check included pages via
getIncludes().

--- Noel


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




RE: How to control the cache setting in Tomcat?

2002-12-03 Thread Shapira, Yoav
Hi,

>For the individual html page, we can turn on/off cache via META or
header.

Yup.  Meta counts as a header as well.

>But how can we do for the whole web application.

You have to do it for each page.

>In the Apache web server, we can use module mod_expires and mod_headers
to
>do it.

This just does it for each page, but automatically so that you don't
have to manually include the header for each page.

>How about TOMCAT ( I mean standalone tomcat )??

There's no equivalent that I know of, but that's not surprising as
tomcat is not designed to be a full-featured standalone HTTP server.
That's what Apache (httpd) is for.

But you may be able to do something similar.  How about a Filter mapped
to everything (URL pattern /*) that adds the expiration and no-cache
headers to the response?

Yoav Shapira
Millennium ChemInformatics

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




RE: Help with jsp:includes

2002-12-03 Thread Noel J. Bergman
> I have pages that have the posibility of having 1000+ jsp:include
> statements in them.

Why?

Not to be a smartass, but perhaps there are alternative solutions.

--- Noel

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




How to control the cache setting in Tomcat?

2002-12-03 Thread Ma, Yongjie
Hi

For the individual html page, we can turn on/off cache via META or header. 

But how can we do for the whole web application.

In the Apache web server, we can use module mod_expires and mod_headers to do it.

How about TOMCAT ( I mean standalone tomcat )??

Thanks
Yongjie
 




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




RE: Get the request path from a filter ..

2002-12-03 Thread Shapira, Yoav
Hi,
You could check the scheme to be safe, e.g.

if("http".equals(request.getScheme()))
{
  // it's HttpServletRequest...
}
else
{
  // Don't know what to do, pass it on...
}

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Eriam Schaffter [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, December 03, 2002 5:39 PM
>To: Tomcat Users List
>Subject: Re: Get the request path from a filter ..
>
>Right ..
>
>But in the filter I get a ServletRequest object and not an
>HttpServletRequest object ..
>
>So ..
>
>HttpServletRequest HttpRequest = (HttpServletRequest) request;
>String URI = Requete.getRequestURI();
>
>Thanks ..
>
>Eriam
>
>Reynir Hübner a écrit:
>
>>How about request.getRequestURI() ?
>>
>>It should return you a string with the uri..
>>
>>Hope it helps
>>-reynir
>>
>>
>>
>>
>>
>>
>>
>>>-Original Message-
>>>From: Eriam Schaffter [mailto:[EMAIL PROTECTED]]
>>>Sent: 3. desember 2002 22:13
>>>To: [EMAIL PROTECTED]
>>>Subject: Get the request path from a filter ..
>>>
>>>
>>>Hi all ..
>>>
>>>How can I get the request uri from a servlet filter .. ?
>>>
>>>Thanks for any answear ..
>>>
>>>Eriam Schaffter
>>>
>>>
>>>--
>>>To unsubscribe, e-mail:
>>> [EMAIL PROTECTED]>
>>>For
>>>additional commands,
>>>e-mail: 
>>>
>>>
>>>
>>>
>>
>>--
>>To unsubscribe, e-mail:   [EMAIL PROTECTED]>
>>For additional commands, e-mail: [EMAIL PROTECTED]>
>>
>>-
>>Ce courrier a ete considere comme non infecte par les virus
>>connu de notre outil de detection. Soyez cependant prudent
>>avec les pieces jointes. Merci.
>>
>>
>>
>
>
>
>
>--
>To unsubscribe, e-mail:   [EMAIL PROTECTED]>
>For additional commands, e-mail: [EMAIL PROTECTED]>


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




Re: HELP!! Tomcat crashes on me!

2002-12-03 Thread Steve R. Burrus
  Hi "Rasputin", lemme "clue you in" to the fact that I HAVE gotten Tomcat 4.1.16 
[version] to run successfully/smoothly by now!!! I posted that fact to the newsgroup 
late last nite, guess that you just haven't seen it yet! And as for me "abusing" other 
people "please try not to shout abuse at people who are trying to help you,...", I 
guess that I was yesterday on Micael's case about the way that I percived him to be 
all the time with other people in the newsgroup!!! I thought that he received my 
CONSTRUCTIVE CRITICISM rather well, wish that you could also take it that way. :) 
*

 wrote:From: Rasputin [mailto: [EMAIL PROTECTED]]To: 
[EMAIL PROTECTED]: Tue, 3 Dec 2002 12:20:10 +Subject: Re: HELP!! 
Tomcat crashes on me!* Steve R. Burrus  [1201 05:01]:
> Kwok, the so-called "crash" is like it just flat disappearing on me!!! I
> mean, it's like "puff", like "up in smoke" so to speak!! 

Right, and it's given you an error that explains your server.xml is
invalid.
Since it seems to work out of the box for many people,
I'm guessing you've edited it. Why not try reinstalling, and this time,
don't edit the server.xml file - as other people have mentioned, you
shouldn't need to.

If it doesn't work, then try examining the logs to see why, and post
any errors you see there.

And please try not to shout abuse at people who are trying to help you, it
means people who could help you instead set their mailers to ignore you.

Cheers.
-- 
Rasputin :: Jack of All Trades - Master of Nuns

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



___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!



Re: Is there a solution to: jsessionid is ignored in a meta refresh?

2002-12-03 Thread Raiden
Hello,

This ALMOST seems to work.  I can't tell if I'm having a problem with
Apache, or it's a problem with Tomcat.

## It works for a URL like:
#http://www.myserver.com/%3bjsessionid=BC2DC8F1FACFD95501ED6A2A0BC9F5E2
#

## But, it doesn't seem to work for a URL like:
#http://www.myserver.com/login/index.jsp%3bjsessionid=BC2DC8F1FACFD95501ED6A2A0BC9F5E2
#

The addition of the "login/index.jsp" results in the following error:

  HTTP Status 404 -
  /login/index.jsp%3bjsessionid=BC2DC8F1FACFD95501ED6A2A0BC9F5E2

--

  type Status report

  message /login/index.jsp%3bjsessionid=BC2DC8F1FACFD95501ED6A2A0BC9F5E2

  description The requested resource
  (/login/index.jsp%3bjsessionid=BC2DC8F1FACFD95501ED6A2A0BC9F5E2) is not
  available.




  Apache Tomcat/4.1.12


It looks like the %3b was translated for (or by?) Tomcat when there was
no speific page given.  Any ideas?

Thanks,
Raiden



On Mon, 2 Dec 2002, Bill Barker wrote:

> Try encoding the ';' as follows:
>
> <%
>   String refresh =
> response.encodeURL("https://www.myserver.com/login/index.jsp";);
>   int jssid = refresh.indexOf(";jsessionid");
>   if(jssid > 0) {
> refresh = refesh.substring(0, jssid) + "%3b" +
> refresh.substring(jssid+1);
>   }
> %>
> 
>
> "Raiden" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hello,
> >
> > As is seen by searching the list archive, this problem has come up quite a
> > bit, but there doesn't seem to be an agreed upon solution.
> >
> > The problem occurs in the following html code:
> >
> >  >
> content="0;URL=https://www.myserver.com/login/index.jsp;jsessionid=3E9F55499
> DCAE154870AD0FAE5B30C20?source=test">
> >
> > The ;jsessionid is ignored by the browser.  So, it appears that you cannot
> > maintain session through URL rewriting (cookies are off), if you use a
> > meta refresh.
> >
> > One solution that I've seen is to replace the ; with a ?, so the browser
> > will accept and process the entire URL... and then intercept the browser's
> > request before it gets back to the tomcat instance, and change the ? back
> > to a ; (since I'm using Apache... I'd use mod_rewrite)
> >
> > Are there any problems with this solution?  Would a browser ever reject it
> > for having two ? 's?  (one for the ;jsessionid and one for the normal
> > query string)
> >
> > This seems like a pretty rough solution.  Does anyone have any better
> > ideas?
> >
> > Thanks,
> > Raiden
>
>
>
>
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
>


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




Re: Get the request path from a filter ..

2002-12-03 Thread Eriam Schaffter
Right ..

But in the filter I get a ServletRequest object and not an 
HttpServletRequest object ..

So ..

HttpServletRequest HttpRequest = (HttpServletRequest) request;
String URI = Requete.getRequestURI();

Thanks ..

Eriam

Reynir Hübner a écrit:

How about request.getRequestURI() ?

It should return you a string with the uri..

Hope it helps
-reynir





 

-Original Message-
From: Eriam Schaffter [mailto:[EMAIL PROTECTED]] 
Sent: 3. desember 2002 22:13
To: [EMAIL PROTECTED]
Subject: Get the request path from a filter .. 


Hi all ..

How can I get the request uri from a servlet filter .. ?

Thanks for any answear ..

Eriam Schaffter


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


   


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

-
Ce courrier a ete considere comme non infecte par les virus 
connu de notre outil de detection. Soyez cependant prudent 
avec les pieces jointes. Merci.

 





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




Re: Get the request path from a filter ..

2002-12-03 Thread Craig R. McClanahan


On Tue, 3 Dec 2002, Eriam Schaffter wrote:

> Date: Tue, 03 Dec 2002 22:12:59 +
> From: Eriam Schaffter <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Get the request path from a filter ..
>
> Hi all ..
>
> How can I get the request uri from a servlet filter .. ?
>

The same way you get it in a servlet:  request.getRequestURI().

> Thanks for any answear ..
>
> Eriam Schaffter
>

Craig


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




RE: Get the request path from a filter ..

2002-12-03 Thread Reynir Hübner

How about request.getRequestURI() ?

It should return you a string with the uri..

Hope it helps
-reynir





> -Original Message-
> From: Eriam Schaffter [mailto:[EMAIL PROTECTED]] 
> Sent: 3. desember 2002 22:13
> To: [EMAIL PROTECTED]
> Subject: Get the request path from a filter .. 
> 
> 
> Hi all ..
> 
> How can I get the request uri from a servlet filter .. ?
> 
> Thanks for any answear ..
> 
> Eriam Schaffter
> 
> 
> --
> To unsubscribe, e-mail:   
>  [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: 
> 
> 

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




Get the request path from a filter ..

2002-12-03 Thread Eriam Schaffter
Hi all ..

How can I get the request uri from a servlet filter .. ?

Thanks for any answear ..

Eriam Schaffter


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




accents

2002-12-03 Thread Felipe Schnack
  Anyone here is a Brazilian user of tomcat and pgsql? I would like to
chat off-list with someone about dealing with problems about our
portuguese and this combination of applications...


-- 

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

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


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




Solved: Tomcat and security manager: unexpected java.security.AccessControlException on sun linux cobalt

2002-12-03 Thread your mom
Hi all.

We solved the problem with tomcat ignoring all grants for individual user
sites. It was a pure RTFM.
For every user site, a unique context is created on startup (as seen in
tomcat.log on debug level)

There is a outcommented line in the server.xml which has to be activated:



After activating the line it should look like this:



After that, tomcat actually assigns the permissions granted in the
tomcat.policy to the individual user sites.

thanx for your all your help on this group,

J.P.Jarolim

P.S.: Keywords for other googlers like me:

tomcat ignoring ignore tomcat.policy grant java server.xml security manager
FilePermission java.security.AccessControlException secure security sun
cobalt



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




Re: javax.servlet.ServletException when starting

2002-12-03 Thread David Mehringer
On Tue, 3 Dec 2002, David Brown wrote:

> David Mehringer writes: 
> 
> Hello Dave, i have special interest when people named Dave running linux 
> boxes and tc ask questions so here goes: how do ur jars get to the locatin 
> under: WEB-INF? how u r generating ur jars? what do the jars do? r the jars 
> from another source or have u generated them? what version and flavor of 
> linux r u running? what dev tools r u running? what version of jdk? anything 
> that may help shed light on the problem. thanx, david. 
> 
Hi David,
Fortunately for me, we have the same first name :).  I see what I think is 
the path your leading me down.  I built the jar file myself with jdk 1.2 
but am running tomcat using jdk 1.4.  I rebuilt the jar file using the 1.4 
version (tho the class files were still compiled using 1.2 -- I'm making a 
mental note of this in case it causes me future problems).  The jar file 
now seems to load ok on start up.  Just to answer some of your other  
questions, I'm running Red Hat 7.3 with kernel 2.4.18-3smp.

Thanks for the questions, sometimes they can be just as good as answers 
:).
Dave


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




[ANN] Best and Worst Development Practices -- Training in NYC and DC

2002-12-03 Thread John Menke
Increase Your Struts Productivity - Attend the BaseBeans Public Struts
Training

We have a 11 hour public class in DC and in NYC in January. If you sign up
soon the price is $145. The regular price is $275 and it goes up as we
approach the date due to capacity planning.

This class is taught by baseBeans Engineering, the company voted to have the
best hands on training class by JDJ for their "Fast Track to Struts" class.

Get your training from the #1 trainer with a money back guarantee

You will pay $50 to register and be billed the balance. Upon registration,
you will be shipped a CD that contains the tools needed for the class, such
as an IDE, App. Server, some sample working source code, Struts, etc.

Follow this link to register:  http://64.253.60.21/do/classReservation

At the training, we will cover Struts, Java Server Faces, JDO, DAO,
JDBC,etc.

A pre-requisite for attendance is some Struts knowledge or at least Servlet
and SQL knowledge. This class is targeted at tech leads. Bring your
questions and receive practical advice from the baseBeans team.

You can FedEx a check or a PO for the balance to BaseBeans.

Prior paid students and clients are free for this class, as always, but we
need to know you are coming.

Hope to see you there,

JOHN


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




RE: Not getting CSS with XML

2002-12-03 Thread Kris Schneider
Sweet. Glad it worked.

Quoting "Caton, Paul" <[EMAIL PROTECTED]>:

> That did the trick! Thanks, Kris.
> 
> Paul.
> 
> -Original Message-
> From: Kris Schneider [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, December 03, 2002 3:04 PM
> To: Tomcat Users List
> Subject: RE: Not getting CSS with XML
> 
> 
>  ... How 'bout something like:
> 
> <%@ page contentType="text/xml" %>
> <%@ include file="mary.xml" %>
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


-- 
Kris Schneider 
D.O.Tech   

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




RE: Not getting CSS with XML

2002-12-03 Thread Caton, Paul
That did the trick! Thanks, Kris.

Paul.

-Original Message-
From: Kris Schneider [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, December 03, 2002 3:04 PM
To: Tomcat Users List
Subject: RE: Not getting CSS with XML


 ... How 'bout something like:

<%@ page contentType="text/xml" %>
<%@ include file="mary.xml" %>

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




Re: Newbie: Infos about Windows NT Authentication

2002-12-03 Thread micael
You might be better off looking at the NT documentation than Tomcat 
documentation.  The way environmental variables, etc. are set on NT is an 
NT matter.

At 06:39 PM 12/3/2002 +0100, you wrote:
Hello,
where can I get basic-information about Windows NT Authentication and
Tomcat. I read the Tomcat Documentation JNDI-Resource HOW-TO and REALM
HOW-TO, but I didn’t understand for example how to configure the Windows NT
Server to run Tomcat with Windows NT Authentication …

thanks for help,
Jasper



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


Micael

---

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



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



Tomcat Server Password Expiration

2002-12-03 Thread Zakeri, Moe
Hi,
 
I have a question I thought you are the right person to ask.
 
I would want to redirect users or do something else so when a password
expires (from Oracle database), the login.jsp page will ask users to enter
their new password after 120 days their old password has been set up.  Do I
have to manipulate server.xml?  Do you know what I have to do?
 
 
Thank you,


- Moe 

 



Re: javax.servlet.ServletException when starting

2002-12-03 Thread David Brown
David Mehringer writes: 

I have a (valid) jar file in the WEB-INF/lib directory of one of my web 
apps.  Threre are other jar files in the same directory which seem to load 
fine on startup, but when loading this one, there is some error which I 
don't understand (snippets from trace below from the log).  I'm running 
tomcat 4.1.12 under linux. I can elaborate more if this description isnt 
adequate. Thanks for any assistance.
Dave 


2002-12-03 11:56:42 ContextConfig[/archive] Exception processing JAR at 
resource path /WEB-INF/lib/huh.jar
javax.servlet.ServletException: Exception processing JAR at resource path 
/WEB-INF/lib/huh.jar
at 
org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:930)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
- Root Cause -
java.lang.IllegalArgumentException: Invalid TLD resource path 
/WEB-INF/lib/huh.jar
at 
org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:898)
 

2002-12-03 11:56:42 ContextConfig[/archive]: Marking this application 
unavailable due to previous error(s)
... 


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




Hello Dave, i have special interest when people named Dave running linux 
boxes and tc ask questions so here goes: how do ur jars get to the locatin 
under: WEB-INF? how u r generating ur jars? what do the jars do? r the jars 
from another source or have u generated them? what version and flavor of 
linux r u running? what dev tools r u running? what version of jdk? anything 
that may help shed light on the problem. thanx, david. 

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



RE: Not getting CSS with XML

2002-12-03 Thread Kris Schneider
Actually, I'm confused as to why you'd ever use a scriptlet for setting the
content type in a JSP. In addition, the default content type is already
text/html, so setting it explicitly seems redundant. The output's actually
supposed to be XML, right? How 'bout something like:

<%@ page contentType="text/xml" %>
<%@ include file="mary.xml" %>

Quoting Julius Davies <[EMAIL PROTECTED]>:

> 
> Paul Caton,
> 
> The error message your getting is because of the fact that
> "response.setContentType()" doesn't return anything.  You used "<%= %>" in
> your jsp, which needs an Object or a primitive inbewteen those brackets. 
> Your jsp is then going to call toString() on that Object (or just blithely
> print the primitive) and make that part of your webpage.
> 
> Since "response.setContentType()" doesn't return anything, there is no Object
> to call toString() on, or no primitive to blithely print!
> 
> Try "<% %>" instead.  Omit the equals sign.  Don't forget to put a semicolon
> at the end.
> 
> yours,
> 
> Julius Davies, Programmer, CUCBC
> Email: [EMAIL PROTECTED], Ph: 604.730.6385
> 
> 
> Code inside "<%= %>" should never end with a semicolon.
> 
> Code inside "<% %>" needs semicolons at the end of each line.
> 
> 
> 
> > -Original Message-
> > From: Caton, Paul [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, December 03, 2002 10:49 AM
> > To: Tomcat Users List
> > Subject: RE: Not getting CSS with XML
> > 
> > 
> > Okay, I put the Java expression first so that now the JSP file looks
> > like this:
> > 
> >   <%= response.setContentType("text/html;charset=UTF-8") %><%@ include
> > file="mary.xml" %>
> > 
> > 
> > After I recompiled and tried to access the page I got this error
> > message:
> > 
> >   > org.apache.jasper.JasperException: Unable to compile class for
> > JSPNote: sun.tools.javac.Main has been deprecated.
> >   > An error occurred at line: 1 in the jsp file: /mary.jsp
> > 
> >   > Generated servlet error:
> >   >
> > /opt/local/jakarta-tomcat-4.0.6-LE-jdk14/work/Standalone/local
> > host/acsam
> > /mary$jsp.java:54: Incompatible type for method. Can't convert void to
> > java.lang.Object.
> >   > out.print( response.setContentType("text/html;charset=UTF-8") );
> > 
> > Paul.
> > 
> > 
> > **
> > 
> > Charlie wrote:
> > 
> > Make sure you have it *before* your include and before any 
> > whitespace in
> > your jsp.
> > 
> > --
> > To unsubscribe, e-mail:   
> > 
> > For additional commands, e-mail: 
> > 
> > 
> > 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


-- 
Kris Schneider 
D.O.Tech   

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




RE: Not getting CSS with XML

2002-12-03 Thread Caton, Paul
Ah ha! Thanks, Julius - that got rid of the server error. But I'm still
back with the lack of CSS. The logs aren't helping either, except
negatively. That is, when I access mary2.jsp (which simply includes
mary.html)the localhost_access_log shows:

  "Get /acsam/mary2.jsp HTTP 1.1" 200 358
  "Get /acsam/mary2.css HTTP 1.1" 200 96

But when I access mary.jsp (which simply includes mary.xml) the log just
shows:


  "Get /acsam/mary.jsp HTTP 1.1" 200 182

It looks like there's something inside ?Jasper/?Catalina which doesn't
know what to do with the  tag when it gets it via a
compiled JSP. I just wish I knew that for sure, and then I could give up
trying to use the XML/CSS/JSP combination (although it would be really,
really convenient for our project if that combination worked). If anyone
else has got this combination to work, please let me know how.
Meanwhile, my thanks to people who have been trying to help.

Paul.

-Original Message-
From: Julius Davies [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, December 03, 2002 2:28 PM
To: Tomcat Users List
Cc: Caton, Paul
Subject: RE: Not getting CSS with XML



Paul Caton,

The error message your getting is because of the fact that
"response.setContentType()" doesn't return anything.  You used "<%= %>"
in your jsp, which needs an Object or a primitive inbewteen those
brackets.  Your jsp is then going to call toString() on that Object (or
just blithely print the primitive) and make that part of your webpage.

Since "response.setContentType()" doesn't return anything, there is no
Object to call toString() on, or no primitive to blithely print!

Try "<% %>" instead.  Omit the equals sign.  Don't forget to put a
semicolon at the end.

yours,

Julius Davies, Programmer, CUCBC
Email: [EMAIL PROTECTED], Ph: 604.730.6385


Code inside "<%= %>" should never end with a semicolon.

Code inside "<% %>" needs semicolons at the end of each line.



> -Original Message-
> From: Caton, Paul [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 03, 2002 10:49 AM
> To: Tomcat Users List
> Subject: RE: Not getting CSS with XML
> 
> 
> Okay, I put the Java expression first so that now the JSP file looks 
> like this:
> 
>   <%= response.setContentType("text/html;charset=UTF-8") %><%@ include

> file="mary.xml" %>
> 
> 
> After I recompiled and tried to access the page I got this error
> message:
> 
>   > org.apache.jasper.JasperException: Unable to compile class for
> JSPNote: sun.tools.javac.Main has been deprecated.
>   > An error occurred at line: 1 in the jsp file: /mary.jsp
> 
>   > Generated servlet error:
>   > /opt/local/jakarta-tomcat-4.0.6-LE-jdk14/work/Standalone/local
> host/acsam
> /mary$jsp.java:54: Incompatible type for method. Can't convert void to
> java.lang.Object.
>   > out.print( response.setContentType("text/html;charset=UTF-8") );
> 
> Paul.
> 
> 
> **
> 
> Charlie wrote:
> 
> Make sure you have it *before* your include and before any
> whitespace in
> your jsp.
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail:
> 
> 
> 

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




Re: TC 4.1.12 auto re-deploy...revisited

2002-12-03 Thread Mark
At 12/3/2002 01:19 PM, you wrote:

Mark writes:

At 12/3/2002 09:09 AM, you wrote:

Mark writes:

I have an expanded-war app where it will initially auto-deploy (ie. 
expand the directories under /webapps), but not able to get it to hot 
redeploy after changes are made. By 'hot', I mean automatically have a 
new.war file re-expanded without restarting Tomcat.
If I make changes to the app and create a new.war file, the only way I 
can get it to re-deploy is if I remove the existing directory under 
webapps then shutdown/restart Tomcat.  If I delete the directory and 
move a new .war file into /webapps while TC is running, it's not 
automatically expanded.  I've tried removing the app via the TC manager 
first, but it still won't auto-deploy. If I simply rename the .war file 
while it's in the /webapps directory, it's immediately deployed with 
the new directory name w/o restarting TC.  In a nutshell, if I use the 
same .war name, it won't redeploy unless I restart TC.  I'm using the 
out-of-the-box server.xml, where unpackWARs="true" and 
autoDeploy="true" for localhost.
Is there no way to 'hot' deploy an existing app the way I'd like 
without restarting Tomcat? I've looked at the documentation and 
searched the archives/Internet. In almost all cases, the last step is 
to 'restart Tomcat'.  My goal is to have automatic 
continuous-integration, including auto-deployment. Having to manually 
restart TC each time throws a wrench into that process.
Thanks
Mark
--
Hello Mark, i u r using: http://localhost:8080/manager then this works 4 
me: http://localhost:8080/manager/remove?path= and 
http://localhost:8080/manager/install?path= where "" 
means ur application context generated from ur .war. u must "remove" 
then "re-install" using the /manager webapp and "hot" deploy works w/o 
bouncing tc. hope this helps, david
--
Actually, this isn't working the way I thought it was/would.  By doing a 
remove/install of the app, TC is running from the .war file vs. unpacking 
the .war and running the app from the subdirectories.  This works, but 
(as we discovered) if/when TC is restarted, the result is the 'old' 
version of the app running from the subdirectory because we didn't remove it.
Maybe we're trying to mix-match or doing something real unconventional 
(dumb), but the question/problem seems pretty straightforward: given a 
previously-deployed unpacked app called 'myapp', can Tomcat refresh the 
contents of the /webapps/myapp subdirectories automatically from a new 
.war file? The only way we've been able to do that is to shutdown TC, 
delete the /myapp directory and restart TC, allowing it to unpack the 
.war and re-create the /myapp directory structure.
Based on what I've found, it looks like we should use one of these 2 
methods for hot-deployment:
1) Run the app from the .war vs. unpacking it, and use remove/install.
2) Replace changed files in the /myapp directory structure, and use reload.
Both work but I'm curious what method is typically used/recommended, or 
whether it's just personal preference.   Thanks.


--
To unsubscribe, e-mail:

For additional commands, e-mail: 



Hello Mark, acutally u need to do both 1 and 2 as i do but i guess i left 
out part of my automation process which is: ant. this little (no pun 
intended) but very powerful development tool is indespensible as part of 
my development structure. the ant tool basically automates the phsysicall 
removal of the "old" webapp directory as it completes the compile, 
generation and deployment of all my .ear, .war and .jar files. i run ant 
with 2 or more (depending on the depth of the webapp directories) 
build.xml files and 2 scripts namely: cleansite.sh and buildsite.sh (w/ 
controlling parms). these tools completely build or rebuild webapp/site, 
tear down the old and replace w/ the new and all is immediately accessible 
and tc never knows the difference. i can make edit changes or create whole 
new application contexts and webapp directory sites w/ these tools running 
all in the public no less (not so much brag i just can't afford a separate 
dev server). hope this helps, david.
--

Thanks again David. That was my plan, to use Ant to create a fresh 
environment and control Tomcat via the TC Ant tasks.  We'll be using the 
continuous-integration tool CruiseControl, and I wanted the build/deploy 
process to be basically transparent to developers after they commit changes 
to CVS, except for a notification of a build success/failure.





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



RE: Not getting CSS with XML

2002-12-03 Thread Julius Davies

Paul Caton,

The error message your getting is because of the fact that "response.setContentType()" 
doesn't return anything.  You used "<%= %>" in your jsp, which needs an Object or a 
primitive inbewteen those brackets.  Your jsp is then going to call toString() on that 
Object (or just blithely print the primitive) and make that part of your webpage.

Since "response.setContentType()" doesn't return anything, there is no Object to call 
toString() on, or no primitive to blithely print!

Try "<% %>" instead.  Omit the equals sign.  Don't forget to put a semicolon at the 
end.

yours,

Julius Davies, Programmer, CUCBC
Email: [EMAIL PROTECTED], Ph: 604.730.6385


Code inside "<%= %>" should never end with a semicolon.

Code inside "<% %>" needs semicolons at the end of each line.



> -Original Message-
> From: Caton, Paul [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 03, 2002 10:49 AM
> To: Tomcat Users List
> Subject: RE: Not getting CSS with XML
> 
> 
> Okay, I put the Java expression first so that now the JSP file looks
> like this:
> 
>   <%= response.setContentType("text/html;charset=UTF-8") %><%@ include
> file="mary.xml" %>
> 
> 
> After I recompiled and tried to access the page I got this error
> message:
> 
>   > org.apache.jasper.JasperException: Unable to compile class for
> JSPNote: sun.tools.javac.Main has been deprecated.
>   > An error occurred at line: 1 in the jsp file: /mary.jsp
> 
>   > Generated servlet error:
>   >
> /opt/local/jakarta-tomcat-4.0.6-LE-jdk14/work/Standalone/local
> host/acsam
> /mary$jsp.java:54: Incompatible type for method. Can't convert void to
> java.lang.Object.
>   > out.print( response.setContentType("text/html;charset=UTF-8") );
> 
> Paul.
> 
> 
> **
> 
> Charlie wrote:
> 
> Make sure you have it *before* your include and before any 
> whitespace in
> your jsp.
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 
> 

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




Re: TC 4.1.12 auto re-deploy...revisited

2002-12-03 Thread David Brown
Mark writes: 

At 12/3/2002 09:09 AM, you wrote:

Mark writes:

I have an expanded-war app where it will initially auto-deploy (ie. 
expand the directories under /webapps), but not able to get it to hot 
redeploy after changes are made. By 'hot', I mean automatically have a 
new.war file re-expanded without restarting Tomcat.
If I make changes to the app and create a new.war file, the only way I 
can get it to re-deploy is if I remove the existing directory under 
webapps then shutdown/restart Tomcat.  If I delete the directory and 
move a new .war file into /webapps while TC is running, it's not 
automatically expanded.  I've tried removing the app via the TC manager 
first, but it still won't auto-deploy. If I simply rename the .war file 
while it's in the /webapps directory, it's immediately deployed with the 
new directory name w/o restarting TC.  In a nutshell, if I use the same 
.war name, it won't redeploy unless I restart TC.  I'm using the 
out-of-the-box server.xml, where unpackWARs="true" and autoDeploy="true" 
for localhost.
Is there no way to 'hot' deploy an existing app the way I'd like without 
restarting Tomcat? I've looked at the documentation and searched the 
archives/Internet. In almost all cases, the last step is to 'restart 
Tomcat'.  My goal is to have automatic continuous-integration, including 
auto-deployment. Having to manually restart TC each time throws a wrench 
into that process.
Thanks
Mark
--
Hello Mark, i u r using: http://localhost:8080/manager then this works 4 
me: http://localhost:8080/manager/remove?path= and 
http://localhost:8080/manager/install?path= where "" 
means ur application context generated from ur .war. u must "remove" then 
"re-install" using the /manager webapp and "hot" deploy works w/o 
bouncing tc. hope this helps, david
--

Actually, this isn't working the way I thought it was/would.  By doing a 
remove/install of the app, TC is running from the .war file vs. unpacking 
the .war and running the app from the subdirectories.  This works, but (as 
we discovered) if/when TC is restarted, the result is the 'old' version of 
the app running from the subdirectory because we didn't remove it. 

Maybe we're trying to mix-match or doing something real unconventional 
(dumb), but the question/problem seems pretty straightforward: given a 
previously-deployed unpacked app called 'myapp', can Tomcat refresh the 
contents of the /webapps/myapp subdirectories automatically from a new 
.war file? The only way we've been able to do that is to shutdown TC, 
delete the /myapp directory and restart TC, allowing it to unpack the .war 
and re-create the /myapp directory structure. 

Based on what I've found, it looks like we should use one of these 2 
methods for hot-deployment: 

1) Run the app from the .war vs. unpacking it, and use remove/install.
2) Replace changed files in the /myapp directory structure, and use 
reload. 

Both work but I'm curious what method is typically used/recommended, or 
whether it's just personal preference.   Thanks. 

 


--
To unsubscribe, e-mail:   

For additional commands, e-mail: 
 




Hello Mark, acutally u need to do both 1 and 2 as i do but i guess i left 
out part of my automation process which is: ant. this little (no pun 
intended) but very powerful development tool is indespensible as part of my 
development structure. the ant tool basically automates the phsysicall 
removal of the "old" webapp directory as it completes the compile, 
generation and deployment of all my .ear, .war and .jar files. i run ant 
with 2 or more (depending on the depth of the webapp directories) build.xml 
files and 2 scripts namely: cleansite.sh and buildsite.sh (w/ controlling 
parms). these tools completely build or rebuild webapp/site, tear down the 
old and replace w/ the new and all is immediately accessible and tc never 
knows the difference. i can make edit changes or create whole new 
application contexts and webapp directory sites w/ these tools running all 
in the public no less (not so much brag i just can't afford a separate dev 
server). hope this helps, david. 

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



RE: Reading wanted.

2002-12-03 Thread Turner, John

#1: jakarta.apache.org/tomcat

John


> -Original Message-
> From: Triptpal Singh Lamba [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 03, 2002 1:56 PM
> To: Tomcat Users List
> Subject: Reading wanted.
> 
> 
> Hi all.
> 
> Can someone direct me to the following two things please...
> 
> 1. The most exhaustive online, free resource for Tomcat documentation
> 2. Whats the best newsletter to keep in touch with the J2EE 
> World updates.
> Like we have  IEEE software for SE, Dr Dobb blah blah, but 
> whats  a good one
> for j2ee in general. I tried google but there are so many 
> results I dont
> know what to do:)
> 
> Btw ,bless the soul of the man who suggested Eclipse. It 
> rocks! I used VA fo
> Java 3.5 last time I did a project , buthad to make do with 
> Jbuilder till
> eclipse came along.  I didnt find a fav. feature I like din 
> editors --the
> ctrl + bracket key to manually check brackets match or not 
> and till where.
> 
> Thanks
> Tript Singh
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 

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




RE: Reading wanted.

2002-12-03 Thread Reynir Hübner

For general java/j2ee : 
Try www.javalobby.org and the www.theserverside.com

For tomcat: 
guess that has to be http://jakarta.apache.org/tomcat



> -Original Message-
> From: Triptpal Singh Lamba [mailto:[EMAIL PROTECTED]] 
> Sent: 3. desember 2002 18:56
> To: Tomcat Users List
> Subject: Reading wanted.
> 
> 
> Hi all.
> 
> Can someone direct me to the following two things please...
> 
> 1. The most exhaustive online, free resource for Tomcat 
> documentation 2. Whats the best newsletter to keep in touch 
> with the J2EE World updates. Like we have  IEEE software for 
> SE, Dr Dobb blah blah, but whats  a good one for j2ee in 
> general. I tried google but there are so many results I dont 
> know what to do:)
> 
> Btw ,bless the soul of the man who suggested Eclipse. It 
> rocks! I used VA fo Java 3.5 last time I did a project , 
> buthad to make do with Jbuilder till eclipse came along.  I 
> didnt find a fav. feature I like din editors --the ctrl + 
> bracket key to manually check brackets match or not and till where.
> 
> Thanks
> Tript Singh
> 
> 
> 
> --
> To unsubscribe, e-mail:   
>  [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: 
> 
> 

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




Reading wanted.

2002-12-03 Thread Triptpal Singh Lamba
Hi all.

Can someone direct me to the following two things please...

1. The most exhaustive online, free resource for Tomcat documentation
2. Whats the best newsletter to keep in touch with the J2EE World updates.
Like we have  IEEE software for SE, Dr Dobb blah blah, but whats  a good one
for j2ee in general. I tried google but there are so many results I dont
know what to do:)

Btw ,bless the soul of the man who suggested Eclipse. It rocks! I used VA fo
Java 3.5 last time I did a project , buthad to make do with Jbuilder till
eclipse came along.  I didnt find a fav. feature I like din editors --the
ctrl + bracket key to manually check brackets match or not and till where.

Thanks
Tript Singh



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




RE: Not getting CSS with XML

2002-12-03 Thread Caton, Paul
Okay, I put the Java expression first so that now the JSP file looks
like this:

  <%= response.setContentType("text/html;charset=UTF-8") %><%@ include
file="mary.xml" %>


After I recompiled and tried to access the page I got this error
message:

  > org.apache.jasper.JasperException: Unable to compile class for
JSPNote: sun.tools.javac.Main has been deprecated.
  > An error occurred at line: 1 in the jsp file: /mary.jsp

  > Generated servlet error:
  >
/opt/local/jakarta-tomcat-4.0.6-LE-jdk14/work/Standalone/localhost/acsam
/mary$jsp.java:54: Incompatible type for method. Can't convert void to
java.lang.Object.
  > out.print( response.setContentType("text/html;charset=UTF-8") );

Paul.


**

Charlie wrote:

Make sure you have it *before* your include and before any whitespace in
your jsp.

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




Re: SUCCESS w. Tomcat execution!

2002-12-03 Thread David Brown
micael writes: 

Congratulations, "even" from me.  ///;-).  Would you like a small list of 
books that will give you the inside scoop on this sort of technology?  I 
think that it would serve the list well if you asked for the same under a 
"Subject" of Tomcat Book List, and people could make their recommendations 
for your perusal.  Congratulations again.  (The Ant suggestion was a good 
one for you to pay attention to, Steve.)  Micael 

At 10:36 PM 12/2/2002 -0800, you wrote:
Yes, SUCCESS is what I have finally met with in trying/attempting to get 
Tomcat
activated!!!  I make a "thunderous" declaration that I have finally done 
it, and
of course I thank all those who helped me out, and that even includes 
Micael!!
Now, I need some help with trying to see a JSP/Servlet in my browser, a 
long time
problem with me!! I have just now installed Ant. Does that aid me in 
trying to get
a JSP going or not? 

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com 

--
To unsubscribe, e-mail:   

For additional commands, e-mail: 


Micael 

--- 

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

 

--
To unsubscribe, e-mail:   

For additional commands, e-mail: 
 




Hello, ant is never a step backwards. ant is always a step forward. david. 

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



Re: Newbie: Infos about Windows NT Authentication

2002-12-03 Thread David Brown
Jasper Dammann writes: 

Hello,
where can I get basic-information about Windows NT Authentication and
Tomcat. I read the Tomcat Documentation JNDI-Resource HOW-TO and REALM
HOW-TO, but I didn’t understand for example how to configure the Windows NT
Server to run Tomcat with Windows NT Authentication … 

thanks for help,
Jasper 

 

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




Hello Jasper, the actual os should not matter. what matters is ur http 
server. i'm running a linux box w/ apache http server that talks to tomcat. 
though possible, apache can run on nt but it seems many people elect to run 
ms iis. iis presents its own set of problems: 1) more difficult to config w/ 
tomcat. 2) to run a publicly accessible server u will have to run a firewall 
router appliance like a cisco router because nt/win2k/xp have no built-in 
firewall protection that is reliable. also, iis is one of the most security 
compromised servers on the planet. check out ur local isp running linux or 
solaris servers and take a look at their syslog logs to see the amount of 
compromised iis servers running that r looking for more platforms to 
compromise. also, the cisco tcp stack has flaws that r easily compromised if 
the router is not configured correctly. finally, look at: 
http://www.netcraft.net/survey/. hope this helps, david.

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



Re: TC 4.1.12 auto re-deploy...revisited

2002-12-03 Thread Mark
At 12/3/2002 09:09 AM, you wrote:

Mark writes:

I have an expanded-war app where it will initially auto-deploy (ie. 
expand the directories under /webapps), but not able to get it to hot 
redeploy after changes are made. By 'hot', I mean automatically have a 
new.war file re-expanded without restarting Tomcat.
If I make changes to the app and create a new.war file, the only way I 
can get it to re-deploy is if I remove the existing directory under 
webapps then shutdown/restart Tomcat.  If I delete the directory and move 
a new .war file into /webapps while TC is running, it's not automatically 
expanded.  I've tried removing the app via the TC manager first, but it 
still won't auto-deploy. If I simply rename the .war file while it's in 
the /webapps directory, it's immediately deployed with the new directory 
name w/o restarting TC.  In a nutshell, if I use the same .war name, it 
won't redeploy unless I restart TC.  I'm using the out-of-the-box 
server.xml, where unpackWARs="true" and autoDeploy="true" for localhost.
Is there no way to 'hot' deploy an existing app the way I'd like without 
restarting Tomcat? I've looked at the documentation and searched the 
archives/Internet. In almost all cases, the last step is to 'restart 
Tomcat'.  My goal is to have automatic continuous-integration, including 
auto-deployment. Having to manually restart TC each time throws a wrench 
into that process.
Thanks
Mark
--
Hello Mark, i u r using: http://localhost:8080/manager then this works 4 
me: http://localhost:8080/manager/remove?path= and 
http://localhost:8080/manager/install?path= where "" means 
ur application context generated from ur .war. u must "remove" then 
"re-install" using the /manager webapp and "hot" deploy works w/o bouncing 
tc. hope this helps, david
--

Actually, this isn't working the way I thought it was/would.  By doing a 
remove/install of the app, TC is running from the .war file vs. unpacking 
the .war and running the app from the subdirectories.  This works, but (as 
we discovered) if/when TC is restarted, the result is the 'old' version of 
the app running from the subdirectory because we didn't remove it.

Maybe we're trying to mix-match or doing something real unconventional 
(dumb), but the question/problem seems pretty straightforward: given a 
previously-deployed unpacked app called 'myapp', can Tomcat refresh the 
contents of the /webapps/myapp subdirectories automatically from a new .war 
file? The only way we've been able to do that is to shutdown TC, delete the 
/myapp directory and restart TC, allowing it to unpack the .war and 
re-create the /myapp directory structure.

Based on what I've found, it looks like we should use one of these 2 
methods for hot-deployment:

1) Run the app from the .war vs. unpacking it, and use remove/install.
2) Replace changed files in the /myapp directory structure, and use reload.

Both work but I'm curious what method is typically used/recommended, or 
whether it's just personal preference.   Thanks.




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



Tomcat and JMX

2002-12-03 Thread Jay Wright

I was trying to find information regarding tomcat and jmx, but was unable to
do so.  I'm particularly interested in knowing if tomcat is jmx 1.0 or 1.1
compliant.  And if it differs from tomcat 4.x to 5.x.

I'd appreciate either a link or a faq or (preferably) someone with firsthand
knowledge...

Thanks,
Jay

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




Re: VIRTUAL HOST CONFIGURATION

2002-12-03 Thread David Brown
karthikeyan.balasubramanian writes: 

Hi All, 

  I have sucessfully integarated Apache with Tomcat using WarpConnecter.  But how do i go about from here to implement lots of Virtual Host for our clients.  I  need to setup atleast 5 virtual hosts.  I couldnt actually figure a way to host 5 real domains with JSP and Servlet support.   

  What are all the changes I need to do in the Httpd.conf and Server.xml.  I dont want to keep users folder under 
TOMCATHOME/Webapps/UserContext it will be under /usr/home/users-home-directory. 

  Can anybody help me out on this.  If somebody out here who have hosted some real domains rather then localhost thing 
please advice. 

  Looking forward for yours response. 

karthikeyan.


Hello, i'm hosting 4 public virtual domains. i am using mod_jk w/ apache and 
JkMount in httpd.conf and the ajp13 connector. i have many servlets, java 
beans and jsp running in different protected application context 
directories, jdbc connection to oracle, etc. this works 4 me. i know about 
the WarpConnector but have not used it. i have seen a lot of controversy on 
this ml about WarpConnector. maybe u could try the mail-archive to find out 
more or just keep trying here. hope this helps, david. 


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



Struts-Console-3.1 causes windows to reboot ???

2002-12-03 Thread Ron Day
Anyone else see this strange behavior.

downloaded Struts-console-3.1 to c:\
double click console.bat or run command line...
windows shuts down, then reboots.

Win 2000 sp3
jdk 1.4.1

anyone, or is my machine cookoo



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




Tomcat 4.1.12 startup speed

2002-12-03 Thread Brandon Cruz
I have recently upgraded about 200 virtual hosts from tomcat 3.2.4 to tomcat
4.1.12 and noticed that it takes much longer to start the server.  Tomcat
4.1.12 seems to print out quite a bit of information about each virtual host
and context that it is creating, which may be causing the long startup time.
Each host has at least three contexts, which means there are over one
thousand messages printed by the time all hosts are loades and before tomcat
can take any requests.

Is there a way to turn off the logging (I already have everything set to 0)
or speed up the startup?

Thanks!

Brandon


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




Help needed for threading

2002-12-03 Thread bm

Hi

Here is config :

Am using the ajp13 connector between apache(2.34) and tomcat 4.0.3 under window 2000
server. Am using the scope as 'application' in all JSP files.

Here is settings :

 I have minimum processor as 20 in server.xml and the maximum processor as 100 for 
ajp13

Here is issue :
Tomcat is not recycling these  threads and not allowing my other user to use those 
process threads. The number of threads are  growing  rapidly
even with  one or two user and ends up with 100 thread , finally hangs


What could be the problem, or how do i able to relieve these thread after usage.

Ultimately i want reuse the thread in ajp13 connector

Advance thanks for any help.
BM






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




javax.servlet.ServletException when starting

2002-12-03 Thread David Mehringer
I have a (valid) jar file in the WEB-INF/lib directory of one of my web 
apps.  Threre are other jar files in the same directory which seem to load 
fine on startup, but when loading this one, there is some error which I 
don't understand (snippets from trace below from the log).  I'm running 
tomcat 4.1.12 under linux. I can elaborate more if this description isnt 
adequate. Thanks for any assistance.
Dave


2002-12-03 11:56:42 ContextConfig[/archive] Exception processing JAR at 
resource path /WEB-INF/lib/huh.jar
javax.servlet.ServletException: Exception processing JAR at resource path 
/WEB-INF/lib/huh.jar
at 
org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:930)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
- Root Cause -
java.lang.IllegalArgumentException: Invalid TLD resource path 
/WEB-INF/lib/huh.jar
at 
org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:898)


2002-12-03 11:56:42 ContextConfig[/archive]: Marking this application 
unavailable due to previous error(s)
...


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




Concurrent Connection Limits

2002-12-03 Thread Johnson, Garrett
Ladies and Gentlemen:

I need to know:  Are there limits, ASIDE from those imposed by Apache HTTPD
/ Tomcat, imposed by WINDOWS 2000 on the number of concurrent connections it
can accept?  I'm running my application on Win2K Pro, but am afraid once it
goes live I'll have to upgrade to Win2K Server.  What are the limits on Pro,
Server, Advanced Server, and Datacenter, does anyone know?  Also, does the
MySQL-Connector-Java JDBC driver eat into those numbers?  The Database is
running locally, and only accessed by servlets, never remotely, but if the
driver uses IP, it might count toward that limit...

Thanks.


-G

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




The page cannot be displayed, HTTP 500 - Internal server error

2002-12-03 Thread Tomislav Miladinovic
Hi,

After so many tries to get Tomcat 4.1.12 works (get home page) I am still experiencing 
error (after browsing http://localhost:8080). I try change Catalina port to 80 
(server.xml) but no difference.

The page cannot be displayed, HTTP 500 - Internal server error 

I didn't have this error with Tomcat 4.0.3 . Any help will be greatly appreciated.



Tomislav










RE: Problem downloading binary files, please help.

2002-12-03 Thread Vy Ho


Thank you very much for helping.  I was speculating on something like
this, but didn't know if it's true.  If you have time, please point me to
some where easy to find info on how to do this (since you did the same
thing before).  Again, thank you very much for the help.

On Tue, 3 Dec 2002, Cox, Charlie wrote:

> why do you need a servlet wrapper for binary files? if you need to do
> pre/post-processing, use a filter and let tomcat server the file. This way
> you don't have to try to implement the http spec in your servlet. 
> 
> You will run into problems when a download manager requests 10 pieces(via
> http resume) of your file at once and you will end up serving the whole file
> 10 times if you have not handled 'resume' correctly. A filter resolved this
> for me.
> 
> Charlie
> 
> > -Original Message-
> > From: Vy Ho [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, December 02, 2002 12:46 PM
> > To: Tomcat Users List
> > Subject: Re: Problem downloading binary files, please help.
> > 
> > 
> > 
> >  
> > > I got a very weird error and here is the situation:
> > > 
> > > The app I used: tomcat 4.06, phoenix web browser 0.3, ie6.0
> > > 
> > > Here is the problem:
> > > 
> > > When I set up an application in tomcat (with BASIC AUTHEN), 
> > phoenix could
> > > download all binary files (.exe, .pdf, etc...) fine from 
> > Tomcat server.
> > > Then I tested with IE6.0, and I got error (server could not 
> > find the file
> > > or something).  However, IE6.0 could download text file ok 
> > without any
> > > problem. Ok, so I came back and delete the file index.html in the
> > > application, and I can download the file fine.  Isn't this strange?
> > > 
> > > But that's not all yet.  I want to serve files using a 
> > servlet wraper.
> > > Basically send back the binary with the right content type.
> > > Mozilla/phoenix can download without any problem.  But 
> > IE6.0 complain with
> > > the same error before.  So, somehow the index.html file and 
> > the servlet
> > > have something in common that make IE not working while it 
> > works without
> > > the index.html and statically.
> > > 
> > > Well, want another strange thing?  I could not find anyone 
> > complain about
> > > this, or even ask any question about this in newsgroup or 
> > apache site.
> > > And I can produce consistently using different machine.
> > > 
> > > Anyone have any idea?  Is it Apache Tomcat or IE error?  Or 
> > both?  Or it's
> > > me?
> > > 
> > > I am sure Tomcat can be changed to work, since statically 
> > served page
> > > works.  And I am sure IE can be changed to work, since 
> > Mozilla works all
> > > the time.
> > > 
> > > Actually, I found any article in the newsgroup on Google 
> > with a similar
> > > error, but very different situation (IIS server).  And the 
> > problem is in
> > > the expiration of a page.  If some page has instant 
> > expiration, then IE6
> > > has problem getting it.  It could be the same problem.  
> > Coudl someone help
> > > me out here since IE has 95% of the market share?
> > > 
> > > Thank you very much in advance.
> > > 
> > > Vy
> > > 
> > > 
> > > 
> > > 
> > > --
> > > To unsubscribe, e-mail:   
> > 
> > > For additional commands, e-mail: 
> > 
> > > 
> > > 
> > > 
> > > --
> > > To unsubscribe, e-mail:   
> > 
> > > For additional commands, e-mail: 
> > 
> > > 
> > > 
> > 
> > 
> > --
> > To unsubscribe, e-mail:   
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 


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




Need help

2002-12-03 Thread Avinash Prasad

Hi,

I configured the tomcat with IIS (in process) on windows 2000 
professional. Its working fine for JSP , I want to execute 
 ASP page from the same directory where I putted my jsp file.
 
 Like
 
 /webapps/jsp/hello.jsp-This is working fine
 
 /webapps/jsp/hello.asp---its not working.
  
 I came to know that if tomcat is configured In process with 
 IIS. Both asp and jsp page can communicate.   
  
 Note: How I can test my configuration that it is in process.
  
 Need help urgently.
 
 Regards,
 
 Avinash Prasad   




-
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now


Newbie: Infos about Windows NT Authentication

2002-12-03 Thread Jasper Dammann
Hello,
where can I get basic-information about Windows NT Authentication and
Tomcat. I read the Tomcat Documentation JNDI-Resource HOW-TO and REALM
HOW-TO, but I didn’t understand for example how to configure the Windows NT
Server to run Tomcat with Windows NT Authentication …

thanks for help,
Jasper



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




RE: Need help with Tomcat!

2002-12-03 Thread Turner, John

Because there is more to adding a directory to Tomcat than just throwing a
Context tag into server.xml.  Did you create a web.xml file?  Is your
DefaultContext configured correctly?  Do you have the right directory
structure under /test (it should mirror the directory structure under
/examples)?

You might want to check the documentation, such as the Application
Developer's Guide, which will explain things like directory structures,
deployment requirements, etc.:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/index.html

John


> -Original Message-
> From: Roland Dong [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 03, 2002 12:37 PM
> To: Tomcat Users List
> Subject: Re: Need help with Tomcat!
> 
> 
> Thanks for your reply. However, it follows the example 
> included in Tomcat
> 
>   reloadable="true" crossContext="true">
> 
> 
> And examples works but test doesn't! Why?
> 
> Roland
> 
> On 12/3/02 11:27 AM, "Fenlason, Josh" <[EMAIL PROTECTED]> wrote:
> 
> > Try changing the docBase attribute to the full path to the 
> test directory.
> > 
> > --
> > To unsubscribe, e-mail:   
> 
> > For additional commands, e-mail: 
> 
> > 
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 

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




Re: Filters don't affect request dispatcher forward

2002-12-03 Thread Alexander Wallace
Ok, thankyou for the advice, I will do that then. What i was trying to
do is actually what you are telling me i shouldn't.

Again, thanks!

On Tue, 2002-12-03 at 11:20, Craig R. McClanahan wrote:
> 
> 
> On 3 Dec 2002, Alexander Wallace wrote:
> 
> > Date: 03 Dec 2002 10:21:19 -0600
> > From: Alexander Wallace <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: Tomcat Users List <[EMAIL PROTECTED]>
> > Subject: Re: Filters don't affect request dispatcher forward
> >
> > Hey I love that! Thanks, let me try it!
> >
> > Now, with this solution, I figure i can't fore stuff that doesn't match
> > the "to be secured" pattern to go over http and not https if it is
> > requested, right? I still can live with that, but it would sure be
> > cool..
> >
> 
> I'm not sure what you're really asking, but ...
> 
> If you declare a security constraint with a transport guarantee, any URL
> that matches the specified pattern(s) can *only* be accessed via SSL.  Any
> URL that does not match the pattern can be accessed over *either* SSL or
> non-SSL.
> 
> One additional note -- web applications that allow a user to switch from
> SSL back to non-SSL on the same session are broken.  What you've just done
> is allowed anyone snooping the network to swipe the session id and
> impersonate your user (for example, click the "buy" button again using the
> credit card number that was entered on a secure page).
> 
> You should program your apps that, once a user switches from non-SSL to
> SSL, you never again accept a non-SSL request for that same session id.
> If the user needs to go back (for example, after checking out of an
> ecommerce site you want to buy some more stuff), start a new session first
> (and clear the confidential data you might have captured).
> 
> > Thanks!
> 
> Craig
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 



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




Re: Need help with Tomcat!

2002-12-03 Thread Roland Dong
Thanks for your reply. However, it follows the example included in Tomcat




And examples works but test doesn't! Why?

Roland

On 12/3/02 11:27 AM, "Fenlason, Josh" <[EMAIL PROTECTED]> wrote:

> Try changing the docBase attribute to the full path to the test directory.
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


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




RE: Need help with Tomcat!

2002-12-03 Thread Fenlason, Josh
Try changing the docBase attribute to the full path to the test directory.

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




Re: SUCCESS w. Tomcat execution!

2002-12-03 Thread micael
Congratulations, "even" from me.  ///;-).  Would you like a small list of 
books that will give you the inside scoop on this sort of technology?  I 
think that it would serve the list well if you asked for the same under a 
"Subject" of Tomcat Book List, and people could make their recommendations 
for your perusal.  Congratulations again.  (The Ant suggestion was a good 
one for you to pay attention to, Steve.)  Micael

At 10:36 PM 12/2/2002 -0800, you wrote:
 Yes, SUCCESS is what I have finally met with in trying/attempting to get 
Tomcat
activated!!!  I make a "thunderous" declaration that I have finally done 
it, and
of course I thank all those who helped me out, and that even includes Micael!!
Now, I need some help with trying to see a JSP/Servlet in my browser, a 
long time
problem with me!! I have just now installed Ant. Does that aid me in 
trying to get
a JSP going or not?

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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

Micael

---

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



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



Re: TC 4.1.12 auto re-deploy problem/confusion

2002-12-03 Thread Craig R. McClanahan


On Tue, 3 Dec 2002, Mark wrote:

> Date: Tue, 03 Dec 2002 10:07:29 -0500
> From: Mark <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: TC 4.1.12 auto re-deploy problem/confusion
>
> I have an expanded-war app where it will initially auto-deploy (ie. expand
> the directories under /webapps), but not able to get it to hot redeploy
> after changes are made. By 'hot', I mean automatically have a new.war file
> re-expanded without restarting Tomcat.
>
> If I make changes to the app and create a new.war file, the only way I can
> get it to re-deploy is if I remove the existing directory under webapps
> then shutdown/restart Tomcat.  If I delete the directory and move a new
> .war file into /webapps while TC is running, it's not automatically
> expanded.  I've tried removing the app via the TC manager first, but it
> still won't auto-deploy. If I simply rename the .war file while it's in the
> /webapps directory, it's immediately deployed with the new directory name
> w/o restarting TC.  In a nutshell, if I use the same .war name, it won't
> redeploy unless I restart TC.  I'm using the out-of-the-box server.xml,
> where unpackWARs="true" and autoDeploy="true" for localhost.
>
> Is there no way to 'hot' deploy an existing app the way I'd like without
> restarting Tomcat? I've looked at the documentation and searched the
> archives/Internet. In almost all cases, the last step is to 'restart
> Tomcat'.  My goal is to have automatic continuous-integration, including
> auto-deployment. Having to manually restart TC each time throws a wrench
> into that process.
>

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/manager-howto.html

> Thanks
> Mark

Craig


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




Need help with Tomcat!

2002-12-03 Thread Roland Dong
I managed to install Tomcat 4.1.12 on Mac os X 1.2

However I was unable to run my applications.

I am testing the tomcat by add test directory under webapps with only one
file, index.html,  in it.

I restarted the server and typin http://localhost:8090/test/index.html. It
gives me an error: 

"The requested resource (/test/index.html) is not available."

Should tomcat automatically load the application at startup? I also tried to
add  

To server.xml. That wouldn't work either?

Did I miss something?

I am new to Tomcat. Please help

Thanks a lot,

RD


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




Re: Filters don't affect request dispatcher forward

2002-12-03 Thread Craig R. McClanahan


On 3 Dec 2002, Alexander Wallace wrote:

> Date: 03 Dec 2002 10:21:19 -0600
> From: Alexander Wallace <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: Re: Filters don't affect request dispatcher forward
>
> Hey I love that! Thanks, let me try it!
>
> Now, with this solution, I figure i can't fore stuff that doesn't match
> the "to be secured" pattern to go over http and not https if it is
> requested, right? I still can live with that, but it would sure be
> cool..
>

I'm not sure what you're really asking, but ...

If you declare a security constraint with a transport guarantee, any URL
that matches the specified pattern(s) can *only* be accessed via SSL.  Any
URL that does not match the pattern can be accessed over *either* SSL or
non-SSL.

One additional note -- web applications that allow a user to switch from
SSL back to non-SSL on the same session are broken.  What you've just done
is allowed anyone snooping the network to swipe the session id and
impersonate your user (for example, click the "buy" button again using the
credit card number that was entered on a secure page).

You should program your apps that, once a user switches from non-SSL to
SSL, you never again accept a non-SSL request for that same session id.
If the user needs to go back (for example, after checking out of an
ecommerce site you want to buy some more stuff), start a new session first
(and clear the confidential data you might have captured).

> Thanks!

Craig


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




RE: Not getting CSS with XML

2002-12-03 Thread Cox, Charlie
that should work. Make sure you have it *before* your include and before any
whitespace in your jsp.

Also look in the logs for errors. 

You may want to use AccessLogValve(to log requests) to see if the css is
requested with the wrong path.

Charlie

> -Original Message-
> From: Caton, Paul [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 03, 2002 11:16 AM
> To: Tomcat Users List
> Subject: RE: Not getting CSS with XML
> 
> 
> Charlie,
> 
> A colleague suggested I try adding this to the JSP:
> 
>  response.setContentType("text/html;charset=UTF-8")
> 
> 
> but it made no difference. Is there another way you know of I 
> could try?
> 
> Paul.
> 
> -Original Message-
> From: Cox, Charlie [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, December 03, 2002 10:06 AM
> To: 'Tomcat Users List'
> Subject: RE: Not getting CSS with XML
> 
> 
> are you setting the content type in the jsp?
> 
> Charlie
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail:


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




Re: Filters don't affect request dispatcher forward

2002-12-03 Thread Craig R. McClanahan


On Mon, 2 Dec 2002, Bill Barker wrote:

> Date: Mon, 2 Dec 2002 23:50:08 -0800
> From: Bill Barker <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: Filters don't affect request dispatcher forward
>
>
> "Craig R. McClanahan" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >
> >
> > On 2 Dec 2002, Alexander Wallace wrote:
> >
> > > Date: 02 Dec 2002 18:41:26 -0600
> > > From: Alexander Wallace <[EMAIL PROTECTED]>
> > > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > > To: Tomcat Users List <[EMAIL PROTECTED]>
> > > Subject: Filters don't affect request dispatcher forward
> > >
> > > Hi there. I wrote a filter to ensure that resources that i want accessed
> > > using https are, and the ones that don't need to aren't.
> > >
> > > I found out that filters are only applied if the request came from the
> > > user, by typing the url or using a link, etc. They are not used if the
> > > resource is called using request dispatcher.
> > >
> > > Supposedly this is becouse of a lack of specifications in the servlet
> > > api, but that should be fixed in the api used by tomcat 5.
> > >
> > > Is all this correct?
> >
> > Yes, basically.
> >
> > > Is there a work around while tomcat 5 is released?
> >
> > You can use a security constraint with a  element to
> > require that certain accesses be performed only on SSL connections.  Then,
> > the container will do the necessary redirect for you.
>
> Urm, on my reading of the 2.3 spec, this would be a bug if Tomcat 4.x
> enforces a  on a rd.forward/include.

You're correct ... security constraints (including transport guarantees)
are only applied on the initial request.  I was offering an alternative to
using a filter for this purpose -- let the container do the work for you.

Not to mention that it's not actually possible to switch to SSL in the
middle of an existing HTTP request *without* doing a redirect ...

Craig



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




Tomcat and IIS

2002-12-03 Thread Schultz, Cecilia


Hi,

I installed Tomcat 3.3.1, win2K server with IIS 

I followed the IIS HowTo and did all the additional IIS setup to have IIS redirect 
jsp/servlets to tomcat (started tomcat with jkconf option, generated the 
isapi_redirect.properties files in conf/auto, created Jakarta virtual directory on 
isapi_redirect.dll, restarted tomcat, etc)


I have a simple test1.jsp with content:



<% String thispage="test1.jsp"; %>
this page is <%=thispage %> 




I am able to see a "this page is test1.jsp" when I do:

http://webapps2/examples/test1.jsp

http://webapps2/admin/test2.jsp


but when I try to see it in the web app that I set up (which is not not under 
c:\tomcat\webapps)
I don't get to see the jsp part (I only see "this page is")

http://webapps2/i1440/test1.jsp


"i1440" is a virtual directory that points to a directory path 
F:\i1440root\opt\i1440\webapps\i1440

this directory has a WEB-INF under it, and a web.xml is inside this WEB-INF directory.

At this point, the content of web.xml is very simple:


http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>

   JHU iTrack





also, the content of c:\tomcat\conf\apps-i1440.xml is





  




Why am I doing wrong? why am I not able to see a test1.jsp under my i1440 web app? is 
tehre a restriction in Tomcat that your webapp needs to be under c:\tomcat\webapps  ?


Thanks in advance for your help
Cecilia


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




Re: Tomcat and security manager: unexpected java.security.AccessControlException on sun linux cobalt

2002-12-03 Thread J.P.Jarolim
Hi - thanks for the answer;

I found the following line in the description for java.io.FilePermission
indicating that i could have a serious problem in understanding english
(nosarkasm):

>A pathname that ends with "/-" indicates (recursively) all files and
subdirectories contained in that directory. A pathname consisting of the
special token ">" matches any file.

Is there a difference between "all files and subdirectories" and "any file"?
Nevertheless i'll try every posted solution until tomcat stops ignoring my
settings ;-)

thanks,

J.P.Jarolim

> >...
> >grant codeBase "file:/home/.sites/143/site40/web/-" {
> >  permission SocketPermission "localhost:1024-",
"listen,connect,resolve";
> >  permission java.util.PropertyPermission "*", "read,write";
> >  permission java.io.FilePermission "/home/.sites/143/site40/-",
> >"read,write,delete";
> >
> This is the problem. You need to put the file name, not the path. If
> need to put <> if you want to grant access to all file under
> your context, or test.txt if you only want to be able to read that file.
>
> -- Jeanfrancois



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




Re: query

2002-12-03 Thread Martin Jacobson
faisal shabbir wrote:


Hi,
  I have just implemented ssl on tomcat4.0 by using jsse. Now
on running my application i found that ssl is working on all of the  
pages. Problem is that i want ssl to work on the pages that contains 
sensitive information. How can i turn ON and OFF ssl on jsp pages.


You really don't want to do this! Apart from securing the 'visible' data 
passing between the client and the server, SSL also secures the session 
id. Once a hacker has got the session id, he can masquerade as the 
client. Probably not what you want :-)

HTH,
Martin


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



Re: Filters don't affect request dispatcher forward

2002-12-03 Thread Alexander Wallace
Hey I love that! Thanks, let me try it!

Now, with this solution, I figure i can't fore stuff that doesn't match
the "to be secured" pattern to go over http and not https if it is
requested, right? I still can live with that, but it would sure be
cool..

Thanks!

On Mon, 2002-12-02 at 19:31, Craig R. McClanahan wrote:
> 
> 
> On 2 Dec 2002, Alexander Wallace wrote:
> 
> > Date: 02 Dec 2002 18:41:26 -0600
> > From: Alexander Wallace <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: Tomcat Users List <[EMAIL PROTECTED]>
> > Subject: Filters don't affect request dispatcher forward
> >
> > Hi there. I wrote a filter to ensure that resources that i want accessed
> > using https are, and the ones that don't need to aren't.
> >
> > I found out that filters are only applied if the request came from the
> > user, by typing the url or using a link, etc. They are not used if the
> > resource is called using request dispatcher.
> >
> > Supposedly this is becouse of a lack of specifications in the servlet
> > api, but that should be fixed in the api used by tomcat 5.
> >
> > Is all this correct?
> 
> Yes, basically.
> 
> > Is there a work around while tomcat 5 is released?
> 
> You can use a security constraint with a  element to
> require that certain accesses be performed only on SSL connections.  Then,
> the container will do the necessary redirect for you.
> 
> An example that requires any (context-relative) path starting with "/foo"
> or "/bar" to be done on SSL would look like this:
> 
>   
> 
>   SSL-Only Portion Of This Webapp
>   
>   /foo/*
>   /bar/*
> 
> 
>   CONFIDENTIAL
> 
>   
> 
> Note that, because there is no , login will not be
> required -- only execution over SSL will be required, and only for URLs in
> the named "subdirectories".  All other accesses to the webapp will be
> allowed over either SSL or non-SSL requests.
> 
> >
> > Also, does someone have or knows of a proven filter that redirects to
> > http or https? Mine seesm to work ok, but i want to make sure I'm not
> > missing something.
> >
> 
> With the above security constraint, you won't need a filter at all :-).
> 
> > Thanks in advance!
> >
> 
> Craig
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 



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




RE: Not getting CSS with XML

2002-12-03 Thread Caton, Paul
Charlie,

A colleague suggested I try adding this to the JSP:

 response.setContentType("text/html;charset=UTF-8")


but it made no difference. Is there another way you know of I could try?

Paul.

-Original Message-
From: Cox, Charlie [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, December 03, 2002 10:06 AM
To: 'Tomcat Users List'
Subject: RE: Not getting CSS with XML


are you setting the content type in the jsp?

Charlie

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




Re: Tomcat and security manager: unexpected java.security.AccessControlExceptionon sun linux cobalt

2002-12-03 Thread Jeanfrancois Arcand


J.P.Jarolim wrote:


Hi!

I've been working on this since beginnig last week together with a friend
and can't find a clue:

My friend owns a sun cobalt with linux, apache and tomcat.
The system seems to be ready to use for providers - there is a config
utility
to add new user sites with a lot of options (like: user gets mysql, pop3,
tomcat, or whatever)

After creating a site with jsp, we deployed a jsp-testsuite which tests the
given infrastructure:
reading files, instancing classes, trying a db-query on mysql and so on
(Which works fine on
our local system). But every time we try to execute the testsuite we get one
of these SecurityExceptions:

java.security.AccessControlException: access denied (java.io.FilePermission
/home/.sites/143/site40/web/test.txt read)
(Test.txt is the file we want to read in the first part of our testsuite:
File permissions 777)

We looked into the tomcat docs how to setup the security manager correctly
and looked into the tomcat.policy file
in the {tomcat.home}/conf dir just to see that everything was set correctly
(for us) from the site management utility:

...
grant codeBase "file:/home/.sites/143/site40/web/-" {
 permission SocketPermission "localhost:1024-", "listen,connect,resolve";
 permission java.util.PropertyPermission "*", "read,write";
 permission java.io.FilePermission "/home/.sites/143/site40/-",
"read,write,delete";


This is the problem. You need to put the file name, not the path. If 
need to put <> if you want to grant access to all file under 
your context, or test.txt if you only want to be able to read that file.

-- Jeanfrancois



 permission java.lang.RuntimePermission "accessClassInPackage.sun.io";
};
...

Tomcat seems to run secure with the right file (as seen under ps -Af) but
seems to ignore all grants for the user sites:

...
java -Djava.security.manager -Djava.security.policy==/usr/java/jakarta-tomca
t/conf/tomcat.policy -Dtomcat.home=/usr/java/jakarta-tomcat
org.apache.tomcat.startup.Tomcat

Some users on groups.google mentioned, that the codeBase should be the same
as the docBase in the server.xml:
...
 
 
 

...

but this looks correct to me too. We even tried to give my site all
permissions:

grant codeBase "file:/home/.sites/143/site40/web/-" {
   permission java.security.AllPermission;
};

But that is ignored too. The testsuite is neither able to open a file nor
just to read the length.
We have the same problems when instancing a class which tries to dynamically
instance another class. Like:

myDriver = (Driver)Class.forName(DriverName).newInstance();  // This is a
part of opening a connection to the mysql-db

To get that straight: Everything runs fine without security manager - But
who wants to run a root-tomcat without a security manager ;-)
Could anyone give me a clue where we could look at? After one week of
googling we're somehow out of ideas...

thanks in advance,

mfG,

J.P.Jarolim, ADWERBA
-
ADWERBA, Gesellschaft für Verkaufsförderung und Werbung
A-5020 Salzburg - Schallmooser Hauptstraße 85 A
Telefon: +43(0)662 643125, 643126 - Telefax: +43(0)662 643128
ISDN: +43(0)662 648058 - Email: [EMAIL PROTECTED] - ICQ 44284507
-



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


 



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




Re: help! authentication problem

2002-12-03 Thread Nathan Pitts
thanks a bunch, craigyou got me pointed in the right direction!  
working fine, now

--nathan




On Monday, December 2, 2002, at 07:39 PM, Craig R. McClanahan wrote:

See below.

On Mon, 2 Dec 2002, Nathan Pitts wrote:


Date: Mon, 2 Dec 2002 19:08:42 -0600
From: Nathan Pitts <[EMAIL PROTECTED]>
Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: help!  authentication problem

I have a problem that hopefully someone has seen before -- please help
if you can.  I am trying to get Tomcat to do declarative
authentication/auth. using a JDBCRealm (via a Sybase database).  I am
using Sybase's Jconnect5.5 driver.  It seems like I have followed the
instructions to configure this, but the authentication fails and there
is an exception in my app's logfile that says the following:

2002-12-02 18:52:09 Authenticator[/hris]: Security checking request  
GET
/hris/index.html
2002-12-02 18:52:09 Authenticator[/hris]:   Checking constraint
'SecurityConstraint[TAHCStaff]' against GET /index.html --> true
2002-12-02 18:52:09 Authenticator[/hris]:  Subject to constraint
SecurityConstraint[TAHCStaff]
2002-12-02 18:52:09 Authenticator[/hris]:  Calling checkUserData()
2002-12-02 18:52:09 Authenticator[/hris]:   User data constraint has  
no
restrictions
2002-12-02 18:52:09 Authenticator[/hris]:  Calling authenticate()
2002-12-02 18:52:09 JDBCRealm[/hris]: Username jpitts successfully
authenticated
2002-12-02 18:52:09 JDBCRealm[/hris]: Exception performing
authentication
com.sybase.jdbc2.jdbc.SybSQLException: Invalid column name 'username'.

	at com.sybase.jdbc2.tds.Tds.processEed(Tds.java:2535)
	at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:1916)
	at  
com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69)
	at  
com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:201)
	at  
com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:182)
	at  
com.sybase.jdbc2.jdbc.SybStatement.queryLoop(SybStatement.java:1455)
	at
com.sybase.jdbc2.jdbc.SybStatement.executeQuery(SybStatement.java:1440 
)
	at
com.sybase.jdbc2.jdbc.SybPreparedStatement.executeQuery(SybPreparedSta 
te
ment.java:70)
	at  
org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:476)
	at  
org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:394)
	at
org.apache.catalina.authenticator.BasicAuthenticator.authenticate(Basi 
cA
uthenticator.java:161)

The column is called 'username' in the database, however.  The
following clips of the server.xml file and web.xml file may give some
insight???


Is this column called "username" in *both* the "users" and "roles"  
tables?
The particular query that broke (at line 476 of JDBCRealm) is trying
to read from the roles table, while it appears from the log that
authenticating the user was successful (meaning the users table is
probably ok).

Server.xml


cachingAllowed="false"
charsetMapperClass="org.apache.catalina.util.CharsetMapper"
cookies="true" crossContext="false" debug="99" displayName="Welcome to
HRIS" docBase="/usr/local/tomcat/webapps/hris"
mapperClass="org.apache.catalina.core.StandardContextMapper"
path="/hris" privileged="false" reloadable="true"  
swallowOutput="false"
useNaming="true"
wrapperClass="org.apache.catalina.core.StandardWrapper">
   
connectionName="theuser"
		connectionPassword="thepw"
connectionURL="jdbc:sybase:Tds:192.108.17.13:4100/users"
		debug="99" driverName="com.sybase.jdbc2.jdbc.SybDriver"
		userTable="users" userNameCol="username" userCredCol="password"
		userRoleTable="roles" roleNameCol="arole"/>

	
directory="logs" prefix="hris_log."
		suffix=".txt" timestamp="true" verbosity="99"/>
 


Web.xml

	
		Web App Access Control -- TAHC Staff
		
			TAHCStaff
			/index.html
		
		
			tahcstaff
		
		
			NONE
		
	


	
		BASIC
		JDBCRealm

Although this element (confusingly) refers to a "realm", it's only used
when you are using BASIC authentication -- this value shows up in the
pop-up dialog that the browser shows for you.  You can make it say
whatever you want.


		
			/login.html
			/login-error.html
		


You don't need these if you're using BASIC authentication.


	

	
		Regular TAHC users
		tahcstaff
	



Craig


--
To unsubscribe, e-mail:

For additional commands, e-mail:  






=
Nathan Pitts
Programmer Analyst
Texas Animal Health Commission
=


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




RE: VIRTUAL HOST CONFIGURATION

2002-12-03 Thread Turner, John

http://www.codesta.com/knowledge/technical/tomcat_warp_apache/index.jsp

FYI - WARP is deprecated, or at least no longer actively developed.  If you
want to be guaranteed support in the future, you might want to consider
moving to JK/JK2.

John

> -Original Message-
> From: karthikeyan.balasubramanian
> [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 03, 2002 10:57 PM
> To: Tomcat Users List
> Subject: VIRTUAL HOST CONFIGURATION
> 
> 
> Hi All,
> 
>   I have sucessfully integarated Apache with Tomcat using 
> WarpConnecter.  But how do i go about from here to implement 
> lots of Virtual Host for our clients.  I  need to setup 
> atleast 5 virtual hosts.  I couldnt actually figure a way to 
> host 5 real domains with JSP and Servlet support.  
> 
>   What are all the changes I need to do in the Httpd.conf and 
> Server.xml.  I dont want to keep users folder under 
> TOMCATHOME/Webapps/UserContext it will be under 
> /usr/home/users-home-directory.
> 
>   Can anybody help me out on this.  If somebody out here who 
> have hosted some real domains rather then localhost thing 
> please advice.
> 
>   Looking forward for yours response.
> 
> karthikeyan.
> 

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




Re: Access denied... to /tmp !?

2002-12-03 Thread Jeanfrancois Arcand


Simon Brooke wrote:


On Monday 02 Dec 2002 5:01 pm, Jeanfrancois Arcand wrote:
 

That's the proper behaviour. By default, a web application is only able
to read under the context under which it was deployed. If you want to
grant access to the /tmp !*be carefull*!, add the following in your
catalina.policy file:

grant codeBase "file:${catalina.home}/webapps/<>/-" {
   permission java.io.FilePermission "/tmp", "read";
};
   


OK, this raises another issue. The problem arose because my servlet makes use 
of the maybeupload package http://www.weft.co.uk/library/maybeupload/ >
which I wrote and maintain, but which is also used in a number of other 
people's code including Cocoon 2, so it's moderately important that it 
doesn't do stupid things.

MaybeUploadServlet checks in it's init method that it's upload directory 
exists and is writable:

	uploadDir = new File( uploadDirPath);

	if ( ! uploadDir.isDirectory() || ! uploadDir.canWrite())
	throw new 
		UnavailableException( "Cannot write to upload directory " + 
  uploadDirPath);

UploadDirPath is a runtime configurable parameter, expected to be picked up 
from the web.xml:

	uploadDirPath = getStringParameterValue( "upload_dir_path", config, 
		 uploadDirPath);

However, if no value is specified in the web.xml, then currently the 
hard-coded default is /tmp; the thinking being this is it's usually a safe 
place to write stuff.

Clearly, though, as you point out, this is the wrong thing to do. The obvious 
solution is to alter MaybeUploadServlet so that if no upload_dir_path is 
specified in the web.xml, to switch off the upload facility altogether, 
possibly appending a warning to the log. However I don't know who else's code 
this will hurt (and, indeed, it's interesting that I haven't had anyone else 
report this to me as a bug).

Because they probably runs Tomcat without the security manager, so they 
can read/write from any context :-)


Could anyone suggest a means of getting a 'safe' directory path for 
UploadDirPath to default to, or should I go for the 'switch off' behaviour?

Have you try the solution proposed by Yoav? This is probably the best 
solution if you want a "tmp" directory for each web-app. If  you only 
want 1 directory, then the /tmp is fine (but works only on Unix).

-- Jeanfrancois



Cheers

Simon

 



RE: How to connect to a Data-File above the WEB-INF-Folder from a servlet????

2002-12-03 Thread Shapira, Yoav
Howdy,

You want to be careful when running executables from your servlet (and
from a web server in general).  You're opening up security holes there.

>From your servlet, assuming the file is at "/home/myname/myprogram":

String execPath = "/home/myname/myprogram";
Runtime runtime = Runtime.getRuntime();
Process myProcess = runtime.exec(execPath);

// Wait for process to complete
p.waitFor();

Your executable needs to handle the case where it is concurrently
invoked by multiple servlets.  Alternatively, you could write a
singleton that coordinates access from your servlets to the executable.
The singleton would then do the above, and the servlets would just do
stuff like
ExecutableSingleton.getInstance().runProgram();

This is not really a tomcat question.  See the JavaDocs for the Runtime
and Process classes for more information.

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Patrick Kosiol [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, December 03, 2002 10:26 AM
>To: Tomcat Users List
>Subject: Re: How to connect to a Data-File above the WEB-INF-Folder
from a
>servlet
>
>Howdy ;-)
>
>thx 4 ur help, this it is what I wanted.
>
>But there is also another Question. I have a ".exe-file" that I want to
>start out of the servlet. Of course with some paramteters and one of my
>data-files as one of the parameters. Is that possible? And how do I do
>that?
>If that works and the .exe-file is accessing my data-file and another
>instance of the servlet does the same the tomcat can be crash or the
>servlet or so. How do I handle that?

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




VIRTUAL HOST CONFIGURATION

2002-12-03 Thread karthikeyan.balasubramanian
Hi All,

  I have sucessfully integarated Apache with Tomcat using WarpConnecter.  But how do i 
go about from here to implement lots of Virtual Host for our clients.  I  need to 
setup atleast 5 virtual hosts.  I couldnt actually figure a way to host 5 real domains 
with JSP and Servlet support.  

  What are all the changes I need to do in the Httpd.conf and Server.xml.  I dont want 
to keep users folder under 
TOMCATHOME/Webapps/UserContext it will be under /usr/home/users-home-directory.

  Can anybody help me out on this.  If somebody out here who have hosted some real 
domains rather then localhost thing 
please advice.

  Looking forward for yours response.

karthikeyan.



Re: How to connect to a Data-File above the WEB-INF-Folder from aservlet????

2002-12-03 Thread Patrick Kosiol
Howdy ;-)

thx 4 ur help, this it is what I wanted.

But there is also another Question. I have a ".exe-file" that I want to 
start out of the servlet. Of course with some paramteters and one of my 
data-files as one of the parameters. Is that possible? And how do I do 
that?
If that works and the .exe-file is accessing my data-file and another 
instance of the servlet does the same the tomcat can be crash or the 
servlet or so. How do I handle that?

Patrick

Shapira, Yoav wrote:

Howdy,

 

How do I connect to a Data-File above the WEB-INF-Folder from a
   

servlet
 

For example my class is placed in
$CATALINA_HOME/webapps/ROOT/WEB-INF/classes/myApp/server/servlet.class
and my data-files are placed in $CATALINA_HOME/webapps/data/data.dat or
so. Is this possible or does anybody know a better way to place my
data-files? And how do I connect to them?
   


Data files belonging to or referenced by your webapp should be under
your webapp's structure (or within your webapps .war file).  So if your
app is in the ROOT context, your data files should be in
$CATALINA_HOME/webapps/ROOT/data/data.dat.

Then, from your servlets, you could do:

InputStream is =
getServletContext().getResourceAsStream("/data/data.dat");
(and do whatever you need with the input stream, e.g. read it)
or
URL fileUrl = getServletContext().getResource("/data/data.dat");
To just get the URL for the file.  Don't assume this is a file:// or an
http:// URL.  It may be a jndi:/localhost/... type of URL as well.

You could also use 
String filePath = getServletContext().getRealPath("/data/data.dat");
approach, but that won't work if you're deploying out of a .war file.

Finally, if for some reason you cannot place your data files under your
own context, you can set a data file directory as a context parameter in
your web.xml.  For example:

 dataFileDirectory
 /home/myname/mydatafiles


Then in your servlets, you could do:
String dataFileDirectory =
getServletContext().getInitParameter("dataFileDirectory");

String filePath = dataFileDirectory + File.separator + "data.dat";
And go from there.

I hope you find this helpful,

Yoav Shapira
Millennium ChemInformatics

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


 



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




cloudscape datasource

2002-12-03 Thread work
hi,

I am trying very hard to get a clouscape datasource up and running using
tomcat 4.0.6.

Ive put the jars into common lib
have added the server.xml context elements.
have the web.xml res elements
but get Namingexception cannot create resource instance.
This is using good code.
I can get a manual connection ie Class.forName.
DB is running as I can select using this manual method.
Any ideas or experience would really help me sleep as this is personal now.

Mike

Head of Operations AsiaPac
elata
Level 30
6 Battery Road
Singapore
049909
Office : +65 65509723
Mobile : +65 91117814
Fax: +65 65509725
[EMAIL PROTECTED]
http://www.elata.com

This e-mail is intended solely for the above mentioned recipient(s) and it
may contain confidential information.  If you have received this e-mail in
error, please notify us immediately and delete the e-mail from your system.
Copying, distribution or other use of the information contained in this
e-mail is strictly prohibited.  Nothing in this e-mail amounts to a
contractual commitment, or is otherwise legally binding on elata unless
confirmed by an authorised representative independently of this e-mail.
Registered in England, number 1961405




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




  1   2   >