[ANN] Apache Tomcat 4.1.37 stable is released

2008-02-18 Thread Mark Thomas

The Apache Tomcat team is proud to announce the immediate availability
of Tomcat 4.1.37 stable. This build contains numerous library updates,
a small number of bug fixes and two important, one moderate and six low
severity security fixes.

Apache Tomcat is an implementation of the Java Server Pages 1.2 and
Java Servlet 2.3 specifications.

Please refer to the release notes for a complete list of changes.

Downloads:
http://tomcat.apache.org/download-41.cgi
Security information:
http://tomcat.apache.org/security-4.html

The Apache Tomcat Team


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



RE: JASPER libraries incompatibilities

2008-02-18 Thread Hitesh Raghav
Hi,

I've web-app developed to run with Tomcat 4.2. It used to work perfectly
fine with Tomcat 4.2.
When same web-app is deployed on Tomcat v5.5.x or v6.0.y, it fails by
throwing NullPointerException.

It works perfectly fine, when we replace JASPER libraries from Tomcat
v4.2 (from \common\lib folder).



===
type Exception report

message 

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

exception 

java.lang.NullPointerException

org.apache.jasper.runtime.TagHandlerPool.reuse(TagHandlerPool.java:132)

vrts.mgmt.sample.jsp.layouts.mainLayout_jsp._jspService(mainLayout_jsp.j
ava:87)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)

javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.jav
a:1069)

org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProc
essor.java:274)

org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(Til
esRequestProcessor.java:254)

org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(Tiles
RequestProcessor.java:309)

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
279)

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)

org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)

javax.servlet.http.HttpServlet.service(HttpServlet.java:690)

javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java
:686)

org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:6
56)

vrts.mgmt.sample.jsp.index_jsp._jspService(index_jsp.java:42)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)

javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

com.veritas.qe.authentication.AuthenticationFilter.doFilter(Authenticati
onFilter.java:210)

vrts.tomcat.admin.SecurePortRedirector.doFilter(SecurePortRedirector.jav
a:217)

vrts.tomcat.admin.SecurePortRedirector.doFilter(SecurePortRedirector.jav
a:217)

vrts.tomcat.admin.HTTPMethodBlocker.doFilter(HTTPMethodBlocker.java:160)

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



===

Please let me know in case any other details are needed.

Thanks,
-Hitesh
 

-Original Message-
From: Hitesh Raghav [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 18, 2008 7:21 PM
To: users@tomcat.apache.org
Subject: JASPER libraries incompatibilities

Hi,
 
Is there any backward incompatibility in JASPER libraries in Tomcat
(v4.x.y, 5.x.y & 6.x.y)?
 
If 'YES', could you please share appropriate URL about it.
 
 
Thanks,
-Hitesh
 

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



Tomcat6, Apache, and mod_jk configuration

2008-02-18 Thread Da Rock
I'm trying to get all of the above working together peacefully with no
success whatsoever. I've got Tomcat working, and Apache has always
worked as per usual, but mod_jk will simply not work.

I'm running all this on freebsd server, and when I navigate to /webapps
on the server I get a 404 error- but from the Tomcat server! Yet
navigating directly on the Tomcat server works fine. Am I missing
something?


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



Re: using a class from jar file

2008-02-18 Thread David Smith
The required jar files will have to be made available to the java 
compiler.  They can be made available either by pulling them from your 
war file or by downloading them from the sites that host them.  
Personally I would have an IDE (NetBean and Eclipse are both good, open 
source choices) or build tool (Maven and Ant are both excellent open 
source tools) handle the dirty work of compiling classes.


--David

polock wrote:

I made a mistake I wanted instead of war file I wrote a jar file. So the web
application has been already created. My question is if I have to compile a
java class that extends one of the classes included in a jar file. Do I have
to extract from war file necessary libraries need for the compilation of my
file or there is a more elegant way to handle this?

Christopher Schultz-2 wrote:
  

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

To whom it may concern,

polock wrote:
| I just put a jar file in my webapps folder

That's not the place to put it.

| now I would like to write
| some java files with classes that are available within jar file that
will be
| also part of a web application.

| Where should I place this new java files?

You need to create a web application, then. Find an online tutorial or a
book, and you'll see that a web application needs to have a directory
structure like this:

webapps/yourwebapp
webapps/yourwebapp/WEB-INF
webapps/yourwebapp/WEB-INF/lib
webapps/yourwebapp/WEB-INF/classes

Your JAR files go under the "lib" directory and your compiled Java
classes go under the "classes" directory (of course, in
package-appropriate subdirectories). You should really also have a
web.xml file in WEB-INF.

Note that the Java source files are irrelevant to a web application:
they need not be included.

| Should they be compiled?

Yes, and they should be installed under the "classes" directory as
indicated above.

| Also I would appreciate a reffernce to some documents where this is
| explained!

GIYF (Google is your friend): try searching the web for this
information, as it is plentiful. Ignore anything that references "Apache
JServ" which is an outdated servlet container that has been out of use
for quite a long time (yet the documentation seems to survive on the web
for some reason).

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

iEYEARECAAYFAke0eJ4ACgkQ9CaO5/Lv0PAV3gCeJDvpuaDehMXx/3mFreIOZWqb
5i8AoLgOeqI4AzX8l9Wvbgt9gCxy6ZBX
=Gzpw
-END PGP SIGNATURE-

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






  



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



Hard problem with tomcat 4.1 and jwsdp-1.3

2008-02-18 Thread Alex Florentino
Hi all,

I installed java jdk 1.4, tomcat 4.1 and jwsdp-1.3, it are configured and is
working ok.

I create a servlet that handle SOAP messages, but it have strange result.

see my codes...

*base servlet class*

package test;

import java.io.IOException;
import java.io.OutputStream;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.StringTokenizer;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.MimeHeader;
import javax.xml.soap.MimeHeaders;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;

/**
 * A servlet that can be used to host a SAAJ
 * service within a web container. This is based
 * on ReceivingServlet.java in the JWSDP tutorial
 * examples.
 */
public abstract class SAAJServlet extends HttpServlet {

/**
 * The factory used to build messages
 */
protected MessageFactory messageFactory;

/**
 * Initialisation - create the MessageFactory
 */
public void init(ServletConfig config) throws ServletException {
super.init(config);
try {

messageFactory = MessageFactory.newInstance();

} catch (SOAPException ex) {
throw new ServletException("Failed to create MessageFactory",
ex);
}

}

/**
 * Handles a POST request from a client. The request is assumed
 * to contain a SOAP message with the HTTP binding.
 */
public void doPost(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException {

try {

// Get all the HTTP headers and convert them to a MimeHeaders
object
MimeHeaders mimeHeaders = getMIMEHeaders(request);




//System.out.println("request["+request.getInputStream().available()+"]");

// Create a SOAPMessage from the content of the HTTP request
SOAPMessage message = messageFactory.createMessage(mimeHeaders,
request.getInputStream());



// Let the subclass handle the message
SOAPMessage reply = onMessage(message);

// If there is a reply, return it to the sender.
if (reply != null) {
// Set OK HTTP status, unless there is a fault.
boolean hasFault = reply.getSOAPPart
().getEnvelope().getBody().hasFault();
response.setStatus(hasFault ?

HttpServletResponse.SC_INTERNAL_SERVER_ERROR :
HttpServletResponse.SC_OK);

// Force generation of the MIME headers
if (reply.saveRequired()) {
reply.saveChanges();
}

// Copy the MIME headers to the HTTP response
setHttpHeaders(reply.getMimeHeaders(), response);

// Send the completed message
OutputStream os = response.getOutputStream();
reply.writeTo(os);
os.flush();
} else {
// No reply - set the HTTP status to indicate this
response.setStatus(HttpServletResponse.SC_NO_CONTENT);
}
} catch (SOAPException ex) {
throw new ServletException("SOAPException: " + ex);
}
}

/**
 * Method implemented by subclasses to handle a received SOAP message.
 * @param message the received SOAP message.
 * @return the reply message, or null if there is
 * no reply to be sent.
 */
protected abstract SOAPMessage onMessage(SOAPMessage message) throws
SOAPException;

/**
 * Creates a MIMEHeaders object from the HTTP headers
 * received with a SOAP message.
 */
private MimeHeaders getMIMEHeaders(HttpServletRequest request) {

MimeHeaders mimeHeaders = new MimeHeaders();

Enumeration enum = request.getHeaderNames();

while (enum.hasMoreElements()) {
String headerName = (String)enum.nextElement();
String headerValue = request.getHeader(headerName);



StringTokenizer st = new StringTokenizer(headerValue, ",");
while (st.hasMoreTokens()) {
mimeHeaders.addHeader(headerName, st.nextToken().trim());
}
}
return mimeHeaders;
}

/**
 * Converts the MIMEHeaders for a SOAP message to
 * HTTP headers in the response.
 */
private void setHttpHeaders(MimeHeaders mimeHeaders, HttpServletResponse
response) {
Iterator iter = mimeHeaders.getAllHeaders();
while (iter.hasNext()) {
MimeHeader mimeHeader = (MimeHeader)iter.next();
String headerName = mimeHeader.getName();
String[] headerValues = mimeHeaders.getHeader(headerName);

int count = headerValues

Re: Why Tomcat take about 15 minutes to start?

2008-02-18 Thread Neha Agrawal
Hi!
 i recompiled my APR 1.2.7 with /dev/urandom 
and hence recompiled Native libraries
(because Native library builds with --with-apr-)
i did not recompile the jsvc part though

I dont have X server installed on the machine.
So cannot use Jconsole.


I am attaching two outputs displayed by 
jstack and top respectively 
for the jsvc.exe started by the tomcat user

Also there is only one sample application (Hello
world)
that i have deployed on tomcat..
So applications are not causing the delay

Is there any other way to look to threads dump?

Neha

--

with Jstack i got the following output when i passed
the PID of th Tomcat process on the command line. 

---
Attaching to process ID 26595, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 1.5.0_10-b03
Thread 26607: (state = BLOCKED)


Thread 26606: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=0 (Interpreted
frame)
 - java.lang.ref.ReferenceQueue.remove(long) @bci=44,
line=116 (Interpreted frame)
 - java.lang.ref.ReferenceQueue.remove() @bci=2,
line=132 (Interpreted frame)
 - java.lang.ref.Finalizer$FinalizerThread.run()
@bci=3, line=159 (Interpreted frame)


Thread 26605: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=0 (Interpreted
frame)
 - java.lang.Object.wait() @bci=2, line=474
(Interpreted frame)
 - java.lang.ref.Reference$ReferenceHandler.run()
@bci=46, line=116 (Interpreted frame)


Thread 26595: (state = IN_NATIVE)
 -
org.apache.tomcat.jni.SSL.initialize(java.lang.String)
@bci=0 (Interpreted frame)
 - org.apache.tomcat.util.net.AprEndpoint.init()
@bci=486, line=633 (Interpreted frame)
 - org.apache.coyote.http11.Http11AprProtocol.init()
@bci=26, line=116 (Interpreted frame)
 -
org.apache.catalina.connector.Connector.initialize()
@bci=201, line=1017 (Interpreted frame)
 -
org.apache.catalina.core.StandardService.initialize()
@bci=189, line=578 (Interpreted frame)
 -
org.apache.catalina.core.StandardServer.initialize()
@bci=170, line=782 (Interpreted frame)
 - org.apache.catalina.startup.Catalina.load()
@bci=310, line=504 (Interpreted frame)
 -
sun.reflect.NativeMethodAccessorImpl.invoke0(java.lang.reflect.Method,
java.lang.Object, java.lang.Object[]) @bci=0
(Interpreted frame)
 -
sun.reflect.NativeMethodAccessorImpl.invoke(java.lang.Object,
java.lang.Object[]) @bci=87, line=39 (Interpreted
frame)
 -
sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object,
java.lang.Object[]) @bci=6, line=25 (Interpreted
frame)
 - java.lang.reflect.Method.invoke(java.lang.Object,
java.lang.Object[]) @bci=111, line=585 (Interpreted
frame)
 -
org.apache.catalina.startup.Bootstrap.load(java.lang.String[])
@bci=104, line=267 (Interpreted frame)
 -
org.apache.catalina.startup.Bootstrap.init(java.lang.String[])
@bci=6, line=282 (Interpreted frame)
 -
sun.reflect.NativeMethodAccessorImpl.invoke0(java.lang.reflect.Method,
java.lang.Object, java.lang.Object[]) @bci=0
(Interpreted frame)
 -
sun.reflect.NativeMethodAccessorImpl.invoke(java.lang.Object,
java.lang.Object[]) @bci=87, line=39 (Interpreted
frame)
 -
sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object,
java.lang.Object[]) @bci=6, line=25 (Interpreted
frame)
 - java.lang.reflect.Method.invoke(java.lang.Object,
java.lang.Object[]) @bci=111, line=585 (Interpreted
frame)
 -
org.apache.commons.daemon.support.DaemonLoader.load(java.lang.String,
java.lang.String[]) @bci=305, line=160 (Interpreted
frame)
-

and with 
#top -H -p tomcat_proceess_id

i got 

 PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEM   
TIME+  COMMAND

26595 tomcat6   15   0 1713m  54m  12m S0  1.4  
0:00.88 jsvc
26596 tomcat6   15   0 1713m  54m  12m S0  1.4  
0:00.00 jsvc
26597 tomcat6   15   0 1713m  54m  12m S0  1.4  
0:00.00 jsvc
26598 tomcat6   15   0 1713m  54m  12m S0  1.4  
0:00.00 jsvc
26599 tomcat6   15   0 1713m  54m  12m S0  1.4  
0:00.00 jsvc
26600 tomcat6   15   0 1713m  54m  12m S0  1.4  
0:00.00 jsvc
26601 tomcat6   15   0 1713m  54m  12m S0  1.4  
0:00.00 jsvc
26602 tomcat6   15   0 1713m  54m  12m S0  1.4  
0:00.00 jsvc
26603 tomcat6   15   0 1713m  54m  12m S0  1.4  
0:00.00 jsvc
26604 tomcat6   15   0 1713m  54m  12m S0  1.4  
0:00.00 jsvc
26605 tomcat6   15   0 1713m  54m  12m S0  1.4  
0:00.00 jsvc
26606 tomcat6   15   0 1713m  54m  12m S0  1.4  
0:00.00 jsvc
26607 tomcat6   15   0 1713m  54m  12m S0  1.4  
0:00.00 jsvc
26608 tomcat6   15   0 1713m  54m  12m S0  1.4  
0:00.00 jsvc
26609 tomcat6   15   0 1713m  54m  12m S0  1.4  
0:00.47 jsvc
26610 tomcat6   15   0 1713m  54m  12m S0  1.4  
0:00.53 jsvc
26611 tomcat6   15   0 1713m  54m  12m S0  1.4  
0:00.00 jsvc
26612 tomcat6   15   0 1713m  54m  12m S0  1.4  
0:00.00 jsvc

thanks
Neha



--- Christopher Schultz <[EMAIL PROTECTED]>
wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Chuck,
> 
> Caldarale, C

Re: Why Tomcat take about 15 minutes to start?

2008-02-18 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

Caldarale, Charles R wrote:
| 2) Try taking periodic stack traces to find out where the threads are
| spending their time (jstack helps here, as would a profiler).

Definitely. If you have a 12 minute delay, do something with that time.
One of the last things to happen during Tomcat startup is for all the
request handler threads to be created. I suspect that this delay occurs
before that time. That means that thread dumps are super easy to read:
there will be a small number of threads and you can easily see which
ones are trying to do things rather than sitting idle. Whatever thread
is actually doing something is probably the one with problems.

If you can't figure out what's going on, post the entire thread dump.

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

iEYEARECAAYFAke6KIgACgkQ9CaO5/Lv0PDD5gCfZFFPEel8XeHUay7ilb6J6zeP
g9gAn1/UEUd40sNGn97ne8oEXWMoStvH
=bOzU
-END PGP SIGNATURE-

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



Re: Why Tomcat take about 15 minutes to start?

2008-02-18 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Neha,

Neha Agrawal wrote:
| i tried two things to improve the startup time for
| my Tomcat5.5.25 version compiled with native
| libraries:

Do you mean "configured" with native libraries? Recompiling Tomcat will
not change anything...

| Still it takes 12 minutes to restart tomcat:
|
| Catalina.out shows that it takes a Long time to
| Initialize (For 12 minutes, it stops after
| initializing the Coyote engine for 8180 port)
|
| What are possible solutions ?

That depends on what the problem is. You need to help us diagnose your
problem before we start suggesting fixes. Please see my previous post
for another idea that the problem could be (hint: it has nothing to do
with SSL and entropy).

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

iEYEARECAAYFAke6J+kACgkQ9CaO5/Lv0PBxcQCgo0zEUOIE/QkqAYTUIUDYKUdN
iXoAn12jr3vji2iiTF/aYowZhCm+4x0T
=aYf4
-END PGP SIGNATURE-

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



Re: Difficulty with the latest Tomcat 6.x on Windows XP

2008-02-18 Thread perry anderson
We checked the System logs for Windows it just showed that it tried to
execute but failed for some "unspecified" reason. Also, I installed the
latest version of Java, 1.6...04

But will try to check log files where ever I see them...

Thanks

- Perry

On Feb 18, 2008 7:20 PM, Hassan Schroeder <[EMAIL PROTECTED]>
wrote:

> On Feb 18, 2008 2:30 PM, perry anderson <[EMAIL PROTECTED]> wrote:
>
> > The computer at work is running firewalls of some nature and also has
> McAfee
> > running on the desktop. Don't know if this has anything to do with it.
> At
> > this point I don't even know where to check first to even begin to
> address
> > the problem.
>
> Logs. Look in the Tomcat logs, look in your firewalls' logs -- don't
> even know what they are? find out :-)  -- McAfee's logs, whatever
> system logs XP has.
>
> And if that doesn't set you on the path to fixing it, it'd probably be
> good to indicate what version of JDK/JRE you're using, whether it's
> a fresh install or you've installed your own webapps, etc. etc.
>
> HTH,
> --
> Hassan Schroeder  [EMAIL PROTECTED]
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Perry Anderson

[EMAIL PROTECTED]



RE: Difficulty with the latest Tomcat 6.x on Windows XP

2008-02-18 Thread Caldarale, Charles R
> From: Martin Gainty [mailto:[EMAIL PROTECTED] 
> Subject: Re: Difficulty with the latest Tomcat 6.x on Windows XP
> 
> Unless you have some manner of virus running on 
> that computer your browser *should* be able to 
> access localhost specifically put the address 
> http://localhost:8080/manager/index.jsp
> in your browser's address and you should see the
> manager application..

No, you'll get a 404, since there is no index.jsp in the manager webapp.

Trying http://localhost:8080/manager/html should get the manager main
page - but if the Tomcat isn't starting, then it's all rather pointless.
As Hassan S said, look at the logs.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Difficulty with the latest Tomcat 6.x on Windows XP

2008-02-18 Thread Martin Gainty
Unless you have some manner of virus running on that computer your browser
*should* be able to access localhost specifically put the address
http://localhost:8080/manager/index.jsp
in your browser's address
and you should see the manager application..

Please verify..
M-
- Original Message -
From: "perry anderson" <[EMAIL PROTECTED]>
To: 
Sent: Monday, February 18, 2008 5:30 PM
Subject: Difficulty with the latest Tomcat 6.x on Windows XP


> I have tried both Tomcat 4.1.x and the latest 6.x on my networked Windows
XP
> desktop at work. It is a government office so there could be plenty of
> firewalls in effect. The Windows XP firewall however is not operational.
>
> The experience that I am having is that in one case, Tomcat seems to start
> but when I type localhost:8080 I am met with a blank white page and the
url
> resets to local:8080 (no leading http:/  or anything). In another case, I
> try to start Tomcat as a service but it refuses to start.
>
> I would really really like to be running Tomcat at work as I need to be
> doing some JSP and Webservices. I have been able to get Tomcat running on
my
> home computer just fine. At home I have both a Windows XP and a Linux
> installation where I have been able to use Tomcat with no problems.
>
> The computer at work is running firewalls of some nature and also has
McAfee
> running on the desktop. Don't know if this has anything to do with it. At
> this point I don't even know where to check first to even begin to address
> the problem.
>
> Any and all help would be greatly appreciated.
>
> Thanks
>
> - Perry
>
>
>
> --
> Perry Anderson
> 
> [EMAIL PROTECTED]
> 
>


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



Re: Using mod_jk with other Java programs

2008-02-18 Thread Rainer Jung

Hi Daniel,

mod_jk uses a special protocol to talk to the backend server. It's 
called AJP13. Several backends implement the protocol, e.g. Tomcat, 
Jetty, Glassfish, JBoss, Geronimo (I guess because it includes Tomcat or 
Jetty).


If you are looking for a simple solution, you might also just use Apache 
2.2 with mod_proxy(_http), so talking HTTP to the backend.


The strengths of mod_jk come into play, if you want to do loadbalancing 
and online administration, e.g. when you have a couple of nodes and a 
non-trivial topology.


Whatever you combine with mod_rewrite, don't overlook brien's advice 
about the P resp. PT flag of RewriteRules.


Regards,

Rainer

Daniel Winterstein schrieb:
Is it possible to use mod_jk to get the Apache2 web server to forward 
web requests to programs other than Tomcat?
E.g. can workers.properties be set to point to a non-Tomcat program? If 
so, what would that program have to do to interpret the incoming 
requests? Are the requests still in http form, or have they been 
partially parsed and altered?
I'm currently using mod_rewrite, but this achieves a redirect via the 
client, rather than a hidden forward. A hidden forward would prevent 
'ugly' urls appearing, and (I think) be faster.

Thank you for any help,
- Daniel




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



Re: Difficulty with the latest Tomcat 6.x on Windows XP

2008-02-18 Thread Hassan Schroeder
On Feb 18, 2008 2:30 PM, perry anderson <[EMAIL PROTECTED]> wrote:

> The computer at work is running firewalls of some nature and also has McAfee
> running on the desktop. Don't know if this has anything to do with it. At
> this point I don't even know where to check first to even begin to address
> the problem.

Logs. Look in the Tomcat logs, look in your firewalls' logs -- don't
even know what they are? find out :-)  -- McAfee's logs, whatever
system logs XP has.

And if that doesn't set you on the path to fixing it, it'd probably be
good to indicate what version of JDK/JRE you're using, whether it's
a fresh install or you've installed your own webapps, etc. etc.

HTH,
-- 
Hassan Schroeder  [EMAIL PROTECTED]

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



Re: Tomcat ISAPI Redirector for IIS

2008-02-18 Thread Rainer Jung
Start fixing it by *not* commenting out the worker.list=ajp13w and set 
your connection pool size to something reasonable (default is 1, start 
with let's say 50).


Then follow Tim's adviceand please also tell us which isapi redirector 
version you are using.


Regards,

Rainer

doepain schrieb:

No matter what I try where I go I just keep hitting a wall with this ISAPI
redirector for IIS/Tomcat.
I have been trying to get this to work since 9:00 AM est, and I am losing
steam.  


I tried supplying any useful information for trouble shooting below

Error:
HTTP Status 404 - /jakarta/isapi_redirect.dll
type Status report
message /jakarta/isapi_redirect.dll
description The requested resource (/jakarta/isapi_redirect.dll) is not
available.
Apache Tomcat/5.0.16

uriworkermap.properties File:
# uriworker.properties -
#
# This file provides sample mappings for example
# ajp13w worker defined in workermap.properties.minimal

/jsp-examples/*=ajp13w
/servlet-examples/*=ajp13w

# Now filter out all .jpeg files inside that context
# For no mapping the url has to start with exclamation (!)
#!/servlet-examples/*.jpeg=ajp13w

Workers.Properties.Minimal:
# workers.properties.minimal -
# This file provides minimal jk configuration properties needed to 
# connect to Tomcat.
# The workers that jk should create and work with 
# Defining a worker named ajp13w and of type ajp13

# Note that the name and the type do not have to match.

#worker.list=ajp13w
worker.ajp13w.type=ajp13
worker.ajp13w.host=localhost
worker.ajp13w.port=8009

Jakarta Isapi Redirector Install path:
C:\Program Files\Apache Software Foundation\Jakarta Isapi Redirector\conf

Tomcat Install Path:
C:\Program Files\Apache Software Foundation\Tomcat 5.0

IIS V6.0 Settings
The "jakarta" Web Service Extension is Installed, and Allowed.
The ISAPI Filter for "jakarta" in installed, and its Status is "Online"
Priority "High"

Host:
Windows Server 2003 SP2

ISAPI-Redirector Log output:
[Mon Feb 18 13:11:38 2008] [error] HttpExtensionProc::jk_isapi_plugin.c
(944): could not get a worker for name ajp13
[Mon Feb 18 13:11:39 2008] [error] HttpExtensionProc::jk_isapi_plugin.c
(944): could not get a worker for name ajp13
[Mon Feb 18 13:21:47 2008] [error]
ajp_connection_tcp_send_message::jk_ajp_common.c (902): sendfull returned -3
with errno=54 
[Mon Feb 18 13:21:47 2008] [error] ajp_send_request::jk_ajp_common.c (1158):

Error sending request try another pooled connection
[Mon Feb 18 13:21:48 2008] [info]  jk_open_socket::jk_connect.c (183):
connect() failed errno = 61
[Mon Feb 18 13:21:48 2008] [info]  ajp_connect_to_endpoint::jk_ajp_common.c
(862): Failed connecting to tomcat. Tomcat is probably not started or is
listening on the wrong host/port (127.0.0.1:8009). Failed errno = 61
[Mon Feb 18 13:21:48 2008] [info]  ajp_send_request::jk_ajp_common.c (1186):
Error connecting to the Tomcat process.
[Mon Feb 18 13:21:48 2008] [info]  ajp_service::jk_ajp_common.c (1665):
Sending request to tomcat failed,  recoverable operation attempt=0
[Mon Feb 18 13:21:48 2008] [info]  ajp_done::jk_ajp_common.c (1947): could
not find empty cache slot from 1 for worker ajp13. Rise worker cachesize
[Mon Feb 18 13:43:40 2008] [error]
ajp_connection_tcp_send_message::jk_ajp_common.c (902): sendfull returned -3
with errno=54 
[Mon Feb 18 13:43:40 2008] [error] ajp_send_request::jk_ajp_common.c (1158):

Error sending request try another pooled connection
[Mon Feb 18 13:43:41 2008] [info]  jk_open_socket::jk_connect.c (183):
connect() failed errno = 61
[Mon Feb 18 13:43:41 2008] [info]  ajp_connect_to_endpoint::jk_ajp_common.c
(862): Failed connecting to tomcat. Tomcat is probably not started or is
listening on the wrong host/port (127.0.0.1:8009). Failed errno = 61
[Mon Feb 18 13:43:41 2008] [info]  ajp_send_request::jk_ajp_common.c (1186):
Error connecting to the Tomcat process.
[Mon Feb 18 13:43:41 2008] [info]  ajp_service::jk_ajp_common.c (1665):
Sending request to tomcat failed,  recoverable operation attempt=0
[Mon Feb 18 13:43:42 2008] [info]  jk_open_socket::jk_connect.c (183):
connect() failed errno = 61
[Mon Feb 18 13:43:42 2008] [info]  ajp_connect_to_endpoint::jk_ajp_common.c
(862): Failed connecting to tomcat. Tomcat is probably not started or is
listening on the wrong host/port (127.0.0.1:8009). Failed errno = 61
[Mon Feb 18 13:43:42 2008] [info]  ajp_send_request::jk_ajp_common.c (1186):
Error connecting to the Tomcat process.
[Mon Feb 18 13:43:42 2008] [info]  ajp_service::jk_ajp_common.c (1665):
Sending request to tomcat failed,  recoverable operation attempt=1
[Mon Feb 18 13:43:43 2008] [info]  jk_open_socket::jk_connect.c (183):
connect() failed errno = 61
[Mon Feb 18 13:43:43 2008] [info]  ajp_connect_to_endpoint::jk_ajp_common.c
(862): Failed connecting to tomcat. Tomcat is probably not started or is
listening on the wrong host/port (127.0.0.1:8009). Failed errno = 61
[Mon Feb 18 13:43:43 2008] [info]  ajp_send_request::jk_ajp_common.c (1186):
Error con

Re: Using mod_jk with other Java programs

2008-02-18 Thread brien colwell
mod_rewrite can also do proxy forwarding, where the web server will
route the forwarded resource to the client. Use the P flag.


On Feb 18, 2008 2:35 PM, Daniel Winterstein
<[EMAIL PROTECTED]> wrote:
> Is it possible to use mod_jk to get the Apache2 web server to forward
> web requests to programs other than Tomcat?
> E.g. can workers.properties be set to point to a non-Tomcat program? If
> so, what would that program have to do to interpret the incoming
> requests? Are the requests still in http form, or have they been
> partially parsed and altered?
> I'm currently using mod_rewrite, but this achieves a redirect via the client, 
> rather than a hidden forward. A hidden forward would prevent 'ugly' urls 
> appearing, and (I think) be faster.
> Thank you for any help,
>  - Daniel
>
>
> --
> --
> Daniel Winterstein, Ph.D.
> ThinkTank Mathematics Ltd
> http://ThinkTankMaths.co.uk
> ETTC, King's Buildings,
> Edinburgh, EH9 3JL
> T: +44(0) 131 472 4810
> M: +44(0) 772 517 2612
> F: +44(0) 131 662 4678
> Skype: daniel.winterstein
> Registered in Scotland, SC295336
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Using mod_jk with other Java programs

2008-02-18 Thread Daniel Winterstein
Is it possible to use mod_jk to get the Apache2 web server to forward 
web requests to programs other than Tomcat?
E.g. can workers.properties be set to point to a non-Tomcat program? If 
so, what would that program have to do to interpret the incoming 
requests? Are the requests still in http form, or have they been 
partially parsed and altered?

I'm currently using mod_rewrite, but this achieves a redirect via the client, 
rather than a hidden forward. A hidden forward would prevent 'ugly' urls 
appearing, and (I think) be faster.
Thank you for any help,
- Daniel


--
--
Daniel Winterstein, Ph.D.
ThinkTank Mathematics Ltd
http://ThinkTankMaths.co.uk
ETTC, King's Buildings,
Edinburgh, EH9 3JL
T: +44(0) 131 472 4810
M: +44(0) 772 517 2612
F: +44(0) 131 662 4678
Skype: daniel.winterstein
Registered in Scotland, SC295336


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



Difficulty with the latest Tomcat 6.x on Windows XP

2008-02-18 Thread perry anderson
I have tried both Tomcat 4.1.x and the latest 6.x on my networked Windows XP
desktop at work. It is a government office so there could be plenty of
firewalls in effect. The Windows XP firewall however is not operational.

The experience that I am having is that in one case, Tomcat seems to start
but when I type localhost:8080 I am met with a blank white page and the url
resets to local:8080 (no leading http:/  or anything). In another case, I
try to start Tomcat as a service but it refuses to start.

I would really really like to be running Tomcat at work as I need to be
doing some JSP and Webservices. I have been able to get Tomcat running on my
home computer just fine. At home I have both a Windows XP and a Linux
installation where I have been able to use Tomcat with no problems.

The computer at work is running firewalls of some nature and also has McAfee
running on the desktop. Don't know if this has anything to do with it. At
this point I don't even know where to check first to even begin to address
the problem.

Any and all help would be greatly appreciated.

Thanks

- Perry



-- 
Perry Anderson

[EMAIL PROTECTED]



RE: Why Tomcat take about 15 minutes to start?

2008-02-18 Thread Caldarale, Charles R
> From: Neha Agrawal [mailto:[EMAIL PROTECTED] 
> Subject: Re: Why Tomcat take about 15 minutes to start?
> 
> Still it takes 12 minutes to restart tomcat:
> What are possible solutions ?

You won't get any solutions without doing some investigative work.  To
repeat suggestions made over the weekend:

Find out what's going on during those 15 minutes.  Besides increasing
the logging level, try these (in no particular order):

1) Look at CPU usage, I/O activity, and network activity to see if
there's an excessive amount of any of those during the startup period.

2) Try taking periodic stack traces to find out where the threads are
spending their time (jstack helps here, as would a profiler).

3) Look at JConsole displays for any excessive heap usage and GC
activity, and to find out if threads are locking each other out of
useful work (not likely during initialization).

4) Remove all your webapps and see if the startup time changes.  If so,
add them back in one at a time to find out which one is causing the
problem.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Why Tomcat take about 15 minutes to start?

2008-02-18 Thread Neha Agrawal
Hi!
i tried two things to improve the startup time for
my Tomcat5.5.25 versio ncompiled with native
libraries:

1)Djava.security.egd=file:/dev/urandom added this to
the Startup script of Tomcat
2) and also compiled APR with /dev/urandom and again
compiled Native libraries

Still it takes 12 minutes to restart tomcat:

Catalina.out shows that it takes a Long time to
Initialize (For 12 minutes, it stops after
initializing the Coyote engine for 8180 port)

What are possible solutions ?


thanks
neha

--- Christopher Schultz <[EMAIL PROTECTED]>
wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Mohamed,
> 
> Mohamed Mohamedin wrote:
> | I am using Tomcat 5.5.25 on SUSE Linux 10.1
> (X86-64) and Java 1.5.0_10
> from
> | Sun.
> | When I run Tomcat using "catalina.sh start" and
> watching the log it
> stop at
> | "INFO: XML validation disabled" and take about 15
> minutes before
> continuing
> | next lines and starting. Please help me to know
> why?
> 
> After the 15 minute delay, what log messages are in
> the log file?
> 
> I'm wondering if the delay is related to repeated
> failed DNS lookups or
> even a firewall issue when trying to grab a DTD or
> XML Schema.
> 
> Do you have iptables blocking anything in
> particular? Are you getting
> anything in your kernel log related to dropped
> packets?
> 
> Finally, does the application start up correctly
> (eventually)?
> 
> - -chris
> 
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.8 (MingW32)
> Comment: Using GnuPG with Mozilla -
> http://enigmail.mozdev.org
> 
>
iEYEARECAAYFAke54D8ACgkQ9CaO5/Lv0PDfUwCgjYJKTQz9n4goNxo4WfrlRcHv
> 3jMAnjdobEvsNNKEiTINW53G8tCXYqyK
> =gCg0
> -END PGP SIGNATURE-
> 
>
-
> To start a new topic, e-mail:
> users@tomcat.apache.org
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 



  Now you can chat without downloading messenger. Go to 
http://in.messenger.yahoo.com/webmessengerpromo.php

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



Re: Tomcat ISAPI Redirector for IIS

2008-02-18 Thread mgainty
agreed...
if by *Strange* you mean *you dont understand* then I would advise you to
take a look at Mladen Turks paper on fronting Tomcat with IIS
http://people.apache.org/~mturk/docs/article/ftwai.html
I would specifically note the built-in restrictions of Windows Workstation
products to managing <=10 connections without Windows Network LoadBalancer
Also the complexity of the system goes up as you have 4 systems to configure
to work together..
Windows Network Load Balancer
1..n IIS servers
mod_jk connectors to TC
1..n*2 Tomcat nodes

HTH/
M-
- Original Message -
Wrom: VWWCUFPEGAUTFJMVRESKPNKMBIPBARHDMNNSKVFVWRKJVZCMHVI
To: "'Tomcat Users List'" 
Sent: Monday, February 18, 2008 3:28 PM
Subject: RE: Tomcat ISAPI Redirector for IIS


> It looks like you've got more than one thing going on.
>
> The debug log refers to a worker named 'ajp13', which is the default name,
> and not the one you've got  configured in your
> uriworkermap.properties/worker.properties
> - This usually points to your filter config and the ISAPI extension DLL
> (the one that's sitting in the virtual directory you created) not being
> the same file.
> - Sometimes this is just IIS being strange - a complete net stop iisadmin;
> net start w3svc sometimes sorts it
>
> The debug log also indicates it can't connect to the back end Tomcat
> instance, but there's not enough info to tell exactly what's going on.
> Change your log level to debug (in isapi_redirect.properties or the
> registry if you're using that), do a complete IIS restart and make a
> single request - post the resulting log and we can have a look at what's
> going on.
>
> cheers
> tim
>
> -Original Message-
> Wrom: BGDADRZFSQHYUCDDJBLVLMHAALPTCXLYRW
> Sent: Tuesday, 19 February 2008 9:14 a.m.
> To: users@tomcat.apache.org
> Subject: Tomcat ISAPI Redirector for IIS
>
>
> No matter what I try where I go I just keep hitting a wall with this ISAPI
> redirector for IIS/Tomcat.
> I have been trying to get this to work since 9:00 AM est, and I am losing
> steam.
>
> I tried supplying any useful information for trouble shooting below
>
> Error:
> HTTP Status 404 - /jakarta/isapi_redirect.dll
> type Status report
> message /jakarta/isapi_redirect.dll
> description The requested resource (/jakarta/isapi_redirect.dll)
> is not available.
> Apache Tomcat/5.0.16
>
> uriworkermap.properties File:
> # uriworker.properties -
> #
> # This file provides sample mappings for example # ajp13w worker defined
> in workermap.properties.minimal
>
> /jsp-examples/*=ajp13w
> /servlet-examples/*=ajp13w
>
> # Now filter out all .jpeg files inside that context # For no mapping the
> url has to start with exclamation (!) #!/servlet-examples/*.jpeg=ajp13w
>
> Workers.Properties.Minimal:
> # workers.properties.minimal -
> # This file provides minimal jk configuration properties needed to #
> connect to Tomcat.
> # The workers that jk should create and work with # Defining a worker
> named ajp13w and of type ajp13 # Note that the name and the type do not
> have to match.
>
> #worker.list=ajp13w
> worker.ajp13w.type=ajp13
> worker.ajp13w.host=localhost
> worker.ajp13w.port=8009
>
> Jakarta Isapi Redirector Install path:
> C:\Program Files\Apache Software Foundation\Jakarta Isapi Redirector\conf
>
> Tomcat Install Path:
> C:\Program Files\Apache Software Foundation\Tomcat 5.0
>
> IIS V6.0 Settings
> The "jakarta" Web Service Extension is Installed, and Allowed.
> The ISAPI Filter for "jakarta" in installed, and its Status is "Online"
> Priority "High"
>
> Host:
> Windows Server 2003 SP2
>
> ISAPI-Redirector Log output:
> [Mon Feb 18 13:11:38 2008] [error] HttpExtensionProc::jk_isapi_plugin.c
> (944): could not get a worker for name ajp13 [Mon Feb 18 13:11:39 2008]
> [error] HttpExtensionProc::jk_isapi_plugin.c
> (944): could not get a worker for name ajp13 [Mon Feb 18 13:21:47 2008]
> [error] ajp_connection_tcp_send_message::jk_ajp_common.c (902): sendfull
> returned -3 with errno=54 [Mon Feb 18 13:21:47 2008] [error]
> ajp_send_request::jk_ajp_common.c (1158):
> Error sending request try another pooled connection [Mon Feb 18 13:21:48
> 2008] [info]  jk_open_socket::jk_connect.c (183):
> connect() failed errno = 61
> [Mon Feb 18 13:21:48 2008] [info]
> ajp_connect_to_endpoint::jk_ajp_common.c
> (862): Failed connecting to tomcat. Tomcat is probably not started or is
> listening on the wrong host/port (127.0.0.1:8009). Failed errno = 61 [Mon
> Feb 18 13:21:48 2008] [info]  ajp_send_request::jk_ajp_common.c (1186):
> Error connecting to the Tomcat process.
> [Mon Feb 18 13:21:48 2008] [info]  ajp_service::jk_ajp_common.c (1665):
> Sending request to tomcat failed,  recoverable operation attempt=0 [Mon
> Feb 18 13:21:48 2008] [info]  ajp_done::jk_ajp_common.c (1947): could not
> find empty cache slot from 1 for worker ajp13. Rise worker cachesize [Mon
> Feb 18 13:43:40 2008] [error]
> ajp_connection_tcp_send_message::jk_ajp_common.c (902): sendfull returned
> -3 with errno=54 [Mon Feb 18 13:43:40 2008

Re: Problem closing database pool connections

2008-02-18 Thread Len Popp
Yes, it should be OK if you close the pool connection at the
appropriate time and don't close the one from getInnermostDelegate -
the pool takes care of that one.
-- 
Len

On Feb 18, 2008 2:48 PM, Petter Olofsson <[EMAIL PROTECTED]> wrote:
> Hi Len! Thanks for the reply.
> The dconn was closed by simply calling the close function when I was
> done with the connection.
> This is something that has worked in the past so I'm a bit confused
> when it stopped working now.
>
> I have solved the problem now by just returning the connection from
> the pool and close it later. The connection returned by calling
> getInnermostDelegate() is not closed at all. Does anyone know if this
> will cause problem later on? It seems to work correctly for now with a
> connection pool consisting of only one connection.
>
>
> 2008/2/18, Len Popp <[EMAIL PROTECTED]>:
>
> > It looks to me like you're bypassing the connection pool and messing
> > up the way it handles connections. You've only shown a snippet of
> > code, so I have a couple of questions:
> > 1. After dconn is returned from getConnection, how and when does it get 
> > closed?
> > 2. Does the exception happen every time getConnection is called, or
> > does it maybe succeed on the first call and fail during the second?
> >
> > When you get a connection from the connection pool, you're supposed to
> > close it *after* you use it. At
> > that time the underlying "real" connection is *not* closed, it's just
> > returned to the pool. That's the point of the connection pool, it
> > keeps a set of connections open to reduce overhead. Here you're
> > closing the PoolableConnection immediately, before it's used, which is
> > wrong.
> >
> > Here's what I think happens. (This is partly guesswork.)
> >
> > - DatabaseController.getConnection gets a PoolableConnection, extracts
> > the underlying real connection (dconn), then returns the
> > PoolableConnection to the pool.
> >
> > - The caller of DatabaseController.getConnection uses the real
> > connection and then closes it.
> >
> > - Now the pool contains a PoolableConnection whose underlying
> > connection is closed - This shouldn't happen!
> >
> > - DatabaseController.getConnection is called a second time, and
> > returns the same PoolableConnection as before (because it's back in
> > the pool).
> >
> > - conn.close() fails this time because the underlying connection was
> > closed prematurely.
> >
> > Normally you'd never call getInnermostDelegate, you'd just use the
> > PoolableConnection returned by DataSource.getConnection and close it
> > when you're done. Is there a reason that you can't do that?
> > --
> > Len
> >
> >
> > On Feb 18, 2008 11:05 AM, Petter Olofsson <[EMAIL PROTECTED]> wrote:
> > > Hello tomcat users!
> > >
> > > I have a problem using the connection pool in Tomcat. The function
> > > getConnection() throws the following error message:
> > >
> > > [Error message]
> > > When trying to get a Connection an SQLExcpetion occurred:
> > > java.sql.SQLException: Already closed.
> > >at 
> > > org.apache.tomcat.dbcp.dbcp.PoolableConnection.close(PoolableConnection.java:84)
> > >at 
> > > org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:181)
> > >at 
> > > org.metria.kiruna.profs.eniro.db.DatabaseController.getConnection(DatabaseController.java:136)
> > >
> > > [DatabaseController.java]
> > >protected Connection getConnection(){
> > >try{
> > >Context initContext = new InitialContext();
> > >Context envContext  = 
> > > (Context)initContext.lookup("java:comp/env");
> > >DataSource ods = (DataSource) envContext.lookup("jdbc/yyy");
> > >
> > >Connection conn = ods.getConnection();
> > >
> > >Connection dconn = ((DelegatingConnection)
> > > conn).getInnermostDelegate();
> > >
> > >// if( conn != null && !conn.isClosed() ) // Line 135
> > >conn.close(); // Line 136
> > >
> > >return dconn;
> > >}catch( SQLException sqle ){
> > >System.err.println("When trying to get a Connection an
> > > SQLExcpetion occured.");
> > >sqle.printStackTrace();
> > >}catch( NamingException ne ){
> > >System.err.println("When trying to get a Connection an
> > > NamingException occured.");
> > >System.err.println(ne);
> > >}
> > >return null;
> > >}
> > >
> > > [Context.xml]
> > >  > >auth="Container"
> > >driverClassName="oracle.jdbc.OracleDriver"
> > >maxActive="30"
> > >maxIdle="10"
> > >maxWait="1000"
> > >name="jdbc/yyy"
> > >username="xxx"
> > >password="xxx"
> > >type="javax.sql.DataSource"
> > >url="jdbc:oracle:thin:@drone:1521:top" />
> > >
> > > If the outer connection is left open ( line 135, 136 is deleted) then
> > > all connections are used unt

RE: Tomcat ISAPI Redirector for IIS

2008-02-18 Thread Tim Whittington
It looks like you've got more than one thing going on.

The debug log refers to a worker named 'ajp13', which is the default name,
and not the one you've got  configured in your
uriworkermap.properties/worker.properties 
- This usually points to your filter config and the ISAPI extension DLL
(the one that's sitting in the virtual directory you created) not being
the same file.
- Sometimes this is just IIS being strange - a complete net stop iisadmin;
net start w3svc sometimes sorts it

The debug log also indicates it can't connect to the back end Tomcat
instance, but there's not enough info to tell exactly what's going on.
Change your log level to debug (in isapi_redirect.properties or the
registry if you're using that), do a complete IIS restart and make a
single request - post the resulting log and we can have a look at what's
going on.

cheers
tim

-Original Message-
From: doepain [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 19 February 2008 9:14 a.m.
To: users@tomcat.apache.org
Subject: Tomcat ISAPI Redirector for IIS


No matter what I try where I go I just keep hitting a wall with this ISAPI
redirector for IIS/Tomcat.
I have been trying to get this to work since 9:00 AM est, and I am losing
steam.  

I tried supplying any useful information for trouble shooting below

Error:
HTTP Status 404 - /jakarta/isapi_redirect.dll
type Status report
message /jakarta/isapi_redirect.dll
description The requested resource (/jakarta/isapi_redirect.dll)
is not available.
Apache Tomcat/5.0.16

uriworkermap.properties File:
# uriworker.properties -
#
# This file provides sample mappings for example # ajp13w worker defined
in workermap.properties.minimal

/jsp-examples/*=ajp13w
/servlet-examples/*=ajp13w

# Now filter out all .jpeg files inside that context # For no mapping the
url has to start with exclamation (!) #!/servlet-examples/*.jpeg=ajp13w

Workers.Properties.Minimal:
# workers.properties.minimal -
# This file provides minimal jk configuration properties needed to #
connect to Tomcat.
# The workers that jk should create and work with # Defining a worker
named ajp13w and of type ajp13 # Note that the name and the type do not
have to match.

#worker.list=ajp13w
worker.ajp13w.type=ajp13
worker.ajp13w.host=localhost
worker.ajp13w.port=8009

Jakarta Isapi Redirector Install path:
C:\Program Files\Apache Software Foundation\Jakarta Isapi Redirector\conf

Tomcat Install Path:
C:\Program Files\Apache Software Foundation\Tomcat 5.0

IIS V6.0 Settings
The "jakarta" Web Service Extension is Installed, and Allowed.
The ISAPI Filter for "jakarta" in installed, and its Status is "Online"
Priority "High"

Host:
Windows Server 2003 SP2

ISAPI-Redirector Log output:
[Mon Feb 18 13:11:38 2008] [error] HttpExtensionProc::jk_isapi_plugin.c
(944): could not get a worker for name ajp13 [Mon Feb 18 13:11:39 2008]
[error] HttpExtensionProc::jk_isapi_plugin.c
(944): could not get a worker for name ajp13 [Mon Feb 18 13:21:47 2008]
[error] ajp_connection_tcp_send_message::jk_ajp_common.c (902): sendfull
returned -3 with errno=54 [Mon Feb 18 13:21:47 2008] [error]
ajp_send_request::jk_ajp_common.c (1158):
Error sending request try another pooled connection [Mon Feb 18 13:21:48
2008] [info]  jk_open_socket::jk_connect.c (183):
connect() failed errno = 61
[Mon Feb 18 13:21:48 2008] [info]
ajp_connect_to_endpoint::jk_ajp_common.c
(862): Failed connecting to tomcat. Tomcat is probably not started or is
listening on the wrong host/port (127.0.0.1:8009). Failed errno = 61 [Mon
Feb 18 13:21:48 2008] [info]  ajp_send_request::jk_ajp_common.c (1186):
Error connecting to the Tomcat process.
[Mon Feb 18 13:21:48 2008] [info]  ajp_service::jk_ajp_common.c (1665):
Sending request to tomcat failed,  recoverable operation attempt=0 [Mon
Feb 18 13:21:48 2008] [info]  ajp_done::jk_ajp_common.c (1947): could not
find empty cache slot from 1 for worker ajp13. Rise worker cachesize [Mon
Feb 18 13:43:40 2008] [error]
ajp_connection_tcp_send_message::jk_ajp_common.c (902): sendfull returned
-3 with errno=54 [Mon Feb 18 13:43:40 2008] [error]
ajp_send_request::jk_ajp_common.c (1158):
Error sending request try another pooled connection [Mon Feb 18 13:43:41
2008] [info]  jk_open_socket::jk_connect.c (183):
connect() failed errno = 61
[Mon Feb 18 13:43:41 2008] [info]
ajp_connect_to_endpoint::jk_ajp_common.c
(862): Failed connecting to tomcat. Tomcat is probably not started or is
listening on the wrong host/port (127.0.0.1:8009). Failed errno = 61 [Mon
Feb 18 13:43:41 2008] [info]  ajp_send_request::jk_ajp_common.c (1186):
Error connecting to the Tomcat process.
[Mon Feb 18 13:43:41 2008] [info]  ajp_service::jk_ajp_common.c (1665):
Sending request to tomcat failed,  recoverable operation attempt=0 [Mon
Feb 18 13:43:42 2008] [info]  jk_open_socket::jk_connect.c (183):
connect() failed errno = 61
[Mon Feb 18 13:43:42 2008] [info]
ajp_connect_to_endpoint::jk_ajp_common.c
(862): Failed connecting to tomcat. Tomcat is probably not started

cachingAllowed="false" kills tomcat-5.5 (works on tomcat-6)

2008-02-18 Thread Mick Semb Wever
-- follow up from "FileDirContext fails to immediately recognise new 
files" --


My application has in META-INF/context.xml:



This works just beautifully in tomcat-6 but in tomcat-5.5 the application 
warfile fails to unpack.
Not a single related log line is written in any of tomcat's logfiles!

Any idea what's up with tomcat-5.5?
Any idea how to get some more debug out of tomcat?

~mck


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



Tomcat ISAPI Redirector for IIS

2008-02-18 Thread doepain

No matter what I try where I go I just keep hitting a wall with this ISAPI
redirector for IIS/Tomcat.
I have been trying to get this to work since 9:00 AM est, and I am losing
steam.  

I tried supplying any useful information for trouble shooting below

Error:
HTTP Status 404 - /jakarta/isapi_redirect.dll
type Status report
message /jakarta/isapi_redirect.dll
description The requested resource (/jakarta/isapi_redirect.dll) is not
available.
Apache Tomcat/5.0.16

uriworkermap.properties File:
# uriworker.properties -
#
# This file provides sample mappings for example
# ajp13w worker defined in workermap.properties.minimal

/jsp-examples/*=ajp13w
/servlet-examples/*=ajp13w

# Now filter out all .jpeg files inside that context
# For no mapping the url has to start with exclamation (!)
#!/servlet-examples/*.jpeg=ajp13w

Workers.Properties.Minimal:
# workers.properties.minimal -
# This file provides minimal jk configuration properties needed to 
# connect to Tomcat.
# The workers that jk should create and work with 
# Defining a worker named ajp13w and of type ajp13
# Note that the name and the type do not have to match.

#worker.list=ajp13w
worker.ajp13w.type=ajp13
worker.ajp13w.host=localhost
worker.ajp13w.port=8009

Jakarta Isapi Redirector Install path:
C:\Program Files\Apache Software Foundation\Jakarta Isapi Redirector\conf

Tomcat Install Path:
C:\Program Files\Apache Software Foundation\Tomcat 5.0

IIS V6.0 Settings
The "jakarta" Web Service Extension is Installed, and Allowed.
The ISAPI Filter for "jakarta" in installed, and its Status is "Online"
Priority "High"

Host:
Windows Server 2003 SP2

ISAPI-Redirector Log output:
[Mon Feb 18 13:11:38 2008] [error] HttpExtensionProc::jk_isapi_plugin.c
(944): could not get a worker for name ajp13
[Mon Feb 18 13:11:39 2008] [error] HttpExtensionProc::jk_isapi_plugin.c
(944): could not get a worker for name ajp13
[Mon Feb 18 13:21:47 2008] [error]
ajp_connection_tcp_send_message::jk_ajp_common.c (902): sendfull returned -3
with errno=54 
[Mon Feb 18 13:21:47 2008] [error] ajp_send_request::jk_ajp_common.c (1158):
Error sending request try another pooled connection
[Mon Feb 18 13:21:48 2008] [info]  jk_open_socket::jk_connect.c (183):
connect() failed errno = 61
[Mon Feb 18 13:21:48 2008] [info]  ajp_connect_to_endpoint::jk_ajp_common.c
(862): Failed connecting to tomcat. Tomcat is probably not started or is
listening on the wrong host/port (127.0.0.1:8009). Failed errno = 61
[Mon Feb 18 13:21:48 2008] [info]  ajp_send_request::jk_ajp_common.c (1186):
Error connecting to the Tomcat process.
[Mon Feb 18 13:21:48 2008] [info]  ajp_service::jk_ajp_common.c (1665):
Sending request to tomcat failed,  recoverable operation attempt=0
[Mon Feb 18 13:21:48 2008] [info]  ajp_done::jk_ajp_common.c (1947): could
not find empty cache slot from 1 for worker ajp13. Rise worker cachesize
[Mon Feb 18 13:43:40 2008] [error]
ajp_connection_tcp_send_message::jk_ajp_common.c (902): sendfull returned -3
with errno=54 
[Mon Feb 18 13:43:40 2008] [error] ajp_send_request::jk_ajp_common.c (1158):
Error sending request try another pooled connection
[Mon Feb 18 13:43:41 2008] [info]  jk_open_socket::jk_connect.c (183):
connect() failed errno = 61
[Mon Feb 18 13:43:41 2008] [info]  ajp_connect_to_endpoint::jk_ajp_common.c
(862): Failed connecting to tomcat. Tomcat is probably not started or is
listening on the wrong host/port (127.0.0.1:8009). Failed errno = 61
[Mon Feb 18 13:43:41 2008] [info]  ajp_send_request::jk_ajp_common.c (1186):
Error connecting to the Tomcat process.
[Mon Feb 18 13:43:41 2008] [info]  ajp_service::jk_ajp_common.c (1665):
Sending request to tomcat failed,  recoverable operation attempt=0
[Mon Feb 18 13:43:42 2008] [info]  jk_open_socket::jk_connect.c (183):
connect() failed errno = 61
[Mon Feb 18 13:43:42 2008] [info]  ajp_connect_to_endpoint::jk_ajp_common.c
(862): Failed connecting to tomcat. Tomcat is probably not started or is
listening on the wrong host/port (127.0.0.1:8009). Failed errno = 61
[Mon Feb 18 13:43:42 2008] [info]  ajp_send_request::jk_ajp_common.c (1186):
Error connecting to the Tomcat process.
[Mon Feb 18 13:43:42 2008] [info]  ajp_service::jk_ajp_common.c (1665):
Sending request to tomcat failed,  recoverable operation attempt=1
[Mon Feb 18 13:43:43 2008] [info]  jk_open_socket::jk_connect.c (183):
connect() failed errno = 61
[Mon Feb 18 13:43:43 2008] [info]  ajp_connect_to_endpoint::jk_ajp_common.c
(862): Failed connecting to tomcat. Tomcat is probably not started or is
listening on the wrong host/port (127.0.0.1:8009). Failed errno = 61
[Mon Feb 18 13:43:43 2008] [info]  ajp_send_request::jk_ajp_common.c (1186):
Error connecting to the Tomcat process.
[Mon Feb 18 13:43:43 2008] [info]  ajp_service::jk_ajp_common.c (1665):
Sending request to tomcat failed,  recoverable operation attempt=2
[Mon Feb 18 13:43:43 2008] [error] ajp_service::jk_ajp_common.c (1673):
Error connecting to tomcat. Tomcat is probably not started o

Re: How many tomcat processes should there be?

2008-02-18 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David and Jonathan,

David Smith wrote:
| I'm guessing you're running an older version of linux w/ a 2.4 or
| earlier kernel.  In such systems the threads within a process show up as
| processes themselves.  That changed in newer versions of the linux
| kernel which report one entry per process regardless of how many threads.

If this is the case, run "ps" with the addition of the "-f" switch. This
will show you the relationship between parent and child processes. The
"main" thread should look like the parent process, and you'll have a
large number of child processes (which are really threads).

Don't be scared of all these processes. ;)

- -chris

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

iEYEARECAAYFAke54ewACgkQ9CaO5/Lv0PCNIgCeL3vRe4dj+H8Sy2Yi+cOk2vAN
QKYAn1/1RPbFn641mmM4vZFph9+hhjA/
=vX1x
-END PGP SIGNATURE-

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



Re: Problem closing database pool connections

2008-02-18 Thread Petter Olofsson
Hi Len! Thanks for the reply.
The dconn was closed by simply calling the close function when I was
done with the connection.
This is something that has worked in the past so I'm a bit confused
when it stopped working now.

I have solved the problem now by just returning the connection from
the pool and close it later. The connection returned by calling
getInnermostDelegate() is not closed at all. Does anyone know if this
will cause problem later on? It seems to work correctly for now with a
connection pool consisting of only one connection.


2008/2/18, Len Popp <[EMAIL PROTECTED]>:
> It looks to me like you're bypassing the connection pool and messing
> up the way it handles connections. You've only shown a snippet of
> code, so I have a couple of questions:
> 1. After dconn is returned from getConnection, how and when does it get 
> closed?
> 2. Does the exception happen every time getConnection is called, or
> does it maybe succeed on the first call and fail during the second?
>
> When you get a connection from the connection pool, you're supposed to
> close it *after* you use it. At
> that time the underlying "real" connection is *not* closed, it's just
> returned to the pool. That's the point of the connection pool, it
> keeps a set of connections open to reduce overhead. Here you're
> closing the PoolableConnection immediately, before it's used, which is
> wrong.
>
> Here's what I think happens. (This is partly guesswork.)
>
> - DatabaseController.getConnection gets a PoolableConnection, extracts
> the underlying real connection (dconn), then returns the
> PoolableConnection to the pool.
>
> - The caller of DatabaseController.getConnection uses the real
> connection and then closes it.
>
> - Now the pool contains a PoolableConnection whose underlying
> connection is closed - This shouldn't happen!
>
> - DatabaseController.getConnection is called a second time, and
> returns the same PoolableConnection as before (because it's back in
> the pool).
>
> - conn.close() fails this time because the underlying connection was
> closed prematurely.
>
> Normally you'd never call getInnermostDelegate, you'd just use the
> PoolableConnection returned by DataSource.getConnection and close it
> when you're done. Is there a reason that you can't do that?
> --
> Len
>
>
> On Feb 18, 2008 11:05 AM, Petter Olofsson <[EMAIL PROTECTED]> wrote:
> > Hello tomcat users!
> >
> > I have a problem using the connection pool in Tomcat. The function
> > getConnection() throws the following error message:
> >
> > [Error message]
> > When trying to get a Connection an SQLExcpetion occurred:
> > java.sql.SQLException: Already closed.
> >at 
> > org.apache.tomcat.dbcp.dbcp.PoolableConnection.close(PoolableConnection.java:84)
> >at 
> > org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:181)
> >at 
> > org.metria.kiruna.profs.eniro.db.DatabaseController.getConnection(DatabaseController.java:136)
> >
> > [DatabaseController.java]
> >protected Connection getConnection(){
> >try{
> >Context initContext = new InitialContext();
> >Context envContext  = 
> > (Context)initContext.lookup("java:comp/env");
> >DataSource ods = (DataSource) envContext.lookup("jdbc/yyy");
> >
> >Connection conn = ods.getConnection();
> >
> >Connection dconn = ((DelegatingConnection)
> > conn).getInnermostDelegate();
> >
> >// if( conn != null && !conn.isClosed() ) // Line 135
> >conn.close(); // Line 136
> >
> >return dconn;
> >}catch( SQLException sqle ){
> >System.err.println("When trying to get a Connection an
> > SQLExcpetion occured.");
> >sqle.printStackTrace();
> >}catch( NamingException ne ){
> >System.err.println("When trying to get a Connection an
> > NamingException occured.");
> >System.err.println(ne);
> >}
> >return null;
> >}
> >
> > [Context.xml]
> >  >auth="Container"
> >driverClassName="oracle.jdbc.OracleDriver"
> >maxActive="30"
> >maxIdle="10"
> >maxWait="1000"
> >name="jdbc/yyy"
> >username="xxx"
> >password="xxx"
> >type="javax.sql.DataSource"
> >url="jdbc:oracle:thin:@drone:1521:top" />
> >
> > If the outer connection is left open ( line 135, 136 is deleted) then
> > all connections are used until "maxActive" connections are created.
> >
> > The program uses Tomcat 5.5.26 and Oracle 10.2.3.0.
> >
> > Does anybody have an idea of why I can't close the outer connection so
> > that the connections can be returned to the pool when I am done?
> >
> > / Petter
> >
> > -
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional comma

Re: Why Tomcat take about 15 minutes to start?

2008-02-18 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mohamed,

Mohamed Mohamedin wrote:
| I am using Tomcat 5.5.25 on SUSE Linux 10.1 (X86-64) and Java 1.5.0_10
from
| Sun.
| When I run Tomcat using "catalina.sh start" and watching the log it
stop at
| "INFO: XML validation disabled" and take about 15 minutes before
continuing
| next lines and starting. Please help me to know why?

After the 15 minute delay, what log messages are in the log file?

I'm wondering if the delay is related to repeated failed DNS lookups or
even a firewall issue when trying to grab a DTD or XML Schema.

Do you have iptables blocking anything in particular? Are you getting
anything in your kernel log related to dropped packets?

Finally, does the application start up correctly (eventually)?

- -chris

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

iEYEARECAAYFAke54D8ACgkQ9CaO5/Lv0PDfUwCgjYJKTQz9n4goNxo4WfrlRcHv
3jMAnjdobEvsNNKEiTINW53G8tCXYqyK
=gCg0
-END PGP SIGNATURE-

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



Re: Remote ip Address

2008-02-18 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ksh,

[EMAIL PROTECTED] wrote:
|> If you want to swallow output under certain conditions, why not use
|> a Filter or Valve?  Much easier than trying to redirect output.
|
| Are you referring to filters and valves as defined in the server.xml?
| If so, I was hoping to solve the problem programatically so as to
| promote portability...is this at all possible?

Filters are portable, while Valves are Tomcat-only.

Honestly, this all comes down to how you decide to suppress the
response, and if you still need to run the target servlet even when no
response will be emitted.

- -chris

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

iEYEARECAAYFAke53ocACgkQ9CaO5/Lv0PDULACfbogRIZ1+W3Y/jLtiN77bJ6pA
laYAn1Lx9XlZZCJtDii057PW47sq1Jba
=WepF
-END PGP SIGNATURE-

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



Re: Remote ip Address

2008-02-18 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ksh,

[EMAIL PROTECTED] wrote:
| | Not using the servlet container in any usual way. You could email
| the | response somewhere or something like that, or POST it to
| another URL or | whatever. I'm not sure why you'd want to do that,
| though.
|
| I'm not sure I follow you here. POST is an http request...how would
| that prevent a http response.

Right. Your question kind of didn't make sense, so my response doesn't
really make sense, either. ;)

| | Do you mean that you simply want to discard the response?
|
| Exactly

Okay. The proper way to do this is to make your decision to suppress a
response /before/ any response is generated. You cannot really /not/
respond to a request. You should at least send a blank response, perhaps
using an appropriate HTTP status code (like 200 OK, 201 CREATED, 202
ACCEPTED, or 204 NO CONTENT).

Another way would be to buffer the response and then throw it out later.

| | The proper way | to do that is to buffer any response you /might/
| send, and then simply | do not send it at all if you decide not to.
|
| But wouldn't that tie up memory?

Yes, which is why you shouldn't do it.

|
| | Or, better yet, decide not to send the response before you actually
|  | create it, thus avoiding all foolishness of that sort.
|
| That would be excellent, although I'm not sure how I would go about
| choosing not the send the response. Would I have to hack the source
| code.

How do you know that you don't want to send a response?

This is definitely going to require you to write some code. If you don't
have access to the source code of the app you are trying to modify, and
you can't decide before the request is processed, then you will have to
buffer the response and then choose not to send it afterward (which
/will/ eat up memory). There's pretty much no way around that.

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

iEYEARECAAYFAke53f8ACgkQ9CaO5/Lv0PDwYQCgwGQaifUl6H9lmiSYQkvwTZEg
1S0Ani97C6/LTenNuU6jbzm4kevD5Fio
=IB/P
-END PGP SIGNATURE-

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



RE: Mapping JSP's to outside of the war or expanded folder

2008-02-18 Thread philip.coates
We also do this with Velocity (we use Spring MVC rather than JSP) and point our 
Velocity ResourceLoader to somewhere else on the filesystem (away from any 
Apache document root so they aren't accessible). This brings benefits of being 
able to do hot-deploy of content/templates for urgent copy changes, should we 
need to, ability to work with things like AlFresco, and not having any logic 
other than minimal presentational logic in the view layer.

-Original Message-
From: Ralph Goers [mailto:[EMAIL PROTECTED]
Sent: 18 February 2008 17:37
To: Tomcat Users List
Subject: Re: Mapping JSP's to outside of the war or expanded folder


We have a similar need. But doing this with JSPs is very dangerous since 
they can have java code within them. Instead, using a templating 
language like Velocity would seem to be a mucn better approach. 

emerson cargnin wrote:
> The policy of our company is to deploy the jsp's separated from the
> war file, to allow a finer grained control over deployment. I'm not
> very fan of it, but it's something I won't be able to change. So I
> need a way to point the following URL's to another place in the file
> system.
> http://server/[context]/jsp/*
> http://server/[context]/css/*
> http://server/[context]/html/*
> http://server/[context]/images/*
>
> Thanks
> emerson
>
> On 18/02/2008, David Brown <[EMAIL PROTECTED]> wrote:
>   
>> Once the .war is expanded why would you want to map to JSPs outside of the 
>> file system package?
>>
>> emerson cargnin wrote ..
>> 
>>> Hi there
>>>
>>> We use resin here in my work. Resin allows in its web.xml an element like:
>>>
>>>   
>>> /jsp/*
>>> c:/resin/resin-2.1.4/apps/ucs/
>>> 
>>>
>>>
>>>
>>>
>>> This can also be used in resin.conf, amking the war more portable.
>>>
>>> Now we are starting a migration to tomcat. But as far as I know TC
>>> doesnt not allow to have the JSP's out side of the war or the expanded
>>> war. I did a research a couple of years ago. Did it changed? Is there
>>> anyway now of mapping the jsp's of an app to an outside folder?
>>>
>>> Thanks
>>> Emerson Cargnin
>>>
>>> -
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>   
>> -
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>> 
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>   

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


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



Re: Mapping JSP's to outside of the war or expanded folder

2008-02-18 Thread Ralph Goers
We have a similar need. But doing this with JSPs is very dangerous since 
they can have java code within them. Instead, using a templating 
language like Velocity would seem to be a mucn better approach. 


emerson cargnin wrote:

The policy of our company is to deploy the jsp's separated from the
war file, to allow a finer grained control over deployment. I'm not
very fan of it, but it's something I won't be able to change. So I
need a way to point the following URL's to another place in the file
system.
http://server/[context]/jsp/*
http://server/[context]/css/*
http://server/[context]/html/*
http://server/[context]/images/*

Thanks
emerson

On 18/02/2008, David Brown <[EMAIL PROTECTED]> wrote:
  

Once the .war is expanded why would you want to map to JSPs outside of the file 
system package?

emerson cargnin wrote ..


Hi there

We use resin here in my work. Resin allows in its web.xml an element like:

  
/jsp/*
c:/resin/resin-2.1.4/apps/ucs/

   



This can also be used in resin.conf, amking the war more portable.

Now we are starting a migration to tomcat. But as far as I know TC
doesnt not allow to have the JSP's out side of the war or the expanded
war. I did a research a couple of years ago. Did it changed? Is there
anyway now of mapping the jsp's of an app to an outside folder?

Thanks
Emerson Cargnin

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

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





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

  


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



ext. command (PIPE) hangs

2008-02-18 Thread Holger Burde

Hi;

I have a webapp which uses a pipe to read from a process under 2003  
Server. The webapp sort of wrappes zhe output in objects and displays  
them in
tables. Today i found that the app does not work anymore. The strange  
thing is it still works as a UNIT Test from the commandline. it only  
does not
work anymore in the webcontainer. We restarted tomcat , redeployed  
etc. but still the app wont work.


The testsystem isa slow vmware image and someone suggested that maybe  
timeing are out of order. Are there any restrictions on runing  
external commands (pipe) ? Does it have to complete fast ? or does it  
need special permissions ?


The UNIT Test runs 1:1 the very same objects/methods which complete in  
a dos shell and fail in the container. The webapp  stays on loading -  
forever.
We commented everything out so the page has nothing more in it that  
the stuff in the UNIT Test.


Any ideas ? We run out of ideas of what can cause this sort of  
behaviour ... especialy if it worked before (slow but it worked).



hb

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



Re: using a class from jar file

2008-02-18 Thread polock

I made a mistake I wanted instead of war file I wrote a jar file. So the web
application has been already created. My question is if I have to compile a
java class that extends one of the classes included in a jar file. Do I have
to extract from war file necessary libraries need for the compilation of my
file or there is a more elegant way to handle this?

Christopher Schultz-2 wrote:
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> To whom it may concern,
> 
> polock wrote:
> | I just put a jar file in my webapps folder
> 
> That's not the place to put it.
> 
> | now I would like to write
> | some java files with classes that are available within jar file that
> will be
> | also part of a web application.
> 
> | Where should I place this new java files?
> 
> You need to create a web application, then. Find an online tutorial or a
> book, and you'll see that a web application needs to have a directory
> structure like this:
> 
> webapps/yourwebapp
> webapps/yourwebapp/WEB-INF
> webapps/yourwebapp/WEB-INF/lib
> webapps/yourwebapp/WEB-INF/classes
> 
> Your JAR files go under the "lib" directory and your compiled Java
> classes go under the "classes" directory (of course, in
> package-appropriate subdirectories). You should really also have a
> web.xml file in WEB-INF.
> 
> Note that the Java source files are irrelevant to a web application:
> they need not be included.
> 
> | Should they be compiled?
> 
> Yes, and they should be installed under the "classes" directory as
> indicated above.
> 
> | Also I would appreciate a reffernce to some documents where this is
> | explained!
> 
> GIYF (Google is your friend): try searching the web for this
> information, as it is plentiful. Ignore anything that references "Apache
> JServ" which is an outdated servlet container that has been out of use
> for quite a long time (yet the documentation seems to survive on the web
> for some reason).
> 
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.8 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iEYEARECAAYFAke0eJ4ACgkQ9CaO5/Lv0PAV3gCeJDvpuaDehMXx/3mFreIOZWqb
> 5i8AoLgOeqI4AzX8l9Wvbgt9gCxy6ZBX
> =Gzpw
> -END PGP SIGNATURE-
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/using-a-class-from-jar-file-tp15481864p15547050.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: What version of Tomcat??

2008-02-18 Thread David Smith

Hi Mike.

First, could you fix your system time?  Your email came through w/ a 
time stamp of 5/11/2004, 11:04am.  Unless you've found a really cool 
time machine somewhere and can sent email in to the future, this is just 
slightly annoying to me.


Regarding your question, if your effort is to eliminate bugs in the 
tomcat server, moving to the most recent available 5.5.x tomcat is 
probably the best advice.  Tomcat 6 isn't a huge change, but there is 
some refactoring and folder layout changes that might introduce issues 
rather than eliminate them.  Plus I suspect there is not a compatibility 
package for tomcat 6 like there was for tomcat 5 or 5.5.  You'd have to 
upgrade your Java version to run tomcat 6.


--David

Michael McQuade wrote:

Hi Folks

Sorry I'm not very knowledgeable about technical aspects of Tomcat.  I
am having some problems with an application I am running acting rather
weird.  So what I want to do is download a newer version of Tomcat to
try and rule out some possibilities.
Currently I am running the following

Tomcat version 5.0.28
Java SDK Standard Edition Version 1.4.2
Java 2 runtime environment

To go to Tomcat 6.xx, can someone please tell me what I need to download...

Binary Distributions Core  ZIP ???  I assume, for a windows environment

Where I get confused is the Catalina stuff, or any other small pieces I need
to add to it..  What version of Java do I need to grab

This is a Paste

"Tomcat 6.0 is designed to run on JSE 5.0 and later.

In addition, Tomcat 6.0 uses the Eclipse JDT Java compiler for compiling
JSP pages.  This means you no longer need to have the complete
Java Development Kit (JDK) to run Tomcat, but a Java Runtime Environment
(JRE) is sufficient.  The Eclipse JDT Java compiler is bundled with the
binary Tomcat distributions.  Tomcat can also be configured to use the
compiler from the JDK to compile JSPs, or any other Java compiler supported
by Apache Ant. "

So can I remove the Java SDK environment from my server and just download a
a new JRE version 5   Anyone got this link

Im sorry for being so inept  at this, Im working on improving

Thank-you to anyone who can answer this for me

Mike

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

  



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



RE: [SPAM:] - IIS and Tomcat Redirector. - Email has different SMTP TO: and MIME TO: fields in the email addresses

2008-02-18 Thread doepain

I have the same exact problem with my installation of Tomcat and the ISAPI
redirector. I have the Web Service Extension in IIS, mapped to the location
of the isapi redirector dll, and set it to "allowed"? 

If anyone can follow-up with the post it would be greatly appreciated.






Leo Donahue - PLANDEVX wrote:
> 
> Did you create a Web Service Extension in IIS, mapped to the location of
> the isapi redirector dll, and set it to "allowed"? 
> 
> 
> Leo D
> 
> -Original Message-
> From: sbell [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, July 19, 2006 11:47 AM
> To: users@tomcat.apache.org
> Subject: [SPAM:] - IIS and Tomcat Redirector. - Email has different SMTP
> TO: and MIME TO: fields in the email addresses
> 
> Hello,
> 
> I am having troubles setting up the Tomcat Redirector (binary version
> 1.2.15) on Windows 2000 server. 
> 
> Java 1.5_07 is installed, and I am using the base binary installation of
> Tomcat 5.5.17.
> After installing the redirector dll, I configured an isapi filter on my
> web site (not the default web though. That was setup automatically from
> the install.) 
> 
> Restarted Tomcat, IIS, checked on the ISAPI filter and had the green
> upward arrow.
> 
> Went to the /jsp-examples/index.html page, and got an error 404.
> 
> Curiously on the page it claimed to be powered by Jetty. 
> Jetty is not installed on the server at all, unless it comes as part of
> JSpell or the redirector dll.
> 
> The site is password protected, using NTLM After the isapi discovery,
> there is hexidecimal / ascii dump of the http headers.
> 
> Any advice would be greatly appreciated.
> 
> Thank you, Steve.
> 
> The isapi dll log file:
> [Wed Jul 19 14:10:03 2006] [2260:2232] [debug] jk_isapi_plugin.c (762):
> Filter started [Wed Jul 19 14:10:03 2006] [2260:2232] [debug]
> jk_isapi_plugin.c (828): Virtual Host redirection of
> /jsp-examples/index.html [Wed Jul 19 14:10:03 2006] [2260:2232] [debug]
> jk_uri_worker_map.c (449): Attempting to map URI
> '/jsp-examples/index.html' from 4 maps [Wed Jul 19 14:10:03 2006]
> [2260:2232] [debug] jk_uri_worker_map.c (461): Attempting to map context
> URI '/servlets-examples/*'
> [Wed Jul 19 14:10:03 2006] [2260:2232] [debug] jk_uri_worker_map.c
> (461): Attempting to map context URI '/jsp-examples/*'
> [Wed Jul 19 14:10:03 2006] [2260:2232] [debug] jk_uri_worker_map.c
> (475): Found a wildchar match wlb -> /jsp-examples/* [Wed Jul 19
> 14:10:03 2006] [2260:2232] [debug] jk_isapi_plugin.c (845): check if
> [/jsp-examples/index.html] is points to the web-inf directory [Wed Jul
> 19 14:10:03 2006] [2260:2232] [debug] jk_isapi_plugin.c (863):
> [/jsp-examples/index.html] is a servlet url - should redirect to wlb
> [Wed Jul 19 14:10:03 2006] [2260:2232] [debug] jk_worker.c (301):
> Maintaining worker wlb [Wed Jul 19 14:10:03 2006] [2260:2232] [debug]
> jk_worker.c (111): found a worker wlb [Wed Jul 19 14:10:03 2006]
> [2260:2232] [debug] jk_isapi_plugin.c (1018): got a worker for name wlb
> [Wed Jul 19 14:10:03 2006] [2260:2232] [debug] jk_lb_worker.c (592):
> service sticky_session=1 [Wed Jul 19 14:10:03 2006] [2260:2232] [debug]
> jk_ajp_common.c (2131): acquired connection cache slot=0 [Wed Jul 19
> 14:10:03 2006] [2260:2232] [debug] jk_lb_worker.c (612): service
> worker=ajp13w jvm_route=ajp13w [Wed Jul 19 14:10:03 2006] [2260:2232]
> [debug] jk_ajp_common.c (566): ajp marshaling done [Wed Jul 19 14:10:03
> 2006] [2260:2232] [debug] jk_ajp_common.c (1670): processing with 3
> retries [Wed Jul 19 14:10:03 2006] [2260:2232] [debug] jk_connect.c
> (328): socket TCP_NODELAY set to On [Wed Jul 19 14:10:03 2006]
> [2260:2232] [debug] jk_connect.c (426): trying to connect socket 2708 to
> 127.0.0.1:8009 [Wed Jul 19 14:10:03 2006] [2260:2232] [debug]
> jk_connect.c (452): socket 2708 connected to 127.0.0.1:8009 [Wed Jul 19
> 14:10:03 2006] [2260:2232] [debug] jk_ajp_common.c (864): Connected
> socket 2708 to (127.0.0.1:8009) [Wed Jul 19 14:10:03 2006] [2260:2232]
> [debug] jk_ajp_common.c (909): sending to ajp13 pos=4 len=972 max=8192
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/IIS-and-Tomcat-Redirector.-tp5401962p15547046.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: How many tomcat processes should there be?

2008-02-18 Thread David Smith
I'm guessing you're running an older version of linux w/ a 2.4 or 
earlier kernel.  In such systems the threads within a process show up as 
processes themselves.  That changed in newer versions of the linux 
kernel which report one entry per process regardless of how many threads.


--David

Jonathan Mast wrote:

When I run "ps ax" on our Linux server, I'm seeing dozens of Tomcat
processes running.  Is this normal?
Shouldn't there be just 1 Tomcat process?

Occasionally, we have to restart Apache to kill all those processes, because
they are slowing the machine down.

thanks

  



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



Re: Mapping JSP's to outside of the war or expanded folder

2008-02-18 Thread David Brown
In the future to get the gurus to reply supply more info about your systems 
overall (OS, JDK, TC version, hardware, network topology, etc.). If you are 
running a NIX box you could possibly create some soft links in the directories 
you have named below. I have not tried something like that nor have I ever seen 
any discussion about something like soft links in the /WEB-INF directory. HTH.

emerson cargnin wrote ..
> The policy of our company is to deploy the jsp's separated from the
> war file, to allow a finer grained control over deployment. I'm not
> very fan of it, but it's something I won't be able to change. So I
> need a way to point the following URL's to another place in the file
> system.
> http://server/[context]/jsp/*
> http://server/[context]/css/*
> http://server/[context]/html/*
> http://server/[context]/images/*
> 
> Thanks
> emerson
> 
> On 18/02/2008, David Brown <[EMAIL PROTECTED]> wrote:
> > Once the .war is expanded why would you want to map to JSPs outside of the 
> > file
> system package?
> >
> > emerson cargnin wrote ..
> > > Hi there
> > >
> > > We use resin here in my work. Resin allows in its web.xml an element like:
> > >
> > >   
> > > /jsp/*
> > > c:/resin/resin-2.1.4/apps/ucs/
> > > 
> > >
> > >
> > >
> > >
> > > This can also be used in resin.conf, amking the war more portable.
> > >
> > > Now we are starting a migration to tomcat. But as far as I know TC
> > > doesnt not allow to have the JSP's out side of the war or the expanded
> > > war. I did a research a couple of years ago. Did it changed? Is there
> > > anyway now of mapping the jsp's of an app to an outside folder?
> > >
> > > Thanks
> > > Emerson Cargnin
> > >
> > > -
> > > To start a new topic, e-mail: users@tomcat.apache.org
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > -
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

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



Re: Problem closing database pool connections

2008-02-18 Thread Len Popp
It looks to me like you're bypassing the connection pool and messing
up the way it handles connections. You've only shown a snippet of
code, so I have a couple of questions:
1. After dconn is returned from getConnection, how and when does it get closed?
2. Does the exception happen every time getConnection is called, or
does it maybe succeed on the first call and fail during the second?

When you get a connection from the connection pool, you're supposed to
close it *after* you use it. At
that time the underlying "real" connection is *not* closed, it's just
returned to the pool. That's the point of the connection pool, it
keeps a set of connections open to reduce overhead. Here you're
closing the PoolableConnection immediately, before it's used, which is
wrong.

Here's what I think happens. (This is partly guesswork.)

- DatabaseController.getConnection gets a PoolableConnection, extracts
the underlying real connection (dconn), then returns the
PoolableConnection to the pool.

- The caller of DatabaseController.getConnection uses the real
connection and then closes it.

- Now the pool contains a PoolableConnection whose underlying
connection is closed - This shouldn't happen!

- DatabaseController.getConnection is called a second time, and
returns the same PoolableConnection as before (because it's back in
the pool).

- conn.close() fails this time because the underlying connection was
closed prematurely.

Normally you'd never call getInnermostDelegate, you'd just use the
PoolableConnection returned by DataSource.getConnection and close it
when you're done. Is there a reason that you can't do that?
-- 
Len


On Feb 18, 2008 11:05 AM, Petter Olofsson <[EMAIL PROTECTED]> wrote:
> Hello tomcat users!
>
> I have a problem using the connection pool in Tomcat. The function
> getConnection() throws the following error message:
>
> [Error message]
> When trying to get a Connection an SQLExcpetion occurred:
> java.sql.SQLException: Already closed.
>at 
> org.apache.tomcat.dbcp.dbcp.PoolableConnection.close(PoolableConnection.java:84)
>at 
> org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:181)
>at 
> org.metria.kiruna.profs.eniro.db.DatabaseController.getConnection(DatabaseController.java:136)
>
> [DatabaseController.java]
>protected Connection getConnection(){
>try{
>Context initContext = new InitialContext();
>Context envContext  = (Context)initContext.lookup("java:comp/env");
>DataSource ods = (DataSource) envContext.lookup("jdbc/yyy");
>
>Connection conn = ods.getConnection();
>
>Connection dconn = ((DelegatingConnection)
> conn).getInnermostDelegate();
>
>// if( conn != null && !conn.isClosed() ) // Line 135
>conn.close(); // Line 136
>
>return dconn;
>}catch( SQLException sqle ){
>System.err.println("When trying to get a Connection an
> SQLExcpetion occured.");
>sqle.printStackTrace();
>}catch( NamingException ne ){
>System.err.println("When trying to get a Connection an
> NamingException occured.");
>System.err.println(ne);
>}
>return null;
>}
>
> [Context.xml]
> auth="Container"
>driverClassName="oracle.jdbc.OracleDriver"
>maxActive="30"
>maxIdle="10"
>maxWait="1000"
>name="jdbc/yyy"
>username="xxx"
>password="xxx"
>type="javax.sql.DataSource"
>url="jdbc:oracle:thin:@drone:1521:top" />
>
> If the outer connection is left open ( line 135, 136 is deleted) then
> all connections are used until "maxActive" connections are created.
>
> The program uses Tomcat 5.5.26 and Oracle 10.2.3.0.
>
> Does anybody have an idea of why I can't close the outer connection so
> that the connections can be returned to the pool when I am done?
>
> / Petter
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Re: JNDI question/problem

2008-02-18 Thread Mindaugas Žakšauskas
Hi Charles,

...and thanks for your reply.

> You appear to be trying to define two default contexts (path=""), which is 
> obviously incorrect <..>

Just to be more precise and address your point:

- I am running Tomcat without its default apps (manager, root), only
my own apps are set up;
- when I define both contexts in server.xml, I obviously put different
path="..." on contexts, the given example was for illustration
purposes only. Sorry for the confusion.

Just to repeat myself, I only have to put Context entries inside
server.xml to be able to control the startup order of the webapps. If
you could suggest me how would I achieve setting the startup order by
having separate files, I would be able to get rid of at least two
problems in my life. Thanks again for your effort & time.

Regards,
Mindaugas

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



mail host name lost when sending mail with Apache Commons Email

2008-02-18 Thread Björn Þór Jónsson
Hi,

I'm having trouble sending mail with Apache Commons Email in Tomcat 6.0.  At
the top of the stack trace the mail server I'm sending to (that is known to
be working ok) is mentioned but further down the trace there are _Caused by_
messages mentioning problems sending to localhost.

It seems like the hostname that I'm setting via Commons Emails's
.setHostName(...)
is getting lost somewhere and javax.mail... falls back to localhost.

This code works fine when run as a JUnit test.

Does anyone have an idea about what may be causing this loss of mail host
name when run with Tomcat?



Here's the stacktrace (actual mail host name replaced with "some.mail.server
")

Cause:
 Sending the email to the following server failed : some.mail.server:25
org.apache.commons.mail.EmailException: Sending the email to the following
server failed : some.mail.server:25
 at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1138)
 at org.apache.commons.mail.Email.send(Email.java:1163)

Caused by: javax.mail.SendFailedException: Send failure (
javax.mail.MessagingException: Could not connect to SMTP host: localhost,
port: 25 (java.net.ConnectException: Connection refused: connect))
 at javax.mail.Transport.send(Transport.java:163)
 at javax.mail.Transport.send(Transport.java:48)
 at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1128)
 ... 14 more
Caused by: javax.mail.MessagingException: Could not connect to SMTP host:
localhost, port: 25 (java.net.ConnectException: Connection refused: connect)
 at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1282)
 at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370)
 at javax.mail.Service.connect(Service.java:231)
 at javax.mail.Service.connect(Service.java:85)
 at javax.mail.Service.connect(Service.java:70)
 at javax.mail.Transport.send(Transport.java:94)
 ... 16 more
Caused by: java.net.ConnectException: Connection refused: connect
 at java.net.PlainSocketImpl.socketConnect(Native Method)
 at java.net.PlainSocketImpl.doConnect(Unknown Source)
 at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
 at java.net.PlainSocketImpl.connect(Unknown Source)
 at java.net.SocksSocketImpl.connect(Unknown Source)
 at java.net.Socket.connect(Unknown Source)
 at java.net.Socket.connect(Unknown Source)
 at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:232)
 at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
 at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1250)
 ... 21 more



Thanks for any hints.
/Björn


-- 
Björn Þór Jónsson
http://bthj.is


What version of Tomcat??

2008-02-18 Thread Michael McQuade
Hi Folks

Sorry I'm not very knowledgeable about technical aspects of Tomcat.  I
am having some problems with an application I am running acting rather
weird.  So what I want to do is download a newer version of Tomcat to
try and rule out some possibilities.
Currently I am running the following

Tomcat version 5.0.28
Java SDK Standard Edition Version 1.4.2
Java 2 runtime environment

To go to Tomcat 6.xx, can someone please tell me what I need to download...

Binary Distributions Core  ZIP ???  I assume, for a windows environment

Where I get confused is the Catalina stuff, or any other small pieces I need
to add to it..  What version of Java do I need to grab

This is a Paste

"Tomcat 6.0 is designed to run on JSE 5.0 and later.

In addition, Tomcat 6.0 uses the Eclipse JDT Java compiler for compiling
JSP pages.  This means you no longer need to have the complete
Java Development Kit (JDK) to run Tomcat, but a Java Runtime Environment
(JRE) is sufficient.  The Eclipse JDT Java compiler is bundled with the
binary Tomcat distributions.  Tomcat can also be configured to use the
compiler from the JDK to compile JSPs, or any other Java compiler supported
by Apache Ant. "

So can I remove the Java SDK environment from my server and just download a
a new JRE version 5   Anyone got this link

Im sorry for being so inept  at this, Im working on improving

Thank-you to anyone who can answer this for me

Mike

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



How many tomcat processes should there be?

2008-02-18 Thread Jonathan Mast
When I run "ps ax" on our Linux server, I'm seeing dozens of Tomcat
processes running.  Is this normal?
Shouldn't there be just 1 Tomcat process?

Occasionally, we have to restart Apache to kill all those processes, because
they are slowing the machine down.

thanks


Problem closing database pool connections

2008-02-18 Thread Petter Olofsson
Hello tomcat users!

I have a problem using the connection pool in Tomcat. The function
getConnection() throws the following error message:

[Error message]
When trying to get a Connection an SQLExcpetion occurred:
java.sql.SQLException: Already closed.
   at 
org.apache.tomcat.dbcp.dbcp.PoolableConnection.close(PoolableConnection.java:84)
   at 
org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:181)
   at 
org.metria.kiruna.profs.eniro.db.DatabaseController.getConnection(DatabaseController.java:136)

[DatabaseController.java]
   protected Connection getConnection(){
   try{
   Context initContext = new InitialContext();
   Context envContext  = (Context)initContext.lookup("java:comp/env");
   DataSource ods = (DataSource) envContext.lookup("jdbc/yyy");

   Connection conn = ods.getConnection();

   Connection dconn = ((DelegatingConnection)
conn).getInnermostDelegate();

   // if( conn != null && !conn.isClosed() ) // Line 135
   conn.close(); // Line 136

   return dconn;
   }catch( SQLException sqle ){
   System.err.println("When trying to get a Connection an
SQLExcpetion occured.");
   sqle.printStackTrace();
   }catch( NamingException ne ){
   System.err.println("When trying to get a Connection an
NamingException occured.");
   System.err.println(ne);
   }
   return null;
   }

[Context.xml]


If the outer connection is left open ( line 135, 136 is deleted) then
all connections are used until "maxActive" connections are created.

The program uses Tomcat 5.5.26 and Oracle 10.2.3.0.

Does anybody have an idea of why I can't close the outer connection so
that the connections can be returned to the pool when I am done?

/ Petter

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



JAAS Principal propagation from Tomcat to JBoss

2008-02-18 Thread Denis Cossutta
I have the following situation (I try to simplify it):

   1. I have a standalone Apache Tomcat server (5.5.26), on which is
   running a web application:


   - A Welcome jsp page (Welcome.jsp) and 2 Servlets: CalculatorServlet
   and MyProtectedServlet
   - The CalculatorSevlet servlet has to access remotly a stateless
   session bean on a JBoss application server:

Properties env = new Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY,"
org.jnp.interfaces.NamingContextFactory");
env.put(Context.URL_PKG_PREFIXES, "org.jnp.interfaces");
env.put(Context.PROVIDER_URL, "localhost:1099");
Context c = new InitialContext(env);
MyCalculatorRemote calculator = c.lookup
("MyCalculatorBean/remote");
int result = calculator.sum(a, b);

   1. I have a standalone JBoss server (version 4.2.2), on which is
   running an EJB3 application


   - A Stateless session bean (MyCalculatorBean), which exposes a sum(nt
   a, int b) method through the remote interface:

 @Stateless
 @SecurityDomain("MyRealm")
 public class MyCalculatorBean implements MyCalculatorRemote {

 @RolesAllowed("math")
 public Integer sum(int a, int b) {
   return a + b;
  }
  }

   - The Session bean is defined under the jboss security domain called
   "MyRealm", which is defined in the jboss login-config.xml and in fact
   uses a MySql database for authentication and authorization:

 


 true
 java:/MysqlDS
 SELECT
PASSWORD FROM USERS WHERE EMAIL=?
 SELECT ROLE,
'Roles' FROM ROLES WHERE EMAIL=?
   
   


   - The method sum(int a, int b) of the Session bean can be called only
   by authenticated users with "math" role:

 @RolesAllowed("math")
 public Integer sum(int a, int b) {
   return a + b;
  }

Since the Session bean is secured with jboss security mechanism, which is
based on JAAS, to access the bean I have to setup JAAS authentication on the
web application (Single sign on authentication):

   - I defined a JAASRealm in the Tomcat server.xml

 

  


 

 

   - I defined a login.config file to be used by the JAASRealm; the file
   defines the login module to be used for jaas authentication and I define to
   use the JBoss DatabaseServerLoginModule (I imported the jboss security
   library into the tomcat common/lib folder):

MyRealm{

org.jboss.security.auth.spi.DatabaseServerLoginModulesufficient
debug="true"
  dsJndiName="java:comp/env/jdbc/MyDB"
  principalsQuery="select password from users where
email=?"
  rolesQuery="select role, 'Roles' from roles where
email=?";
  };


   - I set up Tomcat to specify the location of the login.config file,
   changing the catalina.bat script:

 set JAVA_OPTS=%JAVA_OPTS% -
Djava.security.auth.login.config==%CATALINA_HOME%/conf/login.config

   - I set up the web.xml of my web application to define the login
   configuration and the security constrains like follows:


Constraint

Proteced Servlet

/MyProtectedServlet
GET
POST
HEAD
PUT
OPTIONS
TRACE
DELETE


Auth
math



FORM
MyRealm

/login.jsp
/error.jsp



Math role
math


   - I defined finally the login.jsp page as required for jaas
   authentication:



Login Page



Username:



Password:










Now, the flow is the following one:

   - I acces the web application root (http:\\localhost:8081\MyWebApplicaiton)
   through the web browser and it displays the Welcom page (Welcome.jsp)
   - I click on a link on the Welcome page to the MyProtectedServlet
   - Since the MyProtectedServlet is a protected resource I'm redirected
   to the login page
   - I enter my credentials in the login page form and submit
   - the browser displays the MyProtectedServlet which has a link to the
   MyServlet servelt
   - Clicking on the link, I'm redirect to MyServlet, which calls the
   remote session bean (passing automatically the Principal of the logged in
   user, which is supposed to be stored in the HttpServletRequest) and the
   result of the call is displayed on the page

Unfortunatelly I have to following issue trying to accomplish this process:

   - When submitting my credentials through the 

Tomcat 6.0 + myFaces 1.2 --> ClassNotFoundException

2008-02-18 Thread MPF

Hi!

I use:


Also myFaces 1.2 unter Tomcat 5.x dürfte sowieso nicht laufen, da Tomcat 5.x
nicht JSP 1.2 und Servlet Container 2.5 unterstützt?

Demnach müsste der Tomcat 6.0 her:
Hab das Teil installiert, Classpath und Catalina_Home gesetzt, Sysdeo Plugin
(3.2.1) installiert und lt. Release Notes das DevLoader.jar nach Tomcat 6 /
libs geschoben.
+) myEclipse 5.1.1GA
+) Tomcat 6.0.16
+) [url=http://www.eclipsetotale.com/tomcatPlugin.html]Sysdeo Plugin
3.2.1[/url]
+) Maven 2.0.8 und
[url=http://wiki.apache.org/myfaces/MyFaces_Archetypes_for_Maven]Archetypes[/url]

Thats the archetype how I created the web project:
[code]
mvn archetype:create -DarchetypeGroupId=org.apache.myfaces.buildtools
-DarchetypeArtifactId=myfaces-archetype-helloworld
-DarchetypeVersion=1.0.0 -DgroupId=abc-DartifactId=ProjectName
[/code]

I tried to start a webapplication which should developed with JSP 1.2 and
servlet container 2.5.
So I installed tomcat 6.0.16 and started the server - following error
message I got:

[code]
18.02.2008 15:43:37 org.apache.tomcat.util.digester.Digester startElement
SCHWERWIEGEND: Begin event threw exception
java.lang.ClassNotFoundException: org.apache.catalina.loader.DevLoader
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:205)
at org.apache.tomcat.util.digester.Rule.begin(Rule.java:153)
at
org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1358)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
Source)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1644)
at org.apache.catalina.startup.Catalina.load(Catalina.java:516)
at org.apache.catalina.startup.Catalina.load(Catalina.java:550)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
18.02.2008 15:43:37 org.apache.catalina.startup.Catalina load
WARNUNG: Catalina.start using C:\Programme\Apache Software Foundation\Tomcat
6.0\conf\server.xml: 
java.lang.ClassNotFoundException: org.apache.catalina.loader.DevLoader
at
org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2808)
at
org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2834)
at
org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1361)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
Source)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1644)
at org.apache.catalina.startup.Catalina.load(Catalina.java:516)
at org.apache.catalina.startup.Catalina.load(Catalina.java:550)
 

RE: JNDI question/problem

2008-02-18 Thread Caldarale, Charles R
> From: Mindaugas Žakšauskas [mailto:[EMAIL PROTECTED] 
> Subject: JNDI question/problem
> 
>   
>  
> 
>  
>  type="java.util.Map"/>
>  
>  
>  type="java.util.Map"/>
>  
> 
>   
> 

You appear to be trying to define two default contexts (path=""), which is 
obviously incorrect, and likely conflict with Tomcat's existing default app in 
[appBase]/ROOT.  Since you shouldn't be putting  elements inside 
server.xml and the resource reference works when you place the  
elements in valid locations, your question is somewhat moot.

Note that when  elements are not in server.xml, the path attribute 
must not be used (it's usually ignored, but can cause problems).

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Why Tomcat take about 15 minutes to start?

2008-02-18 Thread Mohamed Mohamedin
The same delay approx.

-Original Message-
From: Leon Rosenberg [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 18, 2008 12:56 AM
To: Tomcat Users List
Subject: Re: Why Tomcat take about 15 minutes to start?

And without the enhydra app?
Leon

On Feb 17, 2008 9:36 PM, Mohamed Mohamedin <[EMAIL PROTECTED]>
wrote:
> It has internet connection and can connect to apache.org. Also It has app
> (Enhydra Application)
>
>
> -Original Message-
> From: Leon Rosenberg [mailto:[EMAIL PROTECTED]
> Sent: Sunday, February 17, 2008 4:46 PM
> To: Tomcat Users List
> Subject: Re: Why Tomcat take about 15 minutes to start?
>
> is your server connected to the internet (e.g. can make requests,
> specially to apache.org) ?
> Is it a vanilla tomcat or have you put some app into it? Especially a
> struts app?
>
> regards
> Leon
>
>
> On Feb 17, 2008 2:43 PM, Mohamed Mohamedin <[EMAIL PROTECTED]>
> wrote:
> > This message
> "http://readlist.com/lists/tomcat.apache.org/users/9/46003.html"; talked
> about APR. Which I don't use.
> >
> > But I found in the last these lines
> > " Anyway: since you've not configured an HTTPS Connector in Tomcat, I
> > don't really have an explanation for the slow startup."
> >
> > I use the default server.xml and it has only this connector:
> > >connectionTimeout="2"
> >redirectPort="8443" />
> > So is really my problem has no explanation?
> >
> > Thanks again  for your help
> >
> > -Original Message-
> > From: Markus Schönhaber [mailto:[EMAIL PROTECTED]
> > Sent: Sunday, February 17, 2008 1:15 AM
> > To: users@tomcat.apache.org
> > Subject: Re: Why Tomcat take about 15 minutes to start?
> >
> > Neha Agrawal wrote:
> >
> > >  but i did not receive it...dont know why?
> >
> > This is what Christopher pointed you to:
> > http://readlist.com/lists/tomcat.apache.org/users/9/46003.html
> >
> > Regards
> >   mks
> >
> > -
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> > __ NOD32 2881 (20080217) Information __
> >
> > This message was checked by NOD32 antivirus system.
> > http://www.eset.com
> >
> >
> >
> > -
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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


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



JASPER libraries incompatibilities

2008-02-18 Thread Hitesh Raghav
Hi,
 
Is there any backward incompatibility in JASPER libraries in Tomcat
(v4.x.y, 5.x.y & 6.x.y)?
 
If 'YES', could you please share appropriate URL about it.
 
 
Thanks,
-Hitesh
 


Re: Why Tomcat take about 15 minutes to start?

2008-02-18 Thread Markus Schönhaber
jean-frederic clere wrote:

> Nope, the entropy is collected when starting the listener
>  SSLEngine="off" />
> Should help.

I didn't know that. Thanks for the hint.

Regards
  mks

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



Tomcat 5.5 clustering -> Cluster Session

2008-02-18 Thread Andrew Hole
Hello!

I'm getting the following message on Tomcat:

18/Fev/2008 12:07:50
org.apache.catalina.cluster.tcp.ReplicationValvecreatePrimaryIndicator
FINE: Context /outpatient: Found session
07EEE91093046F13672F88402F03C5A2.node02 but it isnt a ClusterSession.

Why this happen?

Thanks a lot
AH


Re: Mapping JSP's to outside of the war or expanded folder

2008-02-18 Thread emerson cargnin
The policy of our company is to deploy the jsp's separated from the
war file, to allow a finer grained control over deployment. I'm not
very fan of it, but it's something I won't be able to change. So I
need a way to point the following URL's to another place in the file
system.
http://server/[context]/jsp/*
http://server/[context]/css/*
http://server/[context]/html/*
http://server/[context]/images/*

Thanks
emerson

On 18/02/2008, David Brown <[EMAIL PROTECTED]> wrote:
> Once the .war is expanded why would you want to map to JSPs outside of the 
> file system package?
>
> emerson cargnin wrote ..
> > Hi there
> >
> > We use resin here in my work. Resin allows in its web.xml an element like:
> >
> >   
> > /jsp/*
> > c:/resin/resin-2.1.4/apps/ucs/
> > 
> >
> >
> >
> >
> > This can also be used in resin.conf, amking the war more portable.
> >
> > Now we are starting a migration to tomcat. But as far as I know TC
> > doesnt not allow to have the JSP's out side of the war or the expanded
> > war. I did a research a couple of years ago. Did it changed? Is there
> > anyway now of mapping the jsp's of an app to an outside folder?
> >
> > Thanks
> > Emerson Cargnin
> >
> > -
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Re: Mapping JSP's to outside of the war or expanded folder

2008-02-18 Thread David Brown
Once the .war is expanded why would you want to map to JSPs outside of the file 
system package?

emerson cargnin wrote ..
> Hi there
> 
> We use resin here in my work. Resin allows in its web.xml an element like:
> 
>   
> /jsp/*
> c:/resin/resin-2.1.4/apps/ucs/
> 
>
> 
> 
> 
> This can also be used in resin.conf, amking the war more portable.
> 
> Now we are starting a migration to tomcat. But as far as I know TC
> doesnt not allow to have the JSP's out side of the war or the expanded
> war. I did a research a couple of years ago. Did it changed? Is there
> anyway now of mapping the jsp's of an app to an outside folder?
> 
> Thanks
> Emerson Cargnin
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

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



Mapping JSP's to outside of the war or expanded folder

2008-02-18 Thread emerson cargnin
Hi there

We use resin here in my work. Resin allows in its web.xml an element like:

  
/jsp/*
c:/resin/resin-2.1.4/apps/ucs/

   



This can also be used in resin.conf, amking the war more portable.

Now we are starting a migration to tomcat. But as far as I know TC
doesnt not allow to have the JSP's out side of the war or the expanded
war. I did a research a couple of years ago. Did it changed? Is there
anyway now of mapping the jsp's of an app to an outside folder?

Thanks
Emerson Cargnin

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



Re: Why Tomcat take about 15 minutes to start?

2008-02-18 Thread jean-frederic clere

Mohamed Mohamedin wrote:

This message "http://readlist.com/lists/tomcat.apache.org/users/9/46003.html"; 
talked about APR. Which I don't use.

But I found in the last these lines
" Anyway: since you've not configured an HTTPS Connector in Tomcat, I
don't really have an explanation for the slow startup."


Nope, the entropy is collected when starting the listener
SSLEngine="off" />

Should help.

Cheers

Jean-Frederic




I use the default server.xml and it has only this connector:
   
So is really my problem has no explanation?

Thanks again  for your help

-Original Message-
From: Markus Schönhaber [mailto:[EMAIL PROTECTED] 
Sent: Sunday, February 17, 2008 1:15 AM

To: users@tomcat.apache.org
Subject: Re: Why Tomcat take about 15 minutes to start?

Neha Agrawal wrote:


 but i did not receive it...dont know why?


This is what Christopher pointed you to:
http://readlist.com/lists/tomcat.apache.org/users/9/46003.html

Regards
  mks

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


__ NOD32 2881 (20080217) Information __

This message was checked by NOD32 antivirus system.
http://www.eset.com



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





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



JNDI question/problem

2008-02-18 Thread Mindaugas Žakšauskas
Hi,

I'm using Tomcat v5.5.25 with two webbaps deployed as plain files (not
wars). Both of them use JNDI and do some initial binding upon webapp
(context) startup.
The "startup" event is determined by implementing a listener
(javax.servlet.ServletContextListener's contextInitialized method) and
placing it in WEB-INF/web.xml.

Now, there are (at least) two ways of defining/configuring webapp contexts:

1) by having both webapps defined in conf/server.xml, e.g.:


  
 
  

  
 

 

 
 

 

  


2) By having Context part defined separately, e.g. sitting in
conf/Catalina/localhost/webapp1.xml and
conf/Catalina/localhost/webapp2.xml

Now the difference between the two is that for the (1) case linked
JNDI resource ("java:comp/env/local_bar") is not available upon
startup - I'm getting "javax.naming.NameNotFoundException: Name
local_bar is not bound in this Context". Although when the config sits
separately from server.xml, as in case (2), everything works just fine
and JNDI contains all configured bindings/resource links.

The question is, is this a normal behavior or something that should be
addressed/fixed? Also, is there any bit of JNDI spec which would speak
of JNDI availability upon server/webapp startup?

I would prefer to use the (1) approach as in some cases I need to
specify the order of which webapp starts first while this is not
possible using (2).

Thanks indeed anyone for any ideas, really much appreciated.

Regards,
Mindaugas

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



Tomcat connector based on MINA

2008-02-18 Thread neil davudo

Is anyone working on a tomcat connector based on MINA?

TIA,
Neil
-- 
View this message in context: 
http://www.nabble.com/Tomcat-connector-based-on-MINA-tp15540286p15540286.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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