Re: Protecting applications in Tomcat using Directory Server

2005-09-25 Thread Mark Thomas

Surya Mishra wrote:

 I have successfully used JNDI realm to protect my applications on Tomcat.
But if Tomcat is unable to connect to the the directory server, it refuses
access. I want it to use the tomcat-users list as a backup if it fails to
connect to the directory. It seems if the JNDI realm is set up, the
tomcat-users.cml file entries become useless.
Need Help!!!
Thanks
-Surya

You are correct. This type of fall-back from one realm to another is 
not supported. However, JNDI does have an alternateURL attribute which 
is used if connecting to connectionURL fails. It isn't as well 
documented as it should be - something that I'll fix later today - but 
if you search 
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/realm-howto.html for 
alternateURL you should find the info you need.


More generally, I suspect that making your directory more reliable (or 
replicating to a second directory and using the alternateURL) is going 
to be less effort and less error prone that trying to keep to 
completely different lists of users, passwords and role assignments in 
sync.


Mark



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



RE: Re: heap size in tomcat 5.0

2005-09-25 Thread Caldarale, Charles R
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of matador
 Subject: Re: heap size in tomcat 5.0
 
 i assume that if you run it as a windows service then the 
 JAVA_OPTS are still picked up from there?

No, they're in the registry.  Use the tomcat5w.exe program in the bin
directory to set parameters for the service.

 well i dont think that if you install tomcat 5.5.x on windows 
 there is no catalina.bat anymore

That's correct, the scripts were left out of the .exe installer (saving
space hardly seems to be a reasonable justification), but they are in
the .zip download.

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



Synchronize wrapper for session obj attrib get/set

2005-09-25 Thread Maurice Yarrow

Hello Tomcat people

For those not wishing to migrate at this time to 5.5.12
(in our case, from 5.0.28 and jdk 1.4) would the following
be sufficient for preventing deadlock access of the session
objects ?

In a given servlet, say, ServletA, for example, might have:

HttpSession session = getSessionCheckValid( request );

synchronized( session )  {
session.setAttribute( particularAttribName,
  particularAttribVal );
}

The question arises, if this session obj is being used from
a variety of such servlets, does the above code in ServletA
prevent simultaneous access to the set method of the same obj
in a similar synchronized block in some other servlet, say,
in ServletB ?

If, on the other hand, one chooses to write a class extending
the HttpSession interface, and then (2) wrap the get/set and other 
applicable methods with synchonized methods, then what is the

minimum amount of threading machinery that must to be provided
(i.e., Runnable, run(), etc) to accomplish this wrapping ?

For that matter, has someone done this who would be willing
to share such code ?


Maurice Yarrow


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



Re: Can't change servlet path

2005-09-25 Thread Paul Singleton

Caldarale, Charles R wrote:


In addition to nesting Context elements inside a Host element, you can
also store them:
...
* in individual files (with a .xml extension) in the
$CATALINA_HOME/conf/[enginename]/[hostname]/ directory

 ...

The value of this field ...t will be infered [sic] from the filenames
used for either the .xml context file or the docBase.


From which I infer that the Context element for the default
web application of a virtual host should be held in a file
named .xml

?

Paul Singleton


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.6/111 - Release Date: 23/Sep/2005


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



RE: Can't change servlet path

2005-09-25 Thread Caldarale, Charles R
 From: Paul Singleton [mailto:[EMAIL PROTECTED] 
 Subject: Re: Can't change servlet path
 
  From which I infer that the Context element for the default
 web application of a virtual host should be held in a file
 named .xml

As with every rule, there are exceptions.  As I understand it, the
Context for the default app should be placed in ROOT.xml (caps
required).

 - 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 apps in a common appBase

2005-09-25 Thread Paul Singleton

I set up several virtual hosts with 5.5.9, each with
deployOnStartup=true (by default) and with Tomcat's webapps
folder (containing all the apps) as their appBase.  Each
Context specified a docBase path relative to this common
appBase.

From inspecting the work folder I saw that *all* apps were
started at *each* virtual host, which is not what I wanted.

So I now have separate per-host folders each holding just
one web app, plus an empty folder which I set as appBase
(I dared not leave this undefined, or pointing to a
nonexistent folder, and I reckoned I needed to leave
deployOnStartup=true).

This does what I want, but seems inelegant: can I do better?
Am I missing something?

Paul Singleton


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.6/111 - Release Date: 23/Sep/2005


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



RE: Synchronize wrapper for session obj attrib get/set

2005-09-25 Thread Caldarale, Charles R
 From: Maurice Yarrow [mailto:[EMAIL PROTECTED] 
 Subject: Synchronize wrapper for session obj attrib get/set
 
 For those not wishing to migrate at this time to 5.5.12
 (in our case, from 5.0.28 and jdk 1.4) would the following
 be sufficient for preventing deadlock access of the session
 objects ?

No.  As Wade C and others have pointed out, there are numerous
unsynchronized get/set invocations within Tomcat itself, and these have
the potential for unexpected behavior.  (Note that the problem is not
deadlock, but infinite loops and erroneous results.)

Possibly the easiest thing to do is edit the StandardSession.java file
and change the type of the attributes field to HashTable rather than
HashMap, then rebuild the associated jar.  The places that already
synchronize on attributes can be left alone, since redundant synchs are
allowed and have minimal performance impact.

 - 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: Why doesn't my context work?

2005-09-25 Thread Michael Sullivan
On Fri, 2005-09-16 at 19:31 -0700, Mark Eggers wrote:
 
 --- Michael Sullivan [EMAIL PROTECTED] wrote:
 
  OK.  For clarification I am running
  tomcat-5.0.27-r6.  I want user's
  tomcat files to be read from
  /home/*/webspace/webapps.  My personal
  account is michael so my personal tomcat directory 
  would
  be /home/michael/webspace/webapps .  Just for the
  sake of arguments I
  created a directory called user under
  /home/michael/webspace/webapps and
  moved my jsp files into it.
  My /opt/tomcat5/conf/Catalina/localhost/user.xml
  file looks like this
  now:
  
  Context
  docBase=/home/michael/webspace/webapps/user
  debug=0 privileged=true
  /Context
 
 You don't need privledged=true, so let's remove
 that.
 
  I restarted Tomcat.  I am using mod_jk and when I go
  to
  www.espersunited.com/index.jsp I see the Tomcat
  start page.  However,
 
 Good, you're using mod_jk.  You will need to do some
 Apache configuration in order for this to work.
 
 I am going to assume that /home/* lies outside of the
 DocumentRoot directory tree.
 
 1. Get Apache to recognize web directories outside of
 the DocumentRoot tree.  There are several ways of
 doing this.  One such way is given in the actuall
 httpd.conf file that comes with the stock Apache.
 
 Basically you need to give a set of Directory
 directives that give Apache access to the material in
 the home directories.
 
 If you use the userdir_module in Apache, then
 ~username/directory will become a part of the web
 space (if you take the comments out).
 
 If you do this by hand, you'll need to give both
 Directory directives and an Alias directive to move it
 into the web space that Apache serves.
 
 2. Once you do that, you'll need to add JkMount
 statements as well.  I suspect that JkMount statements
 will respond to Alias directives since JkMount deals
 with web space and not directories.
 
 I don't know if JkMount interacts with the
 userdir_module.  In other words, I don't know what
 will happen if you put in a JkMount statment that
 reads:
 
 JkMount /~*/*.jsp tomcat
 
 It would be interesting to find out if that would end
 up mapping to /~username/directory/*.jsp where
 username is the user name and directory is the
 value of UserDir.
 
 3. Once you do that, it's always nice to make a small
 WEB-INF/web.xml, even for plain jsp pages.  Something
 like the following should work:
 
 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE web-app PUBLIC
 -//Sun Microsystems, Inc.//DTD Web Application
 2.3//EN
  http://java.sun.com/dtd/web-app_2_3.dtd;
 web-app
 display-nameBeginning JSP/display-name
 descriptionContainer for quick
 jsptests/description
 welcome-file-list
   welcome-fileindex.jsp/welcome-file
 /welcome-file-list
 /webapp
 
 Sorry for the wrapping.
 
 In short, you need to do the following three steps.
 
 1. Make sure your Apache server knows about
 directories outside of DocumentRoot.  Use Directory
 and Alias directives or userdir_module.
 
 2. Use JkMount to map the expected incoming URLs to
 the Tomcat server.  Experiment to see if JkMount picks
 up on the substitutions done by userdir_module.
 
 3. Make a small WEB-INF/web.xml with the appropriate
 structure.  Creating a proper web application is
 useful, especially once you start adding servlets to
 the mix.
 
 /mde/
 


I've been wrestling the past week with the hassles of upgrading to
Apache-2.0.54-r31 on my Gentoo system.  I think I've finally got
everything working the way it's supposed to except mod_jk for my user
directories.  I tried to do the userdir thing you suggested, but I
couldn't get it to work.  Right now I use symlinks to my individual
users' website directories, but now that I've discovered Alias I'll
probably switch completely to using Aliases.  I created a test Alias
point to the ~/webspace/webapps directory in my personal account, but I
can't seem to JkMount it, and I can't figure out why.  Here is the
mod_jk portion of my httpd.conf file:

#mod_jk stuff

LoadModule jk_module modules/mod_jk.so

JkMount /*.jsp wrkr
JkMount /servlet/* wrkr
# Deny direct access to WEB-INF
LocationMatch .*WEB-INF.*
   AllowOverride None
   deny from all
/LocationMatch
Alias /michael /home/michael/webspace/webapps
Directory /home/michael/webspace/webapps
Options FollowSymLinks
AllowOverride None
/Directory

I don't know if I need that LocationMatch stuff - It was part of a
VirtualHost block that seemed to be unecessary, so I took it out.  I
tried putting my JkMount statements inside the Directory block, but
when I tried to restart Apache it gave me the following error:

JkMount can not have a path when defined in a location

In /home/michael/webspace/webapps there is a file called colors.jsp.
When I navigate my browser to www.espersunited.com/michael/colors.jsp I
get the Tomcat 404 error, yet when I navigate to
www.espersunited.com/index.jsp I get the Tomcat start page.  What am I
doing wrong?



What to put into JAVA_HOME on Windows xp

2005-09-25 Thread Markus Hapke
Hello,

I just installed tomcat 5.0.28 successfully.

Then tested the samples in 
C:\TOMCAT\webapps\jsp-examples\jsp2 - they worked.

Thed tried to test a .jsp of my own- getting the error msg in the
MS Internet-Explorer:
=== BEGIN of error Msg 
HTTP Status 500 - 

type Exception report

message 

description The server encountered an internal error () that prevented it
from fulfilling this request.

exception 

org.apache.jasper.JasperException: Unable to compile class for
JSP

org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:97)

org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:346)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:414)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)

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

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


root cause 

Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the
JDK

org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:106)
org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:935)
org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:382)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)

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

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


note The full stack trace of the root cause is available in the Apache
Tomcat/5.0.28 logs.
=== END of error Msg= ==

I set the environment entry of JAVA_HOME to 
C:\JDK1.4\AppServer\jdk\bin

Is that correct?

OK, nobody of you could know where I have my J2EE (1.4) :
it is 'mounted' under:
C:\JDK1.4\AppServer
and i can find the javac.exe under: C:\JDK1.4\AppServer\jdk\bin

Is my entry of the JAVA_HOME correct? 

Is there another error?

Thanx in advance, Markus

-- 
,,

5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
+++ GMX - die erste Adresse für Mail, Message, More +++

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



What to put into JAVA_HOME on Windows XP

2005-09-25 Thread Markus Hapke
Hello,

I just installed tomcat 5.0.28 successfully.

Then tested the samples in 
C:\TOMCAT\webapps\jsp-examples\jsp2 - they worked.

Thed tried to test a .jsp of my own- getting the error msg in the
MS Internet-Explorer:
=== BEGIN of error Msg 
HTTP Status 500 - 

type Exception report

message 

description The server encountered an internal error () that prevented it
from fulfilling this request.

exception 

org.apache.jasper.JasperException: Unable to compile class
for
JSP

org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:97)

org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:346)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:414)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)

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

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


root cause 

Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to
the
JDK

org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:106)
org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:935)
org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:382)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)

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

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


note The full stack trace of the root cause is available in the Apache
Tomcat/5.0.28 logs.
=== END of error Msg= ==

I set the environment entry of JAVA_HOME to 
C:\JDK1.4\AppServer\jdk\bin

Is that correct?

OK, nobody of you could know where I have my J2EE (1.4) :
it is 'mounted' under:
C:\JDK1.4\AppServer
and i can find the javac.exe under: C:\JDK1.4\AppServer\jdk\bin

Is my entry of the JAVA_HOME correct? 

Is there another error?

Thanx in advance, Markus


-- 
GMX DSL = Maximale Leistung zum minimalen Preis!
2000 MB nur 2,99, Flatrate ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl

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



Re: Synchronize wrapper for session obj attrib get/set

2005-09-25 Thread Leon Rosenberg
 Possibly the easiest thing to do is edit the StandardSession.java file
 and change the type of the attributes field to HashTable rather than
 HashMap, then rebuild the associated jar.  The places that already
 synchronize on attributes can be left alone, since redundant synchs are
 allowed and have minimal performance impact.

  - Chuck

Or, you take one of existing patches, see also:
http://www.niallp.pwp.blueyonder.co.uk/TomcatBug36541.html

or, you just get the last StandartSession version out of CVS ( sorry
SVN since this weekend) ,
and compile it.

regards
Leon

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



Re: What to put into JAVA_HOME on Windows XP

2005-09-25 Thread Leon Rosenberg
can you compile classes?
I mean just normal java classes out of the command prompt.
Do you start tomcat as service or with bin\catalina.bat run / bin\startup.bat?

On 9/25/05, Markus Hapke [EMAIL PROTECTED] wrote:
 Hello,

 I just installed tomcat 5.0.28 successfully.

 Then tested the samples in
 C:\TOMCAT\webapps\jsp-examples\jsp2 - they worked.

 Thed tried to test a .jsp of my own- getting the error msg in the
 MS Internet-Explorer:
 === BEGIN of error Msg 
 HTTP Status 500 -

 type Exception report

 message

 description The server encountered an internal error () that prevented it
 from fulfilling this request.

 exception

 org.apache.jasper.JasperException: Unable to compile class
 for
 JSP
 
 org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:97)
 
 org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:346)
 org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:414)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
 
 org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
 
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


 root cause

 Unable to find a javac compiler;
 com.sun.tools.javac.Main is not on the classpath.
 Perhaps JAVA_HOME does not point to
 the
 JDK
 
 org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:106)
 org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:935)
 org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
 org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:382)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
 
 org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
 
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


 note The full stack trace of the root cause is available in the Apache
 Tomcat/5.0.28 logs.
 === END of error Msg= ==

 I set the environment entry of JAVA_HOME to
 C:\JDK1.4\AppServer\jdk\bin

 Is that correct?

 OK, nobody of you could know where I have my J2EE (1.4) :
 it is 'mounted' under:
 C:\JDK1.4\AppServer
 and i can find the javac.exe under: C:\JDK1.4\AppServer\jdk\bin

 Is my entry of the JAVA_HOME correct?

 Is there another error?

 Thanx in advance, Markus


 --
 GMX DSL = Maximale Leistung zum minimalen Preis!
 2000 MB nur 2,99, Flatrate ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl

 -
 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: What to put into JAVA_HOME on Windows xp

2005-09-25 Thread Arthur D'Alessandro
Move it up one level, in your case:
C:\JDK1.4\AppServer\jdk

 On 9/25/05, Markus Hapke [EMAIL PROTECTED] wrote:

 Hello,

 I just installed tomcat 5.0.28 successfully.

 Then tested the samples in
 C:\TOMCAT\webapps\jsp-examples\jsp2 - they worked.

 Thed tried to test a .jsp of my own- getting the error msg in the
 MS Internet-Explorer:
 === BEGIN of error Msg 
 HTTP Status 500 -

 type Exception report

 message

 description The server encountered an internal error () that prevented it
 from fulfilling this request.

 exception

 org.apache.jasper.JasperException: Unable to compile class for
 JSP
 org.apache.jasper.compiler.DefaultErrorHandler.javacError(
 DefaultErrorHandler.java:97)
 org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java
 :346)
 org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:414)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
 org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java
 :511)
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java
 :295)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


 root cause

 Unable to find a javac compiler;
 com.sun.tools.javac.Main is not on the classpath.
 Perhaps JAVA_HOME does not point to the
 JDK
 org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler
 (CompilerAdapterFactory.java:106)
 org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:935)
 org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
 org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:382)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
 org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java
 :511)
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java
 :295)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


 note The full stack trace of the root cause is available in the Apache
 Tomcat/5.0.28 logs.
 === END of error Msg= ==

 I set the environment entry of JAVA_HOME to
 C:\JDK1.4\AppServer\jdk\bin

 Is that correct?

 OK, nobody of you could know where I have my J2EE (1.4) :
 it is 'mounted' under:
 C:\JDK1.4\AppServer
 and i can find the javac.exe under: C:\JDK1.4\AppServer\jdk\bin

 Is my entry of the JAVA_HOME correct?

 Is there another error?

 Thanx in advance, Markus

 --
 ,,

 5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
 +++ GMX - die erste Adresse für Mail, Message, More +++

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




--
-Art D'Alessandro


Re: Generic Types support in Tomcat?

2005-09-25 Thread Stephan van Loendersloot

Seak, Teng-Fong wrote:


   I've received an announcement mail telling that 5.5.12 is in alpha
phase!  So what's this story?  Actually, I'm more interested in using
the new for loop in Java5 than using generic.

 

I always like to think that the modularity that comes with Java is one 
of it's greatest features.


Combined with JSP and the recommended MVC model, this leaves me with 
enough options to generate pre-packaged JAR's for  inclusion with my 
web-applications.


I use the latest Eclipse (which does support those features) and I use 
the enhanced for loop and generics a lot, though mostly pre-compiled and 
pre-packaged.


Maybe it's a suitable workaround for you while waiting for the next 
stable Tomcat release.



Regards,

   --Stephan.

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



Re: Protecting applications in Tomcat using Directory Server

2005-09-25 Thread Surya Mishra
Thank You Mark,
My Tomcat server won't even start if the directory server is unreachable.
That means other applications that have not protected are also failing.
Second question: There is no attribute in the Realm definition to give a
name to realm (as per the how-to document. How do I configure different
realms for different applications? What is the default realm name for the
tomcat-users.xml? I want the manager application to run using the default
tomcat-users.xml. Another application is to be protected using JNDI realm. A
third one is public meaning nothing is protected in that application.
 Thanks
-Surya

 On 9/25/05, Mark Thomas [EMAIL PROTECTED] wrote:

 Surya Mishra wrote:
  I have successfully used JNDI realm to protect my applications on
 Tomcat.
  But if Tomcat is unable to connect to the the directory server, it
 refuses
  access. I want it to use the tomcat-users list as a backup if it fails
 to
  connect to the directory. It seems if the JNDI realm is set up, the
  tomcat-users.cml file entries become useless.
  Need Help!!!
  Thanks
  -Surya
 
 You are correct. This type of fall-back from one realm to another is
 not supported. However, JNDI does have an alternateURL attribute which
 is used if connecting to connectionURL fails. It isn't as well
 documented as it should be - something that I'll fix later today - but
 if you search
 http://jakarta.apache.org/tomcat/tomcat-5.5-doc/realm-howto.html for
 alternateURL you should find the info you need.

 More generally, I suspect that making your directory more reliable (or
 replicating to a second directory and using the alternateURL) is going
 to be less effort and less error prone that trying to keep to
 completely different lists of users, passwords and role assignments in
 sync.

 Mark



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