Re: Virtual Hosting with WAR files

2005-08-16 Thread Darryl L. Miles


in $CATALINA_BASE/conf/server.xml merge these settings:




 foo.com




 




 




 




Ensure the 3 sets of "webapps" and "work" directories are writable by 
the userid your JVM is running as.



Mahesh S Kudva wrote:

I have setup Tomcat+Apache2+mod_jk. I have 3 application in war files 
namely flie1.war, file2.war and file3.war. To deploy, I just put them in 
the deploy folder and access then using the urls:

http://foo.com/file1
http://foo.com/file2
http://foo.com/file3
This works perfectly for me. I want to change this to simple urls as 
follows:

http://file1.foo.com
http://file2.foo.com
http://file3.foo.com

I have also read the notes on Virtual hosting: 
http://jakarta.apache.org/tomcat/connectors-doc-

archive/jk2/jk2/vhosthowto.html

Even though I am not able to configure Tomcat to connect to the war files 
as requested. How do I configure tomcat to connect to the correct war 
file as requested?


Any help will be appreciated.



--
Darryl L. Miles



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



Re: session problems: www.blahblah.com versus blahblah.com

2005-08-16 Thread Peter Rossbach

Hey Michael,

I look inside the tomcat source and find that we don't set the cookie 
hostname attribute.
That means that the calling client/browser must made the hostname 
handling. I also

thing the redirect way is currently right direction.

Peter

Paul Singleton schrieb:


Michael Teter wrote:


If my users come to "blahblah.com", then go away, then return, they
get a new session id (for www.blahblah.com).

But if they come to www.blahblah.com, leave, and return (via link from
external site), they keep the same session.

I finally discovered that the browser (Firefox in this case) ends up
with two different session cookies - one for www.blahblah.com and one
for blahblah.com.



this behaviour seems reasonable to me...


What's the right thing to do to solve this?



it doesn't need solving, just accepting :-)

but assuming you want www.blahblah.com and blahblah.com
to behave (session-wise) like one domain, which they aren't,
you could redirect (client-side) from www.blahblah.com
(which IMHO is the redundant/obsolete/legacy domain) to
blahblah.com, which allocates sessions and dishes out cookies.

i.e. www.blahblah.com is a static site which just serves e.g.


  
<%= a.appTitle %>: redirection page
http://blahblah.com"; />
  
  http://blahblah.com')">

  


NB I haven't actually *tried* this :-)

Paul Singleton







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



Re: Apache/Tomcat integration - What am I doing wrong?

2005-08-16 Thread Darryl L. Miles

Kyle wrote:

I have Apache serving multiple VHosts. I want to (eventually) 
integrate different versions of Tomcat into different VHosts, but for 
now, I'd settle for just 5.5.9 working with my default Apache VHost.


Apache works dandy alone on :80.
Tomcat works just fine on :8080.

I have the jsp-examples and servlets-examples pages displaying from 
host.domain.com/..


But I have not yet managed to get 
www.host.domain.com/-examples/ to work 
without returning a 500 Error.


First is it apache or tomcat that is returning the 500 ?

This might be easiest found setting up logging of your specific VHost in 
apache to a different file than the default apache logs (that are in 
apache/logs/).  Then breaking the ServerName and ServerAlias 
configuration in apache (restarting apache inbetween) and checking to 
see that the request you put through with say "wget" is being directed 
by apache to the correct Apache VHost logfile.


I would revise your JkMount to look like:

JkMount  /admin/*  ajp13Wkr

This will pass-thru apache everything for the webapp to TC.


I would also remove "inprocess" from the "worker.list" settings.



Once you have that established you can then work on your JkMount 
settings and Tomcat.  Have you checked out, understood and implement the 
information in 
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/host.html#Host+Name+Aliases 
?



I suspect your only remaining problem now is to get Apache and Tomcat to 
see the same website document roots for the same URLs.  This maybe a 
problem if you are using deployed WARs since tomcat can and will delete 
the directory from under apache during the deployment process.






Likewise, I am unable to get the host.domain.com/admin, 
host.domain.com/manager/html or host.domain.com/manager/status to 
display over :80


Various errors I am seeing are;

"File does not exist /opt/www/root/jsp-examples/"
"File does not exist /opt/www/root/admin"

or

/admin just displays the index.

Files look like this;



httpd.conf
==

ServerName host.domain.com:80
UseCanonicalName Off
DocumentRoot /opt/www/root
..
..


ServerAdmin [EMAIL PROTECTED]
ServerName host.domain.com
ErrorLog logs/host-defaulthost-error_log
CustomLog logs/host-defaulthost-access_log common

Include /opt/jakarta-tomcat-5.5.9/conf/auto/mod_jk.conf-hostname


--

server.xml
==

.

   



autoDeploy="true"

   xmlValidation="false" xmlNamespaceAware="false">

localhost



modJk="/opt/httpd/modules/mod_jk.so"
   
workersConfig="/opt/jakarta-tomcat-5.5.9/conf/workers.properties" 
forwardAll="false"
   jkLog="/var/log/httpd/mod_jk.log" jkDebug="info" 
jkWorker="ajp13Wkr"/>




  


-- 



workers.properties
==

workers.tomcat_home=/opt/jakarta-tomcat-5.5.9
#workers.tomcat_home=/opt/tomcat

workers.java_home=/opt/java

ps=/

# The workers that your plugins should create and work with
#
worker.list=ajp13Wkr, inprocess

worker.ajp13Wkr.port=8009
worker.ajp13Wkr.host=host.domain.com
worker.ajp13Wkr.type=ajp13
worker.ajp13Wkr.lbfactor=1
worker.ajp13Wkr.cachesize=30

worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=ajp13Wkr

worker.inprocess.type=jni
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar
worker.inprocess.cmd_line=start
worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)lib$(ps)i386$(ps)client$(ps)libjvm.so 

worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout 

worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr 


worker.inprocess.sysprops=tomcat.home=$(workers.tomcat_home)
-


and the included file in the httpd.conf VHost above

mod-jk.conf-hostname


JkWorkersFile "/opt/jakarta-tomcat-5.5.9/conf/workers.properties"
JkLogFile "/var/log/httpd/mod_jk.log"
JkLogLevel debug
JkLogStampFormat "[%a %d %b %Y %H:%M:%S] "
JkOptions +ForwardKeySize +ForwardURICompat +ForwardDirectories
JkRequestLogFormat "%w %V %T"

# Static files
Alias /admin "/opt/jakarta-tomcat-5.5.9/server/webapps/admin"


Options Indexes FollowSymLinks
DirectoryIndex index.jsp index.html index.htm
Order allow,deny
Allow from All



# Deny direct access to WEB-INF and META-INF
#

AllowOverride None
deny from all



AllowOverride None
deny from all


JkMount /admin/j_security_check  ajp13Wkr
JkMount /admin/index.jsp  ajp13Wkr
JkMount /admin/host/hosts.jsp  ajp13Wkr
JkMount /admin/saved.jsp  ajp13Wkr
JkMount /admin/server/server.jsp  ajp13Wkr
JkMount /admin/resources/dataSource.jsp  ajp13Wkr

..

Re: Apache/Tomcat integration - What am I doing wrong?

2005-08-16 Thread Kyle

Darryl,

thanks the reply.

Responses inline

Darryl L. Miles wrote:

Kyle wrote:

I have Apache serving multiple VHosts. I want to (eventually) 
integrate different versions of Tomcat into different VHosts, but for 
now, I'd settle for just 5.5.9 working with my default Apache VHost.


Apache works dandy alone on :80.
Tomcat works just fine on :8080.

I have the jsp-examples and servlets-examples pages displaying from 
host.domain.com/..


But I have not yet managed to get 
www.host.domain.com/-examples/ to work 
without returning a 500 Error.



First is it apache or tomcat that is returning the 500 ?


I'll leave the 500 question till I can be certain of the answer. I 
thought it could only be Apache. Will however ensure now.


Then breaking the ServerName and ServerAlias 
configuration in apache (restarting apache inbetween) 


Not certain I understand what you mean here. Break them ... ?? Do you 
simply mean give the default VHost a diff. name to the general 
ServerName directive above?




I would revise your JkMount to look like:

JkMount  /admin/*  ajp13Wkr

This will pass-thru apache everything for the webapp to TC.


The multiple jkMount Directives are auto-generated by Tomcat. I could 
revise. I just thought it best to just leave them. I suspect they are so 
that IF I were to put any static content in those directories, Apache 
would pick it up instead.




Once you have that established you can then work on your JkMount 
settings and Tomcat.  Have you checked out, understood and implement the 
information in 
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/host.html#Host+Name+Aliases 
?

Interesting question. Read it, I have.

It is not however clear to me as to whether or not TC _MUST_ have a 
_Different_ "VirtualHost Name" than the default VHost name in Apache or 
whether it should be the same. And then whether or not an Alias can or 
cannot be the same as some other name for that same machine.


Does this mean effectively there should be 3 different names for the 
same machine to function in this manner? I.e.

The "ServerName" directive in httpd.conf
The "ServerName" for the default VHost AND
yet ANother different defaultHost/Host name for Tomcat

I suspect your only remaining problem now is to get Apache and Tomcat to 
see the same website document roots for the same URLs.  This maybe a 
problem if you are using deployed WARs since tomcat can and will delete 
the directory from under apache during the deployment process.


So far, I am only trying to view the examples and default admin app.s 
that come bundled with TC. If I understand you correctly here, you are 
effectively saying that the auto-conf file generated by TC is not up to 
the job and I should dump it in favour of manual inline config.


MTiA

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



RE: 64 Bit Machines and Tomcat

2005-08-16 Thread Peter Crowther
> From: J R [mailto:[EMAIL PROTECTED] 
> Are there 64 bit counterparts?  If not, would the 32
> bit ones definitely work?

Assuming you have a Java virtual machine that runs on your system, the
Tomcat Java classes will run unchanged.  The 'virtual' in 'virtual
machine' means that compiled Java classes are insulated from the details
of the underlying machine - Tomcat runs unchanged on Windows, MacOS*,
and many flavours of UNIX.

For further reading, check out 'application virtual machine' at
http://en.wikipedia.org/wiki/Virtual_machine and
http://en.wikipedia.org/wiki/Java_virtual_machine

- Peter

* Although Tomcat 5.5 is a bit awkward until Sun release a Java 1.5
virtual machine for Mac.

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



Re: Apache/Tomcat integration - What am I doing wrong?

2005-08-16 Thread Darryl L. Miles

Kyle wrote:



But I have not yet managed to get 
www.host.domain.com/-examples/ to work 
without returning a 500 Error.




First is it apache or tomcat that is returning the 500 ?



I'll leave the 500 question till I can be certain of the answer. I 
thought it could only be Apache. Will however ensure now.


Then breaking the ServerName and ServerAlias configuration in apache 
(restarting apache inbetween) 



Not certain I understand what you mean here. Break them ... ?? Do you 
simply mean give the default VHost a diff. name to the general 
ServerName directive above?



I mean when you are stuck and don't know.  Somethings are easier to 
deliberatly break the configuration and observe the result (i.e. where 
the error shows up now).   Since you are trying to work out if the 500 
is being produced directly from Apache or is a response apache is just 
relaying that really came from Tomcat.  It smells like apache to me, but 
until you can prove it you wont really know.


You need to confirm that requests for the vhost are being correctly 
routed into the VirtualHost section of the apache config.  If they are 
not then there is no sense looking at the JkMount configuration yet.  So 
if you have logging setup in apache both in the global config 
/usr/local/apache/log/access_log and in the  section to 
/tmp/foobar/someother/file/access_log then depending upon which file the 
request gets logged will confirm to you that Apache is correctly 
configured and working for vhost operation and the  
section your JkMount's are in it indeed coming into play.




JkMount  /admin/*  ajp13Wkr

This will pass-thru apache everything for the webapp to TC.


I would revise your JkMount to look like:

The multiple jkMount Directives are auto-generated by Tomcat. I could 
revise. I just thought it best to just leave them. I suspect they are 
so that IF I were to put any static content in those directories, 
Apache would pick it up instead.


Yes.  But in the situation you are in, setting up "/admin/*" should make 
Apache bounce the request off Tomcat if it was not table to serve the 
content itself.  I am not at all sure what the order of preceedence is 
with mixing "Alias", "JkMount" or if the file itself it found in the 
document root.


Once you have that established you can then work on your JkMount 
settings and Tomcat.  Have you checked out, understood and implement 
the information in 
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/host.html#Host+Name+Aliases 
?


Interesting question. Read it, I have.

It is not however clear to me as to whether or not TC _MUST_ have a 
_Different_ "VirtualHost Name" than the default VHost name in Apache 
or whether it should be the same. And then whether or not an Alias can 
or cannot be the same as some other name for that same machine.


Does this mean effectively there should be 3 different names for the 
same machine to function in this manner? I.e.

The "ServerName" directive in httpd.conf
The "ServerName" for the default VHost AND
yet ANother different defaultHost/Host name for Tomcat

Different No.  The idea is that you can service some content via Apache 
directly (maybe this is also PHP or Perl) and other content via 
Apache+Tomcat.  Apache is always in control, if the request is not 
forwarded to Tomcat then you will see the usual Apache like responses (404).


So if you want to a single hostname in the URL then you need to 
configure both Apache (ServerName/ServerAlias) and Tomcat ( / 
) to responsd to the same hostname.



I suspect your only remaining problem now is to get Apache and Tomcat 
to see the same website document roots for the same URLs.  This maybe 
a problem if you are using deployed WARs since tomcat can and will 
delete the directory from under apache during the deployment process.


So far, I am only trying to view the examples and default admin app.s 
that come bundled with TC. If I understand you correctly here, you are 
effectively saying that the auto-conf file generated by TC is not up 
to the job and I should dump it in favour of manual inline config.


No...  I'm not saying that I have no idea your Apache configuration was 
auto-generated by TC.  I'm just offering you a methodoligy to observe 
some change in behaviour so you can work through the problem yourself.




--
Darryl L. Miles



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



Tomcat5 / war file deployment: symlink problem

2005-08-16 Thread Alan Cooper
I have a tomcat5 installation running on a RHEL ES3 box which I am 
having some issues with.


I have a symlink back to an images directory which is outside the 
context. This works fine and I can read the images etc.


The problem occurs when I redeploy the context through the manager 
webapp: when the context is removed. the removal script seems to follow 
the symlinks, thus deleting my images directory.


Any suggestions on how to avoid this?
--

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed.  
If you have received this email in error please notify the sender. Any 
offers or quotation of service are subject to formal specification.  
Errors and omissions excepted.  Please note that any views or opinions 
presented in this email are solely those of the author and do not 
necessarily represent those of Lumison, nplusone or lightershade ltd.  
Finally, the recipient should check this email and any attachments for the 
presence of viruses.  Lumison, nplusone and lightershade ltd accepts no 
liability for any damage caused by any virus transmitted by this email.


--
--
Virus scanned by Lumison.

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



How can i change the http 500 error page

2005-08-16 Thread Ebru KAYA
Can anyone help me how can i change the error page http1.1 500 on tomcat
?
 
 
 
Ebru KAYA
 


Re: How can i change the http 500 error page

2005-08-16 Thread Jost Richstein


 503
 /errors/503.html


in web.xml

Ebru KAYA wrote:


Can anyone help me how can i change the error page http1.1 500 on tomcat
?
 
 
 
Ebru KAYA
 





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



{Virus} Status

2005-08-16 Thread tomcat-user
Warning: This message has had one or more attachments removed
Warning: (file.scr).
Warning: Please read the "DiE-Attachment-Warning.txt" attachment(s) for more 
information.

test

This is a message from the MailScanner E-Mail Virus Protection Service
--
The original e-mail attachment "file.scr"
was believed to be dangerous and/or infected by a virus and has been
replaced by this warning message.

Due to limitations placed on us by the Regulation of Investigatory Powers
Act 2000, we were unable to keep a copy of the infected attachment. Please
ask the sender of the message to disinfect their original version and send
you a clean copy.

At Tue Aug 16 13:36:14 2005 the scanner said:
   ClamAV: file.scr contains Worm.Mytob.C 
   MailScanner: Windows Screensavers are often used to hide viruses (file.scr)
   No programs allowed (file.scr)

-- 
Postmaster
Devlet Istatistik Enstutusu
www.die.gov.tr

MailScanner thanks transtec Computers for their support

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

Re: How can i change the http 500 error page

2005-08-16 Thread pacea
Just remember to add it after the  tag.

> 
>   503
>   /errors/503.html
> 
> 
> in web.xml
> 
> Ebru KAYA wrote:
> 
> > Can anyone help me how can i change the error page http1.1 500 on tomcat
> > ?
> >  
> >  
> >  
> > Ebru KAYA


> 
>   503
>   /errors/503.html
> 
> 
> in web.xml
> 
> Ebru KAYA wrote:
> 
> > Can anyone help me how can i change the error page http1.1 500 on tomcat
> > ?
> >  
> >  
> >  
> > Ebru KAYA
> >  
> > 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

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



AW: JspC compile exception in tomcat-deployer 5.5.10

2005-08-16 Thread Bernhard Slominski
Hi Richard,

the problem is that your classpath for the jasper path is not correct.
So this Null Pointer exception actually means that some class was not found.
Note that you need all the tomcat libraries in your jaser classpath, as well
as your libs as well.
I post you my script, which is working Ok (on Tomcat 5.5.7).

Cheers

Bernhard


 
 
 
 
 
   
 
 
 
 
 
  
 



 

-Ursprüngliche Nachricht-
Von: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 15. August 2005 23:58
An: tomcat-user@jakarta.apache.org
Betreff: JspC compile exception in tomcat-deployer 5.5.10


Hello,

I am using the jakarta-tomcat-5.5.10-deployer to deploy my customized war
file to tomcat. When I have it do the "compile" target so it pre-compiles
the JSP's I get the exception below (its sort of long). I've got the source
and can see that it is happening as it processes the JSPs. But it gives no
clue as to which JSP is causing the problem.

Is there a way to turn on a trace that would list each file as it is
processed? I've also looked in the output directory - but there are not
class files at all. And the generated_web.xml is completely empty at this
point.

Here is how I've got the jasper2 task defined in my build.xml:
 

Notice that I turned validateXml to false - otherwise I get the following
message:
[jasper2] org.xml.sax.SAXParseException: Document is invalid: no grammar
found.
I have compared and compared my web.xml to the spec and it seems to be OK.
It complains about position 9 in the 3rd line. Line 3 follows, position 9 is
the start of the "xmlns=" attribute:
http://java.sun.com/xml/ns/j2ee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
version="2.4">
... which appears to be fine.

Any ideas or help is appreciated. I have tried this a few months back in
5.5.7 but got the same results (worked fine in 5.0.19). I imagine its a
problem either in one of my JSPs or in the web.xml - but cannot figure it
out.

Thanks in advance for any ideas.

 - Richard


Exception from running "ant compile":

Loaded from C:\jakarta-tomcat-5.5.10-deployer\lib\jasper-compiler.jar
org/apache/jasper/compiler/AntCompiler.class
Class org.apache.jasper.compiler.AntCompiler loaded from ant loader
(parentFirst)
Class org.apache.tools.ant.BuildListener loaded from parent loader
(parentFirst)
Couldn't load Resource commons-logging.properties
Couldn't load Resource
META-INF/services/org.apache.commons.logging.LogFactory
Finding class org.apache.log4j.Logger
Finding class org.apache.log4j.Category
Finding class org.apache.log4j.spi.AppenderAttachable
Finding class org.apache.commons.logging.impl.Log4JLogger
Loaded from C:\jakarta-tomcat-5.5.10-deployer\lib\commons-logging.jar
org/apache/commons/logging/impl/Log4JLogger.class
Class org.apache.commons.logging.impl.Log4JLogger loaded from ant loader
(parentFirst)
Finding class org.apache.log4j.Category
Finding class org.apache.log4j.Category
  [jasper2] java.lang.NullPointerException
  [jasper2] at
org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext
.java:220)
  [jasper2] at org.apache.jasper.JspC.processFile(JspC.java:913)
  [jasper2] at org.apache.jasper.JspC.execute(JspC.java:1061)
  [jasper2] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
  [jasper2] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
  [jasper2] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
  [jasper2] at java.lang.reflect.Method.invoke(Method.java:585)
  [jasper2] at
org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:123)
  [jasper2] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
  [jasper2] at org.apache.tools.ant.Task.perform(Task.java:364)
  [jasper2] at org.apache.tools.ant.Target.execute(Target.java:341)
  [jasper2] at org.apache.tools.ant.Target.performTasks(Target.java:369)
  [jasper2] at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
  [jasper2] at
org.apache.tools.ant.Project.executeTarget(Project.java:1185)
  [jasper2] at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.j
ava:40)
  [jasper2] at
org.apache.tools.ant.Project.executeTargets(Project.java:1068)
  [jasper2] at org.apache.tools.ant.Main.runBuild(Main.java:668)
  [jasper2] at org.apache.tools.ant.Main.startAnt(Main.java:187)
  [jasper2] at
org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
  [jasper2] at
org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
  [ja

Re: 64 Bit Machines and Tomcat

2005-08-16 Thread Ben Ricker
The one caveat I have seen is when you use third-party software that
is compiled; chances are it was compiled with 32-bit system libraries
and will not take advantage of the 64-bit data structure. If you can,
spend the time compiling the third-paty software using 64-bit JDK.

Ben Ricker

On 8/16/05, Peter Crowther <[EMAIL PROTECTED]> wrote:
> > From: J R [mailto:[EMAIL PROTECTED]
> > Are there 64 bit counterparts?  If not, would the 32
> > bit ones definitely work?
> 
> Assuming you have a Java virtual machine that runs on your system, the
> Tomcat Java classes will run unchanged.  The 'virtual' in 'virtual
> machine' means that compiled Java classes are insulated from the details
> of the underlying machine - Tomcat runs unchanged on Windows, MacOS*,
> and many flavours of UNIX.
> 
> For further reading, check out 'application virtual machine' at
> http://en.wikipedia.org/wiki/Virtual_machine and
> http://en.wikipedia.org/wiki/Java_virtual_machine
> 
> - Peter
> 
> * Although Tomcat 5.5 is a bit awkward until Sun release a Java 1.5
> virtual machine for Mac.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
Ben Ricker
He's just this guy, you know?

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



howto configure JAAS+SSO

2005-08-16 Thread Edmund Urbani


hello!

I'm trying to configure two webapps (slide and jetspeed2) for 
single-sign-on in the same tomcat instance. Both apps use JAAS and come 
with their own JAAS login modules. Is it possible to configure these 
(any?) two apps to share login info with JAAS. I started reading the 
JAAS docs recently and I tried putting the two login modules into one 
JAAS login context, but that does not seem to work, because the login 
module classes won't instantiate properly due to dependencies to their 
respective webapps.


Can SSO be achieved without having the apps share one login context?
Will I have to write my own login module(s)?
Should I use a (completely) different approach to get SSO?

Thanks for any help/advice.

Edmund


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



Re: serving japanese file problem

2005-08-16 Thread Mark Thomas
You need to change your connector element(s) in server.xml

Mark

Arun Prasad R wrote:
> thanks Mark,Hiroshi
> 
> but how do i specify this in tomcat configuration. in which config file i 
> need to change. what are the changes to be done to achive this.
> pls help. im newbie
> 
> arun
> 
> On 8/12/05, Mark Thomas <[EMAIL PROTECTED]> wrote:
> 
>>Arun Prasad R wrote:
>>
>>>i have a ウェブ.jpg (japanese filename) in images directory.
>>>while requesting that file url encode to %E3%82%A6%E3%82%A7%E3%83%96.jpg
>>>
>>>but tomcat doesn't serve ウェブ.jpg instead it says file not found.
>>>
>>>my question is how to make tomcat to decode
>>>%E3%82%A6%E3%82%A7%E3%83%96.jpg as ウェブ.jpg
>>
>>
>>You should set the URIEncoding paramter of the connector to UTF-8.
>>
>>Mark
>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 



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



Re: session problems: www.blahblah.com versus blahblah.com

2005-08-16 Thread Michael Teter
I guess I was hoping there was some server-level redirect.

I'm not sure how I would put the meta redirect in all my pages.  My
app is a complicated mess (my fault - my lack of skill).

The issue is that my users are clicking a PayPal "Subscribe" button,
which sends them off to PayPal.  Part of the hidden information sent
to PayPal when the user clicks that button is the return path.

So if user comes to blahblah.com, clicks the Subscribe button it sends
them to PayPal with a return path of www.blahblah.com (because that's
what I'm telling PayPal to do.)  I'm thinking now I can just look at
the URL they're at now and set my PayPal return path dynamically... If
they're here as blahblah.com, I make sure to tell the PayPal form that
the return path is blahblah.com.  If www, then return to www...

Thanks for your suggestion though.  I can even continue using PayPal's
encrypted buttons - I'll just make two buttons, one for www, and
theother for just blahblah, and display the appropriate button based
on current situation.

Still, I think I was hoping that somewhere in server.xml I could say
"all requests for blahblah.com should be mapped to www.blahblah.com."

Thanks all.

On 8/16/05, Peter Rossbach <[EMAIL PROTECTED]> wrote:
> Hey Michael,
> 
> I look inside the tomcat source and find that we don't set the cookie
> hostname attribute.
> That means that the calling client/browser must made the hostname
> handling. I also
> thing the redirect way is currently right direction.
> 
> Peter
> 
> Paul Singleton schrieb:
> 
> > Michael Teter wrote:
> >
> >> If my users come to "blahblah.com", then go away, then return, they
> >> get a new session id (for www.blahblah.com).
> >>
> >> But if they come to www.blahblah.com, leave, and return (via link from
> >> external site), they keep the same session.
> >>
> >> I finally discovered that the browser (Firefox in this case) ends up
> >> with two different session cookies - one for www.blahblah.com and one
> >> for blahblah.com.
> >
> >
> > this behaviour seems reasonable to me...
> >
> >> What's the right thing to do to solve this?
> >
> >
> > it doesn't need solving, just accepting :-)
> >
> > but assuming you want www.blahblah.com and blahblah.com
> > to behave (session-wise) like one domain, which they aren't,
> > you could redirect (client-side) from www.blahblah.com
> > (which IMHO is the redundant/obsolete/legacy domain) to
> > blahblah.com, which allocates sessions and dishes out cookies.
> >
> > i.e. www.blahblah.com is a static site which just serves e.g.
> >
> > 
> >   
> > <%= a.appTitle %>: redirection page
> > http://blahblah.com"; />
> >   
> >   http://blahblah.com')">
> > 
> >   
> > 
> >
> > NB I haven't actually *tried* this :-)
> >
> > Paul Singleton
> >
> >
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

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



RE: session problems: www.blahblah.com versus blahblah.com

2005-08-16 Thread Dale, Matt

I'm not sure if this is the only or best way but you could create virtual hosts 
within your server.xml, one for each domain. Then obviously your code will only 
exist in one of the domains and the other you can do the redirect stuff.

-Original Message-
From: Michael Teter [mailto:[EMAIL PROTECTED]
Sent: 16 August 2005 13:17
To: Tomcat Users List
Subject: Re: session problems: www.blahblah.com versus blahblah.com


I guess I was hoping there was some server-level redirect.

I'm not sure how I would put the meta redirect in all my pages.  My
app is a complicated mess (my fault - my lack of skill).

The issue is that my users are clicking a PayPal "Subscribe" button,
which sends them off to PayPal.  Part of the hidden information sent
to PayPal when the user clicks that button is the return path.

So if user comes to blahblah.com, clicks the Subscribe button it sends
them to PayPal with a return path of www.blahblah.com (because that's
what I'm telling PayPal to do.)  I'm thinking now I can just look at
the URL they're at now and set my PayPal return path dynamically... If
they're here as blahblah.com, I make sure to tell the PayPal form that
the return path is blahblah.com.  If www, then return to www...

Thanks for your suggestion though.  I can even continue using PayPal's
encrypted buttons - I'll just make two buttons, one for www, and
theother for just blahblah, and display the appropriate button based
on current situation.

Still, I think I was hoping that somewhere in server.xml I could say
"all requests for blahblah.com should be mapped to www.blahblah.com."

Thanks all.

On 8/16/05, Peter Rossbach <[EMAIL PROTECTED]> wrote:
> Hey Michael,
> 
> I look inside the tomcat source and find that we don't set the cookie
> hostname attribute.
> That means that the calling client/browser must made the hostname
> handling. I also
> thing the redirect way is currently right direction.
> 
> Peter
> 
> Paul Singleton schrieb:
> 
> > Michael Teter wrote:
> >
> >> If my users come to "blahblah.com", then go away, then return, they
> >> get a new session id (for www.blahblah.com).
> >>
> >> But if they come to www.blahblah.com, leave, and return (via link from
> >> external site), they keep the same session.
> >>
> >> I finally discovered that the browser (Firefox in this case) ends up
> >> with two different session cookies - one for www.blahblah.com and one
> >> for blahblah.com.
> >
> >
> > this behaviour seems reasonable to me...
> >
> >> What's the right thing to do to solve this?
> >
> >
> > it doesn't need solving, just accepting :-)
> >
> > but assuming you want www.blahblah.com and blahblah.com
> > to behave (session-wise) like one domain, which they aren't,
> > you could redirect (client-side) from www.blahblah.com
> > (which IMHO is the redundant/obsolete/legacy domain) to
> > blahblah.com, which allocates sessions and dishes out cookies.
> >
> > i.e. www.blahblah.com is a static site which just serves e.g.
> >
> > 
> >   
> > <%= a.appTitle %>: redirection page
> > http://blahblah.com"; />
> >   
> >   http://blahblah.com')">
> > 
> >   
> > 
> >
> > NB I haven't actually *tried* this :-)
> >
> > Paul Singleton
> >
> >
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

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


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



Re: session problems: www.blahblah.com versus blahblah.com

2005-08-16 Thread David Smith
I would imagine the other way to do this is to implement a filter
looking for people trying to reach blahblah.com and returning a 302
redirect to www.blahblah.com.  That would give them all the proper
cookie from the start and could be implemented accross all your webapp
resources at once.

--David

Michael Teter wrote:

>I guess I was hoping there was some server-level redirect.
>
>I'm not sure how I would put the meta redirect in all my pages.  My
>app is a complicated mess (my fault - my lack of skill).
>
>The issue is that my users are clicking a PayPal "Subscribe" button,
>which sends them off to PayPal.  Part of the hidden information sent
>to PayPal when the user clicks that button is the return path.
>
>So if user comes to blahblah.com, clicks the Subscribe button it sends
>them to PayPal with a return path of www.blahblah.com (because that's
>what I'm telling PayPal to do.)  I'm thinking now I can just look at
>the URL they're at now and set my PayPal return path dynamically... If
>they're here as blahblah.com, I make sure to tell the PayPal form that
>the return path is blahblah.com.  If www, then return to www...
>
>Thanks for your suggestion though.  I can even continue using PayPal's
>encrypted buttons - I'll just make two buttons, one for www, and
>theother for just blahblah, and display the appropriate button based
>on current situation.
>
>Still, I think I was hoping that somewhere in server.xml I could say
>"all requests for blahblah.com should be mapped to www.blahblah.com."
>
>Thanks all.
>
>On 8/16/05, Peter Rossbach <[EMAIL PROTECTED]> wrote:
>  
>
>>Hey Michael,
>>
>>I look inside the tomcat source and find that we don't set the cookie
>>hostname attribute.
>>That means that the calling client/browser must made the hostname
>>handling. I also
>>thing the redirect way is currently right direction.
>>
>>Peter
>>
>>Paul Singleton schrieb:
>>
>>
>>
>>>Michael Teter wrote:
>>>
>>>  
>>>
If my users come to "blahblah.com", then go away, then return, they
get a new session id (for www.blahblah.com).

But if they come to www.blahblah.com, leave, and return (via link from
external site), they keep the same session.

I finally discovered that the browser (Firefox in this case) ends up
with two different session cookies - one for www.blahblah.com and one
for blahblah.com.


>>>this behaviour seems reasonable to me...
>>>
>>>  
>>>
What's the right thing to do to solve this?


>>>it doesn't need solving, just accepting :-)
>>>
>>>but assuming you want www.blahblah.com and blahblah.com
>>>to behave (session-wise) like one domain, which they aren't,
>>>you could redirect (client-side) from www.blahblah.com
>>>(which IMHO is the redundant/obsolete/legacy domain) to
>>>blahblah.com, which allocates sessions and dishes out cookies.
>>>
>>>i.e. www.blahblah.com is a static site which just serves e.g.
>>>
>>>
>>>  
>>><%= a.appTitle %>: redirection page
>>>http://blahblah.com"; />
>>>  
>>>  http://blahblah.com')">
>>>
>>>  
>>>
>>>
>>>NB I haven't actually *tried* this :-)
>>>
>>>Paul Singleton
>>>
>>>
>>>  
>>>
>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>  
>


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


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



RE: session problems: www.blahblah.com versus blahblah.com

2005-08-16 Thread Dale, Matt

Ignore my last mail, this way is better.

Ta
Matt

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: 16 August 2005 13:42
To: Tomcat Users List
Subject: Re: session problems: www.blahblah.com versus blahblah.com


I would imagine the other way to do this is to implement a filter
looking for people trying to reach blahblah.com and returning a 302
redirect to www.blahblah.com.  That would give them all the proper
cookie from the start and could be implemented accross all your webapp
resources at once.

--David

Michael Teter wrote:

>I guess I was hoping there was some server-level redirect.
>
>I'm not sure how I would put the meta redirect in all my pages.  My
>app is a complicated mess (my fault - my lack of skill).
>
>The issue is that my users are clicking a PayPal "Subscribe" button,
>which sends them off to PayPal.  Part of the hidden information sent
>to PayPal when the user clicks that button is the return path.
>
>So if user comes to blahblah.com, clicks the Subscribe button it sends
>them to PayPal with a return path of www.blahblah.com (because that's
>what I'm telling PayPal to do.)  I'm thinking now I can just look at
>the URL they're at now and set my PayPal return path dynamically... If
>they're here as blahblah.com, I make sure to tell the PayPal form that
>the return path is blahblah.com.  If www, then return to www...
>
>Thanks for your suggestion though.  I can even continue using PayPal's
>encrypted buttons - I'll just make two buttons, one for www, and
>theother for just blahblah, and display the appropriate button based
>on current situation.
>
>Still, I think I was hoping that somewhere in server.xml I could say
>"all requests for blahblah.com should be mapped to www.blahblah.com."
>
>Thanks all.
>
>On 8/16/05, Peter Rossbach <[EMAIL PROTECTED]> wrote:
>  
>
>>Hey Michael,
>>
>>I look inside the tomcat source and find that we don't set the cookie
>>hostname attribute.
>>That means that the calling client/browser must made the hostname
>>handling. I also
>>thing the redirect way is currently right direction.
>>
>>Peter
>>
>>Paul Singleton schrieb:
>>
>>
>>
>>>Michael Teter wrote:
>>>
>>>  
>>>
If my users come to "blahblah.com", then go away, then return, they
get a new session id (for www.blahblah.com).

But if they come to www.blahblah.com, leave, and return (via link from
external site), they keep the same session.

I finally discovered that the browser (Firefox in this case) ends up
with two different session cookies - one for www.blahblah.com and one
for blahblah.com.


>>>this behaviour seems reasonable to me...
>>>
>>>  
>>>
What's the right thing to do to solve this?


>>>it doesn't need solving, just accepting :-)
>>>
>>>but assuming you want www.blahblah.com and blahblah.com
>>>to behave (session-wise) like one domain, which they aren't,
>>>you could redirect (client-side) from www.blahblah.com
>>>(which IMHO is the redundant/obsolete/legacy domain) to
>>>blahblah.com, which allocates sessions and dishes out cookies.
>>>
>>>i.e. www.blahblah.com is a static site which just serves e.g.
>>>
>>>
>>>  
>>><%= a.appTitle %>: redirection page
>>>http://blahblah.com"; />
>>>  
>>>  http://blahblah.com')">
>>>
>>>  
>>>
>>>
>>>NB I haven't actually *tried* this :-)
>>>
>>>Paul Singleton
>>>
>>>
>>>  
>>>
>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>  
>


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


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


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



Re: Apache/Tomcat integration - Update

2005-08-16 Thread Kyle

Ok,

One step at a time. Thanks so far Darryl.

I now have it working across the internal network, but not externally. 
The next step is what do I now need to do so that I can see the 
jsp/servlets-examples pages externally??


Also, as I understand it, this format means that TC 5.5.9 will be the 
only one available to ALL VHosts. I need to set up different Tomcat 
versions with the different VHosts. Another day's question for now.



{For reference, I have included the changes made to my originally mailed 
config at the bottom.}



As follow up to earlier questions;

You need to confirm that requests for the vhost are being correctly 
routed into the VirtualHost section of the apache config.  If they are 
not then there is no sense looking at the JkMount configuration yet.  ...


logging is set up differently for the global config and the default 
VHost. It is the VHost error log which is displaying the "File does not 
exist" errors. This file registered these internally initially and it is 
now still this file which is registering the same error for external calls.


So if you want to a single hostname in the URL then you need to 
configure both Apache (ServerName/ServerAlias) and Tomcat ( / 
) to responsd to the same hostname.



it is precisely this combo which didn't work.


localhost

I have now switched them (see below) and it appears to work.



I suspect your only remaining problem now is to get Apache and Tomcat 
to see the same website document roots for the same URLs.  This maybe 
a problem if you are using deployed WARs since tomcat can and will 
delete the directory from under apache during the deployment process.


How do you mean "TC can and will delete the directory from under 
Apache"? Which directory do you mean? At this point, I am only trying to 
view the WARs bundled with TC. I am starting TC before Apache with the 
apps already deployed (so far).


Thanks again.

Kyle

==

httpd.conf now looks like;
--

ServerName host.domain.com:80
.


ServerAdmin [EMAIL PROTECTED]
ServerName host.domain.com
ErrorLog logs/host-defaulthost-error_log
CustomLog logs/host-defaulthost-access_log common


Include /opt/jakarta-tomcat-5.5.9/conf/auto/mod_jk.conf
JkLogStampFormat "[%a %d %b %Y %H:%M:%S] "
JkOptions +ForwardKeySize +ForwardURICompat +ForwardDirectories
JkRequestLogFormat "%w %V %T"

server.xml has been switched (localhost now defaultHost - surely this 
can't be right)

--



autoDeploy="true"

   xmlValidation="false" xmlNamespaceAware="false">

host.domain.com

and mod_jk.conf is almost the std. auto-generated file from TC with the 
minor additions of;




Options Indexes FollowSymLinks
DirectoryIndex index.html index.htm index.jsp

Order allow,deny
Allow from all


And
JkMount /jsp-examples/* ajp13Wkr



Also del'd the JNI worker in workers.properties as suggested.



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



RE: howto configure JAAS+SSO

2005-08-16 Thread Mark Benussi
Hi Edmund.

I am sorry but I don't know much about SSO.

However I can tell you about JAAS in Tomcat. In 5 certainly there are
issues. Essentially when you call the LoginModule to invoke your JAAS config
it works but it does not authenticate the proper session Subject. What you
end up doing (Or what I did) was place a request filter in the app that
wraps the request with an overridden RequestWrapper and you write your own
inUserInRole against the Subject that the LoginModule returns (By placing it
in the session)

If you want some code, taken from Wendy Smoak and others I can provide.

-Original Message-
From: Edmund Urbani [mailto:[EMAIL PROTECTED] 
Sent: 16 August 2005 13:14
To: Tomcat Users List
Subject: howto configure JAAS+SSO


hello!

I'm trying to configure two webapps (slide and jetspeed2) for 
single-sign-on in the same tomcat instance. Both apps use JAAS and come 
with their own JAAS login modules. Is it possible to configure these 
(any?) two apps to share login info with JAAS. I started reading the 
JAAS docs recently and I tried putting the two login modules into one 
JAAS login context, but that does not seem to work, because the login 
module classes won't instantiate properly due to dependencies to their 
respective webapps.

Can SSO be achieved without having the apps share one login context?
Will I have to write my own login module(s)?
Should I use a (completely) different approach to get SSO?

Thanks for any help/advice.

 Edmund


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


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



Re: howto configure JAAS+SSO

2005-08-16 Thread Edmund Urbani

Mark Benussi wrote:


Hi Edmund.

I am sorry but I don't know much about SSO.

However I can tell you about JAAS in Tomcat. In 5 certainly there are
issues. Essentially when you call the LoginModule to invoke your JAAS config
it works but it does not authenticate the proper session Subject. What you
end up doing (Or what I did) was place a request filter in the app that
wraps the request with an overridden RequestWrapper and you write your own
inUserInRole against the Subject that the LoginModule returns (By placing it
in the session)

If you want some code, taken from Wendy Smoak and others I can provide.

 


thanks.

I'm currently considering to write my own login module in order to share 
authentication data across login contexts. i would need to access 
session cookies from the module and i'm not sure how/if this can be done 
yet.


i've never written a requestwrapper myself, so i can't really tell how 
hard/complicated that would be. i'd be glad, if you could provide me 
with some code to look at. that could certainly help me decide on how to 
go on about that SSO requirement.


Edmund


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



org.apache.catalina.valves.RemoteHostValve issue

2005-08-16 Thread Tony Tomcat
Does the RemoteHostValve work?   There are no examples in the Tomcat 5
docs and the tomcat 4 docs have the following..

 

Any regex starting with * fails in Tomcat 5 and you can also see this
happen on the Regex test applet.

http://jakarta.apache.org/regexp/applet.html

Does anyone have some working examples?  It doesn't work for me even
if I type in the full hostname.   Perhaps there is something in Tomcat
I need to configure for it to be able to get the hostname of the
requestor?

Tony

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



Re: TomCat 5.5.9 - 8443

2005-08-16 Thread Tom Spence
Can I use ikeyman or keytool or both?
 
Cuz, I need to use SSL like 8443 so bad...

Paul Kimbrel <[EMAIL PROTECTED]> wrote:
Something I forgot to mention. When you are generating your certificate,
it will ask for your first and last name. Enter the name of the server
your appliation will be running on. In the case of development - this
is usally "localhost". Otherwise, the certificate will be rejected
when your website loads.

--PK

On 8/15/2005, "[EMAIL PROTECTED]"

wrote:

>It sounds like you need to set up an SSL certificate for Java. Here's a
>site that outlines how to do this:
>
>http://jasigch.princeton.edu:9000/display/CAS/Solving+SSL+issues
>
>To use this example, make sure you have your "JAVA_HOME" environment
>variable set properly (or replace it in the example with the appropriate
>value). Also, the example references "%FILE_NAME%". Don't use this -
>in all the other places in the example, it uses "server.crt" - use
>that instead of the FILE_NAME variable. And finally, it will still pop
>up and ask you for the keystore pass code. Just enter "changeit". 
>And don't change it - until you've gotten down the road and figure out
>how all that works. I tried it once, and things got reallys screwed up.
>
>But once, you get that up and running, you should be gold!
>
>--PK
>
>On 8/15/2005, "Tom Spence" wrote:
>
>> I can open
>> 
>> http://localhost:8080
>> 
>> but, can't open
>> 
>> https://localhost:8443
>> 
>> Any idea why?
>> 
>> Of course I did uncomment at 8443 area in server.xml and set up by > using 
>> keytool. Nothing happened.
>> 
>> 
>> 
>> (__[TomCigar]___~~~
>> 
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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




(__[TomCigar]___~~~ 




Re: Webapp suddenly not available

2005-08-16 Thread Brian Cook


WOW that looks like a lot lot of unneeded complication.

I do not know if this is absolutely correct for every situation.  But it 
is my experience that if you are just doing JSP pages you do not need 
the web.xml at all.  It is only needed if you need to call a servlet, 
define a resource like JNDI, or set a context value.


Is the 404 error from Tomcat or Apache?  Do you get the 404 error when 
you try to connect one of the servlets directly?




Vsevolod (Simon) Ilyushchenko wrote:

Hi,

I'm a relative Tomcat newbie. I have built an application with ant and 
was using it under Tomcat 5.5.9 for several weeks, and then it suddenly 
broke. All request to JSP pages now display the 404 error (the requested 
resource is not available). I was making only very minor changes to the 
Java code. The HTML pages still work.


There are no errors in catalina.out and localhost.log. I've tried to 
configure log4j logging by placing the log4j.properties file into 
common/classes (and the commons-logging and log4j jars into common/lib, 
but the log file I specified there is not even created.


Finally, I was never able to make my application work with the web.xml 
file generated by ant. It only worked after I delete the file. The file 
is pretty basic, but I attach it in case there is an obvious error there.


I'll be grateful for any suggestions.

Thanks,
Simon






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







My Web Application

  This is version X.X of an application to perform
  a wild and wonderful task, based on servlets and
  JSP pages.  It was written by Dave Developer
  ([EMAIL PROTECTED]), who should be contacted for
  more information.






  webmaster
  [EMAIL PROTECTED]
  
The EMAIL address of the administrator to whom questions
and comments about this application should be addressed.
  






  controller
  
This servlet plays the "controller" role in the MVC architecture
used in this application.  It is generally mapped to the ".do"
filename extension with a servlet-mapping element, and all form
submits in the app will be submitted to a request URI like
"saveCustomer.do", which will therefore be mapped to this servlet.

The initialization parameter namess for this servlet are the
"servlet path" that will be received by this servlet (after the
filename extension is removed).  The corresponding value is the
name of the action class that will be used to process this request.
  
  com.mycompany.mypackage.ControllerServlet
  
listOrders
com.mycompany.myactions.ListOrdersAction
  
  
saveCustomer
com.mycompany.myactions.SaveCustomerAction
  
  
  5



  graph
  
This servlet produces GIF images that are dynamically generated
graphs, based on the input parameters included on the request.
It is generally mapped to a specific request URI like "/graph".
  








org.apache.jsp.error_jsp
org.apache.jsp.error_jsp


...More servlets here...


org.apache.jsp.error_jsp
/error.jsp


...More servlet-mappings here...




  controller
  *.do



  graph
  /graph






  30









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



--
Brian Cook
Digital Services Analyst
Print Time Inc.
[EMAIL PROTECTED]
913.345.8900

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

Re: Webapp suddenly not available

2005-08-16 Thread Vsevolod (Simon) Ilyushchenko



Brian Cook wrote on 08/16/2005 10:36 AM:


WOW that looks like a lot lot of unneeded complication.

I do not know if this is absolutely correct for every situation.  But it 
is my experience that if you are just doing JSP pages you do not need 
the web.xml at all.  It is only needed if you need to call a servlet, 
define a resource like JNDI, or set a context value.


Is the 404 error from Tomcat or Apache?  Do you get the 404 error when 
you try to connect one of the servlets directly?


Brian,

The error is from Tomcat - if I go to port 8080, I also see it. My issue 
is that I can't figure out how to turn debug messages on via log4j - I'm 
sure I'd see something interesting there.


Thanks,
Simon

--

Simon (Vsevolod ILyushchenko)   [EMAIL PROTECTED]
http://www.simonf.com

Terrorism is a tactic and so to declare war on terrorism
is equivalent to Roosevelt's declaring war on blitzkrieg.

Zbigniew Brzezinski, U.S. national security advisor, 1977-81

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



RE: howto configure JAAS+SSO [Apologies code attached]

2005-08-16 Thread Mark Benussi
1.Filter to go in web.xml

/**
 * [EMAIL PROTECTED] javax.servlet.Filter Filter} to overide the 
HttpServletRequest and
 * overide isUserInRole() using the
 * [EMAIL PROTECTED] com.ibt.framework.security.tomcat.HttpServletRequestWrapper
HttpServletRequestWrapper}
 * 
 * @author Mark Benussi
 */
public class HttpServletRequestFilter implements Filter {

/**
 * @see javax.servlet.Filter#destroy()
 */
public void destroy() {
}

/**
 * @see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest,
 *  javax.servlet.ServletResponse, javax.servlet.FilterChain)
 */
public void doFilter(ServletRequest request, ServletResponse
response,
FilterChain chain) throws IOException,
ServletException {

HttpServletRequest httpServletRequest = (HttpServletRequest)
request;
HttpServletRequestWrapper wrappedRequest = new
HttpServletRequestWrapper(
httpServletRequest);
chain.doFilter(wrappedRequest, response);
}

/**
 * @see javax.servlet.Filter#init(javax.servlet.FilterConfig)
 */
public void init(FilterConfig config) throws ServletException {
}
}

2. Request wrapper

/**
 * Wraps the [EMAIL PROTECTED] javax.servlet.http.HttpServletRequest
HttpServletRequest} 
 * @author Mark Benussi
 */
public class HttpServletRequestWrapper extends
javax.servlet.http.HttpServletRequestWrapper {

/**
 * The original [EMAIL PROTECTED] javax.servlet.http.HttpServletRequest
HttpServletRequest}
 */
private HttpServletRequest request = null;

/**
 * Helper to manage any common security methods
 */
private static SecurityHelper jaasHelper = null;

/**
 * Default constructor
 * 
 * @param request
 *The original [EMAIL PROTECTED]
javax.servlet.http.HttpServletRequest HttpServletRequest}
 */
public HttpServletRequestWrapper(HttpServletRequest request) {

super(request);
if (jaasHelper == null) {
jaasHelper = new SecurityHelper();
}
this.request = request;
}

/**
 * @see
javax.servlet.http.HttpServletRequestWrapper#isUserInRole(java.lang.String)
 */
public boolean isUserInRole(String role) {

Subject subject = jaasHelper.getSessionSubject(request,
false);
return jaasHelper.isSubjectInRole(subject, role);
}
}

3. When you call youre LoginModule get the Subject and place in the session
and then write your own code to validate the Subject has the role required.

4. As for passing the session to your LoginModule, which I wouldn't do in a
puristic way as the LoginModule should be able to be used by a wing app just
as much as a web app.

Contstruct a CallBackHandler with the username and password but also with
the session or request. Then in your loginmodule you will have access to the
request/session when you invoke handle callback


-Original Message-
From: Edmund Urbani [mailto:[EMAIL PROTECTED] 
Sent: 16 August 2005 15:14
To: Tomcat Users List
Subject: Re: howto configure JAAS+SSO

Mark Benussi wrote:

>Hi Edmund.
>
>I am sorry but I don't know much about SSO.
>
>However I can tell you about JAAS in Tomcat. In 5 certainly there are
>issues. Essentially when you call the LoginModule to invoke your JAAS
config
>it works but it does not authenticate the proper session Subject. What you
>end up doing (Or what I did) was place a request filter in the app that
>wraps the request with an overridden RequestWrapper and you write your own
>inUserInRole against the Subject that the LoginModule returns (By placing
it
>in the session)
>
>If you want some code, taken from Wendy Smoak and others I can provide.
>
>  
>
thanks.

I'm currently considering to write my own login module in order to share 
authentication data across login contexts. i would need to access 
session cookies from the module and i'm not sure how/if this can be done 
yet.

i've never written a requestwrapper myself, so i can't really tell how 
hard/complicated that would be. i'd be glad, if you could provide me 
with some code to look at. that could certainly help me decide on how to 
go on about that SSO requirement.

 Edmund


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


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



Re: Virtual Hosting with WAR files

2005-08-16 Thread Pete Stevens

Try reading this,

http://www.ex-parrot.com/~pete/tomcat-vhost.html

It's a receipe for setting up tomcat to do virtual hosting and behave more
like apache with regard to virtual hosts.

Yours,

Pete Stevens

On Tue, 16 Aug 2005, Mahesh S Kudva wrote:

> Hi
>
> I have setup Tomcat+Apache2+mod_jk. I have 3 application in war files
> namely flie1.war, file2.war and file3.war. To deploy, I just put them in
> the deploy folder and access then using the urls:
> http://foo.com/file1
> http://foo.com/file2
> http://foo.com/file3
> This works perfectly for me. I want to change this to simple urls as
> follows:
> http://file1.foo.com
> http://file2.foo.com
> http://file3.foo.com
>
> I have also read the notes on Virtual hosting:
> http://jakarta.apache.org/tomcat/connectors-doc-
> archive/jk2/jk2/vhosthowto.html
>
> Even though I am not able to configure Tomcat to connect to the war files
> as requested. How do I configure tomcat to connect to the correct war
> file as requested?
>
> Any help will be appreciated.
>
> Regards & Thanks
> 
> Mahesh S Kudva
>
>
>
> ---
> Robosoft Technologies - Partners in Product Development
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

--
Pete Stevens
[EMAIL PROTECTED]
http://www.ex-parrot.com/~pete/

   I'm a shareware signature!  Send $2 if you use me, $10 for a manual.

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



Re: Webapp suddenly not available

2005-08-16 Thread Hassan Schroeder

Vsevolod (Simon) Ilyushchenko wrote:

The error is from Tomcat - if I go to port 8080, I also see it. My issue 
is that I can't figure out how to turn debug messages on via log4j - I'm 
sure I'd see something interesting there.


Uh, yeah. Seems like it'd be a good idea to reinstall the orginal
default ROOT directory temporarily and get log4j working properly.

It's really straightforward, but the time to try isn't after your
webapp breaks :-)

Check out Allistair Crossley's 

Good luck!
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

  dream.  code.



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



Re: Webapp suddenly not available

2005-08-16 Thread Brian Cook


I would try removing the <>.xml file, if there is one, and 
replace the web.xml with a default one.  Then restart Tomcat.


If you still get the 404 error when calling just JSP pages and there are 
no errors in the catalina.out file then the problem is very likely in 
the syntax of the URL being used.  If this does work then the problem is 
mostlly in the web.xml file.  Possiblly in the <>.xml but not 
liklly.



The <>.xml file can be found in


<>Tomcat\conf\Catalina\localhost\<>.xml










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

 version="2.4">


30




index.jsp









Vsevolod (Simon) Ilyushchenko wrote:



Brian Cook wrote on 08/16/2005 10:36 AM:



WOW that looks like a lot lot of unneeded complication.

I do not know if this is absolutely correct for every situation.  But 
it is my experience that if you are just doing JSP pages you do not 
need the web.xml at all.  It is only needed if you need to call a 
servlet, define a resource like JNDI, or set a context value.


Is the 404 error from Tomcat or Apache?  Do you get the 404 error when 
you try to connect one of the servlets directly?



Brian,

The error is from Tomcat - if I go to port 8080, I also see it. My issue 
is that I can't figure out how to turn debug messages on via log4j - I'm 
sure I'd see something interesting there.


Thanks,
Simon




--
Brian Cook
Digital Services Analyst
Print Time Inc.
[EMAIL PROTECTED]
913.345.8900

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

Re: howto configure JAAS+SSO [Apologies code attached]

2005-08-16 Thread Edmund Urbani

Mark Benussi wrote:


1.Filter to go in web.xml

/**
* [EMAIL PROTECTED] javax.servlet.Filter Filter} to overide the 
HttpServletRequest and
* overide isUserInRole() using the
* [EMAIL PROTECTED] com.ibt.framework.security.tomcat.HttpServletRequestWrapper
HttpServletRequestWrapper}
* 
* @author Mark Benussi

*/
public class HttpServletRequestFilter implements Filter {

/**
 * @see javax.servlet.Filter#destroy()
 */
public void destroy() {
}

/**
 * @see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest,
 *  javax.servlet.ServletResponse, javax.servlet.FilterChain)
 */
public void doFilter(ServletRequest request, ServletResponse
response,
FilterChain chain) throws IOException,
ServletException {

HttpServletRequest httpServletRequest = (HttpServletRequest)
request;
HttpServletRequestWrapper wrappedRequest = new
HttpServletRequestWrapper(
httpServletRequest);
chain.doFilter(wrappedRequest, response);
}

/**
 * @see javax.servlet.Filter#init(javax.servlet.FilterConfig)
 */
public void init(FilterConfig config) throws ServletException {
}
}

2. Request wrapper

/**
* Wraps the [EMAIL PROTECTED] javax.servlet.http.HttpServletRequest
HttpServletRequest} 
* @author Mark Benussi

*/
public class HttpServletRequestWrapper extends
javax.servlet.http.HttpServletRequestWrapper {

/**
 * The original [EMAIL PROTECTED] javax.servlet.http.HttpServletRequest
HttpServletRequest}
 */
private HttpServletRequest request = null;

/**
 * Helper to manage any common security methods
 */
private static SecurityHelper jaasHelper = null;

/**
 * Default constructor
	 * 
	 * @param request

 *The original [EMAIL PROTECTED]
javax.servlet.http.HttpServletRequest HttpServletRequest}
 */
public HttpServletRequestWrapper(HttpServletRequest request) {

super(request);
if (jaasHelper == null) {
jaasHelper = new SecurityHelper();
}
this.request = request;
}

/**
 * @see
javax.servlet.http.HttpServletRequestWrapper#isUserInRole(java.lang.String)
 */
public boolean isUserInRole(String role) {

Subject subject = jaasHelper.getSessionSubject(request,
false);
return jaasHelper.isSubjectInRole(subject, role);
}
}

3. When you call youre LoginModule get the Subject and place in the session
and then write your own code to validate the Subject has the role required.

4. As for passing the session to your LoginModule, which I wouldn't do in a
puristic way as the LoginModule should be able to be used by a wing app just
as much as a web app.
 

well. my login module would be for the very special purpose of making 
SSO of webapps possible, so i wouldn't have much of a problem with this.



Contstruct a CallBackHandler with the username and password but also with
the session or request. Then in your loginmodule you will have access to the
request/session when you invoke handle callback

 



wow. thanks a lot!
the code looks much simpler than i would have expected.

i think this will do nicely. :)

Edmund


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



Re: How to automatically start tomcat 5.5.9 under linux using local user

2005-08-16 Thread Duong BaTien
Greetings:

I set tomcat 5.5.9 running in port 8080 so it can be started without
using the root user. However, when I start tomcat using linux rc.local
at system start up (/apps/tomcat-5/bin/startup.sh), it seems that the
tomcat instance is started under root.

Question: Where do i set the user that starts tomcat instance via Redhat
Fedora Core start up?

Thanks.

BaTien



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



Re: Virtual Hosting with WAR files

2005-08-16 Thread Charles Meier


If I understand this setup correctly, you would be running one instance 
of Tomcat for all of your
virtual hosts.  This has the disadvantage that if one virtual host needs 
to be restarted, you will need

to restart Tomcat for all of your virtual hosts.

An alternative is to let Apache handle the virtual hosts and run 
multiple instances of Tomcat --
one instance per virtual host.  This requires multiple mod_jk instances, 
each communicating
across a unique port with an instance of Tomcat.  Each Tomcat should be 
deployed to its own
home dir w/ its own CATALINA_HOME pointing to that directory and with 
each Tomcat
given its own start/stop.sh script that sets CATALINA_HOME.  This is 
more complex to
set up, and I'm not sure how many separate Tomcats this can handle, but 
it does allow you

to have something like:

http://customer_1.com
http://customer_2.com
...
http://customer_n.com

and fix customer_n's problem without impacting other customers using the 
same box.  Since I
maintain a box with this setup, I can post sample config files if there 
is interest.


Pete Stevens wrote:


Try reading this,

http://www.ex-parrot.com/~pete/tomcat-vhost.html

It's a receipe for setting up tomcat to do virtual hosting and behave more
like apache with regard to virtual hosts.

Yours,

Pete Stevens

On Tue, 16 Aug 2005, Mahesh S Kudva wrote:

 


Hi

I have setup Tomcat+Apache2+mod_jk. I have 3 application in war files
namely flie1.war, file2.war and file3.war. To deploy, I just put them in
the deploy folder and access then using the urls:
http://foo.com/file1
http://foo.com/file2
http://foo.com/file3
This works perfectly for me. I want to change this to simple urls as
follows:
http://file1.foo.com
http://file2.foo.com
http://file3.foo.com

I have also read the notes on Virtual hosting:
http://jakarta.apache.org/tomcat/connectors-doc-
archive/jk2/jk2/vhosthowto.html

Even though I am not able to configure Tomcat to connect to the war files
as requested. How do I configure tomcat to connect to the correct war
file as requested?

Any help will be appreciated.

Regards & Thanks

Mahesh S Kudva



---
Robosoft Technologies - Partners in Product Development



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


   



--
Pete Stevens
[EMAIL PROTECTED]
http://www.ex-parrot.com/~pete/

  I'm a shareware signature!  Send $2 if you use me, $10 for a manual.

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


 





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



Re: 64 Bit Machines and Tomcat

2005-08-16 Thread J. Ryan Earl

J R wrote:


Are there 64 bit counterparts?  If not, would the 32
bit ones definitely work?
 

Uhm, too many pronouns.  "Ones?"  You mean the binaries?  Java .class 
files are all binary bytecode, the bytecode is architecture independent 
and well defined.  All you need is a Java Virtual Machine for your 
architecture to execute the binaries.  So the binaries, in theory, will 
run all any hardware architecture with a suitable JVM available.


If by "ones" you mean "JVMs" then yes, there is an AMD64 JVM available 
for download at java.sun.com.  In addition, I'm pretty sure Blackdown 
will compile 64-bit as well.



These machines are Intel Zeon processors (dual)
 


Are they EM64T Xeons, or the older 32-bit only Xeons?

-ryan



JR

--- "J. Ryan Earl" <[EMAIL PROTECTED]> wrote:

 


J R wrote:

   


I tried to install Tomcat, and got the following:

./configure
[...]
configure: error: Unsupported CPU architecture
"x86_64"

How do I fix?  Is there files out there to fix
 


that?
   




 


Is there any particular reason you need to build
Tomcat?  Why not just 
go with a prebuilt binary Tomcat installation?


I assume you're using the AMD64 JDK?

-ryan


   


-
 


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


   







Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 



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

 




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



tomcat 5.5.7 + struts problem

2005-08-16 Thread Jiang, Peiyun
What is happening here? I'm running tomcat 5.5.7 as Windows service. It's 
working with tomcat 5.0 as service. Why 5.5.7 does not have start scripts?

Thanks.

Peiyun 
---
java.lang.ClassCastException: org.apache.struts.taglib.html.MessagesTei

org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoImpl.java:420)

org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:248)

org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:162)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:418)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1539)
org.apache.jasper.compiler.Parser.parse(Parser.java:126)

org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)

org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)

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

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)

org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:261)

org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:237)

org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:300)

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)

org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:261)

org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)

org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:316)

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


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

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



SV: Virtual Hosting with WAR files

2005-08-16 Thread Michael Salmon
Hi

I am having the same problem. I tried to use Pete's recipe, but all I get is 
the default Tomcat page. I am setting up on win2003.

Thanks


Michael

-Oprindelig meddelelse-
Fra: Pete Stevens [mailto:[EMAIL PROTECTED] På vegne af Pete Stevens
Sendt: 16. august 2005 17:07
Til: Tomcat Users List
Emne: Re: Virtual Hosting with WAR files


Try reading this,

http://www.ex-parrot.com/~pete/tomcat-vhost.html

It's a receipe for setting up tomcat to do virtual hosting and behave more
like apache with regard to virtual hosts.

Yours,

Pete Stevens

On Tue, 16 Aug 2005, Mahesh S Kudva wrote:

> Hi
>
> I have setup Tomcat+Apache2+mod_jk. I have 3 application in war files
> namely flie1.war, file2.war and file3.war. To deploy, I just put them in
> the deploy folder and access then using the urls:
> http://foo.com/file1
> http://foo.com/file2
> http://foo.com/file3
> This works perfectly for me. I want to change this to simple urls as
> follows:
> http://file1.foo.com
> http://file2.foo.com
> http://file3.foo.com
>
> I have also read the notes on Virtual hosting:
> http://jakarta.apache.org/tomcat/connectors-doc-
> archive/jk2/jk2/vhosthowto.html
>
> Even though I am not able to configure Tomcat to connect to the war files
> as requested. How do I configure tomcat to connect to the correct war
> file as requested?
>
> Any help will be appreciated.
>
> Regards & Thanks
> 
> Mahesh S Kudva
>
>
>
> ---
> Robosoft Technologies - Partners in Product Development
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

--
Pete Stevens
[EMAIL PROTECTED]
http://www.ex-parrot.com/~pete/

   I'm a shareware signature!  Send $2 if you use me, $10 for a manual.

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



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



RE: 64 Bit Machines and Tomcat

2005-08-16 Thread J R
Thanks... I didn't realize that Tomcat was pure Java.

Being tortured through several CS classes that use
Java.. I am familiar with its platform capabilities.

Thanks a bunch!

JR

--- Peter Crowther <[EMAIL PROTECTED]>
wrote:

> > From: J R [mailto:[EMAIL PROTECTED] 
> > Are there 64 bit counterparts?  If not, would the
> 32
> > bit ones definitely work?
> 
> Assuming you have a Java virtual machine that runs
> on your system, the
> Tomcat Java classes will run unchanged.  The
> 'virtual' in 'virtual
> machine' means that compiled Java classes are
> insulated from the details
> of the underlying machine - Tomcat runs unchanged on
> Windows, MacOS*,
> and many flavours of UNIX.
> 
> For further reading, check out 'application virtual
> machine' at
> http://en.wikipedia.org/wiki/Virtual_machine and
> http://en.wikipedia.org/wiki/Java_virtual_machine
> 
>   - Peter
> 
> * Although Tomcat 5.5 is a bit awkward until Sun
> release a Java 1.5
> virtual machine for Mac.
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 





Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

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



Re: JspC compile exception in tomcat-deployer 5.5.10

2005-08-16 Thread Remy Maucherat
On 8/16/05, Bernhard Slominski <[EMAIL PROTECTED]> wrote:
> Hi Richard,
> 
> the problem is that your classpath for the jasper path is not correct.
> So this Null Pointer exception actually means that some class was not found.
> Note that you need all the tomcat libraries in your jaser classpath, as well
> as your libs as well.
> I post you my script, which is working Ok (on Tomcat 5.5.7).

Yes, the problem is indeed that the task definition had been
mistakingly removed in this build from the catalina.tasks properties
file.

-- 
x
Rémy Maucherat
Developer & Consultant
JBoss Group (Europe) SàRL
x

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



Re: howto configure JAAS+SSO

2005-08-16 Thread Wendy Smoak

From: "Mark Benussi" <[EMAIL PROTECTED]>


However I can tell you about JAAS in Tomcat. In 5 certainly there are
issues. Essentially when you call the LoginModule to invoke your JAAS 
config

it works but it does not authenticate the proper session Subject.


Can you explain more about this?  I just _finally_ got the jsp-examples 
webapp that ships with Tomcat changed over to Kerberos authentication. Am I 
about to run into problems?


What you end up doing (Or what I did) was place a request filter in the 
app that

wraps the request with an overridden RequestWrapper and you write your own
inUserInRole against the Subject that the LoginModule returns (By placing 
it

in the session)

If you want some code, taken from Wendy Smoak ...


... who took it from one of Craig's tomcat-user posts. ;)
http://wiki.wsmoak.net/cgi-bin/wiki.pl?TomcatRequestWrapper

--
Wendy Smoak 



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



RE: 64 Bit Machines and Tomcat

2005-08-16 Thread Peter Crowther
> From: J R [mailto:[EMAIL PROTECTED] 
> Thanks... I didn't realize that Tomcat was pure Java.

There's the odd shell script and batch file to assist; other than that,
it's pure Java.  Certainly there's nothing that needs a
platform-specific compiler before it'll run, just the JVM.

> Being tortured through several CS classes that use
> Java.. I am familiar with its platform capabilities.

Heh.  Oh well, I get the 'teaching grandmother to suck eggs' prize for
the week.

- Peter

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



IIS-ISAPI issue with OPTIONS request.

2005-08-16 Thread Nayak, Usha- Kalpana
Hi,

 I have Tomcat redirector plugin DLL, isapi_redirector.dll (1.2.14)
plugin installed in IIS. I am using this redirector to connect IIS with
JBoss. I have configured isapi to redirect uri with /tc/* using
workers.properties and uriworkermap.properties. Also, Using the IIS
management console, added a new virtual directory to my IIS  web site.
The name of the virtual directory given is tomcat and the
isapi_redirector.dll seems to be loaded i.e I see green arrow.

 BTW, I have a created a directory and it has isapi_redirector.dll,
workers.properties, uriworkermap.properties,
isapi_redirector-1.2.14.reg.

 

Contents of isapi_redirector-1.2.14.reg :

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi
Redirector\1.0]

"extension_uri"="/tomcat/isapi_redirect.dll"

"log_file"="C:\\Temp\\jk_iis.log"

"log_level"="debug"

"worker_file"="E:\\isapi_redirect1.2.14\\workers.properties"

"worker_mount_file"="E:\\isapi_redirect1.2.14\\uriworkermap.properties"

 

Contents of uriworkermap.properties:

 # Send all /tc requests to node1

/tc/*=node1

Contents of workers.properties:

worker.list=node1

worker.node1.port=8009

worker.node1.host=beaorchardj01.net.plm.eds.com

worker.node1.type=ajp13


But when a request of the below form is sent:
OPTIONS /tc/FileAccess/ HTTP/1.1

I receive the below message:
HTTP/1.1 500 Server Error
Server: Microsoft-IIS/5.1
Date: Fri, 12 Aug 2005 22:10:57 GMT
Connection: close
Content-Type: text/html
Content-Length: 87

ErrorThe parameter is incorrect.


I seem to have no problem connecting to JBoss with request like POST,
GET, SEARCH.

In ISAPI logs for OPTIONS:
[Fri Aug 12 09:14:23 2005] [0352:4100] [debug]
HttpFilterProc::jk_isapi_plugin.c (747): Filter started
[Fri Aug 12 09:14:23 2005] [0352:4100] [debug]
HttpFilterProc::jk_isapi_plugin.c (813): Virtual Host redirection of
/beaorchardj01.net.plm.eds.com/tc/FileAccess/
[Fri Aug 12 09:14:23 2005] [0352:4100] [debug]
map_uri_to_worker::jk_uri_worker_map.c (449): Attempting to map URI
'/beaorchardj01.net.plm.eds.com/tc/FileAccess/' from 1 maps
[Fri Aug 12 09:14:23 2005] [0352:4100] [debug]
map_uri_to_worker::jk_uri_worker_map.c (461): Attempting to map context
URI '/tc/*'
[Fri Aug 12 09:14:23 2005] [0352:4100] [debug]
HttpFilterProc::jk_isapi_plugin.c (820): Default redirection of
/tc/FileAccess/
[Fri Aug 12 09:14:23 2005] [0352:4100] [debug]
map_uri_to_worker::jk_uri_worker_map.c (449): Attempting to map URI
'/tc/FileAccess/' from 1 maps
[Fri Aug 12 09:14:23 2005] [0352:4100] [debug]
map_uri_to_worker::jk_uri_worker_map.c (461): Attempting to map context
URI '/tc/*'
[Fri Aug 12 09:14:23 2005] [0352:4100] [debug]
map_uri_to_worker::jk_uri_worker_map.c (475): Found a wildchar match
node1 -> /tc/*
[Fri Aug 12 09:14:23 2005] [0352:4100] [debug]
HttpFilterProc::jk_isapi_plugin.c (830): check if [/tc/FileAccess/] is
points to the web-inf directory
[Fri Aug 12 09:14:23 2005] [0352:4100] [debug]
HttpFilterProc::jk_isapi_plugin.c (848): [/tc/FileAccess/] is a servlet
url - should redirect to node1

don't see below statements from isapi for OPTIONS:
[Fri Aug 12 09:14:23 2005] [0352:3556] [debug]
wc_get_worker_for_name::jk_worker.c (111): found a worker node1
[Fri Aug 12 09:14:23 2005] [0352:3556] [debug]
HttpExtensionProc::jk_isapi_plugin.c (1003): got a worker for name node1


In IIS logs:
#Software: Microsoft Internet Information Services 5.1
#Version: 1.0
#Date: 2005-08-12 16:09:39
#Fields: time c-ip cs-method cs-uri-stem sc-status 
17:29:38 134.244.174.103 POST
/tc/controller/gatewayPostserviceInvoke_link 200
17:33:01 134.244.174.103 OPTIONS /tc/FileAccess/ 500

Please help... This is very urgent. BTW, I have IIS 5.1 and working
on WinXp Professional Version 2002 Sp2

thanks...

Usha

 



RE: IIS-ISAPI issue with OPTIONS request.

2005-08-16 Thread Derrick Koes

Note that the extension URI seems to point to a slightly different dll than the 
one configured.

"extension_uri"="/tomcat/isapi_redirect.dll"

isapi_redirector.dll (1.2.14)

-Original Message-
From: Nayak, Usha- Kalpana [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 16, 2005 1:23 PM
To: tomcat-user@jakarta.apache.org
Subject: IIS-ISAPI issue with OPTIONS request.
Importance: High

Hi,

 I have Tomcat redirector plugin DLL, isapi_redirector.dll (1.2.14) plugin 
installed in IIS. I am using this redirector to connect IIS with JBoss. I have 
configured isapi to redirect uri with /tc/* using workers.properties and 
uriworkermap.properties. Also, Using the IIS management console, added a new 
virtual directory to my IIS  web site.
The name of the virtual directory given is tomcat and the isapi_redirector.dll 
seems to be loaded i.e I see green arrow.

 BTW, I have a created a directory and it has isapi_redirector.dll, 
workers.properties, uriworkermap.properties, isapi_redirector-1.2.14.reg.

 

Contents of isapi_redirector-1.2.14.reg :

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi 
Redirector\1.0]

"extension_uri"="/tomcat/isapi_redirect.dll"

"log_file"="C:\\Temp\\jk_iis.log"

"log_level"="debug"

"worker_file"="E:\\isapi_redirect1.2.14\\workers.properties"

"worker_mount_file"="E:\\isapi_redirect1.2.14\\uriworkermap.properties"

 

Contents of uriworkermap.properties:

 # Send all /tc requests to node1

/tc/*=node1

Contents of workers.properties:

worker.list=node1

worker.node1.port=8009

worker.node1.host=beaorchardj01.net.plm.eds.com

worker.node1.type=ajp13


But when a request of the below form is sent:
OPTIONS /tc/FileAccess/ HTTP/1.1

I receive the below message:
HTTP/1.1 500 Server Error
Server: Microsoft-IIS/5.1
Date: Fri, 12 Aug 2005 22:10:57 GMT
Connection: close
Content-Type: text/html
Content-Length: 87

ErrorThe parameter is incorrect.


I seem to have no problem connecting to JBoss with request like POST, GET, 
SEARCH.

In ISAPI logs for OPTIONS:
[Fri Aug 12 09:14:23 2005] [0352:4100] [debug] 
HttpFilterProc::jk_isapi_plugin.c (747): Filter started [Fri Aug 12 09:14:23 
2005] [0352:4100] [debug] HttpFilterProc::jk_isapi_plugin.c (813): Virtual Host 
redirection of /beaorchardj01.net.plm.eds.com/tc/FileAccess/
[Fri Aug 12 09:14:23 2005] [0352:4100] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (449): Attempting to map URI 
'/beaorchardj01.net.plm.eds.com/tc/FileAccess/' from 1 maps [Fri Aug 12 
09:14:23 2005] [0352:4100] [debug] map_uri_to_worker::jk_uri_worker_map.c 
(461): Attempting to map context URI '/tc/*'
[Fri Aug 12 09:14:23 2005] [0352:4100] [debug] 
HttpFilterProc::jk_isapi_plugin.c (820): Default redirection of /tc/FileAccess/ 
[Fri Aug 12 09:14:23 2005] [0352:4100] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (449): Attempting to map URI 
'/tc/FileAccess/' from 1 maps [Fri Aug 12 09:14:23 2005] [0352:4100] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (461): Attempting to map context URI 
'/tc/*'
[Fri Aug 12 09:14:23 2005] [0352:4100] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (475): Found a wildchar match
node1 -> /tc/*
[Fri Aug 12 09:14:23 2005] [0352:4100] [debug] 
HttpFilterProc::jk_isapi_plugin.c (830): check if [/tc/FileAccess/] is points 
to the web-inf directory [Fri Aug 12 09:14:23 2005] [0352:4100] [debug] 
HttpFilterProc::jk_isapi_plugin.c (848): [/tc/FileAccess/] is a servlet url - 
should redirect to node1

don't see below statements from isapi for OPTIONS:
[Fri Aug 12 09:14:23 2005] [0352:3556] [debug] 
wc_get_worker_for_name::jk_worker.c (111): found a worker node1 [Fri Aug 12 
09:14:23 2005] [0352:3556] [debug] HttpExtensionProc::jk_isapi_plugin.c (1003): 
got a worker for name node1


In IIS logs:
#Software: Microsoft Internet Information Services 5.1
#Version: 1.0
#Date: 2005-08-12 16:09:39
#Fields: time c-ip cs-method cs-uri-stem sc-status
17:29:38 134.244.174.103 POST
/tc/controller/gatewayPostserviceInvoke_link 200
17:33:01 134.244.174.103 OPTIONS /tc/FileAccess/ 500

Please help... This is very urgent. BTW, I have IIS 5.1 and working on 
WinXp Professional Version 2002 Sp2

thanks...

Usha

 


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



RE: IIS-ISAPI issue with OPTIONS request.

2005-08-16 Thread Nayak, Usha- Kalpana
Hi,

I seem to have no problem connecting to JBoss with request like POST,
GET, SEARCH. So I am thinking everything is configured correctly. 

My virtual directory tomcat maps to E:\\isapi_redirect1.2.14.
Properties on Default Web Site ->ISAPI Filters, click on filter
installed 
Filter Name : tomcat
Status : Loaded
Executable : E:\isapi_redirect1.2.14\isapi_redirect.dll
Priority : High

Also, would like to mention I can debug the isapi dll and while
debugging, POST, GET, SEARCH request call HttpExtensionProc function in
isapi dll and then return HttpFilterProc.

DWORD WINAPI HttpExtensionProc(LPEXTENSION_CONTROL_BLOCK lpEcb) 
DWORD WINAPI HttpFilterProc(PHTTP_FILTER_CONTEXT pfc,
DWORD dwNotificationType, LPVOID
pvNotification)

Incase of OPTIONS, HttpExtensionProc is called after which
HttpFilterProc is never called.

Will appreciate all your help... Thanks...
Usha

-Original Message-
From: Derrick Koes [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 16, 2005 10:34 AM
To: Tomcat Users List
Subject: RE: IIS-ISAPI issue with OPTIONS request.


Note that the extension URI seems to point to a slightly different dll
than the one configured.

"extension_uri"="/tomcat/isapi_redirect.dll"

isapi_redirector.dll (1.2.14)

-Original Message-
From: Nayak, Usha- Kalpana [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 16, 2005 1:23 PM
To: tomcat-user@jakarta.apache.org
Subject: IIS-ISAPI issue with OPTIONS request.
Importance: High

Hi,

 I have Tomcat redirector plugin DLL, isapi_redirector.dll (1.2.14)
plugin installed in IIS. I am using this redirector to connect IIS with
JBoss. I have configured isapi to redirect uri with /tc/* using
workers.properties and uriworkermap.properties. Also, Using the IIS
management console, added a new virtual directory to my IIS  web site.
The name of the virtual directory given is tomcat and the
isapi_redirector.dll seems to be loaded i.e I see green arrow.

 BTW, I have a created a directory and it has isapi_redirector.dll,
workers.properties, uriworkermap.properties,
isapi_redirector-1.2.14.reg.

 

Contents of isapi_redirector-1.2.14.reg :

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi
Redirector\1.0]

"extension_uri"="/tomcat/isapi_redirect.dll"

"log_file"="C:\\Temp\\jk_iis.log"

"log_level"="debug"

"worker_file"="E:\\isapi_redirect1.2.14\\workers.properties"

"worker_mount_file"="E:\\isapi_redirect1.2.14\\uriworkermap.properties"

 

Contents of uriworkermap.properties:

 # Send all /tc requests to node1

/tc/*=node1

Contents of workers.properties:

worker.list=node1

worker.node1.port=8009

worker.node1.host=beaorchardj01.net.plm.eds.com

worker.node1.type=ajp13


But when a request of the below form is sent:
OPTIONS /tc/FileAccess/ HTTP/1.1

I receive the below message:
HTTP/1.1 500 Server Error
Server: Microsoft-IIS/5.1
Date: Fri, 12 Aug 2005 22:10:57 GMT
Connection: close
Content-Type: text/html
Content-Length: 87

ErrorThe parameter is incorrect.


I seem to have no problem connecting to JBoss with request like POST,
GET, SEARCH.

In ISAPI logs for OPTIONS:
[Fri Aug 12 09:14:23 2005] [0352:4100] [debug]
HttpFilterProc::jk_isapi_plugin.c (747): Filter started [Fri Aug 12
09:14:23 2005] [0352:4100] [debug] HttpFilterProc::jk_isapi_plugin.c
(813): Virtual Host redirection of
/beaorchardj01.net.plm.eds.com/tc/FileAccess/
[Fri Aug 12 09:14:23 2005] [0352:4100] [debug]
map_uri_to_worker::jk_uri_worker_map.c (449): Attempting to map URI
'/beaorchardj01.net.plm.eds.com/tc/FileAccess/' from 1 maps [Fri Aug 12
09:14:23 2005] [0352:4100] [debug]
map_uri_to_worker::jk_uri_worker_map.c (461): Attempting to map context
URI '/tc/*'
[Fri Aug 12 09:14:23 2005] [0352:4100] [debug]
HttpFilterProc::jk_isapi_plugin.c (820): Default redirection of
/tc/FileAccess/ [Fri Aug 12 09:14:23 2005] [0352:4100] [debug]
map_uri_to_worker::jk_uri_worker_map.c (449): Attempting to map URI
'/tc/FileAccess/' from 1 maps [Fri Aug 12 09:14:23 2005] [0352:4100]
[debug] map_uri_to_worker::jk_uri_worker_map.c (461): Attempting to map
context URI '/tc/*'
[Fri Aug 12 09:14:23 2005] [0352:4100] [debug]
map_uri_to_worker::jk_uri_worker_map.c (475): Found a wildchar match
node1 -> /tc/*
[Fri Aug 12 09:14:23 2005] [0352:4100] [debug]
HttpFilterProc::jk_isapi_plugin.c (830): check if [/tc/FileAccess/] is
points to the web-inf directory [Fri Aug 12 09:14:23 2005] [0352:4100]
[debug] HttpFilterProc::jk_isapi_plugin.c (848): [/tc/FileAccess/] is a
servlet url - should redirect to node1

don't see below statements from isapi for OPTIONS:
[Fri Aug 12 09:14:23 2005] [0352:3556] [debug]
wc_get_worker_for_name::jk_worker.c (111): found a worker node1 [Fri Aug
12 09:14:23 2005] [0352:3556] [debug]
HttpExtensionProc::jk_isapi_plugin.c (1003): got a worker for name node1


In IIS logs:
#Software: Microsoft Internet Information Services 5.1
#Version: 1.0
#Date: 2005-08-12 16:09:39
#Fields: time c-ip cs-method cs-uri-stem sc-s

Re: Apache/Tomcat integration - Update

2005-08-16 Thread Darryl L. Miles


Do you have a line in Apache:

NameVirtualHost *:80

I dont think ServerName should have the port number after it.  This and 
ServerAlias are Host: header matching values.




I suspect your only remaining problem now is to get Apache and 
Tomcat to see the same website document roots for the same URLs.  
This maybe a problem if you are using deployed WARs since tomcat 
can and will delete the directory from under apache during the 
deployment process.


How do you mean "TC can and will delete the directory from under 
Apache"? Which directory do you mean? At this point, I am only trying 
to view the WARs bundled with TC. I am starting TC before Apache with 
the apps already deployed (so far).


I suggest you learn more about the exact nature of the "deployment 
procedure" from an packed WAR to an unpacked WAR that goes in within TC.



--
Darryl L. Miles



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



Compatibilty Package

2005-08-16 Thread Qin Ding
Hi:

Where can I download the compatibility package for the tomcat 5.5.9 and 
jdk1.4.2? Please advise.  Thanks.

qd



This is a PRIVATE message. If you are not the intended recipient, please 
delete without copying and kindly advise us by e-mail of the mistake in 
delivery. NOTE: Regardless of content, this e-mail shall not operate to 
bind CSC to any order or other contract unless pursuant to explicit 
written agreement or government initiative expressly permitting the use of 
e-mail for such purpose.



Re: Virtual Hosting with WAR files

2005-08-16 Thread Darryl L. Miles

Charles Meier wrote:



If I understand this setup correctly, you would be running one 
instance of Tomcat for all of your
virtual hosts.  This has the disadvantage that if one virtual host 
needs to be restarted, you will need

to restart Tomcat for all of your virtual hosts.

An alternative is to let Apache handle the virtual hosts and run 
multiple instances of Tomcat --
one instance per virtual host.  This requires multiple mod_jk 
instances, each communicating
across a unique port with an instance of Tomcat.  Each Tomcat should 
be deployed to its own
home dir w/ its own CATALINA_HOME pointing to that directory and with 
each Tomcat
given its own start/stop.sh script that sets CATALINA_HOME.  This is 
more complex to
set up, and I'm not sure how many separate Tomcats this can handle, 
but it does allow you

to have something like:


Maybe this is realistic in your hosting setup, but it would be absurd in 
mine.  The fact you are concerned that VirtualHost changing on the fly 
is an issue suggests you might have a great many VirtualHosts in the 
first place and to give each one their own JVM would be absurd.


As each JVM gets more and more use they will eat up system resources 
that it wont necessarly be given back to the system.  Each Apache 
instance will end up with a AJP socket open to each TC it would multiply 
up the socket usage, memory usage.


All so that you dont have to restart TC for VirtualHost changes.  I 
would much sooner write the code in TC (if its not already been done) to 
allow  level configuration changes to take place at runtime.



--
Darryl L. Miles



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



RE: Compatibilty Package

2005-08-16 Thread Caldarale, Charles R
> From: Qin Ding [mailto:[EMAIL PROTECTED] 
> Subject: Compatibilty Package
> 
> Where can I download the compatibility package for the tomcat 
> 5.5.9 and jdk1.4.2?

This is called hide in plain sight.  It's the download named "Compat" on
the main Tomcat download page
(http://jakarta.apache.org/site/downloads/downloads_tomcat-5.cgi).

 - Chuck


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

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



virtual host and JkMount with jk1.2.14

2005-08-16 Thread Danico Lee


i got tomcat5, apache1.3 and jk1.2.14.  i'm very confused with JkMount. in my 
http.conf, i have:



ServerName our_server
DocumentRoot "${tomcat_home}/webapps/test1"
JkAutoAlias ${tomcat_home}/webapps
JkMount /test1/* worker1


if i go to http://our_server/test1/, it works.  but this is not what i want.  i 
want it to be http://test1.our_server/ instead.  i got this:



ServerName test1.our_server
DocumentRoot "${tomcat_home}/webapps/test1"
JkMount /* worker1


when i go to http://test1.our_server/,  it always displays the default pages 
under ${tomcat_home}/webapps/ROOT/ instead of ${tomcat_home}/webapps/test1/.


i tried messing with  in server.xml, JKAutoAlias, etc.  couldn't get 
it to work.  very frustrated.  pls help.


danico

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



Re: How to automatically start tomcat 5.5.9 under linux using local user

2005-08-16 Thread Darryl L. Miles

Duong BaTien wrote:


I set tomcat 5.5.9 running in port 8080 so it can be started without
using the root user. However, when I start tomcat using linux rc.local
at system start up (/apps/tomcat-5/bin/startup.sh), it seems that the
tomcat instance is started under root.

Question: Where do i set the user that starts tomcat instance via Redhat
 


Fedora Core start up?
 



READ: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/setup.html

Check out the "-user " argument to "jsvc" which may not be so 
well documented.



For non-root running check out "jsvc" bundled with Tomcat:

Extracted TC to /opt/jakarta-tomcat-5.5.9

# To run it as java service need to build jsvc
cd $CATALINA_HOME/bin
tar -zxvf jsvc.tar.gz
cd jsvc-src
autoconf
JAVA_HOME="/opt/jdk1.5.0_04"
export JAVA_HOME
sh ./configure
make
cp jsvc ..
cd ..

# Create a system user for tomcat
/usr/sbin/groupadd  -g 155 jakarta
/usr/sbin/useradd -u 155 -g jakarta -s /sbin/nologin jakarta

# Fix all the permissions on the $CATALINA_HOME with
chown jakarta. -R $CATALINA_HOME

# This bit below you can put into your own startup script for TC and 
call each time

JAVA_HOME="/opt/jdk1.5.0_04"
export JAVA_HOME
PATH="$JAVA_HOME/bin:$PATH"
export PATH

CATALINA_HOME=/opt/jakarta-tomcat-5.5.9
export CATALINA_HOME

cd $CATALINA_HOME
   ./bin/jsvc -Djava.endorsed.dirs=./common/endorsed -cp 
./bin/bootstrap.jar \

   -outfile ./logs/catalina.out -errfile ./logs/catalina.err \
   -pidfile "./logs/jsvc.pid" \
   -user jakarta \
   org.apache.catalina.startup.Bootstrap





Maybe you create a script in /etc/init.d/mytomcat that works the same 
way at the others in there ?  Then symlink from each useful runlevel 
/etc/rc.d/rc[345].d/mytomcat -> /etc/initd.d/mytomcat, use 
/sbin/runlevel to see which you are at already.


Maybe you are lazy and simply add a few lines to /etc/rc.local ?


Eitherway should do the trick.

--
Darryl L. Miles



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



RE: howto configure JAAS+SSO

2005-08-16 Thread Mark Benussi
Hi Wendy,

Sure I can explain what happens but not why.

When you call the LoginModule with an optional Subject and CallBack the code
works fine for me, i.e. it calls the LoginModule and I do everything I need,
placing the Principals into the Subject.

However... and this is where I don't want to say anything sweeping in case I
have just simply misunderstood the Subject that is authenticated via the
LoginModule has no visibility to Tomcat. If I could find a way to replace
the session Subject with the one passed back from the
LoginModule.getSubject() I would be ok, but I couldn't, so I placed the
authorised Subject in the session and overrode the request.isUserInRole() to
authorise against the Subject I placed in the session.

One of these days I might ask the Tomcat dev list what I was doing wrong but
got comments from other developers saying they had the same problem [All the
JAAS examples do it the way I have described in some shape or form]

Its not that bid a deal, and if you just use the Request wrapper I have
attached you know that in the future you can remove the filter if you go to
WebSphere or something like that.

-Original Message-
From: Wendy Smoak [mailto:[EMAIL PROTECTED] 
Sent: 16 August 2005 17:44
To: Tomcat Users List
Subject: Re: howto configure JAAS+SSO

From: "Mark Benussi" <[EMAIL PROTECTED]>

> However I can tell you about JAAS in Tomcat. In 5 certainly there are
> issues. Essentially when you call the LoginModule to invoke your JAAS 
> config
> it works but it does not authenticate the proper session Subject.

Can you explain more about this?  I just _finally_ got the jsp-examples 
webapp that ships with Tomcat changed over to Kerberos authentication. Am I 
about to run into problems?

> What you end up doing (Or what I did) was place a request filter in the 
> app that
> wraps the request with an overridden RequestWrapper and you write your own
> inUserInRole against the Subject that the LoginModule returns (By placing 
> it
> in the session)
>
> If you want some code, taken from Wendy Smoak ...

.. who took it from one of Craig's tomcat-user posts. ;)
http://wiki.wsmoak.net/cgi-bin/wiki.pl?TomcatRequestWrapper

-- 
Wendy Smoak 


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


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



Re: Tomcat5 / war file deployment: symlink problem

2005-08-16 Thread Darryl L. Miles

Alan Cooper wrote:

I have a tomcat5 installation running on a RHEL ES3 box which I am 
having some issues with.


I have a symlink back to an images directory which is outside the 
context. This works fine and I can read the images etc.


The problem occurs when I redeploy the context through the manager 
webapp: when the context is removed. the removal script seems to 
follow the symlinks, thus deleting my images directory.


Any suggestions on how to avoid this?


If they are part of the web-app then they should be inside the WAR in 
the first place.  The idea of the WAR is that its a self-contained 
COMPLETE web-application with no (few) external dependancies.


If they are an external repository your web-app can look into and work 
with, then you need to define some level of logical seporation in your 
web-app (like an API).  This maybe as simple as defining a property 
key/value with the absolute path to the top-level directory of the 
repositorory then making all file access to it resolve the system path 
before using it.  By doing that you can now move your images out of the 
web-app WAR file area and put them anywhere.  This is only useful if 
your servlets want file access to the repository but it sounds like you 
want HTML access to "images/foobar.gif" so they can be served directly.


--
Darryl L. Miles



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



persistence with sessions & distributable attribute

2005-08-16 Thread Nishant Deshpande
Hoping for some help from the tomcat experts on this list.

I want to ensure all objects stored in sessions are serializable.

I read that I can put the  tag in my web.xml file to
'enforce' this.

But I don't see any enforcing happening. I assumed it would throw
exceptions at runtime when I did 'setAttribute("xxx",
SomeNonSerializableObject)'.

I have put 'distributable' in

web.xml:  ...  ... 

I also have the following in server.xml:



  
  

  




Am I missing something? How is the serializability enforced?

Also another question: the serialization does not happen in the
directory i specify for Store above, rather it happens in the
$CATALINA_HOME/work/Catalina/* directories. Any ideas about this one?

Thanks,

Nishant

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



Re: persistence with sessions & distributable attribute

2005-08-16 Thread Nishant Deshpande
Apologies - I omitted the tomcat version: 5.0.28

On 8/16/05, Nishant Deshpande <[EMAIL PROTECTED]> wrote:
> Hoping for some help from the tomcat experts on this list.
> 
> I want to ensure all objects stored in sessions are serializable.
> 
> I read that I can put the  tag in my web.xml file to
> 'enforce' this.
> 
> But I don't see any enforcing happening. I assumed it would throw
> exceptions at runtime when I did 'setAttribute("xxx",
> SomeNonSerializableObject)'.
> 
> I have put 'distributable' in
> 
> web.xml:  ...  ... 
> 
> I also have the following in server.xml:
> 
> 
> 
>reloadable="true" debug="1"/>
>pathname="/cv/data/tmp" debug="5" saveOnRestart="true"
> distributable="true">
> directory="/cv/data/tmp"
>debug="5"/>
>   
> 
> 
> 
> 
> Am I missing something? How is the serializability enforced?
> 
> Also another question: the serialization does not happen in the
> directory i specify for Store above, rather it happens in the
> $CATALINA_HOME/work/Catalina/* directories. Any ideas about this one?
> 
> Thanks,
> 
> Nishant
>

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



Re: How to automatically start tomcat 5.5.9 under linux using local user

2005-08-16 Thread Duong BaTien
Thanks. I will take a look at it.

BaTien

On Tue, 2005-08-16 at 20:31 +0100, Darryl L. Miles wrote:
> Duong BaTien wrote:
> 
> >I set tomcat 5.5.9 running in port 8080 so it can be started without
> >using the root user. However, when I start tomcat using linux rc.local
> >at system start up (/apps/tomcat-5/bin/startup.sh), it seems that the
> >tomcat instance is started under root.
> >
> >Question: Where do i set the user that starts tomcat instance via Redhat
> >  
> >
> >Fedora Core start up?
> >  
> >
> 
> READ: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/setup.html
> 
> Check out the "-user " argument to "jsvc" which may not be so 
> well documented.
> 
> 
> For non-root running check out "jsvc" bundled with Tomcat:
> 
> Extracted TC to /opt/jakarta-tomcat-5.5.9
> 
> # To run it as java service need to build jsvc
> cd $CATALINA_HOME/bin
> tar -zxvf jsvc.tar.gz
> cd jsvc-src
> autoconf
> JAVA_HOME="/opt/jdk1.5.0_04"
> export JAVA_HOME
> sh ./configure
> make
> cp jsvc ..
> cd ..
> 
> # Create a system user for tomcat
> /usr/sbin/groupadd  -g 155 jakarta
> /usr/sbin/useradd -u 155 -g jakarta -s /sbin/nologin jakarta
> 
> # Fix all the permissions on the $CATALINA_HOME with
> chown jakarta. -R $CATALINA_HOME
> 
> # This bit below you can put into your own startup script for TC and 
> call each time
> JAVA_HOME="/opt/jdk1.5.0_04"
> export JAVA_HOME
> PATH="$JAVA_HOME/bin:$PATH"
> export PATH
> 
> CATALINA_HOME=/opt/jakarta-tomcat-5.5.9
> export CATALINA_HOME
> 
> cd $CATALINA_HOME
> ./bin/jsvc -Djava.endorsed.dirs=./common/endorsed -cp 
> ./bin/bootstrap.jar \
> -outfile ./logs/catalina.out -errfile ./logs/catalina.err \
> -pidfile "./logs/jsvc.pid" \
> -user jakarta \
> org.apache.catalina.startup.Bootstrap
> 
> 
> 
> 
> 
> Maybe you create a script in /etc/init.d/mytomcat that works the same 
> way at the others in there ?  Then symlink from each useful runlevel 
> /etc/rc.d/rc[345].d/mytomcat -> /etc/initd.d/mytomcat, use 
> /sbin/runlevel to see which you are at already.
> 
> Maybe you are lazy and simply add a few lines to /etc/rc.local ?
> 
> 
> Eitherway should do the trick.
> 


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



Re: virtual host and JkMount with jk1.2.14

2005-08-16 Thread Darryl L. Miles

Danico Lee wrote:

i got tomcat5, apache1.3 and jk1.2.14.  i'm very confused with 
JkMount. in my http.conf, i have:



ServerName our_server
DocumentRoot "${tomcat_home}/webapps/test1"
JkAutoAlias ${tomcat_home}/webapps
JkMount /test1/* worker1


Are you sure the "${tomcat_home}" works in Apache.  Try putting the full 
path name there.


I've never thought the httpd.conf undergoes any substitution expansion 
before parsing, let alone also have substitution expansion work within a 
quoted string literal as well.



--
Darryl L. Miles



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



Advice for Hosting Many Individual Webapps?

2005-08-16 Thread Seth Ladd

Hello,

We are finding outselves hosting more and more individual webapps, all 
running on Tomcat 5.5.9 w/ JDK 1.5.  Each of these webapps is developed 
and deployed on a separate schedule, and the number and frequency of app 
deployments is increasing.


The frequency is so much that the uptime of all of our applications is 
affected as we continually take down Tomcat servers in production to 
deploy a new application (or new version of the application).  Because 
hot deploy does not work (the old favorite OOM error w/ too many 
redeploys), we bounce the Tomcat server for every redeploy.


To avoid taking down all of our applications when we need to redeploy a 
single app, we've begun to deploy each application to their own Tomcat 
instance.  All of these instances are fronted by a single Apache server 
handling vhosts, logging, etc.


We're just curious how common this setup really is.  We know we are in 
an uncommon position, with so many webapps (approaching 20, and growing 
very fast).  We don't want to put all our eggs in one basket, so to 
speak, so we've begun to split out individual tomcat instances.


Anyone else have to handle numerous webapps, with frequent deploys, and 
have to keep uptime for all apps as high as possible?  We hesitate to 
put all webapps in one tomcat, because to deploy one app means we have 
to take down all of our apps.  This is becoming unacceptable.  (not to 
mention that a memory leak in one app will bring down all the apps 
living in that tomcat instance)


Any tips or tricks would be really appreciated.  Or pointers to previous 
material (I've found some, but nothing that jumped out at me).


Thanks very much in advance,
Seth

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



RE: IIS(5.1)-ISAPI(1.2.14) issue with OPTIONS request.

2005-08-16 Thread Nayak, Usha- Kalpana
Hi,

Just an update: Got JK2(isapi_redirector2.dll) installed and I seem to
have no problem with OPTIONS request too. 

What's the difference between isapi_redirector2.dll v/s
isapi_redirector.dll (version 1.2.14)? Besides JK2 is deprecated.

Thanks.. Please let us know.
Usha

-Original Message-
From: Nayak, Usha- Kalpana [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 16, 2005 11:03 AM
To: Tomcat Users List
Subject: RE: IIS-ISAPI issue with OPTIONS request.

Hi,

I seem to have no problem connecting to JBoss with request like POST,
GET, SEARCH. So I am thinking everything is configured correctly. 

My virtual directory tomcat maps to E:\\isapi_redirect1.2.14.
Properties on Default Web Site ->ISAPI Filters, click on filter
installed 
Filter Name : tomcat
Status : Loaded
Executable : E:\isapi_redirect1.2.14\isapi_redirect.dll
Priority : High

Also, would like to mention I can debug the isapi dll and while
debugging, POST, GET, SEARCH request call HttpExtensionProc function in
isapi dll and then return HttpFilterProc.

DWORD WINAPI HttpExtensionProc(LPEXTENSION_CONTROL_BLOCK lpEcb) 
DWORD WINAPI HttpFilterProc(PHTTP_FILTER_CONTEXT pfc,
DWORD dwNotificationType, LPVOID
pvNotification)

Incase of OPTIONS, HttpExtensionProc is called after which
HttpFilterProc is never called.

Will appreciate all your help... Thanks...
Usha

-Original Message-
From: Derrick Koes [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 16, 2005 10:34 AM
To: Tomcat Users List
Subject: RE: IIS-ISAPI issue with OPTIONS request.


Note that the extension URI seems to point to a slightly different dll
than the one configured.

"extension_uri"="/tomcat/isapi_redirect.dll"

isapi_redirector.dll (1.2.14)

-Original Message-
From: Nayak, Usha- Kalpana [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 16, 2005 1:23 PM
To: tomcat-user@jakarta.apache.org
Subject: IIS-ISAPI issue with OPTIONS request.
Importance: High

Hi,

 I have Tomcat redirector plugin DLL, isapi_redirector.dll (1.2.14)
plugin installed in IIS. I am using this redirector to connect IIS with
JBoss. I have configured isapi to redirect uri with /tc/* using
workers.properties and uriworkermap.properties. Also, Using the IIS
management console, added a new virtual directory to my IIS  web site.
The name of the virtual directory given is tomcat and the
isapi_redirector.dll seems to be loaded i.e I see green arrow.

 BTW, I have a created a directory and it has isapi_redirector.dll,
workers.properties, uriworkermap.properties,
isapi_redirector-1.2.14.reg.

 

Contents of isapi_redirector-1.2.14.reg :

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi
Redirector\1.0]

"extension_uri"="/tomcat/isapi_redirect.dll"

"log_file"="C:\\Temp\\jk_iis.log"

"log_level"="debug"

"worker_file"="E:\\isapi_redirect1.2.14\\workers.properties"

"worker_mount_file"="E:\\isapi_redirect1.2.14\\uriworkermap.properties"

 

Contents of uriworkermap.properties:

 # Send all /tc requests to node1

/tc/*=node1

Contents of workers.properties:

worker.list=node1

worker.node1.port=8009

worker.node1.host=beaorchardj01.net.plm.eds.com

worker.node1.type=ajp13


But when a request of the below form is sent:
OPTIONS /tc/FileAccess/ HTTP/1.1

I receive the below message:
HTTP/1.1 500 Server Error
Server: Microsoft-IIS/5.1
Date: Fri, 12 Aug 2005 22:10:57 GMT
Connection: close
Content-Type: text/html
Content-Length: 87

ErrorThe parameter is incorrect.


I seem to have no problem connecting to JBoss with request like POST,
GET, SEARCH.

In ISAPI logs for OPTIONS:
[Fri Aug 12 09:14:23 2005] [0352:4100] [debug]
HttpFilterProc::jk_isapi_plugin.c (747): Filter started [Fri Aug 12
09:14:23 2005] [0352:4100] [debug] HttpFilterProc::jk_isapi_plugin.c
(813): Virtual Host redirection of
/beaorchardj01.net.plm.eds.com/tc/FileAccess/
[Fri Aug 12 09:14:23 2005] [0352:4100] [debug]
map_uri_to_worker::jk_uri_worker_map.c (449): Attempting to map URI
'/beaorchardj01.net.plm.eds.com/tc/FileAccess/' from 1 maps [Fri Aug 12
09:14:23 2005] [0352:4100] [debug]
map_uri_to_worker::jk_uri_worker_map.c (461): Attempting to map context
URI '/tc/*'
[Fri Aug 12 09:14:23 2005] [0352:4100] [debug]
HttpFilterProc::jk_isapi_plugin.c (820): Default redirection of
/tc/FileAccess/ [Fri Aug 12 09:14:23 2005] [0352:4100] [debug]
map_uri_to_worker::jk_uri_worker_map.c (449): Attempting to map URI
'/tc/FileAccess/' from 1 maps [Fri Aug 12 09:14:23 2005] [0352:4100]
[debug] map_uri_to_worker::jk_uri_worker_map.c (461): Attempting to map
context URI '/tc/*'
[Fri Aug 12 09:14:23 2005] [0352:4100] [debug]
map_uri_to_worker::jk_uri_worker_map.c (475): Found a wildchar match
node1 -> /tc/*
[Fri Aug 12 09:14:23 2005] [0352:4100] [debug]
HttpFilterProc::jk_isapi_plugin.c (830): check if [/tc/FileAccess/] is
points to the web-inf directory [Fri Aug 12 09:14:23 2005] [0352:4100]
[debug] HttpFilterProc::jk_isapi_plugin.c (848): [/tc/FileAccess/] is

webapp loading order...

2005-08-16 Thread Joe R. Lindsay
We have two webapps that communicate via jndi and 
we need to have app2 wait for app1 to load before continuing.
Is there a way to force the order in which the webapps
are started?

Joe Lindsay
email: [EMAIL PROTECTED]



Re: virtual host and JkMount with jk1.2.14

2005-08-16 Thread Danico Lee

Are you sure the "${tomcat_home}" works in Apache.  Try putting the full
path name there.

I've never thought the httpd.conf undergoes any substitution expansion
before parsing, let alone also have substitution expansion work within a
quoted string literal as well.


i'm sorry.  i was too lazy to type the whole path in my message.  i 
actually used the full path (which is /usr/system/tomcat/) instead of 
${tomcat_home} in my http.conf.


danico

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



RE: Advice for Hosting Many Individual Webapps?

2005-08-16 Thread George Sexton
The technique I use is this:

Run the HTTP connector on port 8080.

Forward port 80 to port 8080.

To re-start the system:

edit the server.xml and run the HTTP connector on port 7080
Change the shutdown port to 8006

Start tomcat, and wait till it comes up.

Re-run the firewall script to forward port 80 to port 7080.

Stop the instance running on port 7080.

The downside is that any active sessions get bounced and have to re-login.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

> -Original Message-
> From: Seth Ladd [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, August 16, 2005 3:12 PM
> To: Tomcat Users List
> Subject: Advice for Hosting Many Individual Webapps?
> 
> Hello,
> 
> We are finding outselves hosting more and more individual 
> webapps, all 
> running on Tomcat 5.5.9 w/ JDK 1.5.  Each of these webapps is 
> developed 
> and deployed on a separate schedule, and the number and 
> frequency of app 
> deployments is increasing.
> 
> The frequency is so much that the uptime of all of our 
> applications is 
> affected as we continually take down Tomcat servers in production to 
> deploy a new application (or new version of the application). 
>  Because 
> hot deploy does not work (the old favorite OOM error w/ too many 
> redeploys), we bounce the Tomcat server for every redeploy.
> 
> To avoid taking down all of our applications when we need to 
> redeploy a 
> single app, we've begun to deploy each application to their 
> own Tomcat 
> instance.  All of these instances are fronted by a single 
> Apache server 
> handling vhosts, logging, etc.
> 
> We're just curious how common this setup really is.  We know 
> we are in 
> an uncommon position, with so many webapps (approaching 20, 
> and growing 
> very fast).  We don't want to put all our eggs in one basket, so to 
> speak, so we've begun to split out individual tomcat instances.
> 
> Anyone else have to handle numerous webapps, with frequent 
> deploys, and 
> have to keep uptime for all apps as high as possible?  We hesitate to 
> put all webapps in one tomcat, because to deploy one app 
> means we have 
> to take down all of our apps.  This is becoming unacceptable. 
>  (not to 
> mention that a memory leak in one app will bring down all the apps 
> living in that tomcat instance)
> 
> Any tips or tricks would be really appreciated.  Or pointers 
> to previous 
> material (I've found some, but nothing that jumped out at me).
> 
> Thanks very much in advance,
> Seth
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


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



Re: Performance proxy_ajp vs. mod_jk when TOMCAT integration with Apache

2005-08-16 Thread Christine Ho
Hi,
   Can somebody tell me what the difference between
the proxy_ajp and mod_jk is. 

thanks,
Christine

--- Mladen Turk <[EMAIL PROTECTED]> wrote:

> Xuekun Hu wrote:
> > Hi, 
> >>From performance point, which connector will be
> used for TOMCAT
> > intergration with Apache? proxy_ajp or mod_jk?
> > 
> > I read some docs which said mod_jk should have
> better performance than
> > proxying. While proxy_ajp in Apache2.1 is an
> addition to the mod_proxy
> > and uses Tomcat's AJP protocol stack. So I ask the
> upper question.
> > 
> 
> Right, both mod_jk and proxy_ajp have almost the
> same performance,
> and they are up to twice as fast compared with http
> mostly because
> of constant connection pool. AJP protocol gives it's
> share too
> by transferring less data across the wire.
> 
> If you are using Apache 2.1+ there is no need to use
> mod_jk and
> maintain additional module.
> 
> Regards,
> Mladen.
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 





__ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail

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



Re: webapp loading order...

2005-08-16 Thread QM
On Tue, Aug 16, 2005 at 03:23:16PM -0700, Joe R. Lindsay wrote:
: We have two webapps that communicate via jndi and
: we need to have app2 wait for app1 to load before continuing.
: Is there a way to force the order in which the webapps
: are started?

You could run the apps in separate Tomcat instances.  In that case, you
would explicitly define load order: the start script would start app1 in
instance1, then app2 i instance2.

That said, the spec doesn't cover this, as well it shouldn't -- apps should
be fairly self-sufficient such that load order is irrelevant.

-QM

-- 

software   -- http://www.brandxdev.net/
tech news  -- http://www.RoarNetworX.com/
code scan  -- http://www.JxRef.org/

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



RE: TomCat 5.5.9 - 8443

2005-08-16 Thread Paul Kimbrel
I've only used keytool - and it worked like a charm for me. 

-Original Message-
From: Tom Spence [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 16, 2005 9:23 AM
To: Tomcat Users List
Subject: Re: TomCat 5.5.9 - 8443

Can I use ikeyman or keytool or both?
 
Cuz, I need to use SSL like 8443 so bad...

Paul Kimbrel <[EMAIL PROTECTED]> wrote:
Something I forgot to mention. When you are generating your certificate, it
will ask for your first and last name. Enter the name of the server your
appliation will be running on. In the case of development - this is usally
"localhost". Otherwise, the certificate will be rejected when your website
loads.

--PK

On 8/15/2005, "[EMAIL PROTECTED]"

wrote:

>It sounds like you need to set up an SSL certificate for Java. Here's a 
>site that outlines how to do this:
>
>http://jasigch.princeton.edu:9000/display/CAS/Solving+SSL+issues
>
>To use this example, make sure you have your "JAVA_HOME" environment 
>variable set properly (or replace it in the example with the 
>appropriate value). Also, the example references "%FILE_NAME%". Don't 
>use this - in all the other places in the example, it uses "server.crt" 
>- use that instead of the FILE_NAME variable. And finally, it will 
>still pop up and ask you for the keystore pass code. Just enter "changeit".
>And don't change it - until you've gotten down the road and figure out 
>how all that works. I tried it once, and things got reallys screwed up.
>
>But once, you get that up and running, you should be gold!
>
>--PK
>
>On 8/15/2005, "Tom Spence" wrote:
>
>> I can open
>> 
>> http://localhost:8080
>> 
>> but, can't open
>> 
>> https://localhost:8443
>> 
>> Any idea why?
>> 
>> Of course I did uncomment at 8443 area in server.xml and set up by >
using keytool. Nothing happened.
>> 
>> 
>> 
>> (__[TomCigar]___~~~
>> 
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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




(__[TomCigar]___~~~ 




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



Calculating required memory

2005-08-16 Thread Oleg
Hi,

I am trying to approximate the amount of memory my server will need running 
tomcat. I understand that a lot depends on how the appication handles 
resources, however at this point I am trying to figure out what will be the 
mimimum needed. In my case I have virtual hosting setup, with all hosts 
sharing the same libraries, so I have struts, hibernate,... all sitting in 
shared/lib directory of Tomcat. Would I be correct to estimate that Tomcat 
will atleast need

n(number of users/applications) * mb(total size of shared/lib)

I hope I am wrong because my shared is about 8MB, so to have 300 identical 
application deployed, I will need at least 2.4GB and than some

Could some one please explain how it actually works?

Thanks
Oleg


Re: Performance proxy_ajp vs. mod_jk when TOMCAT integration with Apache

2005-08-16 Thread Xuekun Hu
proxy_ajp is mod_jk successor in Apache2.1/2.2 core. 
You can find more info:
http://httpd.apache.org/docs-2.1/mod/mod_proxy.html
http://httpd.apache.org/docs-2.1/mod/mod_proxy_ajp.html
http://httpd.apache.org/docs-2.1/mod/mod_proxy_balancer.html

Thx, Xuekun

On 8/17/05, Christine Ho <[EMAIL PROTECTED]> wrote:
> Hi,
>   Can somebody tell me what the difference between
> the proxy_ajp and mod_jk is.
> 
> thanks,
> Christine

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



Re: Apache/Tomcat integration - Update

2005-08-16 Thread Kyle



Darryl L. Miles wrote:


Do you have a line in Apache:

NameVirtualHost *:80

I dont think ServerName should have the port number after it.  This and 
ServerAlias are Host: header matching values.




Darryl,

yes I do.

However the ServerName directive I have been referring to in all msgs is 
the global ServerName directive that comes in much further up the file 
(example file anyway). The actual Hostname of the machine. It is this 
name I have been putting into the  tag as the default VHost.


I.e. It is this name I want the machine to respond with rather than 
www as a default.


I'm beginning to wonder whether this is the right thing to be doing.

--
Kind Regards

Kyle


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



RE: Calculating required memory

2005-08-16 Thread Caldarale, Charles R
> From: Oleg [mailto:[EMAIL PROTECTED] 
> Subject: Calculating required memory
> 
> Would I be correct to estimate that Tomcat will atleast need
> 
> n(number of users/applications) * mb(total size of shared/lib)

In a word, no - disk space occupied by class files has no correlation
with memory consumed by a running application.  Class files are
primarily composed of the constant pool and byte codes, whereas the vast
majority of memory used by most Java applications is taken up by
dynamically created objects, which is highly dependent on application
logic.

You really can't estimate memory use with any degree of confidence
without actually running your application, using various loads and
forcing garbage collections to occur.  Given the low price and ready
availability of memory these days, this really shouldn't be much of a
concern.  Of course, it would be possible for some monstrous app to
exhaust the per-process virtual space provided by your OS...

 - Chuck


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

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



RE: webapp loading order...

2005-08-16 Thread Joe R. Lindsay
You may be right in a perfect world, but well... I don't think
we'll get there this week.
 
I have a 3rd party app that I am dependent on and I'd prefer
to avoid the cost of rmi across multiple Tomcat instances.
 
I don't give up easily so I am going to try to use the Tomcat
manager app and just script the starting and stopping of applications
rather than leave that to the vagaries of Tomcat.  I am sure to find
this imperfect but being an old ops guy, but control feels more
deterministic to me...and I've enough datacenter surprise for this
life.
 
If anyone has tried this and gone down in flames, let me know
or just have sympathy for me ;)
 
 

Joe Lindsay
email: [EMAIL PROTECTED]

 
 
 



From: QM [mailto:[EMAIL PROTECTED]
Sent: Tue 8/16/2005 5:30 PM
To: Tomcat Users List
Subject: Re: webapp loading order...



On Tue, Aug 16, 2005 at 03:23:16PM -0700, Joe R. Lindsay wrote:
: We have two webapps that communicate via jndi and
: we need to have app2 wait for app1 to load before continuing.
: Is there a way to force the order in which the webapps
: are started?

You could run the apps in separate Tomcat instances.  In that case, you
would explicitly define load order: the start script would start app1 in
instance1, then app2 i instance2.

That said, the spec doesn't cover this, as well it shouldn't -- apps should
be fairly self-sufficient such that load order is irrelevant.

-QM

--

software   -- http://www.brandxdev.net/
tech news  -- http://www.RoarNetworX.com/
code scan  -- http://www.JxRef.org/

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




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

Re: persistence with sessions & distributable attribute

2005-08-16 Thread Lintang JP
hi Nishant,
You might want to put all your session variable inside HashMap or other 
datatypes that implements Serializable, rather than put it just in a single 
variable. Refer to the javadocs, what are those Serializable data types are. 
Or maybe you can build your own class with something like this :
 public class StoredSessionValue implements Serializable {
 // your session variable goes here
  // your setter and getter method for those variables goes here
}

You did right on your  tags.
 On 8/17/05, Nishant Deshpande <[EMAIL PROTECTED]> wrote: 
> 
> Hoping for some help from the tomcat experts on this list.
> 
> I want to ensure all objects stored in sessions are serializable.
> 
> I read that I can put the  tag in my web.xml file to
> 'enforce' this.
> 
> But I don't see any enforcing happening. I assumed it would throw
> exceptions at runtime when I did 'setAttribute("xxx",
> SomeNonSerializableObject)'.
> 
> I have put 'distributable' in
> 
> web.xml:  ...  ... 
> 
> I also have the following in server.xml:
> 
> 
> 
>  reloadable="true" debug="1"/>
>  pathname="/cv/data/tmp" debug="5" saveOnRestart="true"
> distributable="true">
>  directory="/cv/data/tmp"
> debug="5"/>
> 
> 
> 
> 
> 
> Am I missing something? How is the serializability enforced?
> 
> Also another question: the serialization does not happen in the
> directory i specify for Store above, rather it happens in the
> $CATALINA_HOME/work/Catalina/* directories. Any ideas about this one?
> 
> Thanks,
> 
> Nishant
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
---
http://www.psychotazkia.or.id


RE: Virtual Hosting with WAR files

2005-08-16 Thread Mahesh S Kudva
Thanks to all.

This setup has been tested on Apache2+JBoss+mod_jk-1.2.14_for MacOSX. And 
am sure it will work on other platforms as well. This setup also handles 
Apache related webapps..

Make the required entries in the DNS

webapp.war: Extract the war file using zip and rename the folder 
with .war extension. Please put it in your deployment folder.

mod-jk.so: Obtain the modjk.so library file from www.apache.org and place 
then in the modules folder.

Apache-Virtual Host config
--
NameVirtualHost *.*.*.*:80


ServerName webapp.robosoft.co.in
ServerAlias www.webapp.robosoft.co.in
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /Volumes/Extra/jboss/server/default/deploy/webapp.war
JkMount /* loadbalancer
DirectoryIndex index.html index.jsp
ErrorLog logs/webapp-error_log
CustomLog logs/webapp-access_log common

-
mod-jk.conf

LoadModule jk_module /opt/apache2/modules/mod_jk.so

JkWorkersFile /opt/apache2/conf/workers.properties
JkLogFile /opt/apache2/logs/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"
JkMount /webapp.domain.com/*.jsp loadbalancer
JkMountFile /opt/apache2/conf/uriworkermap.properties
JkShmFile /opt/apache2/logs/jk.shm

JkMount status
Allow from all


--
Server.xml
-


www.webapp.domain.com




--
--
uriworkermap.properties

/jmx-console=loadbalancer
/jmx-console/*=loadbalancer
/web-console=loadbalancer
/web-console/*=loadbalancer
/webapp.domain.com/*.jsp 

--
--
workers.properties


worker.list=loadbalancer,status

worker.webapp.port=8009
worker.webapp.host=webapp.domain.com
worker.webapp.type=ajp13
worker.webapp.lbfactor=1
worker.webapp.cachesize=10

worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=library
worker.loadbalancer.sticky_session=1
worker.loadbalancer.local_worker_only=1
worker.list=loadbalancer

worker.status.type=status


Regards & Thanks

Mahesh S Kudva
Network Analyst
Robosoft Technologies



---
Robosoft Technologies - Partners in Product Development



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



Re: virtual host and JkMount with jk1.2.14

2005-08-16 Thread Mladen Turk

Danico Lee wrote:


i got tomcat5, apache1.3 and jk1.2.14.  i'm very confused with JkMount. 
in my http.conf, i have:



ServerName our_server
DocumentRoot "${tomcat_home}/webapps/test1"
JkAutoAlias ${tomcat_home}/webapps
JkMount /test1/* worker1


if i go to http://our_server/test1/, it works.  but this is not what i 
want.  i want it to be http://test1.our_server/ instead.  i got this:





Mod_jk can not be used for URL rewriting. It can mount only Tomcat
contexts, so you will need to use the mod_rewrite for that.
It has been explained here couple of times, so dig the archive :)

Regards,
Mladen.

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



Re: Advice for Hosting Many Individual Webapps?

2005-08-16 Thread Radek Wierzbicki
Hi,

I very often deploy client's applications in multiple tomcat instances.
It is normal and each application does not affect another. You just need
a strong multiprocessor server with a lot of memory to sustain the last
:) The only difference is that I often configure a separate apache
instance for each tomcat instance. But one apache is also fine.

I find this setup very comfortable when it comes to updating the
application code or just restarting an application. Also, when one
tomcat crashes, others run just fine.

A tip here is to write/rewrite startup script so that it handles
multiple instances of tomcat. It is also a good idea to create an
environment profile file for each instance where you define stuff like
JAVA_HOME or JAVA_OPTS for each instance separatelly and store it with
the configuration. The development expense may be unneccessary if you
only have one setup like that.

I hope you are using the $CATALINA_HOME and $CATALINA_BASE variables to
separate binaries from runtime/configuration files of each instance and
you're not copying the whole tomcat tree.

Think about file and process ownerships when web applications belong to
different owners.

If you want to ensure reliability then clone the machine and put a
redirector in front of both. It scales very well and the user impact in
case of trouble is not 100%.

--Radek W.


Seth Ladd wrote:
> Hello,
> 
> We are finding outselves hosting more and more individual webapps, all
> running on Tomcat 5.5.9 w/ JDK 1.5.  Each of these webapps is developed
> and deployed on a separate schedule, and the number and frequency of app
> deployments is increasing.
> 
> The frequency is so much that the uptime of all of our applications is
> affected as we continually take down Tomcat servers in production to
> deploy a new application (or new version of the application).  Because
> hot deploy does not work (the old favorite OOM error w/ too many
> redeploys), we bounce the Tomcat server for every redeploy.
> 
> To avoid taking down all of our applications when we need to redeploy a
> single app, we've begun to deploy each application to their own Tomcat
> instance.  All of these instances are fronted by a single Apache server
> handling vhosts, logging, etc.
> 
> We're just curious how common this setup really is.  We know we are in
> an uncommon position, with so many webapps (approaching 20, and growing
> very fast).  We don't want to put all our eggs in one basket, so to
> speak, so we've begun to split out individual tomcat instances.
> 
> Anyone else have to handle numerous webapps, with frequent deploys, and
> have to keep uptime for all apps as high as possible?  We hesitate to
> put all webapps in one tomcat, because to deploy one app means we have
> to take down all of our apps.  This is becoming unacceptable.  (not to
> mention that a memory leak in one app will bring down all the apps
> living in that tomcat instance)
> 
> Any tips or tricks would be really appreciated.  Or pointers to previous
> material (I've found some, but nothing that jumped out at me).
> 
> Thanks very much in advance,
> Seth
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


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