Registering my own protocol in Tomcat

2005-09-22 Thread Martin Peter
Hi,

 

Is there a possibility to get tomcat working with my own ASCII based
protocol (instead of HTTP). Is there a possibility to register a
protocol-handler or something similar to handle the requests of my
protocol with a servlet?

 

Thanks,


Martin Peter
 

 



Re: problems setting up tomcat on debian sarge

2005-09-13 Thread Martin Wood
I struggled with running tomcat5 on sarge for a while and found that the 
blackdown jvm was the only one that seemed to work properly.


I had great problems using the Sun JVM (there was a thread on here about 
6 weeks ago) whereby tomcat would just stop responding, and refuse to 
shutdown unless i killed the process.


I've not had any problems since switching to blackdown.

If you are going to try tomcat 5.5 then you'll need to remember to 
install the compatibility patch for using a 1.4 jvm.


thanks,

Martin

Sébastien GALLET wrote:

Hello,
I used tomcat4 with Sun and blackdown JVM in the past. And they work fine.
On sarge, you can use the java-package package to build a .deb with sun 
jdk.
If you want to use tomcat5, you can test my packages (only tested with 
1.4 jvm):


http://debian.gallet.info/search.do?config=htdigwords=jakarta+apache+org+tomcat 



Sebastien

Jim Buttafuoco a écrit :

good questions, all I did was have apt-get install tomcat4 + all 
needed packages.  I know I have kaffe installed. 
here is a list from dpkg of what I have installed.  let me know if I 
should look for and/or install another package.




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



Re: problems setting up tomcat on debian sarge

2005-09-13 Thread Martin Wood

maybe it was just the combinations i tried :)

and i should have read what his actual problem is...

sorry for the noise.

Andrew Miehs wrote:

Hi Martin,

I have tomcat 5.0.25 - 30 running on Sarge without a problem. Sun  JVM 
1.42r5 and greater.


The orginal poster seems to have a problem with his application as  
manager applets etc work.


I would however recommend running a 2.6 kernel

Andrew



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



Re: Unable to access application if I am on VPN

2005-08-19 Thread Martin Wood
I think its a basically a DNS / route problem, triggered by the search 
for a DTD within struts (i think its struts, but dont hold me to that)


When you connect to your VPN there is no route to jakarta.apache.org

as the error says :

java.net.UnknownHostException: jakarta.apache.org

At a guess, when you connect to your office VPN you cant browse the web 
properly either?


Im guessing that you are using a PPTP VPN connection within windows.

You have a few choices that i can think of

1: Get DNS working via your VPN connection

How you go about this depends on what your VPN server is, and if your 
work will allow traffic through the VPN and back out into the web at 
their end.


2: Hope that you can do split-tunneling with your VPN client / setup

this has some more information on the issue

http://www.experts-exchange.com/Security/Firewalls/Q_21246171.html

3: Prevent the lookup for the DTD from struts.

I dont know how you would go about this because i dont know struts at all.

if anyone else has any ideas id like to hear them.

thanks

Martin


Sunjay Gunda wrote:

Tomcat is running on my local machine. Application is
using MYSQL database and it is also on my local box.
Whenever I connect to office through VPN and try to
access the application that is hosted on my local box,
then I get this error in addition to what I mentioned
before


Aug 19, 2005 4:36:30 PM
org.apache.struts.util.PropertyMessageResources init
INFO: Initializing,
config='org.apache.struts.util.LocalStrings',
returnNull=true
Aug 19, 2005 4:36:30 PM
org.apache.struts.util.PropertyMessageResources init
INFO: Initializing,
config='org.apache.struts.action.ActionResources',
returnNull=true
Aug 19, 2005 4:36:30 PM
org.apache.struts.action.ActionServlet
initModuleConfig
SEVERE: Parsing error processing resource path 
java.net.UnknownHostException: jakarta.apache.org

at
java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at
sun.net.NetworkClient.doConnect(NetworkClient.java:139)
at
sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
at
sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
at
sun.net.www.http.HttpClient.init(HttpClient.java:306)
at
sun.net.www.http.HttpClient.init(HttpClient.java:267)
at
sun.net.www.http.HttpClient.New(HttpClient.java:339)
at
sun.net.www.http.HttpClient.New(HttpClient.java:320)
at
sun.net.www.http.HttpClient.New(HttpClient.java:315)
at
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:521)
at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:498)
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:626)
at
org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown
Source)
at
org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown
Source)
at
org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown
Source)
at
org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at
org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown
Source)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at
org.apache.commons.digester.Digester.parse(Digester.java:1548)
at
org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:944)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:468)
at
javax.servlet.GenericServlet.init(GenericServlet.java:211)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4357)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)
at
org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432

Re: Unable to access application if I am on VPN

2005-08-19 Thread Martin Wood

So, i think the issue is getting tomcat (well, the JVM) to use your proxy.

Im not really sure where to start with that tbh.

From what i know the jre should just use the IE proxy settings 
(assuming the control panel still has 'use browser settings' checked.)


But i dont know what the standard behaviour is if youre not using the 
default jre, or a jdk, or if tomcat creates a different set of 
conditions even if you are just using the jre.


I'll have a look around, but hopefully someone else may be able to shed 
some light on the issue.




martin


Sunjay Gunda wrote:

I was thinking along the same lines of struts unable
to reach jakarta.apache.org. But, I can access all the
web sites even if I am connected to office through VPN
(We do that browsing by using a proxy script path
mentioned under Internet Options-Connections-LAN
Settings : Use automatic configuration script). 


After reading your post, I disabled that script (I
can't access any websites) and I tried to run my
application, but I got the same exception (since, its
unable to reach jakarta website).

Regarding the option that you mentioned for DNS, I
don't have any idea. Since, I am able to access the
webpages, I should be able to pass the data back and
forth. So, I should be able to do that. But, can you
provide a link or some detail information of how to do
that?

Thanks
Sunjay



--- Martin Wood [EMAIL PROTECTED] wrote:



I think its a basically a DNS / route problem,
triggered by the search 
for a DTD within struts (i think its struts, but

dont hold me to that)

When you connect to your VPN there is no route to
jakarta.apache.org

as the error says :

java.net.UnknownHostException: jakarta.apache.org

At a guess, when you connect to your office VPN you
cant browse the web 
properly either?


Im guessing that you are using a PPTP VPN connection
within windows.

You have a few choices that i can think of

1: Get DNS working via your VPN connection

How you go about this depends on what your VPN
server is, and if your 
work will allow traffic through the VPN and back out
into the web at 
their end.


2: Hope that you can do split-tunneling with your
VPN client / setup

this has some more information on the issue




http://www.experts-exchange.com/Security/Firewalls/Q_21246171.html


3: Prevent the lookup for the DTD from struts.

I dont know how you would go about this because i
dont know struts at all.

if anyone else has any ideas id like to hear them.

thanks

Martin


Sunjay Gunda wrote:


Tomcat is running on my local machine. Application


is


using MYSQL database and it is also on my local


box.


Whenever I connect to office through VPN and try


to


access the application that is hosted on my local


box,


then I get this error in addition to what I


mentioned


before


Aug 19, 2005 4:36:30 PM
org.apache.struts.util.PropertyMessageResources


init


INFO: Initializing,
config='org.apache.struts.util.LocalStrings',
returnNull=true
Aug 19, 2005 4:36:30 PM
org.apache.struts.util.PropertyMessageResources


init


INFO: Initializing,
config='org.apache.struts.action.ActionResources',
returnNull=true
Aug 19, 2005 4:36:30 PM
org.apache.struts.action.ActionServlet
initModuleConfig
SEVERE: Parsing error processing resource path 
java.net.UnknownHostException: jakarta.apache.org

at




java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153)


at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at




sun.net.NetworkClient.doConnect(NetworkClient.java:139)


at




sun.net.www.http.HttpClient.openServer(HttpClient.java:402)


at




sun.net.www.http.HttpClient.openServer(HttpClient.java:618)


at




sun.net.www.http.HttpClient.init(HttpClient.java:306)


at




sun.net.www.http.HttpClient.init(HttpClient.java:267)


at



sun.net.www.http.HttpClient.New(HttpClient.java:339)


at



sun.net.www.http.HttpClient.New(HttpClient.java:320)


at



sun.net.www.http.HttpClient.New(HttpClient.java:315)


at




sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:521)


at




sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:498)


at




sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:626)


at




org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown


Source)
at




org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown


Source)
at




org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown


Source)
at




org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown


Source)
at




org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown


Source)
at




org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown


Source)
at




org.apache.xerces.parsers.XML11Configuration.parse

Re: Diagnosing Tomcat Hang

2005-08-12 Thread Martin Wood

i was recently recommended these 2 tools by the good people here

http://www.quest.com/jprobe/

http://jakarta.apache.org/jmeter/

but id like to hear if there are other tools and techniques people 
recommend for debugging and monitoring.


thanks

martin

Kenneth Litwak wrote:

  I have a Java web app running on tomcat on Linux Red hat on an Intel
box with 2 GR of RAM.  We're having trouble because the application
intermittently hangs.  The threads never go anywhere near the max.  The
CPU usage never goes above 2%.  The memory does not get used up.
Nevertheless, the tomcat server hangs.Obviously this could be a
deadlock. Or, it could be connected to the fact that the application
uses a third-party tool, which requires a JDBC connection to a
middleware network program on the database server, called Omnidex.  What
I need to know is how I can go about figuring out what's going wrong.
In the short term if there's something I can do in tomcat logging or
tracing, I'd like to know.  Also, I'm interested in suggestions for
software to purchase that can do a better job of analyzing what is going
on in the JVM to track down what is going on.  The problem appears and
then goes way and then reappears.  It is clearly linked to number of
users, but the problem appears with only 18 users at a time.  So I know
that none of you can tell me what's wrong.  I'm looking for where to
start doing diagnostics.  I have a whole book on Tomcat development and
it has not a single section on tomcat problem solving.  Thanks.

 


Ken

 





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



Re: tomcat 5.5, jdk1.5 on user mode debian stable hangs after a few days

2005-08-07 Thread Martin Wood

Just to let people know that my application has been running happily for
nearly a week now.

I actually replaced the JDK1.5 with the blackdown 1.4.2 and installed
the compatibility extensions for tomcat.

since then its been fine.

martin

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



Re: Redirect HTTP to HTTPS

2005-08-01 Thread Martin Bromley

Just create a filter (mapping it to /* for example so it gets applied to all 
requests), test for a secure connection with request.isSecure(), and if it 
isn't, redirect using response.sendRedirect.

Martin

Faine, Mark wrote:

I know I can redirect HTTP to HTTPS by adding:
 
   user-data-constraint

transport-guarantee
 CONFIDENTIAL
   /transport-guarantee
  /user-data-constraint
 
to my web.xml but the problem is that this does not redirect when someone

just goes to a directory path.  I would like
 
http://servername/
 
to redirect to 
 
https://servername/
 
Thanks,

-Mark

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



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



Re: Session Security

2005-07-29 Thread Martin Bromley

Simple solution: use SSL for all pages that have a session.  AFAIK there's no 
way to keep a session secure without it all being over SSL.

So the login process must be over SSL, and then everything until log-out should 
be over SSL also (I'm making the assumption that you're only using sessions for 
a restricted area of the site).

See www.owasp.org for excellent information on securing web apps.  


http://www.owasp.org/documentation/topten/a3.html covers session management.

Martin

Jagadeesha T wrote:

Hi All,
Cookie information goes to the server in a clear text I think. I don't know it can be 
configured to send as a  cypher text. 
When it goes in the network to browser, If not ssl enabled, Cookie;Jsessionid;value can be seen through Ethereal and also copied, If anybody tries with that cookie with the url.

It will take the person to directly to that page.How can disable it.
Please could anybody tell me how to avoid it. 
 
Thanks,

Jagadeesha T


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


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



Re: Viewing Web Resource Updates without Restarting Tomcat

2005-07-28 Thread Martin Bromley

I wasn't aware of Tomcat doing any caching of JSP pages... could be wrong, but 
are you sure it's Tomcat doing the caching, not a browser or proxy server?  You 
may want to look at the Expires, Cache-Control etc. headers that are being sent 
with your pages.

You can clear the compiled classes in the work dir if you want to force JSPs to be 
recompiled, but I've always found that Tomcat detects new JSPs itself (even with the 
Context set with reloadable=false).

Anything in WEB-INF/classes or WEB-INF/lib (basically anything picked up by the 
classloader) requires a restart or reload for changes to be detected.

Cheers
Martin

Martyn George wrote:
Currently, I wish to make minor changes to web pages, and the like, 
associated with a production application without restarting Tomcat, and 
with minimal impact to users. These changes can be made, but are not 
immediately observable due to caching. Is there any command that can be 
issued to Tomcat so that changes can be immediately observed (e.g. a 
cache flush)?


Thankyou

_
Sell your car for $9 on carpoint.com.au   
http://www.carpoint.com.au/sellyourcar



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



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



Re: tomcat 5.5.9, JSP, EL evaluation

2005-07-26 Thread Martin Bromley

Do you need the c:out?  Have you tried just ${users}?  I'm no expert on c:out 
but my understanding is that it's a tag of times past..

Walther Hautermann wrote:

Hi,

 


My jsp page contains a c:out value=${users}/. The result is
${users}. I had a look in the generated .java and it seems the ${users}
is not evaluated : _jspx_th_c_out_0.setValue(new String(${users}));

 


Is there something to configure with tomcat 5.5.9 to enable the
evaluation of the EL ?

 


Thanks for your help.

Walther




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



Re: how to set index.faces as welcome-file

2005-07-26 Thread Martin Bromley

It took me a while to get welcome files working with the SpringMVC web 
framework.

I created the attached servlet to get things working properly.  It requires 
servlet spec 2.4, and it works by mapping the welcome file to a servlet, 
WelcomeFileServlet, rather than direct to a JSP.  The WelcomeFileServlet then 
forwards it on to the correct servlet, and makes sure that the requestURI 
returns the right value (e.g. /index.htm rather than just /) It should work 
fine with JSF, if you configure it properly.

Here's an example of how to configure it in web.xml

servlet
servlet-nameWelcomeFileServlet/servlet-name

servlet-classcom.mbromley.util.servlet.WelcomeFileServlet/servlet-class
init-param
param-nameforward-to-servlet-name/param-name
param-valueDispatcherServlet/param-value
/init-param
init-param
param-namewelcome-file/param-name
param-valueindex.htm/param-value
/init-param
/servlet

It works by mapping the index page (index.htm in my case, index.faces or 
whatever in yours) to the WelcomeFileServlet:

!-- Exact mappings are needed below for the welcome-file feature to work 
with WelcomeFileServlet. --
servlet-mapping
servlet-nameWelcomeFileServlet/servlet-name
url-pattern/index.htm/url-pattern
/servlet-mapping

and then defining the welcome file as 


!-- This relies on the 2.4 spec allowing mappings to a servlet as opposed to just 
a real file (index.htm doesn't exist as a real file in any of the directories this 
feature is required).  The WelcomeFileServlet docs have lots of info on the correct 
setup of that class. --
welcome-file-list
welcome-fileindex.htm/welcome-file
/welcome-file-list

Take a look at the docs with the attached file for more.

Hope it helps,

Martin with an 'i' ;-)




Marten Lehmann wrote:

Hello,

I tried to put the following into web.xml:

welcome-file-list
welcome-fileindex.faces/welcome-file
/welcome-file-list

But obviously, this doesn't work, because there is no file index.faces, 
but index.jsp. However, if the index.jsp isn't called through 
index.faces, the FacesContext isn't used. How can I achieve this as 
expected? I don't want to use the plain old workaround with an 
index.html containing a refresh.


Regards
Marten

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

package com.mbromley.util.servlet;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;

/** This enables the URLs in an HttpServletRequest to be consistently rewritten.
 * This needs to be extended for it to do anything useful.  At least one of the
 * rewriteURL methods needs to be overridden.
 */
public abstract class URLRewritingRequestWrapper 
extends HttpServletRequestWrapper {

public URLRewritingRequestWrapper(
final HttpServletRequest request) {
super(request);
}

@Override
public final String getPathInfo() {
return getPossiblyNull(super.getPathInfo());
}

@Override
public final String getPathTranslated() {
return getPossiblyNull(super.getPathTranslated());
}

@Override
public final String getRequestURI() {
return rewriteURL(super.getRequestURI());
}

@Override
public final StringBuffer getRequestURL() {
return rewriteURL(super.getRequestURL());
}

@Override
public final String getServletPath() {
return rewriteURL(super.getServletPath());
}

private String getPossiblyNull(final String s) {
if (s == null) {
return null;
}
return rewriteURL(s);
}

/** Subclasses can override this if they can improve efficiency by 
rewriting
 * a StringBuffer.  By default this calls the other method and creates 
a new
 * StringBuffer from the result.
 */
protected StringBuffer rewriteURL(final StringBuffer sB) {
return new StringBuffer(rewriteURL(sB.toString()));
}

protected abstract String rewriteURL(final String url);

@Override
public String toString() {
return super.toString() +  wrapping  + 
getRequest().toString();
}

}package com.mbromley.util.servlet;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet

Re: how to get the original requestURI after jsp:forward()

2005-07-25 Thread Martin Bromley

I've needed to do this in the past: I created a filter that set the set the 
requestURI in an attribute in the request.  There may be a better way.

Martin

Marten Lehmann wrote:

Hello,

I have a forward to a jsp-file. This jsp-file needs to know which URI 
was requested in the initial request. Currently, I can only see the 
requestURI of the forwarded jsp-file. Any ideas?


Regards
Marten

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



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



Re: Tomcat filter to overwrite the requestURL of incoming httprequest object

2005-07-25 Thread Martin Bromley

You have to wrap the HttpServletRequest with a class that overrides the methods 
relating to the URI.  I've attached an abstract class that I wrote to make this 
a bit easier.

You will have to implement the rewriteURL method to do the necessary String 
parsing.

Then in your filter doFilter:

chain.doFilter(new WrappedRequest(request), response);

(assuming you've written WrappedRequest - that extends the abstract class I've 
attached).

Good luck.
Martin

PS You're question actually has nothing to do with Tomcat specifically...

Jaynika Barot wrote:

hi all,

I want to write a filter which will overwrite the request URL in
incoming httprequest.

if incoming request's URI contains *./myservletName/extra1/extra2.*

I want to reset it to *./myservletName?param1=extra1param2=extra2 and
pass this request object to subsequent processing (filter chain).

Is it possible to do?? If so how?

thx,
Jaynika

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


package com.mbromley.util.servlet;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;

/** This enables the URLs in an HttpServletRequest to be consistently rewritten.
 * This needs to be extended for it to do anything useful.  At least one of the
 * rewriteURL methods needs to be overridden.
 */
public abstract class URLRewritingRequestWrapper 
extends HttpServletRequestWrapper {

public URLRewritingRequestWrapper(
final HttpServletRequest request) {
super(request);
}

@Override
public final String getPathInfo() {
return getPossiblyNull(super.getPathInfo());
}

@Override
public final String getPathTranslated() {
return getPossiblyNull(super.getPathTranslated());
}

@Override
public final String getRequestURI() {
return rewriteURL(super.getRequestURI());
}

@Override
public final StringBuffer getRequestURL() {
return rewriteURL(super.getRequestURL());
}

@Override
public final String getServletPath() {
return rewriteURL(super.getServletPath());
}

private String getPossiblyNull(final String s) {
if (s == null) {
return null;
}
return rewriteURL(s);
}

/** Subclasses can override this if they can improve efficiency by 
rewriting
 * a StringBuffer.  By default this calls the other method and creates 
a new
 * StringBuffer from the result.
 */
protected StringBuffer rewriteURL(final StringBuffer sB) {
return new StringBuffer(rewriteURL(sB.toString()));
}

protected abstract String rewriteURL(final String url);

@Override
public String toString() {
return super.toString() +  wrapping  + 
getRequest().toString();
}

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

getServletContext() returns / for default context defined outside of server.xml

2005-07-22 Thread Martin Bromley

Hi, I'm trying to setup the default Context for a Host, without defining it in 
server.xml.

In conf/Catalina/localhost I've created a file named .xml, and defined the Context within 
it, without defining the path - I understand from the Tomcat docs that it should be 
inferred as .

This is all working fine, apart from one issue:  a call to HttpServletRequest.getServletContext() returns / 
rather than  - the servlet API says  is correct .  If the default context is defined in 
server.xml, getServletContext() returns  as it should.

I'm guessing that this might be a bug, but I'm reluctant to say so because I suspect I might be 
doing something wrong - the Tomcat docs do say it is not recommended to place 
Context elements directly in the server.xml file, but then creating a .xml file 
seems a little odd to me...  Is that really the right way to do it?

I've tested this on Tomcat 5.5.4 and 5.5.7.

Cheers
Martin


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



Re: Request parameter data not being recognised as UTF-8

2005-07-22 Thread Martin Bromley
If you take a look at the API docs for ServletRequest.setCharacterEncoding(), they say 


This method must be called prior to reading request parameters or reading input 
using getReader().

By the time execution gets to your JSP page, something has probably read your 
request parameters - maybe an MVC controller servlet of some sort.

Martin

Tim Koop wrote:

Thanks Mikolaj.  That did it.

For some reason running request.setCharacterEncoding(UTF-8) in my code 
does nothing, but if it gets run from a Filter it works great.


Tim Koop



Mikolaj Rydzewski wrote:


Tim Koop wrote:

I have a web page form that is expecting UTF-8 data, but when my code 
gets the data, the getParameter() methods don't return the right 
thing.  I have to run this code to get the right thing:


String value = new 
String(request.getParameter(fieldName).getBytes(ISO-8859-1), 
UTF-8);




Please take a look at SetCharacterEncodingFilter servlet in Tomcat's 
example apps. It does the job you need. Its sources are located in 
webapps/jsp-examples/WEB-INF/classes/filters (at least in Tomcat 5.5).


Regards



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



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



OS X.3.8 Server help...

2005-07-07 Thread Martin Hoffsten
Title: OS X.3.8 Server help...



Im looking for a quick walkthrough to install Tomcat 4.x on my OS 10.3.8 server. My Java is up to date and I need a very detailed list of instructions. By detailed, I mean I have no idea what Im doing in the Terminal...



Martin Hoffsten
612.333.3233 x119
www.creatis.com






start tomcat

2005-06-26 Thread martin
hi
i use tomcat 5 on a suse 9.2 if i try to start with rctomcat start
done is be displayed but if i try tomcat status unused is displayed and he is 
not reachable here my logfiles:
catalina.out:
java.lang.IllegalArgumentException: addRepositoryInternal
        at 
org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(StandardClassLoader.java:957)
        at 
org.apache.catalina.loader.StandardClassLoader.init(StandardClassLoader.java:153)
        at 
org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:189)
        at 
org.apache.catalina.startup.Bootstrap.createClassLoader(Bootstrap.java:160)
        at 
org.apache.catalina.startup.Bootstrap.initClassLoaders(Bootstrap.java:104)
        at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:193)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:399)
Caused by: java.util.zip.ZipException: No such file or directory
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.init(ZipFile.java:112)
        at java.util.jar.JarFile.init(JarFile.java:127)
        at java.util.jar.JarFile.init(JarFile.java:65)
        at 
org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(StandardClassLoader.java:944)
        ... 6 more
start.log:
Using CATALINA_BASE:   /usr/share/tomcat5
Using CATALINA_HOME:   /usr/share/tomcat5
Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
Using JAVA_HOME:       /usr/lib/jvm/java
plz help
thx martin

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



Problem with redirection for Tomcat Basic Authentication

2005-05-23 Thread Javier Santos Martin-Moreno
Hello,

I am running Tomcat 5.5.9 on Windows 2000. I configured the ISAPI
redirector (version 1.2.12) so that Tomcat worked along with IIS and
everything seemed to work fine, but...

I have a Tomcat application which requires basic authentication. Everything
works fine if I access from http://localhost:8080/mywebapp/, I get
authenticated and can navigate, so I think the realm is configured
correctly. But if I try to access from http://localhost/mywebapp/ (the path
to my app is added to uriworkermap.properties) I get a Windows
authentication prompt window ('Enter network password' with fields to
introduce username, password plus domain) instead of Tomcat's basic
authentication prompt window. However, once I login (using
http://localhost:8080/mywebapp/) I can navigate without problems through
the application pages without using the ':8080' part. So it seems like
redirection works except for the authentication part.

Does anyone have any ideas so that I can login to my application from
without the need to specify the port?

Thanks in advance,

Javier Santos


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



Using Tiger in jsp

2005-05-20 Thread Julien Martin
Hello,
I use Tomcat 5.5 and I would like to use jdk5.0 features such as enhanced
for loop in my jsp. I am having problems: Tomcat seems to be expecting
jdk1.4 syntax.
Can anyone help please?
Julien.



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



context XML file deleted on webapp redeploy

2005-05-11 Thread Martin Kuba
Hi,
I am using TomCat 5.5.9 with SUN JDK 1.5.0._02 and I have a strange
problem. I have a context file in
$CATALINA_BASE/conf/Catalina/localhost/
directory, let's say it is named mywebapp.xml.When I first start TomCat,
everything is fine. But when I redeploy the application by overwriting
$CATALINA_BAASE/webapps/mywebapp.war
with new version, the file
$CATALINA_BASE/conf/Catalina/localhost/mywebapp.xml
disappears. Is this a feature or a bug ? I never had a problem
like this with TomCat 5.0 or 4.1, so I suppose that it is a bug,
unless that is a new feature of TomCat 5.5.
Martin
--
~~
Supercomputing Center Brno Martin Kuba
Institute of Computer Scienceemail: [EMAIL PROTECTED]
Masaryk University http://www.ics.muni.cz/~makub/
Botanicka 68a, 60200 Brno, CZ mobil: +420-603-533775
--
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


mapping virtual hosts using mysql

2005-04-29 Thread Martin Lidgard
Hello all.
 
I am looking for a way to add host aliases to a webapp without having to
edit server.xml and restart Tomcat. I'm running Tomcat 4.1 as a standalone
on Linux.
 
Is it possible to map virtual hosts using MySQL? 
 
Thanks,

Martin

Arkatay Consulting
www.arkatay.com




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



SV: Handling requests for .asp files

2005-04-18 Thread Martin Lidgard
Thanks for the pointers. 
The problem ended up being that the redirect required not only an
HTTP-StatusCode (301 - Moved permanently) but also a
httpServletResponse.setHeader(Location, http://newurl;). Without the
header, Mozilla shows the originally requested page which contains a
redirect javascript, whereas Internet Explorer just shows a generic error
page.

/Martin 

Martin Lidgard
Arkatay Consulting
mail://[EMAIL PROTECTED]
http://www.arkatay.com   

-Ursprungligt meddelande-
Från: QM [mailto:[EMAIL PROTECTED] 
Skickat: den 18 april 2005 03:33
Till: Tomcat Users List
Ämne: Re: Handling requests for .asp files

On Mon, Apr 18, 2005 at 03:03:45AM +0200, Martin Lidgard wrote:
: I am trying to get Tomcat to respond to requests for files with an .asp
: extension in order to let Turbine handle the request and redirect to the
: appropriate Velocity page.
: [snip]
: The problem is that Tomcat does not seem to respond at all to requests for
: urls with .asp as an extension.  The extensions .as and .aspp work
: fine.

How are you mapping the .as and .aspp extensions?  Through a servlet mapping
in yoru webapp's web.xml?

You could also check the global web.xml. That one defines the mapping for
.jsp files; maybe someone at your site put in a mapping for .asp as well...?

Another thought -- do you access Tomcat directly, or do you go through
Apache as an intermediary?


-QM

-- 

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

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



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



Handling requests for .asp files

2005-04-17 Thread Martin Lidgard
Hi.
 
I am trying to get Tomcat to respond to requests for files with an .asp
extension in order to let Turbine handle the request and redirect to the
appropriate Velocity page. The reason for this seemingly strange need is
that I want to handle external references (on other web sites) to my site
from when the site was on an ASP-based server.
 
The problem is that Tomcat does not seem to respond at all to requests for
urls with .asp as an extension.  The extensions .as and .aspp work
fine. Could there be some filter that tells Tomcat to not process the
request or tries to forward the request somewhere? I can't find anything
asp in conf/server.xml, conf/web.xml, or my WEB-INF/web.xml and none of
the log files even register the http-request, which makes me think that the
problem lies in my servlet container configuration rather than the servlet.
 
Googling for tomcat handling asp requests doesn't seem to generate the
desired set of answers, so any pointers would be greatly appreciated.
 
I'm using Tomcat 4.1 on Linux.
 
Thanks for your attention.

Martin



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



SV: How can I create a digest password

2005-04-13 Thread Martin Lidgard
I created the following bash-script in Linux:

#===
echo -e Enter password to encode: 
read password
$JAVA_HOME/bin/java -classpath $CATALINA_HOME/server/lib/catalina.jar
org.apache.catalina.realm.RealmBase -a SHA $password  
#===

In windows, the following works:

 java  -classpath D:\project\tdk-2.3_01\server\lib\catalina.jar
org.apache.catalina.realm.RealmBase -a SHA mypassword

/Martin

-Ursprungligt meddelande-
Från: Lorenzo Jiménez [mailto:[EMAIL PROTECTED] 
Skickat: den 13 april 2005 18:57
Till: Tomcat Users List
Ämne: How can I create a digest password
Prioritet: Hög

Hi,

I need help to generate encrypted passwords. Using the Tomcat 5's
documentation:

C:\java org.apache.catalina.realm.RealmBase -a MD5 mypassd

And this is the error message:

Exception in thread main java.lang.NoClassDefFoundError:
org/apache/catalina/realm/RealmBase

I also checked the classpath, and Catalina.jar is in it.
I even tried being positioned on catalina's directory.

Using Win XP, Tomcat 5.0.28, and j2sdk1.4.2_07.

Thank you very much!

Lorenzo


-

Si usted no es el destinatario indicado en este mensaje o responsable como
persona de la entrega del mensaje, no debe copiar o reenviar este mensaje,
por favor notifique al correo [EMAIL PROTECTED] Para más referencia
sobre términos importantes relacionados a este correo visite
http://www.nacion.com/disclaimer/index_es2.htm

If you are not the addressee indicated in this message (or responsible for
delivery of the message to such person), you may not copy or send this
message to anyone, please notify to [EMAIL PROTECTED] Click here for
important additional terms relating to this e-mail. 
http://www.nacion.com/disclaimer/index_en2.htm

-



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




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



Authenticated user home folders with WebDAV

2005-04-06 Thread Martin Lidgard
Hello.
 
I would like to achieve the following using Tomcat 4.1:
 
1. use a JDBCRealm to access a mysql database containing users, passwords,
and roles
2. grant WebDAV access to authenticated users, allowing them to access and
upload files to personal home directories
3. personal directories should be grouped by role: ie.  user charlie with
role sitemember has WebDAV access to
$CATALINA_HOME/webapps/myapp/data/sitemember/charlie
4. directories should be created when the user first accesses the WebDAV
account, and if there is no directory for the role, it should be created too
5. it should be possible to limit the amount of space granted to each user
on a role or context basis
6. the personal home directories should be accessible using WebDAV as
http://upload.mydomain.com, automatically returning content for the correct
personal directory depending on authenticated username.
 
How much of this is possible to achieve through smart configuration schemes?
Does anyone know of tools that could do some of the work?
I haven't found any indications that personal home directories have been
used in a Tomcat standalone configuration -- anyone?
 
Thanks,
 
Martin
 
Arkatay Consulting
www.arkatay.com




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



Re: Using JDBC with 5.5.x

2005-04-05 Thread Martin Dubuc
I have found the cause of my problem. I am posting it
in case someone would run into the same problem.

The main issue was that I was using a DataSourceRealm
that was pointing to a Resource (under
GlobalNamingResources) that was using a username and
password that was valid but didn't have the right
privilege to access my users database. I found out the
problem after I enabled MySQL logs. The access denied
log showed up in the hostname.log file.

It is unfortunate that the Tomcat logs don't
explicitly state that access to users database was
denied. It took me a while to figure this one out.

The right config to use MySQL to perform
authentication in 5.5.x is:

server.xml:

  GlobalNamingResources
...
Resource name=jdbc/auth
  auth=Container
  type=javax.sql.DataSource
  maxActive=4 maxIdle=30
  maxWait=1
  username=test password=test
  driverClassName=com.mysql.jdbc.Driver
 
url=jdbc:mysql://localhost:3306/auth?autoReconnect=true/
  /GlobalNamingResources
  ...
  Service name=Catalina
...
Engine name=Catalina defaultHost=localhost
  ...
  Realm
className=org.apache.catalina.realm.DataSourceRealm
 dataSourceName=jdbc/auth
 userTable=users
 userNameCol=user_name
 userCredCol=user_pass
 userRoleTable=user_roles
 roleNameCol=role_name/
  ...
/Engine
  /Service

where the users databse is defined as:

CREATE TABLE users (
  user_name varchar(12) default NULL,
  user_pass varchar(12) default NULL,
  PRIMARY KEY  (user_name)
) TYPE=MyISAM;

CREATE TABLE roles (
  role_name varchar(12) default NULL,
  PRIMARY KEY  (role_name)
) TYPE=MyISAM;

CREATE TABLE user_roles (
  user_name varchar(12) default NULL,
  role_name varchar(12) default NULL,
  PRIMARY KEY  (user_name, role_name)
) TYPE=MyISAM;

Martin

--- Martin Dubuc [EMAIL PROTECTED] wrote:

 I am having some problems using JDBC with 5.5.x
 releases. I can use JDBC with 5.0.28, but as soon as
 I
 switch to 5.5.x, I get the following errors trying
 to
 connect to database:
 
 Mar 29, 2005 11:26:37 AM
 org.apache.catalina.realm.DataSourceRealm open
 SEVERE: Exception performing authentication
 org.apache.tomcat.dbcp.dbcp.SQLNestedException:
 Cannot
 create PoolableConnectionFactory (Server connection
 failure during transaction. Due to underlying
 exception: 'com.mysql.jdbc.CommunicationsException:
 Communications link failure due to underlying
 exception:
 
 ** BEGIN NESTED EXCEPTION **
 
 java.io.EOFException
 
 STACKTRACE:
 
 java.io.EOFException
 at
 com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1842)
 at

com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2288)
 at

com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2784)
 at

com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:750)
 at

com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3573)
 at

com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1151)
 at

com.mysql.jdbc.Connection.createNewIO(Connection.java:1889)
 at

com.mysql.jdbc.Connection.init(Connection.java:430)
 at

com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:268)
 at

org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
 at

org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
 at

org.apache.tomcat.dbcp.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:877)
 at

org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:851)
 at

org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
 at

org.apache.catalina.realm.DataSourceRealm.open(DataSourceRealm.java:402)
 at

org.apache.catalina.realm.DataSourceRealm.authenticate(DataSourceRealm.java:282)
 at

org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:256)
 at

org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:391)
 at

org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
 at

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
 at

org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:526)
 at

org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
 at

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
 at

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
 at

org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
 at

org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527

Content negotiation like Apache HTTP Server in Tomcat

2005-03-29 Thread Martin Alvarez Espinar
Hi,

I want to create something like the content negotiation implemented in the 
'mod_negotiation' for Apache HTTP Server, which would resolve requests like 
myPage.jsp.en using the language preferences of browsers or resource names 
without extensions like images.

Does anyone knows a solution for this? Maybe using filters and rewriting the 
request?

Thanks,


--

Martin Alvarez Espinar
Fundación CTIC
Parque Científico Tecnológico de Gijón
33203 - Gijón, Asturias, España
teléfono: +34 984390616; +34 984291212;
fax: +34 984390612
email: [EMAIL PROTECTED]
URL: http://www.fundacionctic.org

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



Using JDBC with 5.5.x

2005-03-29 Thread Martin Dubuc
)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:526)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)


** END NESTED EXCEPTION **

In server.xml, I define the resource in
GlobalNamingResources as follows:
Resource
  name=db
  type=javax.sql.DataSource
  password=test
  driverClassName=com.mysql.jdbc.Driver
  maxIdle=2
  maxWait=5000
  username=user
 
url=jdbc:mysql://localhost:3306/myapp?autoReconnect=true
  maxActive=4/

and the realm:
  Realm
   
className=org.apache.catalina.realm.DataSourceRealm
dataSourceName=users
userTable=users
userNameCol=user_name
userCredCol=user_pass
userRoleTable=user_roles
roleNameCol=role_name/

Martin



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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



RE: TC (4), IIS isapi_redirector.dll

2005-02-27 Thread Martin Goldhahn
The installer mentioned uses JK2 which is officially unsupported by the
Jakarta project. (See
http://jakarta.apache.org/tomcat/connectors-doc/news/20041100.html#20041
115.1)

Martin

 -Original Message-
 From: Aris Javier [mailto:[EMAIL PROTECTED] 
 Sent: Monday, February 28, 2005 7:52 AM
 To: Tomcat Users List
 Subject: RE: TC (4), IIS  isapi_redirector.dll
 
 sorry...
 forgot .com =)
 
 anyway, here's the site again.
 
 http://www.shiftomat.com/opensource/ 
 
 regards
 aris
 philippines
 
 
 
 -Original Message-
 From: Paul Wallace [mailto:[EMAIL PROTECTED]
 Sent: Monday, February 28, 2005 2:39 PM
 To: Tomcat Users List
 Subject: RE: TC (4), IIS  isapi_redirector.dll
 
  
 Hi  thanks, but that link is dead!
 
 Hello!
 
 visit this site to automate your integration of tomcat and iis.
 http://www.shiftomat/opensource
 
 download the file and follow the instructions... 
 
 regards
 aris 
 
 -Original Message-
 From: Paul Wallace [mailto:[EMAIL PROTECTED]
 Sent: Monday, February 28, 2005 2:25 PM
 To: tomcat-user@jakarta.apache.org
 Subject: TC (4), IIS  isapi_redirector.dll
 
 Hi,
 I am attempting to serve up my pages using IIS, and have 
 Tomcat process my JSPs/Servlets using JK 1.2 Connector. I am 
 following a what I would call a reputable tutorial
 (http://www.onjava.com/pub/a/onjava/2002/12/18/tomcat.html) 
 which tells me to look here
 http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/
 release/v1
 .2.0/bin/ for the isapi_redirector.dll, there or under my 
 Win32 directory. I am running XP Pro and do not appear to 
 have a Win 32 directory. In the above page are the various 
 project downloads. Can someone tell me where I am being 
 directed please? I see no effervescence to Isapi, IIS, 
 redirector, JK or anything else of a similar topic.
  
 thanks and regards
  
 Paul. 
  
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



Re: mod_jk CLOSE_WAIT state and 1 byte recv buffer

2005-02-18 Thread Martin Grotzke
hello,

i have a similar (the same?) problem, where i currently do not
know what's really the root cause of it.

i was monitoring my webapp (apache 2.0.52, tomcat 5.0.28, mod_jk2,
later tomcat 5.5.7 with mod_jk 1.2.8) on port 80 (apache/mod_jk)
by requesting a given url with curl.

sometimes the url was not reachable, the output of curl then was
curl: (6) name lookup timed out. the netstat-output was sometimes
ok (cons in state ESTABLISHED), but sometimes it looked like the
following:   
 tcp1  0 127.0.0.1:50195 127.0.0.1:8009  
 CLOSE_WAIT  12109/httpd 
 tcp1  0 127.0.0.1:50203 127.0.0.1:8009  
 CLOSE_WAIT  12113/httpd 
 tcp1  0 127.0.0.1:50228 127.0.0.1:8009  
 CLOSE_WAIT  12108/httpd 
 tcp1  0 127.0.0.1:50215 127.0.0.1:8009  
 CLOSE_WAIT  12111/httpd 
 tcp0  0 127.0.0.1:50258 127.0.0.1:8009  
 ESTABLISHED 12112/httpd 
 tcp0  0 127.0.0.1:50262 127.0.0.1:8009  
 ESTABLISHED 3268/httpd  
 tcp0  0 127.0.0.1:50240 127.0.0.1:8009  
 ESTABLISHED 12110/httpd 
 tcp0  0 127.0.0.1:50244 127.0.0.1:8009  
 ESTABLISHED 13759/httpd 
 tcp0  0 127.0.0.1:50249 127.0.0.1:8009  
 ESTABLISHED 12114/httpd 
 tcp0  0 127.0.0.1:50254 127.0.0.1:8009  
 ESTABLISHED 12115/httpd 
 tcp0  0 :::127.0.0.1:50238  :::127.0.0.1:3306   
 ESTABLISHED 12562/java  
 tcp0  0 :::127.0.0.1:50237  :::127.0.0.1:3306   
 ESTABLISHED 12562/java  
 tcp0  0 :::127.0.0.1:8009   :::127.0.0.1:50262  
 ESTABLISHED 12562/java  
 tcp0  0 :::127.0.0.1:8009   :::127.0.0.1:50258  
 ESTABLISHED 12562/java  
 tcp0  0 :::127.0.0.1:8009   :::127.0.0.1:50254  
 ESTABLISHED 12562/java  
 tcp0  0 :::127.0.0.1:8009   :::127.0.0.1:50249  
 ESTABLISHED 12562/java  
 tcp0  0 :::127.0.0.1:8009   :::127.0.0.1:50244  
 ESTABLISHED 12562/java  
 tcp0  0 :::127.0.0.1:8009   :::127.0.0.1:50240  
 ESTABLISHED 12562/java 


then i added the hostname of the requested url to /etc/hosts,
and since then everything was ok.
adding the hostname to /etc/hosts was my last action, after that i
was not further debugging.

my environment:
2.6.10-1.760_FC3
tomcat5-5.5.7-2jpp
httpd-2.0.52-3.1
mod_jk-ap20-1.2.8-1jpp


cheers,
martin




On Fri, 2005-02-18 at 15:49 +0100, Michael Stiller wrote:
 Hi,
 
 i have the following problem with mod_jk from tomcat-connectors (1.2.5 -
 1.2.8) including 1.2.9 (from cvs).
 
 Environment:
 apache is 2.0.52, forking model, server os is linux 2.6.10-1.760_FC3smp 
 (fedora core 3), mod_jk 1.2.9 (others tested as well)
 
 After a while i get sockets stuck in CLOSE_WAIT state and netstat shows
 1 byte in the receive queue for this socket.
 
 tcpdump shows, that the backend (jetty) half-closes the connection with
 FIN. That FIN is acked from the mod_jk machine but the connection is not
 closed (no FIN is send). 
 
 sample netstat output:
 ...
 tcp1  0 192.168.100.1:51003 192.168.170.8:32511 
 CLOSE_WAIT
 tcp1  0 192.168.100.1:53875 192.168.170.8:12522 
 CLOSE_WAIT
 tcp1  0 192.168.100.1:53619 192.168.170.8:12521 
 CLOSE_WAIT
 ...
 
 Are there any known issues? Where do is start debugging this? What information
 is missing?
 
 TIA,
 
 Michael
 
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
-- 
Martin Grotzke
Hohenesch 38, 22765 Hamburg
Tel.  +49 (0) 40.39905668
Mobil +49 (0) 170.9365656
E-Mail[EMAIL PROTECTED]
Onlinehttp://www.javakaffee.de


signature.asc
Description: This is a digitally signed message part


RE: URL protocol handler issues

2005-02-14 Thread Martin Goldhahn
 I had a similar problem, which I posted last week. You should find it
searching the Subject field for pluggable protocols in web apps if you
kee pold messages. What I found out so far is this:
- Defining the protocol handler doesn't do any harm. The URL class
searches through the system property java.protocol.handler.pkgs if it
doesn't get a protocol handler from the factory.
- The problem is that URL tries to load the class with
Class.forName(String) method (Check out the method static
URLStreamHandler getURLStreamHandler(String protocol)). 
- Class.forName(String) calls the method
ClassLoader.getCallerClassLoader(), which returns null. I think this
means it uses the remodial classloader
- The premodial classloader cannot find the class becaus it is not in
the bootstrap classpath.
- Subsequently the system class loader is asked to load the class. This
classloader cannot find the class either, because the classes in the web
application are not in the classpath when tomcat was started.
- To solve the problem temporarily is put the protocol handler in the
class path. 
- The disadvantage with this method is you need to distribute the
protocol handler separately. And if you need classes from the web
application, you need to add the webapp class repository the protocol
handler's list of repositories.

Martin Goldhahn


 -Original Message-
 From: Peter Crowther [mailto:[EMAIL PROTECTED] 
 Sent: Friday, February 11, 2005 2:59 PM
 To: Tomcat Users List
 Subject: URL protocol handler issues
 
 Environment: Tomcat 5.0.28, built from source.
 
 I'm trying to persuade Tomcat to allow me to use a custom URL 
 scheme ('bod3vfs'), both in webapps and in some of the 
 behind-the-scenes setup
 - for example, I have a custom HostConfig that examines a 
 virtual file system.  I've tried the following approaches to 
 getting this integrated; none of them appear to work.  Ideas welcome!
 
 1) Create the handler in org.bodington.core.protocol.bod3vfs.Handler.
 Package that into bodington3.jar; place in server/lib.  Call 
 a static routine just after startup to amend 
 java.protocol.handler.pkgs to include 
 org.bodington.core.protocol.  Result: MalformedURLException 
 when asking for bod3vfs:*.
 
 2) As per 1, but add
 -Djava.protocol.handler.pkgs=org.bodington.core.protocol.  
 Result as 1.
 
 3) Amend DirContextURLStreamHandlerFactory to include the following:
 
 public URLStreamHandler createURLStreamHandler(String protocol) {
 if (protocol.equals(jndi)) {
 return new DirContextURLStreamHandler();
 } else if (protocol.equals(bod3vfs)) {
 return new org.bodington.core.protocol.bod3vfs.Handler();
 } else {
 return null;
 }
 }
 
 ... and ensure that the factory replaces the standard factory 
 before it's required, in my custom HostConfig (which is 
 successfully loaded from bodington3.jar).  Result:
 java.lang.reflect.InvocationTargetException caused by
 java.lang.NoClassDefFoundError:
 org/bodington/core/protocol/bod3vfs/Handler at the point that 
 the runtime attempts to load 
 DirContextURLStreamHandlerFactory.  Note that the compilation 
 was successful, and that the invoking class has been loaded 
 successfully from the same jar that contains the handler.  If 
 I replace the return statement with 'return null', 
 DirContextURLStreamHandlerFactory loads and runs successfully.
 
 4) Copy the Handler class into catalina.jar and repeat 3.  
 Same result.
 
 Remy, the original code for DirContextURLStreamHandlerFactory 
 is yours, I think.  Any particular reason you replaced the 
 factory rather than setting the packages?
 
   - Peter
 
 --
 Peter Crowther, Director, Melandra Limited John Dalton House, 
 121 Deansgate, Manchester M3 2AB
 t: +44 (0)161 828 8736  f: +44 (0)161 832 5683
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



RE: URL protocol handler issues

2005-02-14 Thread Martin Goldhahn
 

 -Original Message-
 From: Peter Crowther [mailto:[EMAIL PROTECTED] 
 Sent: Monday, February 14, 2005 12:20 PM
 To: Tomcat Users List
 Subject: RE: URL protocol handler issues
 
 How are you examining the source of this method, by the way?

If you downloaded the JDK you already have the source code of the URL
class on your hard disk ($JDK_HOME/src.zip). 

 
  - To solve the problem temporarily is put the protocol handler in
the 
  class path.
  - The disadvantage with this method is you need to distribute the 
  protocol handler separately. And if you need classes from the web 
  application, you need to add the webapp class repository 
 the protocol 
  handler's list of repositories.
 
 Hmm.  That's going to be fun - there's a good few jars that 
 would be needed.  I'll see if I can separate them out.
 
 Martin, thanks for the input.  I'm still interested in *why* 
 the expected classloader isn't used - anyone got any insights?

The document at
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/class-loader-howto.html
elaborates on class loading. The reason why neither the system class
loader nor the premodial classloader load your class is that each webapp
has its own classloader that is separated from the rest of tomcat, i.e.
class com.mycomp.MyClass in webapp A is a different type than
com.mycomp.MyClass in webapp B.

The tomcat plugin for Eclipse uses a classlaoder DevClassLoader that
could provide a solution to the problem. But again, the class loader mut
be put in tomcat's classpath or the VM's bootstrap path and cannot be
packaged together with your webapp.

---
Martin

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



Re: Adding ServletContextListener causes web app to not deploy

2005-02-11 Thread Martin Grotzke
hi,

you should make the class public.

cheers,
martin



On Fri, 2005-02-11 at 12:27 -0500, Fenderbosch, Eric wrote:
 I've got a small web app that's working just fine. As soon as I add a 
 listener, it fails to deploy.
 
 Here's the relevant part of web.xml:
 
 ?xml version=1.0 encoding=UTF-8?
  
 web-app xmlns=http://java.sun.com/xml/ns/j2ee;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee 
 http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4
   context-param
 param-namejavax.servlet.jsp.jstl.fmt.localizationContext/param-name
 param-valuenet.fender.bazaar.struts.BazaarMessageResources/param-value
   /context-param
   listener
 
 listener-classnet.fender.bazaar.servlet.BazaarServletContextListener/listener-class
   /listener
 
 And the VERY simple listener:
 
 package net.fender.bazaar.servlet;
  
 import javax.servlet.ServletContext;
 import javax.servlet.ServletContextEvent;
 import javax.servlet.ServletContextListener;
  
 class BazaarServletContextListener implements ServletContextListener {
  
 private ServletContext context;
  
 public void contextDestroyed(ServletContextEvent event) {
 context = null;
 }
  
 public void contextInitialized(ServletContextEvent event) {
 context = event.getServletContext();
 }
 }
 
 And the server log:
 INFO: Removing web application at context path /bazaar
 Feb 11, 2005 11:16:37 AM org.apache.catalina.core.StandardHostDeployer install
 INFO: Processing Context configuration file URL 
 file:C:\java\jakarta-tomcat-5.0.28\conf\Catalina\localhost\bazaar.xml
 Feb 11, 2005 11:17:30 AM org.apache.catalina.core.StandardContext 
 listenerStart
 SEVERE: Skipped installing application listeners due to previous error(s)
 Feb 11, 2005 11:17:30 AM org.apache.catalina.core.StandardContext start
 SEVERE: Error listenerStart
 Feb 11, 2005 11:17:30 AM org.apache.catalina.core.StandardContext start
 SEVERE: Context startup failed due to previous errors
 
 I'm using Tomcat 5.0.28 and Sun JDK 1.4.2_06-b03.
 
 Any ideas?
 TIA 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
-- 
Martin Grotzke
Hohenesch 38, 22765 Hamburg
Tel.  +49 (0) 40.39905668
Mobil +49 (0) 170.9365656
E-Mail[EMAIL PROTECTED]
Onlinehttp://www.javakaffee.de


signature.asc
Description: This is a digitally signed message part


Re: Restart-On-Failure for Tomcat?

2005-02-10 Thread Martin Grotzke
hello,

i also have the problem that my tomcat stops does not respond,
and this more than once a day.

i'm currently looking for the cause of the problem, so i wrote
a monitoring script that collects the top-output, does
a thread-dump on the tomcat-process and performs a `netstat -p -n`,
and finally sends this information via email.
configuration is hold by a configuration file, whereas these days
i put more and more configuration into the script itself, so
separation of concerns is broken :)

you can place the script in /etc/init.d/ and register it via chkconfig,
configurations are placed in the conf-file and in the top of
the monitoring-script, you should adapt all to your needs.

as i don't know if attachments are handled properly by this list, i
put the script on my website, so you can find it here too:
http://www.javakaffee.de/jspwiki/Wiki.jsp?page=ServerSideDevelopment

i hope it's helpful,
cheers,
martin
 


On Thu, 2005-02-10 at 12:12 -0800, Robert McIntosh wrote:
 Hi Paul,
 
 I hope you don't mind the direct e-mail.  Would you mind sharing your
 wget script?
 
 Thanks,
 Robert
 
 
 On Sat, 05 Feb 2005 23:02:50 -0600, Paul [EMAIL PROTECTED] wrote:
  I would suggest either a process monitor or using cron to run script
  every minute or so that would use wget to get a test page and if it
  fails, restart tomcat.  I've been using the latter of the two with good
  success for a while.
  
  Of course, I'm assuming your using Linux or the like, but if you're on
  Win then you can set the recovery options under services.
  
  I'm not aware of anything inherent in Tomcat.
  
  Regards,
  -Paul
  
  
  Robert McIntosh wrote:
  
  Hi,
  
  I'm supporting a web application running on Apache (2.0x)
  /Tomcat(5.0.x) w/ mod-jk.  The web application seems to cause Tomcat
  (5.0.28) to fail on average once a week.  Restarting tomcat tends to
  do the trick, however this is in a production enviornment.
  
  I've been looking for a restart-on-failure script or inherent
  feature in Tomcat that can perform this.   Please forward me
  information on how to monitor Tomcat for error conditions and restart
  the application.
  
  Thanks!
  Robert
  [EMAIL PROTECTED]
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
-- 
Martin Grotzke
Hohenesch 38, 22765 Hamburg
Tel.  +49 (0) 40.39905668
Mobil +49 (0) 170.9365656
E-Mail[EMAIL PROTECTED]
Onlinehttp://www.javakaffee.de


watchtomcat
Description: application/shellscript
#
# The configuration file for watchtomcat
# 
# $Id: watchtomcat.conf.baseserver.com 94 2004-03-18 21:15:38Z grotzke $
#

# for curl checking
#CHECK_URL=http://www.javakaffee.de/jspwiki/Wiki.jsp?page=Main;
CHECK_URL=http://tomcat.baseserver.net;
SEARCH_WORD=wordtosearchfor  # for which word shall be searched in the 
CHECK_URL-document?
EXPECTED_WC_L=3# how many lines are expected to be found with 
the given SEARCH_WORD?

[EMAIL PROTECTED]# where to send notifications


signature.asc
Description: This is a digitally signed message part


Re: Restart-On-Failure for Tomcat?

2005-02-10 Thread Martin Grotzke
On Thu, 2005-02-10 at 23:30 +0100, Martin Grotzke wrote:
 hello,
 
 i also have the problem that my tomcat stops does not respond,
 and this more than once a day.
 
 i'm currently looking for the cause of the problem, so i wrote
 a monitoring script that collects the top-output, does
 a thread-dump on the tomcat-process and performs a `netstat -p -n`,
 and finally sends this information via email.
ha, i forgot to mention that it restarts tomcat, too  ;)

cheers,
martin


 configuration is hold by a configuration file, whereas these days
 i put more and more configuration into the script itself, so
 separation of concerns is broken :)
 
 you can place the script in /etc/init.d/ and register it via chkconfig,
 configurations are placed in the conf-file and in the top of
 the monitoring-script, you should adapt all to your needs.
 
 as i don't know if attachments are handled properly by this list, i
 put the script on my website, so you can find it here too:
 http://www.javakaffee.de/jspwiki/Wiki.jsp?page=ServerSideDevelopment
 
 i hope it's helpful,
 cheers,
 martin
  
 
 
 On Thu, 2005-02-10 at 12:12 -0800, Robert McIntosh wrote:
  Hi Paul,
  
  I hope you don't mind the direct e-mail.  Would you mind sharing your
  wget script?
  
  Thanks,
  Robert
  
  
  On Sat, 05 Feb 2005 23:02:50 -0600, Paul [EMAIL PROTECTED] wrote:
   I would suggest either a process monitor or using cron to run script
   every minute or so that would use wget to get a test page and if it
   fails, restart tomcat.  I've been using the latter of the two with good
   success for a while.
   
   Of course, I'm assuming your using Linux or the like, but if you're on
   Win then you can set the recovery options under services.
   
   I'm not aware of anything inherent in Tomcat.
   
   Regards,
   -Paul
   
   
   Robert McIntosh wrote:
   
   Hi,
   
   I'm supporting a web application running on Apache (2.0x)
   /Tomcat(5.0.x) w/ mod-jk.  The web application seems to cause Tomcat
   (5.0.28) to fail on average once a week.  Restarting tomcat tends to
   do the trick, however this is in a production enviornment.
   
   I've been looking for a restart-on-failure script or inherent
   feature in Tomcat that can perform this.   Please forward me
   information on how to monitor Tomcat for error conditions and restart
   the application.
   
   Thanks!
   Robert
   [EMAIL PROTECTED]
   
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   
   
   
   
   
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   
  
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
-- 
Martin Grotzke
Hohenesch 38, 22765 Hamburg
Tel.  +49 (0) 40.39905668
Mobil +49 (0) 170.9365656
E-Mail[EMAIL PROTECTED]
Onlinehttp://www.javakaffee.de


signature.asc
Description: This is a digitally signed message part


pluggable protocols in web apps

2005-02-04 Thread Martin Goldhahn
We use pluggable protocols to access resources. These don't seem to work
with the class loading scheme Tomcat is using. Having a class
no.mycomp.protocols.myprot.Handler I do the following:
1. prepend no.mycomp.protocols| to the system property
java.protocol.handler.pkgs
2. create a URL with URL u = new URL(myprot://whatever);
I get a MalformedUrlException: unknown protocol myprot
When I debug the code I see that the call Class.forName() in
URL.getURLStreamHandler() fails (The one in the try block). After that
the System class loader cannot load my protocol handler either. 

Is ther a way to get this working. perferably without moving archives to
Tomcat's common\ or Java's endorsed path?

Martin 


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



Problem with context path in TOMCAT 5.5.7

2005-02-01 Thread Martin Burgsmüller
Hi,
i have a problem with the Path attribute!
When i write it Path the application running but
not appears in in the manager application!

It´s only appers in Application list!

Context Path=/webapps/JSP_apps docBase=C:\Programme\Apache
Group\Apache2\htdocs\wonline\webapps\JSP_apps

debug=1 reloadable=true

/Context

Thanks for help!

Martin Burgsmüller



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



Certificate Revocation List

2005-01-24 Thread Martin Dubuc
Does Tomcat support certificate revocation list?

If it does, could someone send me a pointer to a page
that explains how to configure Tomcat to enable this?

Regards,

Martin



__ 
Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses. 
http://promotions.yahoo.com/new_mail

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



Forwarding *all* webapps with mod_jk

2004-12-28 Thread Simon MARTIN
Hi,
I've integrated Tomcat successfully into Apache using mod_jk, but there's 
something I've found nothing about: forwarding *all* webapps with only one 
static statement in the configuration files.

I've thought about something like this:
JkMount /tomcat/* ajp13:*  (which of course is wrong I know)
So, everything called like /tomcat/webApp from Apache should be forwarded to 
Tomcat -- but without the /tomcat at the beginning (as Tomcat of course does not 
find the webapp at /tomcat/ but would find it at /webApp).

Background is that I want to dynamically deploy my webapps, but I don't always 
want to modify any configuration file or restart Apache and / or Tomcat.

Thanks in advance and kind regards,
  Simon
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


AW: Tomcat 5 and Realm problem

2004-12-15 Thread Martin Grüneberg
Hi Frederic,

you are using IE and https? I got the same error and can't find a proper
solution for it. I bet you have turned of cookies in IE. Turn them
on (allow session-cookies) and it will work again. 

Greetings
Martin  

-Ursprüngliche Nachricht-
Von: VAN DER MARLIERE FREDERIC [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 14. Dezember 2004 18:41
An: [EMAIL PROTECTED]
Betreff: Tomcat 5 and Realm problem

Hi,

I'm developping a web app in wich I want the users to authenticate via
Realm.
I first used BASIC authentication méthod and everything worked fine.
But when I want to use the FORM one, I get the following message when login
and password are correct (if not, I get the error page I configured in
web.xml):

The time allowed for the login process has been exceeded. If you wish to
continue you must either click back twice and re-click the link you
requested or close and re-open your browser

My web.xml looks like:

security-constraint
display-name/display-name

web-resource-collection
  web-resource-nameprotection index/web-resource-name
  url-pattern//url-pattern
  http-methodGET/http-method
/web-resource-collection

auth-constraint
  role-namemyRole/role-name
/auth-constraint
/security-constraint

login-config
auth-methodFORM/auth-method
form-login-config
  form-login-page/login.jsp/form-login-page
  form-error-page/error.jsp/form-error-page
/form-login-config
/login-config

security-role
role-namemyRole/role-name
/security-role

And login.jsp looks like:

  html
  head/head
  body
form action=j_security_check method=POST
  input type=text name=j_username /
  input type=password name=j_password /
  input type=submit /
/form
  /body
/html


Does someone have any idea about the origin of my problem ?

Thanks.
Fred.



Ce message et toutes les pieces jointes (ci-apres le message) sont
confidentiels et etablis a l'intention exclusive de ses destinataires.
Toute utilisation ou diffusion non autorisee est interdite.Tout message
electronique est susceptible d'alteration.
Le CREDIT DU NORD et ses filiales declinent toute responsabilite au titre de
ce message s'il a ete altere, deforme ou falsifie.
This message and any attachments ( the message) are confidential and
intended solely for the addressees.
Any unauthorised use or dissemination is prohibited.E-mails are susceptible
to alteration.
Neither CREDIT DU NORD nor any of its subsidiaries or affiliates shall be
liable for the message if altered, changed or falsified.





Virus checked by G DATA AntiVirusKit
Version: AVK 15.0.1471 from 11.12.2004
Virus news: www.antiviruslab.com


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



AW: RE : Tomcat 5 and Realm problem

2004-12-15 Thread Martin Grüneberg
Hello Ben,

On my System (w2k IE6) with Cookies turned off FORM based login
fails even with SSL session information in IE
firefox has no problem with that. :-(

Martin  

 -Ursprüngliche Nachricht-
 Von: Ben Souther [mailto:[EMAIL PROTECTED] 
 Gesendet: Mittwoch, 15. Dezember 2004 17:45
 An: Tomcat Users List
 Betreff: Re: RE : Tomcat 5 and Realm problem
 
 On Wed, 2004-12-15 at 10:44, VAN DER MARLIERE FREDERIC wrote:
  Not far. I do use IE and htpts. And I turned off cookies 
 but in server.xml
  file. I meet to many problems when I use session cookies 
 and none with
  encoded URL. 
  Any idea of the way to use realm authentication (FORM 
 method) with cookies
  turned off?
  
 If there is, it probably won't be very portable.
 Here's a quote from the serlet specs:
 
 SRV.12.5.3.1   Login Form Notes
 Form based login and URL based session tracking can be problematic to
 implement.
 Form based login should be used only when sessions are being 
 maintained
 by cookies or by SSL session information.
  
 
 
 
 
 
 
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



Virus checked by G DATA AntiVirusKit
Version: AVK 15.0.1471 from 11.12.2004
Virus news: www.antiviruslab.com


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



Tomcat hangs up ... Huge count of webapps

2004-12-03 Thread Eberle Martin
Hi everybody and java experts, 

i have a huge count of webapps (approximately 25) in my Tomcat here,
running on Suse Linux 9.1.  After a few connection requests, Tomcat just
hangs up and doesn't accept anymore connections. I can't kill the
process anyway, only killall -9 java helps. 

Well, beneath the fact that my server has 2 gigabytes of ram, only 40MB
are available after starting tomcat. So, tomcat allocates 1.96 gigabytes
of ram. 

Question is: what is the maximum count of webapps, Tomcat is able to
handle? Or are there any other configuration hints? 

System is 
- Suse Linux 9.1 
- 2GB of RAM 
- 3.0 Ghz Machine 
- JDK1.4.2_06 and JRE1.4.2_05 (same effect on every Java version) 
- Tomcat 4.1.31 or Tomcat bundle with TDK-2.2 (TurbineDevelopmentKit) ..


This is an absolut urgent issue! Please reply asap .. Thx a lot  

Regard,
Martin Eberle


AW: Tomcat 5 + hostname

2004-12-03 Thread Eberle Martin
Same problem here ... can't get tomcat with domain name running :(


-Ursprüngliche Nachricht-
Von: Lei Lin [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 3. Dezember 2004 15:44
An: [EMAIL PROTECTED]
Betreff: Tomcat 5 + hostname

Hi folks,

We installed Tomcat 5 on Redhat Linux 9 server.  In order to run our servlet, 
we need to use http://hostname:8080 instead of using our server's IP address 
URL eg: http://177.23.6.2:8080.  The IP address URL works for our server, but 
not the hostname url.  Any idea?

Thanks

Lei  

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



AW: Tomcat hangs up ... Huge count of webapps

2004-12-03 Thread Eberle Martin
i have a huge count of webapps (approximately 25) in my Tomcat here,

I wouldn't classify 25 as huge, but I suppose that's subjective.  We
have servers running that many webapps, but they're small webapps.

### Ok. It's not THAT huge .. but we have ~45 users per webapp which are
going to connect on nearly the same time .. 

Well, beneath the fact that my server has 2 gigabytes of ram, only 40MB

are available after starting tomcat. So, tomcat allocates 1.96
gigabytes
of ram.

You control the JVM; if it allocates 1.96GB it means you gave it -Xmx2G
*at least*.  Even if that's the case on purpose, you need to redesign
your deployment practice because leaving 40MB free on a 2GB server will
only lead to bad things.

 I'm bringing up the JVM with /usr/j2re142_05/bin/java -server
-Xmx1024m -Xms256m -D ... 

Question is: what is the maximum count of webapps, Tomcat is able to 
handle?

It's limited by your environment and requirements.  Tomcat imposes no
limit of its own.  I ran a load test a year or so ago with 100 webapps
deployed, and it worked (with good response times and CPU usage), but
the apps were small and the machine was massive.
Then you're SOL for now ;)  It's no fun doing capacity planning after
deployment, and there are no easy shortcuts ;(

 What's SOL? We didn't expect to get THAT massive problems with tomcat
as i know that tomcat run even better some time ago :(

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



Mod_jk and upgrading jdk

2004-11-30 Thread Martin Whelan
Hi All,
I am running Apache/1.3.23 along with Tomcat  4.1.12 and jdk 1.3.1_04
Can I reliably upgrade the jdk to 1.4 without having to recompile mod_jk?
The OS is Redhat 7.2.
Because it is a LIVE server I'd prefer not to get it wrong, I can do 
without the phonecalls from
worried clients.

thanks for any help,
Martin
--

Martin Whelan 
Déise Design - www.deisedesign.com

Tel : 058 23647
Mobile : 086 975


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


Re: Mod_jk and upgrading jdk

2004-11-30 Thread Martin Whelan
Mark,
Thanks for that. I was put off initially by some possible parameters 
which specified the path to some java includes when building it.

Martin
Mark Lowe wrote:
It should be fine. mod_jk is a native library, if you leaving apache
alone then this wont effect the jk module.
tomcat 4.1 should run fine with 1.4
Mark
On Tue, 30 Nov 2004 19:15:35 +, Martin Whelan
[EMAIL PROTECTED] wrote:
 

Hi All,
I am running Apache/1.3.23 along with Tomcat  4.1.12 and jdk 1.3.1_04
Can I reliably upgrade the jdk to 1.4 without having to recompile mod_jk?
The OS is Redhat 7.2.
Because it is a LIVE server I'd prefer not to get it wrong, I can do
without the phonecalls from
worried clients.
thanks for any help,
Martin
--

Martin Whelan
Déise Design - www.deisedesign.com
Tel : 058 23647
Mobile : 086 975

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

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

 


--

Martin Whelan 
Déise Design - www.deisedesign.com

Tel : 058 23647
Mobile : 086 975


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


Session-cookie problems with several virtual hosts

2004-11-10 Thread Martin Morawetz
We have 3 different virtual hosts, which are subdomains
of our main domain.
We need access to the session from all virtual hosts.
We use cookie-sessions, at the moment url-rewriting isn't a
possible alternative.
The problem is, that the browser doesn't send the cookie back
to a subdomain, if the cookie was sent from one of the two
others.
Till now we solved the problem by specifying the domain globally
in the resin.conf . Yes we used Resin as Servlet-Engine and Resin 
supports a config-tag cookie-domain which solved our problem
perfectly. As far as i know Tomcat doesn't support something
like that.

As I don't have access to the session-cookie,
i thought in creating a cookie with the current session-id and the
proper domain set for every virtual host, but that seems to me
a little bit awkward.
Is it possible to specify a general cookie-domain globally for a virtual 
host?

Is there a way to manipulate the session-cookie (set the domain)?
What is supposed as best practise to get access to one session from
different subdomains?
Any help/comment is greatly appreciated.
--
Regards
Martin

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


RE: Tomcat 5.5 and ClassNotFoundException:org.apache.catalina.logger.FileLogger

2004-10-22 Thread Martin Grotzke
On Fri, 2004-10-22 at 15:17, Shapira, Yoav wrote:
 Hi,
 Did you use a Tomcat 5.0 server.xml or context XML file?  The Logger
 elemnt is history, doesn't exist in Tomcat 5.5.
D'oh, my fault.

I copied my old (tc-5.0.27) server.xml to tomcat 5.5 conf directory,
and did not realize to test the original one...

now it works really great!
seems to be faster than tc-5.0.27 (running with jdk 1.5, too)...

thanx a lot,
martin


 
 Yoav Shapira http://www.yoavshapira.com
  
 
 -Original Message-
 From: Martin Grotzke [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 21, 2004 6:49 PM
 To: Tomcat Users List
 Subject: Tomcat 5.5 and
 ClassNotFoundException:org.apache.catalina.logger.FileLogger
 
 hi all,
 
 i just wanted to test tomcat 5.5. beta, so i downloaded
 the binary (jakarta-tomcat-5.5.3.tar.gz), set classpath
 to the jdk 1.5 and ran `./catalina.sh run`.
 
 the output i got does not look really good:
 
  Using CATALINA_BASE:   /opt/jakarta-tomcat-5.5.3
  Using CATALINA_HOME:   /opt/jakarta-tomcat-5.5.3
  Using CATALINA_TMPDIR: /opt/jakarta-tomcat-5.5.3/temp
  Using JAVA_HOME:   /usr/lib/jvm/java-1.5.0
  Oct 22, 2004 12:35:35 AM org.apache.tomcat.util.digester.Digester
 startElement
  SEVERE: Begin event threw exception
  java.lang.ClassNotFoundException:
 org.apache.catalina.logger.FileLogger
  at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
 
 i took a look into jars in $CATALINA_HOME/server/lib, but none of
 these contained the FileLogger...
 
 the tomcat 5.0.27 installation has a catalina.jar in server/lib that
 contains this class, the catalina.jar of tomcat 5.5 does not.
 
 am i doing anything wrong?
 
 any help appreciated,
 thanx very much,
 martin
 
 
 
 
 
 This e-mail, including any attachments, is a confidential business communication, 
 and may contain information that is confidential, proprietary and/or privileged.  
 This e-mail is intended only for the individual(s) to whom it is addressed, and may 
 not be saved, copied, printed, disclosed or used by anyone else.  If you are not 
 the(an) intended recipient, please immediately delete this e-mail from your computer 
 system and notify the sender.  Thank you.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


signature.asc
Description: This is a digitally signed message part


Tomcat 5.5 and ClassNotFoundException: org.apache.catalina.logger.FileLogger

2004-10-21 Thread Martin Grotzke
hi all,

i just wanted to test tomcat 5.5. beta, so i downloaded
the binary (jakarta-tomcat-5.5.3.tar.gz), set classpath
to the jdk 1.5 and ran `./catalina.sh run`.

the output i got does not look really good:

 Using CATALINA_BASE:   /opt/jakarta-tomcat-5.5.3
 Using CATALINA_HOME:   /opt/jakarta-tomcat-5.5.3
 Using CATALINA_TMPDIR: /opt/jakarta-tomcat-5.5.3/temp
 Using JAVA_HOME:   /usr/lib/jvm/java-1.5.0
 Oct 22, 2004 12:35:35 AM org.apache.tomcat.util.digester.Digester startElement
 SEVERE: Begin event threw exception
 java.lang.ClassNotFoundException: org.apache.catalina.logger.FileLogger
 at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:188)

i took a look into jars in $CATALINA_HOME/server/lib, but none of
these contained the FileLogger...

the tomcat 5.0.27 installation has a catalina.jar in server/lib that
contains this class, the catalina.jar of tomcat 5.5 does not.

am i doing anything wrong?

any help appreciated,
thanx very much,
martin




signature.asc
Description: This is a digitally signed message part


Mysterious (I think caching) Problem with IE 6 and Form Authentication under SSL (Tomcat 5.0.x)

2004-10-19 Thread Martin Grüneberg
Hello,

I have a real strange Problem with Tomcat and IE
When I get forwarded to the login page of my application and enter
my account data I always get the following message:

HTTP Status 408 - The time allowed for the login process has been exceeded.
If you wish to continue you must either click back twice and re-click the
link you requested or close and re-open your browser 

But following the instructions does always result in the same errormessage.
With every other browser even InternetExplores on other Machines (same
version) I can login without any Problem.
I think IE caches the error page somewhere because in the logfile the login
is logged as success
I tried everthing delete temporary internetfiles /cookies nothing worked!
Funny is, when I copy the installation to an other machine (other
hostname/ip) I can login with my IE without any Problem.

If someone knows something about this problem, please give me a hint! 

greetings
Martin Grüneberg



Virus checked by G DATA AntiVirusKit
Version: AVK 15.0.551 from 19.10.2004
Virus news: www.antiviruslab.com


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



Help!

2004-10-12 Thread Martin Crowe
Ok, let me introduce myself, just to give you a level of experience with 
linux. I know very little about linux - basic commands etc. My company 
is on my back about installing a linux box with tomcat and apache. They 
seem to be very good at telling me what they want (ie what packages 
running), but can't give any real support on how to set it up.

So far, I have managed to install debian 3.0.2 (Woody). I have set up an 
entry in our firewall to point to this server's ip address, and can ping 
it etc.

This is all fine. Next, I installed apache-ssl using apt-get. If anyone 
wants the version of this then you'd need to tell me the command to find 
out.
I haven't done any set-up on this yet, but have seen the conf file and 
some of it looks fairly self explanatory, whereas other bits look more 
difficult.

I installed jdk1.5 and this wasn't too hard. Put a class_path 
environment variable in.

Next, I spent literally days trying to get an install for tomcat 5.5 
that i could figure out. I ended up downloading a tar.gz package from 
one of the jakarta mirrors. (Version 5.5.3-alpha). This is then put on 
the server, and unzipped it (what's the linux for this, untar?) to a 
directory /var/install/tomcat/jakarta-tomcat-5.5.3.   I then ran the 
startup script in the bin directory and in it's most basic form, this 
worked. I modified part of the server.xml file from localhost to the dns 
name i put in the firewall, as i don't have a browser on the linux 
machine (as far as I'm aware - yes this just shows my linux expertise!). 
It starts up fine without any other modifications (that I can remeber 
doing anyway), and I can browse to it on port 8080.

Ok, now I'm stuck (I also know nothing about jsp or sevlets)
What they want is to be able to have multiple versions of their jsp 
enabled site running on different ports on the machine, through apache 
using tomcat.

Eg:
   The main site will be in /home/www, and to browse to that we would 
type in http://hostname/   eg port 80
   Each developer will have their own local copy of the site in their 
/home/user/www directory, and would browse to it with a given port 
number, so for example if one of the developers was assigned say port 
8004, they could look at their local copy of the site by browsing to 
http://hostname:8004.

I can't seem to work out how to link apache and tomcat, have read 
something about using mod_jk or mod_jserv, but i just can't figure them 
out. I also can't seem to find any documents that will describe using 
multiple homes on both servers (eg i can figure this out on apache's 
conf  file, but haven't got a clue how to do all this in tomcat as well.

Could anyone point me in the right direction please - any pointers to 
manuals or webpages that would help, or just any knowledge that could be 
passed on to me regarding this.

I'm sorry, I know this is one of those questions that's very long and 
doesn't have one simple answer

Thanks
Martin
--
Martin Crowe
Developer
MitchellConnerSearson
3-5 High Pavement
The Lace Market
Nottingham  NG1 1HF
Tel +44 (0)115 959 6455
Fax +44 (0)115 959 6456
Direct +44 (0)115 959 6469
www.choosemcs.co.uk
Confidentiality: This e-mail and its attachments are intended for the above named only 
and may be confidential. If they have come to you in error you must take no action 
based on them, nor must you copy or show them to anyone; please reply to this e-mail 
and highlight the error.
Security Warning: Please note that this e-mail has been created in the knowledge that 
Internet e-mail is not a 100% secure communications medium. We advise that you 
understand and observe this lack of security when e-mailing us.
Viruses: Although we have taken steps to ensure that this e-mail and attachments are 
free from any virus, we advise that in keeping with good computing practice the 
recipient should ensure they are actually virus free.

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


Re: Error page problem

2004-09-18 Thread Martin Schaefer
 May I ask you - how did you conclude that expection occurs on error page
 itself? I think, exception does not occur on error page.

It said so: Exception Processing ErrorPage[errorCode=500, 
location=/errorpage.jsp]

 But when error page is defined for context, Tomcat tries to send error page
 to client. Tomcat tries to reset the response, but it is not possible
 because Axis library tries to send response too. That is why
 IllegalStateException occurs.

Sounds like a good explanation to me.

 Sending error page (that is intended for ordinary servlets or jsp) does not
 make sense, because clients expect SOAP messages.
 Is it possible to remove certain servlets from error page mechanism? Error
 page does not make sense for web services.

Maybe separate the web services from user interface!? Different WARs...

Regards,
Martin

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



Re: Tomcat 5.0.28 form post encoding problem

2004-09-17 Thread Martin Schaefer

Again (there was a similar problem today), it might help to run tomcat
with -Dfile.encoding=ISO-8859-2
Or better use UTF-8 if applicable...


Krzysztof Cieniuch [EMAIL PROTECTED] schrieb am 17.09.2004, 16:42:36:
 Hi I've got problem (again)  with encoding.
 Yes I've read all bugs  23929 25360 etc.
 No I didn't read www.anassina.com/struts/i18n/i18n.html because I can't
 reach that site don't know why server down or my connection broken???
 
 I've got two jsp pages index.jsp and out.jsp
 On index.jsp I have simple form with one text input field (the name of this
 text field is user)
 on out.jsp  page  I read that input with line like this
 request.getParameter(user)
 and of course when I use some national characters i.e not iso-8859-1 then I
 get ??? on the out.jsp page
 when i use
 new
 String(request.getParameter(user).getBytes(ISO-8859-1),ISO-8859-2);
 everything is ok
 I've tried everything :
 -setting encoding
-- in html meta tag
-- in jsp page tag
-- i use method Post in that  form
 
 nothing works the browser allways sends data encoded in ISO-8859-1
 so using through all my pages syntax like this
 new
 String(request.getParameter(user).getBytes(ISO-8859-1),ISO-8859-2);
 is the only solution ??
 I would like to use jsp and struts tags and then this is not an option
 bean:write tag also gives ??? on national characters
 I've changed server.xml connector  part and added URIencoding=ISO-8859-2
 and useBodyEncodingForURI=true this either doesn't help
 and since I'm sending form data in body part of the request how should this
 help anyhow
 
 HELP the lost newbi :-)))
 
 KC
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Martin Schaefer
NAXOS Software Solutions GmbH i.G.
Herrenstr. 1
69502 Hemsbach
Germany
 
Phone:+49 (0) 6201 49298-2
Mobile: +49 (0) 172 6269246
Fax: +49 (0) 6201 49298-1
Mail: [EMAIL PROTECTED]

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



Re: A little offbeat question

2004-09-16 Thread martin

Try running 'java ... HelloWorld' instead of 'java ... HelloWorld.class'
:-)

Regards,
Martin

John Najarian [EMAIL PROTECTED] schrieb am 16.09.2004,
09:00:52:
 I tried to run a program I thought would but it doesn't.
 
 This is on a windows XP platform.
 
 Everything compiled well but I get this error:
 
 Exception in thread main java.lang.NoClassDefFoundError: HelloWorld/class
 
  
 
 So I went back and tried a no brainer 'HelloWorld'  This is the code.
 
 /**
 
  * The HelloWorld class implements an application that
 
  * displays Hello World! to the standard output.
 
  */
 
 public class HelloWorld {
 
 public static void main(String[] args) {
 
 // Display Hello World!
 
 System.out.println(Hello World!);
 
 }
 
 }
 
  
 
 It compiles but I get the same error.
 
 I check my environment variables and mine are
 
 JAVA_HOME c:\j2sdk1.4.2_03
 
 PATH
 C:\Perl\bin\;C:\j2sdk1.4.2_03\bin\;C:\j2sdkee1.3.1\bin\;%SystemRoot%\system3
 2;%SystemRoot%;%SystemRoot%\system32\WBEM
 
  
 
 Any ideas?
 
  
 
 Thanks in advance
-- 
Martin Schaefer
NAXOS Software Solutions GmbH i.G.
Herrenstr. 1
69502 Hemsbach
Germany
 
Phone:+49 (0) 6201 49298-2
Mobile: +49 (0) 172 6269246
Fax: +49 (0) 6201 49298-1
Mail: [EMAIL PROTECTED]

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



Re: RE: A little offbeat question

2004-09-16 Thread martin

But the exception says NoClassDefFoundError: HelloWorld/class. So
where does the /class come from?? In any case don't bother with
classpath environment, but (with the class in your current directory)
simply run 'java -cp . HelloWorld'. Would really surprise me if it
didn't work.

John Najarian [EMAIL PROTECTED] schrieb am 16.09.2004,
09:32:18:
 That's what I did.  When I was first learning Java that 1 bit me.
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, September 16, 2004 12:24 AM
 To: Tomcat Users List
 Subject: Re: A little offbeat question
 
 
 Try running 'java ... HelloWorld' instead of 'java ... HelloWorld.class'
 :-)
 
 Regards,
 Martin
 
 John Najarian  schrieb am 16.09.2004,
 09:00:52:
  I tried to run a program I thought would but it doesn't.
  
  This is on a windows XP platform.
  
  Everything compiled well but I get this error:
  
  Exception in thread main java.lang.NoClassDefFoundError:
 HelloWorld/class
  
   
  
  So I went back and tried a no brainer 'HelloWorld'  This is the code.
  
  /**
  
   * The HelloWorld class implements an application that
  
   * displays Hello World! to the standard output.
  
   */
  
  public class HelloWorld {
  
  public static void main(String[] args) {
  
  // Display Hello World!
  
  System.out.println(Hello World!);
  
  }
  
  }
  
   
  
  It compiles but I get the same error.
  
  I check my environment variables and mine are
  
  JAVA_HOME c:\j2sdk1.4.2_03
  
  PATH
 
 C:\Perl\bin\;C:\j2sdk1.4.2_03\bin\;C:\j2sdkee1.3.1\bin\;%SystemRoot%\system3
  2;%SystemRoot%;%SystemRoot%\system32\WBEM
  
   
  
  Any ideas?
  
   
  
  Thanks in advance
 -- 
 Martin Schaefer
 NAXOS Software Solutions GmbH i.G.
 Herrenstr. 1
 69502 Hemsbach
 Germany
  
 Phone:+49 (0) 6201 49298-2
 Mobile: +49 (0) 172 6269246
 Fax: +49 (0) 6201 49298-1
 Mail: [EMAIL PROTECTED]
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Martin Schaefer
NAXOS Software Solutions GmbH i.G.
Herrenstr. 1
69502 Hemsbach
Germany
 
Phone:+49 (0) 6201 49298-2
Mobile: +49 (0) 172 6269246
Fax: +49 (0) 6201 49298-1
Mail: [EMAIL PROTECTED]

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



session replication slow/problems in 5.0.28

2004-09-08 Thread Joachim Martin
Hello,
I have successfully gotten replication working.  However, every 5-10 
hits or so, the request takes forever, and I see the following in the log:

Sep 8, 2004 11:33:38 AM org.apache.catalina.cluster.tcp.SocketSender 
waitForAck
WARNING: Wasn't able to read acknowledgement from server[/x.x.x.x:56831] 
in 15000 ms. Disconnecting socket, and
trying again.

Is there a fix or workaround for this?
Thanks --Joachim
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: session replication slow/problems in 5.0.28

2004-09-08 Thread Joachim Martin
Hi Filip,
SunOS 5.6 (from uname -a; not sure what that corresponds to)
java version 1.4.0
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)
I didn't realize I was using 1.4.0- I also have 1.4.2_04 available, and 
tried it
quickly, but I got an unsatisfied link error on librt.so.1 (strange).

I added a simple page to the /jsp-examples/ webapp, it just puts an Integer
in session and increments on each request.  I take down servers and make
sure that the hitcount keeps on going up.  Works great except for the 
timeout.

Thanks --Joachim
Filip Hanik - Dev wrote:
ok, you want to find out what is taking so long, are you storing megabyte size stuff 
in your session?
The socket is timing out cause it is not receiving an acknowledgement from the other 
server.
Also, what OS and JDK are you on, if you are on linux, you will need to set 
LD_ASSUME_KERNEL=2.4 because of known NIO issues
Filip
- Original Message - 
From: Joachim Martin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 08, 2004 10:42 AM
Subject: session replication slow/problems in 5.0.28

Hello,
I have successfully gotten replication working.  However, every 5-10 
hits or so, the request takes forever, and I see the following in the log:

Sep 8, 2004 11:33:38 AM org.apache.catalina.cluster.tcp.SocketSender 
waitForAck
WARNING: Wasn't able to read acknowledgement from server[/x.x.x.x:56831] 
in 15000 ms. Disconnecting socket, and
trying again.

Is there a fix or workaround for this?
Thanks --Joachim
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 


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


RE: Path Problem when Porting Hibernate/Struts App from Tomcat 4 to 5

2004-08-31 Thread Emmerich, Martin
On Wed, Aug 25, 2004 at 6:31 PM, QM wrote

 What about renaming the .jar file with the Hibernate mappings .zip?
and
 You may want to hold off, then, till the developer gets back.  

We did both and it worked!

Thanks for the help!

Best regards,
..
Martin Emmerich
Leitung IT

Oestreicher + Wagner
Medientechnik GmbH
Frankenthaler Straße 20
D-81539 München

Fon   +49 (0)89-68961 0 
Fax   +49 (0)89-68961 200
Web   http://www.oew.de/

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



Path Problem when Porting Hibernate/Struts App from Tomcat 4 to 5

2004-08-25 Thread Emmerich, Martin
Hello,

I'm trying to bring an struts and hibernate based application that runs sucessfully 
with tomcat 4 to tomcat 5.

Shortly after start (with an fresh deployment) it throws the exception

Time: 11:36:25  Priority: ERROR  Thread: main  NDC: null
Category: net.sf.hibernate.cfg.Configuration 
Location: net.sf.hibernate.cfg.Configuration.addJar(Configuration.java:381) 
Message: Could not configure datastore from jar: ocp-dbmappings.jar
Throwable:
java.util.zip.ZipException: No such file or directory
   at java.util.zip.ZipFile.open(Native Method)
   at java.util.zip.ZipFile.init(ZipFile.java:204)
   at java.util.jar.JarFile.init(JarFile.java:132)
   at java.util.jar.JarFile.init(JarFile.java:97)
   at net.sf.hibernate.cfg.Configuration.addJar(Configuration.java:378)
   at de.oew.ocp.hibernate.HibernateAdapter.clinit(HibernateAdapter.java:46)
   at de.oew.ocp.hibernate.DomainStore.findActiveUsersByHost(DomainStore.java:353)
   at de.oew.ocp.user.UserManager.getActiveUsers(UserManager.java:76)
   at de.oew.ocp.user.UserManager.deleteActiveUsers(UserManager.java:107)
   at de.oew.ocp.OCPAppAttrContainer.initialize(OCPAppAttrContainer.java:111)
   at 
de.oew.web.servlet.OEWAppAttrContainerBase.contextInitialized(OEWAppAttrContainerBase.java:76)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3773)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4270)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:850)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:638)
   at 
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:320)
   at org.apache.catalina.core.StandardHost.install(StandardHost.java:875)
   at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:657)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:476)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1008)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:394)
   at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1134)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:832)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1126)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:521)
   at org.apache.catalina.core.StandardService.start(StandardService.java:519)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:2345)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:594)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:582)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398) 

Tomcat unpacks the application anyway.

If I go to ${CATALINA_HOME}/work/Catalina/localhost/appname and set a symbolic 
link called loader to ${CATALINA_HOME}/webapps/appname/WEB-INF/classes I can 
sucessfully start the application via the tomcat5 manager application.
The jar file in question contains the hibernate mappings (*.hbm.xml) of the 
application.

I'd prefer to avoid the link hack.

I'm only the admin who tries to get it running, the developer is on vacation. Thus my 
hibernate know-how is very poor.
Versions are Hibernate 2.1.4 and Tomcat 5.0.19 under Linux.

Best Regards,
..
Martin Emmerich
Leitung IT

Oestreicher + Wagner
Medientechnik GmbH
Frankenthaler Straße 20
D-81539 München

Fon   +49 (0)89-68961 0 
Fax   +49 (0)89-68961 200
Web   http://www.oew.de/

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



Configuring thread pools

2004-08-20 Thread julien-martin
Hello,
Is there a way to configure the thread pool in tomcat - if thread pool there is - and 
ask for example for 100 threads to be placed in the thread pool?
Thanks in advance,
Julien Martin.

Configuring thread pools: I meant servlet threads

2004-08-20 Thread julien-martin
Hello Yoav,
Thanks for the reply but I meant servlet threads.
Julien.

- Original Message -
From: Shapira, Yoav 
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, August 20, 2004 9:03 PM
Subject: RE: Configuring thread pools



Hi,
Yes, RTFM at
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/http.html.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, August 20, 2004 2:51 PM
To: Tomcat Users List
Subject: Configuring thread pools

Hello,
Is there a way to configure the thread pool in tomcat - if thread pool
there is - and ask for example for 100 threads to be placed in the
thread
pool?
Thanks in advance,
Julien Martin.



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


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


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



Continous Axis deployment forces Tomcat OutOfMemoryException

2004-08-10 Thread Martin Olsson

I'm developing a web service on Axis, and as I progress I continuously 
deploy versions of my code to a remote Tomcat/Axis server. I do this 
directly from my Ant build script by using ftp,reload,axis-admin tasks etc.

So everyday I'm coding, deploying, testing, coding, deploying, testing 
and so it goes until around 14.00, just after lunch. Then Tomcat stops 
working, the build script fails and I cannot even surf to the 
hostname:8080 to see the intro page (let alone restart axis).

So what I do is that I login using ssh, execute catalina.sh stop and 
then catalina.sh start and this usually makes Tomcat work again.

---
My guess is that somewhere in the deployment process (I never undeploy 
anything) there is a memory leak or something that grows, and after X 
deployments I get this error. Could it be a Tomcat bug?

So, does anyone have similar problems -- or better yet, a solution?
Regards,
Martin Olsson
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Tomcat 5 in debug mode

2004-07-29 Thread Martin
Hi all,

could somebody please tell me how to start tomcat 5 on Windows in debug
mode? I would like to use it for remote debugging, but I just recently
upgraded to tomcat 5 and could not find any description how to do this.

Is there maybe any generic solution to start tomcat 5 on windows and linux
in debug mode?

Many thanks,
Martin

-- 
NEU: WLAN-Router für 0,- EUR* - auch für DSL-Wechsler!
GMX DSL = supergünstig  kabellos http://www.gmx.net/de/go/dsl


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



RE: Win2K3 / Tomcat 4.1 and 5.0 issues - SOLVED

2004-07-29 Thread Martin, David S
So it turns out that the issue I was having with Win2k3 and Tomcat was
with the JDK that I was using, 1.4.2_02. One of our IT guys found a
reference in their bug parade that there is an HTTP issue with 1.4.2. I
rolled our JDK back to 1.4.1_02 and my web application works like it did
on Linux and Win2K. 

I just wanted to let people know incase someone else asks the same
question.




David Martin


-Original Message-
From: Martin, David S [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 27, 2004 12:18 PM
To: Tomcat Users List
Subject: RE: Win2K3 / Tomcat 4.1 and 5.0 issues

QM,

Yes, they both have the same FS in the Win2K and Win2K3 machines.

Well I know it's not the NIC card on the machine because I can log onto
the server that is having the issue, go to the machine where the 48MB
file lives and drag and drop it onto the desktop and the file transfers
in ~2 min.




David Martin


-Original Message-
From: QM [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 27, 2004 12:08 PM
To: Tomcat Users List
Subject: Re: Win2K3 / Tomcat 4.1 and 5.0 issues

On Tue, Jul 27, 2004 at 12:05:00PM -0700, Martin, David S wrote:
: our IT guys install IIS on the machine with the issue, created a test
: HTML page that has an upload field and IIS is showing the same type of
: problem ... weird.

Hmm... That takes Java I/O out of the picture.

Same type of FS under 2k vs 2k3?

-or what about a NIC problem? 
I've been bitten by a few autonegotiating cards that didn't.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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


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


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



RE: Win2K3 / Tomcat 4.1 and 5.0 issues - SOLVED

2004-07-29 Thread Martin, David S
I think we can chalk IIS as being IIS and the machine probably needed
a reboot since it was running a MS OS. :)



David Martin
Software Engineer, Board Tools Software Development
Intel Corporation
Platform Architecture and Solutions Division, Desktop Products Group
Phone: (503) 696-8658
Email:[EMAIL PROTECTED]


-Original Message-
From: QM [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 29, 2004 7:10 AM
To: Tomcat Users List
Subject: Re: Win2K3 / Tomcat 4.1 and 5.0 issues - SOLVED

On Thu, Jul 29, 2004 at 07:03:13AM -0700, Martin, David S wrote:
: So it turns out that the issue I was having with Win2k3 and Tomcat was
: with the JDK that I was using, 1.4.2_02. One of our IT guys found a
: reference in their bug parade that there is an HTTP issue with 1.4.2.

Excellent!

What was with the red herring from IIS, though? I recall you installed
IIS as a test and it exhibited the same poor I/O performance as Tomcat
under JDK 1.4.2...

-or do we just chalk that up as IIS being IIS? ;)


btw, thanks for sharing the solution with the list.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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


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



RE: Win2K3 / Tomcat 4.1 and 5.0 issues - SOLVED

2004-07-29 Thread Martin, David S
I also tried the latest version just now thinking the same thing and it
does not work either. I will test JDK1.5 when it is released, and post
the results here as well.



David Martin
Software Engineer, Board Tools Software Development
Intel Corporation
Platform Architecture and Solutions Division, Desktop Products Group
Phone: (503) 696-8658
Email:[EMAIL PROTECTED]


-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 29, 2004 7:21 AM
To: Tomcat Users List
Subject: RE: Win2K3 / Tomcat 4.1 and 5.0 issues - SOLVED


Hi,
Thanks for posting the conclusion: such posts are extremely valuable to
people searching the archives in the future.

If you can try it, does 1.4.2_04 (the latest I believe) solve the
problem?

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Martin, David S [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 29, 2004 10:03 AM
To: Tomcat Users List
Subject: RE: Win2K3 / Tomcat 4.1 and 5.0 issues - SOLVED

So it turns out that the issue I was having with Win2k3 and Tomcat was
with the JDK that I was using, 1.4.2_02. One of our IT guys found a
reference in their bug parade that there is an HTTP issue with 1.4.2. I
rolled our JDK back to 1.4.1_02 and my web application works like it
did
on Linux and Win2K.

I just wanted to let people know incase someone else asks the same
question.


---
-

David Martin


-Original Message-
From: Martin, David S [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 27, 2004 12:18 PM
To: Tomcat Users List
Subject: RE: Win2K3 / Tomcat 4.1 and 5.0 issues

QM,

Yes, they both have the same FS in the Win2K and Win2K3 machines.

Well I know it's not the NIC card on the machine because I can log onto
the server that is having the issue, go to the machine where the 48MB
file lives and drag and drop it onto the desktop and the file transfers
in ~2 min.


---
-

David Martin


-Original Message-
From: QM [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 27, 2004 12:08 PM
To: Tomcat Users List
Subject: Re: Win2K3 / Tomcat 4.1 and 5.0 issues

On Tue, Jul 27, 2004 at 12:05:00PM -0700, Martin, David S wrote:
: our IT guys install IIS on the machine with the issue, created a test
: HTML page that has an upload field and IIS is showing the same type
of
: problem ... weird.

Hmm... That takes Java I/O out of the picture.

Same type of FS under 2k vs 2k3?

-or what about a NIC problem?
I've been bitten by a few autonegotiating cards that didn't.

-QM

--

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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


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


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




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


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


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



Re: Tomcat 5 in debug mode

2004-07-29 Thread Martin
Thanks a lot for your answers. I figured out that the problem was that
tomcat was running as a windows service - I changed this and it is working
fine now. Besides this I found a good tutorial concerning remote debugging
at http://jakarta.apache.org/site/idedev-rdtomcat.html

Best regards,
Martin

 -Ursprüngliche Nachricht-
 Von: Christophe Thiébaud [mailto:[EMAIL PROTECTED] 
 Gesendet: Donnerstag, 29. Juli 2004 14:21
 An: Tomcat Users List
 Betreff: Re: Tomcat 5 in debug mode
 
 
 I use this on windows:
 
 1.
 in bin\catalina.bat, set JPDA_TRANSPORT and JPDA_ADDRESS to 
 fit your needs e.g. mine are: set JPDA_TRANSPORT=dt_socket 
 set JPDA_ADDRESS=8000
 
 I also change the default suspend=n to suspend=y on the last lines of 
 the script (starting with %_EXECJAVA%)
 
 2.
 start command prompt in TOMCAT_HOME
 
 3.
 enter
 bin\catalina.bat jpda start
 
 CT
 
 Martin wrote:
 
 Hi all,
 
 could somebody please tell me how to start tomcat 5 on 
 Windows in debug 
 mode? I would like to use it for remote debugging, but I 
 just recently 
 upgraded to tomcat 5 and could not find any description how 
 to do this.
 
 Is there maybe any generic solution to start tomcat 5 on windows and 
 linux in debug mode?
 
 Many thanks,
 Martin

-- 
NEU: WLAN-Router für 0,- EUR* - auch für DSL-Wechsler!
GMX DSL = supergünstig  kabellos http://www.gmx.net/de/go/dsl


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



RE: Unable to deploy a JSP from tomcat

2004-07-29 Thread Martin, David S
Sunitha,

What is your JAVA_HOME environment variable set to? 



David Martin

-Original Message-
From: Sunitha Kumar [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 29, 2004 1:19 PM
To: Sunitha Kumar
Cc: [EMAIL PROTECTED]
Subject: Re: Unable to deploy a JSP from tomcat

Also, looking at documentation at:
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html

It says, CLASSPATH is ignored. And, tools.jar should have been loaded?

* System - This class loader is normally initialized from the
  contents of the CLASSPATH environment variable. All such classes
  are visible to both Tomcat internal classes, and to web
  applications. However, the standard Tomcat 4 startup scripts
  ($CATALINA_HOME/bin/catalina.sh or
  %CATALINA_HOME%\bin\catalina.bat) totally ignore the contents of
  the CLASSPATH environment variable itself, and instead build the
  System class loader from the following repositories:
  o $CATALINA_HOME/bin/bootstrap.jar - Contains the main()
method that is used to initialize the Tomcat 4 server, and
the class loader implementation classes it depends on.
  o $JAVA_HOME/lib/tools.jar - Contains the javac compiler
used to convert JSP pages into servlet classes.



Sunitha Kumar wrote:

 Folks:
 I have defined CLASSPATH to have $JAVA_HOME/lib/tools.jar, in
catalina.sh
 However, while deploying my .war file, it fails to find tools.jar.
 Any pointers?
 thanks,
 -sunitha

 Servlet  threw load() exception
 org.apache.jasper.JasperException: Unable to compile class for JSP

 No Java compiler was found to compile the generated source for the
JSP.
 This can usually be solved by copying manually 
 $JAVA_HOME/lib/tools.jar from the JDK
 to the common/lib directory of the Tomcat server, followed by a Tomcat

 restart.
 If using an alternate Java compiler, please check its installation and

 access path.

at 

org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHa
ndler.java:127) 

at 

org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.ja
va:351) 

at 
 org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:415)
at
org.apache.jasper.compiler.Compiler.compile(Compiler.java:458)
at
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
at 

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.ja
va:553) 

at 

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:291) 

at 

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
at 
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at sun.reflect.GeneratedMethodAccessor146.invoke(Unknown
Source)
at 

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25) 

at java.lang.reflect.Method.invoke(Method.java:324)
at 
 org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:284)




-- 
Sunitha Kumar
http://www.cisco.com




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


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



Win2K3 / Tomcat 4.1 and 5.0 issues

2004-07-27 Thread Martin, David S
Here is the environment:
   DELL 6650 running a fresh Win2k3 Advanced Server installation
   Tomcat 5.0
   JDK 1.4.2
   The machine is connected to our intranet at 100Mbit.


Here is the problem:

I got Tomcat 5.0 and my web app to install and run fine. The problem
begins when I try to upload a 48MB file from DuPont, Washington to
Portland, Oregon. It takes ~20 min to upload the file. I originally had
the web app running on a Linux Mandrake box using Tomcat 5.0 and doing
the same operation took less than ~2 min. I had our IT department
upgrade the network drop to the machine to 1Gbit instead of the 100Mbit
and the file still takes ~20 min to upload.  

Well, being a cynic I thought, well it has to be a windows issue. 

I got two more 6650s and did some more testing. 

Here is a quick table showing the results of my tests. 
-
| Test | O/S, Tomcat Ver. | Time|
-
| 1| Linux,  5.0  | ~2  min |
| 2| Win2k3, 5.0  | ~20 min |
| 3| Win2k3, 4.1  | ~20 min |
| 4| Win2k,  4.1  | ~2  min |
| 5| Win2k,  5.0  | ~2  min |
-

Test Machine 1 Environment:
   DELL 6650 running a fresh Win2k3 Advanced Server installation
   Tomcat 4.1 and 5.0
   JDK 1.4.2
   The machine is connected to our intranet at 100Mbit.

I deployed the web app and got the same results as before. I then
uninstalled Tomcat 5.0 and installed Tomcat 4.0, deployed the web app
and got the same results again.

Test Machine 2 Environment:
   DELL 6650 running a fresh Win2k Advanced Server installation
   Tomcat 4.1 and 5.0
   JDK 1.4.2
   The machine is connected to our intranet at 100Mbit.

I deployed the web app and got the same results as my Linux server, the
file took ~2 min to upload to the machine.

So what gives? Is there a known conflict between Tomcat 4.1/5.0 and
Win2k3 Advanced Server?

Any ideas?

Thanks in advance,

David Martin


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



RE: Win2K3 / Tomcat 4.1 and 5.0 issues

2004-07-27 Thread Martin, David S
QM,
As it turns out it might not be a Tomcat issue after all. I had
our IT guys install IIS on the machine with the issue, created a test
HTML page that has an upload field and IIS is showing the same type of
problem ... weird.  



David Martin


-Original Message-
From: QM [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 27, 2004 11:44 AM
To: Tomcat Users List
Subject: Re: Win2K3 / Tomcat 4.1 and 5.0 issues

On Tue, Jul 27, 2004 at 08:53:45AM -0700, Martin, David S wrote:
: -
: | Test | O/S, Tomcat Ver. | Time|
: -
: | 1| Linux,  5.0  | ~2  min |
: | 2| Win2k3, 5.0  | ~20 min |
: | 3| Win2k3, 4.1  | ~20 min |
: | 4| Win2k,  4.1  | ~2  min |
: | 5| Win2k,  5.0  | ~2  min |
: -
: 
: So what gives? Is there a known conflict between Tomcat 4.1/5.0 and
: Win2k3 Advanced Server?

What about general I/O under 2k3, or Java I/O?

What sort of services are running under a default 2k3 install that
aren't
running under Win2k?  Does 2k3 add any extra security checks or
containment
that 2k does not have?

You could also check for interactions between the JDK you used and the
OS.

The JDKs are all native code deep-down. If 2k3 is running the code
inside
some special win2k emulation mode or protected area, that may be the
culprit.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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


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



RE: Win2K3 / Tomcat 4.1 and 5.0 issues

2004-07-27 Thread Martin, David S
QM,

Yes, they both have the same FS in the Win2K and Win2K3 machines.

Well I know it's not the NIC card on the machine because I can log onto
the server that is having the issue, go to the machine where the 48MB
file lives and drag and drop it onto the desktop and the file transfers
in ~2 min.




David Martin


-Original Message-
From: QM [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 27, 2004 12:08 PM
To: Tomcat Users List
Subject: Re: Win2K3 / Tomcat 4.1 and 5.0 issues

On Tue, Jul 27, 2004 at 12:05:00PM -0700, Martin, David S wrote:
: our IT guys install IIS on the machine with the issue, created a test
: HTML page that has an upload field and IIS is showing the same type of
: problem ... weird.

Hmm... That takes Java I/O out of the picture.

Same type of FS under 2k vs 2k3?

-or what about a NIC problem? 
I've been bitten by a few autonegotiating cards that didn't.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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


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



RE: Win2K3 / Tomcat 4.1 and 5.0 issues

2004-07-27 Thread Martin, David S
Cary,
I am not doing any IIS redirection to Tomcat. I was asked to get
IIS on that same machine to see if IIS would have the same slowness when
someone tried to upload a file to it.



David Martin


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 27, 2004 12:16 PM
To: Tomcat Users List
Subject: Re: Win2K3 / Tomcat 4.1 and 5.0 issues

There is additional security in IIS v6 that causes many of these issues.

It is the third tab in the IIS configuration section in the Management 
Console on W2K3.

I would experiment with identifying the specific java servlet redirector

for each of the tomcats bases that are in use on the system to see if 
there is a better response time.

Cary D. Conover
Lawson Software
Advisory Consultant
Technology Services - East Region
Voice 972-934-0408 ext 2429
Cellphone 214-417-8669 
SMS [EMAIL PROTECTED]
Fax 509-355-0356
Use http://www.Teleflip.com to contact any cellphone number via SMS.
160 
Character Messages there in a flash.



QM [EMAIL PROTECTED] 
07/27/2004 02:43 PM
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
Re: Win2K3 / Tomcat 4.1 and 5.0 issues






On Tue, Jul 27, 2004 at 08:53:45AM -0700, Martin, David S wrote:
: -
: | Test | O/S, Tomcat Ver. | Time|
: -
: | 1| Linux,  5.0  | ~2  min |
: | 2| Win2k3, 5.0  | ~20 min |
: | 3| Win2k3, 4.1  | ~20 min |
: | 4| Win2k,  4.1  | ~2  min |
: | 5| Win2k,  5.0  | ~2  min |
: -
: 
: So what gives? Is there a known conflict between Tomcat 4.1/5.0 and
: Win2k3 Advanced Server?

What about general I/O under 2k3, or Java I/O?

What sort of services are running under a default 2k3 install that
aren't
running under Win2k?  Does 2k3 add any extra security checks or 
containment
that 2k does not have?

You could also check for interactions between the JDK you used and the
OS.

The JDKs are all native code deep-down. If 2k3 is running the code
inside
some special win2k emulation mode or protected area, that may be the
culprit.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



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



Tomcat with SSL/secure=false

2004-07-08 Thread Martin Dubuc
I am having problems with using SSL on Tomcat. When I
add an SSL connector to my server.xml, Tomcat hangs on
startup. I have been able to identify what causes it
to hang, but I still can't figure out why this is
happening. Here are the connectors I have defined in
server.xml:

Connector
className=org.apache.coyote.tomcat5.CoyoteConnector
   acceptCount=100 bufferSize=2048
clientAuth=false
   compression=off connectionLinger=-1
   connectionTimeout=2
connectionUploadTimeout=30
   debug=0 disableUploadTimeout=true
enableLookups=true
   keepAlive=true
maxKeepAliveRequests=100 maxProcessors=100
   minProcessors=5 port=8080
protocol=HTTP/1.1
  
protocolHandlerClassName=org.apache.coyote.http11.Http11Protocol

   proxyPort=0 redirectPort=8443
scheme=http secure=false
   serverSocketTimeout=0
tcpNoDelay=true
   tomcatAuthentication=true
xpoweredBy=true
/Connector
Connector
className=org.apache.coyote.tomcat5.CoyoteConnector
   port=8443 minProcessors=5
maxProcessors=75
   enableLookups=true
disableUploadTimeout=true
   acceptCount=100 debug=0
   scheme=https secure=false
   keystoreFile=/home/www/.keystore
keystorePass=changeit
   clientAuth=false sslProtocol=TLS
  Factory
className=org.apache.coyote.tomcat5.CoyoteServerSocketFactory
   clientAuth=false protocol=TLS
   keystoreFile=/home/www/.keystore
keystorePass=changeit/
/Connector

If I set the secure attribute to false in the SSL
connector, then Tomcat starts without problems. But if
it is set to true, then Tomcat hangs when it loads the
SSL connector. Has someone experienced this problem
before?

I am worried of implication of setting secure to false
with regards to SSL connector.

The version of Tomcat I use is 5.0.19. I am running
Tomcat on FreeBSD 4.10 (I may be experiencing a
limitation of the J2SDK FreeBSD port). Anybody else
running Tomcat with SSL of FreeBSD?

Martin



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

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



Mysterious Exception while server startup

2004-07-07 Thread Martin Grüneberg
Hello,
I run here a tomcat 5.0.27 server on windows 2000 with jsdk1.4.2-04.
The following happens rarely and it seems only to happen when I start Tomcat
in Eclipse 3 
(Sysdeo 3.0.0 alpha1 plugin).
After processing all contextes on startup I get sometimes the following 
Exception:

WARNUNG: Error registering contexts
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:782)
at java.util.HashMap$EntryIterator.next(HashMap.java:824)
at java.util.HashMap.putAllForCreate(HashMap.java:424)
at java.util.HashMap.clone(HashMap.java:656)
at
mx4j.server.DefaultMBeanRepository.clone(DefaultMBeanRepository.java:56)
at
mx4j.server.MBeanServerImpl.findMBeansByPattern(MBeanServerImpl.java:1603)
at
mx4j.server.MBeanServerImpl.queryObjectNames(MBeanServerImpl.java:1568)
at
mx4j.server.MBeanServerImpl.queryMBeans(MBeanServerImpl.java:1512)
at
org.apache.coyote.tomcat5.MapperListener.init(MapperListener.java:126)
at
org.apache.coyote.tomcat5.CoyoteConnector.start(CoyoteConnector.java:1537)
at
org.apache.catalina.core.StandardService.start(StandardService.java:489)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422)
07.07.2004 15:01:07 org.apache.catalina.startup.Catalina start
INFO: Server startup in 30844 ms

When it happens all Contextes are not available and when I stop and restart
Tomcat with the plugin 
in Eclipse after this it ALWAYS happens until I restart Eclipse!.

Did somebody else encounter this problem?

Greetings,
Martin Grüneberg



Virus checked by G DATA AntiVirusKit
Version: AVK 14.0.1353 from 07.07.2004
Virus news: www.antiviruslab.com


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



SSL Hangs Tomcat

2004-07-05 Thread Martin Dubuc
I am trying to get SSL to run under Tomcat 5.0.19. I
have configured my server as documented in
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/ssl-howto.html:

- I have created a keystore.
- I have imported a root and a tomcat key.
- I have set the redirectPort to 8443 on the Coyote
connector.
- I have copied the following SSL config connector in
the server.xml:

Connector
className=org.apache.coyote.tomcat5.CoyoteConnector
   port=8443 minProcessors=5
maxProcessors=75
   enableLookups=true
disableUploadTimeout=true
   acceptCount=100 debug=0 scheme=https
secure=true
   clientAuth=false sslProtocol=TLS
   keystoreFile=/home/user/.keystore
   keystorePass=blah/

I have restarted Tomcat. I see this log:
Using CATALINA_BASE:   /usr/local/jakarta-tomcat5.0
Using CATALINA_HOME:   /usr/local/jakarta-tomcat5.0
Using CATALINA_TMPDIR:
/usr/local/jakarta-tomcat5.0/temp
Using JAVA_HOME:   /usr/local/jdk1.4.2
Jul 5, 2004 8:03:37 PM
org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 8080

But nothing else. It seems to hang when it loads the
SSL connector. If I comment out the SSL connector, the
server starts without any problem.

Any advice on how to get this to work?

Martin






__
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

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



AW: Getting mad with jsp 2.0 jsp:directive.include file=file_to_include.jsp/

2004-07-01 Thread Martin Grüneberg
Thanks for the answer, 

but the  jsp:directive.include ... is the xml-styled version of %@ include
file=...
so this should work equaly. 

Any other proposals?

martin
 
-Ursprüngliche Nachricht-
Von: Woodchuck [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 30. Juni 2004 16:23
An: Tomcat Users List
Betreff: Re: Getting mad with jsp 2.0 jsp:directive.include
file=file_to_include.jsp/

hi Martin,

can you try to use the compile-time include like the following:

%@ include file=/jsp/ascript.jsp%

instead of the run-time include that you are currently using?  that is
why it is complaining about double importing.

if you use compile-time include then you do not need to import in your
ascript.jsp

woodchuck
 

--- Martin_Gr|neberg [EMAIL PROTECTED] wrote:
 Hello, hope somebody knows whats going on here...
 
 I have a main.jsp with the following start..
 
 ?xml version=1.0 encoding=utf-8?
 jsp:root version=2.0 xmlns:jsp=http://java.sun.com/JSP/Page; 
   xmlns=http://www.w3.org/1999/xhtml;
   xmlns:c=http://java.sun.com/jsp/jstl/core;
   xmlns:fn=http://java.sun.com/jsp/jstl/functions;
   xmlns:html=/WEB-INF/struts-html-el.tld
   xmlns:am=/WEB-INF/AccessManager2.tld
   xmlns:bean=/WEB-INF/struts-bean-el.tld
 jsp:output doctype-root-element=html
  doctype-public=-//W3C//DTD XHTML 1.0 Transitional//EN
  

doctype-system=http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
 /
 jsp:directive.page contentType=text/html; charset=utf-8
 language=java
 /
 html:html locale=true xhtml=true 
 head
   html:base/
   titlebean:message key=login.title//title
   c:url value=/css/style.css var=link
   /c:url
   link rel=stylesheet href=${fn:escapeXml(link)}
 type=text/css/
   
   jsp:directive.include file=/jsp/ascript.jsp/
   
 /head
 
 
 the /jsp/ascript.jsp looks like that:
 
 script type=text/javascript
 var newWindow;
 
 function openInsertWindow()
 {
   c:url value=/messdatenPreloadAction.do var=link
   c:param name=operation value=insertDataset/
   /c:url
   newWindow =

window.open(${fn:escapeXml(link)},_blank,resizable=yes,scrollbars=yes,w
 idth=800,height=600,status=yes);
 }
 ...
 
 ok, now the problem:
 when i call the jsp tomcat (jasper) throws the following exception:
 
 org.apache.jasper.JasperException: /jsp/ascript.jsp(9,33) The
 attribute
 prefix fn does not correspond to any imported tag library
 
 I thought ok, and added the same declaration to the /jsp/ascript.jsp
 include
 file like in the main.jsp:
 
 ?xml version=1.0 encoding=utf-8?
 jsp:root version=2.0 xmlns:jsp=http://java.sun.com/JSP/Page; 
   xmlns=http://www.w3.org/1999/xhtml;
   xmlns:c=http://java.sun.com/jsp/jstl/core;
   xmlns:fn=http://java.sun.com/jsp/jstl/functions;
   xmlns:html=/WEB-INF/struts-html-el.tld
   xmlns:am=/WEB-INF/AccessManager2.tld
   xmlns:bean=/WEB-INF/struts-bean-el.tld
 script type=text/javascript
 var newWindow;
 
 function openInsertWindow()
 {
   c:url value=/messdatenPreloadAction.do var=link
   c:param name=operation value=insertDataset/
   /c:url
   newWindow =

window.open(${fn:escapeXml(link)},_blank,resizable=yes,scrollbars=yes,w
 idth=800,height=600,status=yes);
 }
 ...
 
 
 but then i got the exception:
 
 org.apache.jasper.JasperException: h3Validation error messages from
 TagLibraryValidator for c/h3pnull: 
 org.xml.sax.SAXParseException: Attribute bean bound to namespace
 http://www.w3.org/2000/xmlns/; was already 
 specified for element jsp:root./p
 
 ok, this seems to be logical to me, because it is alredy declared in
 main.jsp.
 
 What can i do to fix this, to get the taglib known in the include but
 not
 double import it???
 
 thanks in advance
 Martin Gr|neberg
  
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 




__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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




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



strange error when processing stylesheets: tomcat, jdk1.4, windows, xalan

2004-07-01 Thread Martin Monsorno
Hi *,

I get the following error when trying to transform a xml document with
a XSLT stylesheet:

; SystemID: jndi:/localhost/ipas/xsl/minutes_pdf.xsl; Line#: 298; Column#: 66
javax.xml.transform.TransformerException: Unknown error in XPath
at org.apache.xpath.XPath.bool(XPath.java:411)
at org.apache.xalan.templates.ElemIf.execute(ElemIf.java:198)
...

In the stylesheet, I test for an empty string:

xsl:if test=not(string(./title))

The error occurs:

- with ANY test condition that tests for an empty string
  (e.g. with string-length(./entry) = 0
- with having xalan.jar, xml-apis.jar and xercesImpl.jar in my
  WEB-INF/lib from any xalan versions of 2.5.0, 2.5.2, 2.6.0
- with Tomcat 4.1.29 on Windows 2000 and JDK 1.4x
- NOT with JDK 1.3
- NOT on Linux
- NOT with resin

It's these kind of errors that makes being a programmer a real fun!

Does anyone have a tip on what to do?  

-- 
Martin

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



Re: strange error when processing stylesheets: tomcat, jdk1.4, windows, xalan

2004-07-01 Thread Martin Monsorno
Martin Monsorno [EMAIL PROTECTED] writes:

 Hi *,

 I get the following error when trying to transform a xml document with
 a XSLT stylesheet:

 ; SystemID: jndi:/localhost/ipas/xsl/minutes_pdf.xsl; Line#: 298; Column#: 66
 javax.xml.transform.TransformerException: Unknown error in XPath
 at org.apache.xpath.XPath.bool(XPath.java:411)
 at org.apache.xalan.templates.ElemIf.execute(ElemIf.java:198)
 ...

 In the stylesheet, I test for an empty string:

 xsl:if test=not(string(./title))

 The error occurs:

 - with ANY test condition that tests for an empty string
   (e.g. with string-length(./entry) = 0
 - with having xalan.jar, xml-apis.jar and xercesImpl.jar in my
   WEB-INF/lib from any xalan versions of 2.5.0, 2.5.2, 2.6.0
 - with Tomcat 4.1.29 on Windows 2000 and JDK 1.4x
 - NOT with JDK 1.3
 - NOT on Linux
 - NOT with resin

Ah, yes, and it does NOT occur when running the transforming by
directly calling xalan from the command line and not via TomCat!


-- 
Martin

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



Map backed ActionForm, and jstl expression language

2004-07-01 Thread John Martin
Hi all,

Any help on the following problem would be most appreciated.

What i am trying to do is produce a report of data in tabular form with filters that 
will reduce the report set. There can be 100's of different reports but by passing in 
a report id to a database the query, filters, columns and row values can be determined.

So i use a map backed action form for the filter property and there values, this 
contains the methods

  public void setValue(String key, Object value) {
values.put(key, value);
}

public Object getValue(String key) {
return values.get(key);
}

For example, i want the first filter to have a value of 1, so i 
setValue(filter1,1) and the second filter to be value 2 (setValue(filter1,1)).

Now i populate another bean with the filter labels and values, that gets stored in the 
request. These are filter lists are stored as array lists in a hashmap with the the 
key, being the filter property, in this case filter1 and filter2. 

So in the jsp i write
  c:forEach items=${dao.hmOfLists} var=list
   c:set var=props value=${list.key}/
   c:set var=values value=${list.value}/
  html-el:select property=${props} value=
html:options collection=values property=value labelProperty=label/
  /html-el:select
  /c:forEach

this gets me the all the filters that have been stored in the hashmap from the object 
dao via the property hmOfLists, with the key in the hashmap being the filter 
property. However, i want to set the defaults on the filters via the map backed action 
form, but if i write html-el:select property=${props} , i get an error of No 
getter method available for property filter2..etc. So i try an access the value, 
in the html-el:select using the expression value=${testForm.props}, but this 
shouldn't (and doesn't work) as label is actually the variable props from the hashmap, 
not the property props from the testForm. How i can i make it use the var props 
instead of the string literal, in order to determine the property to retrieve from the 
map based action form ?

Thanks,

John







Re: Map backed ActionForm, and jstl expression language

2004-07-01 Thread John Martin
Sorry wrong User List, it is quite late

- Original Message - 
From: John Martin [EMAIL PROTECTED]
To: tomcat-user [EMAIL PROTECTED]
Sent: Friday, July 02, 2004 1:00 AM
Subject: Map backed ActionForm, and jstl expression language


Hi all,

Any help on the following problem would be most appreciated.

What i am trying to do is produce a report of data in tabular form with
filters that will reduce the report set. There can be 100's of different
reports but by passing in a report id to a database the query, filters,
columns and row values can be determined.

So i use a map backed action form for the filter property and there values,
this contains the methods

  public void setValue(String key, Object value) {
values.put(key, value);
}

public Object getValue(String key) {
return values.get(key);
}

For example, i want the first filter to have a value of 1, so i
setValue(filter1,1) and the second filter to be value 2
(setValue(filter1,1)).

Now i populate another bean with the filter labels and values, that gets
stored in the request. These are filter lists are stored as array lists in a
hashmap with the the key, being the filter property, in this case filter1
and filter2.

So in the jsp i write
  c:forEach items=${dao.hmOfLists} var=list
   c:set var=props value=${list.key}/
   c:set var=values value=${list.value}/
  html-el:select property=${props} value=
html:options collection=values property=value
labelProperty=label/
  /html-el:select
  /c:forEach

this gets me the all the filters that have been stored in the hashmap from
the object dao via the property hmOfLists, with the key in the hashmap
being the filter property. However, i want to set the defaults on the
filters via the map backed action form, but if i write html-el:select
property=${props} , i get an error of No getter method available for
property filter2..etc. So i try an access the value, in the
html-el:select using the expression value=${testForm.props}, but this
shouldn't (and doesn't work) as label is actually the variable props from
the hashmap, not the property props from the testForm. How i can i make it
use the var props instead of the string literal, in order to determine the
property to retrieve from the map based action form ?

Thanks,

John







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



Getting mad with jsp 2.0 jsp:directive.include file=file_to_include.jsp/

2004-06-30 Thread Martin Grüneberg
Hello, hope somebody knows whats going on here...

I have a main.jsp with the following start..

?xml version=1.0 encoding=utf-8?
jsp:root version=2.0 xmlns:jsp=http://java.sun.com/JSP/Page; 
xmlns=http://www.w3.org/1999/xhtml;
xmlns:c=http://java.sun.com/jsp/jstl/core;
xmlns:fn=http://java.sun.com/jsp/jstl/functions;
xmlns:html=/WEB-INF/struts-html-el.tld
xmlns:am=/WEB-INF/AccessManager2.tld
xmlns:bean=/WEB-INF/struts-bean-el.tld
jsp:output doctype-root-element=html
 doctype-public=-//W3C//DTD XHTML 1.0 Transitional//EN
 
doctype-system=http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; /
jsp:directive.page contentType=text/html; charset=utf-8 language=java
/
html:html locale=true xhtml=true 
head
  html:base/
  titlebean:message key=login.title//title
  c:url value=/css/style.css var=link
/c:url
  link rel=stylesheet href=${fn:escapeXml(link)} type=text/css/

jsp:directive.include file=/jsp/ascript.jsp/

/head


the /jsp/ascript.jsp looks like that:

script type=text/javascript
var newWindow;

function openInsertWindow()
{
c:url value=/messdatenPreloadAction.do var=link
c:param name=operation value=insertDataset/
/c:url
  newWindow =
window.open(${fn:escapeXml(link)},_blank,resizable=yes,scrollbars=yes,w
idth=800,height=600,status=yes);
}
...

ok, now the problem:
when i call the jsp tomcat (jasper) throws the following exception:

org.apache.jasper.JasperException: /jsp/ascript.jsp(9,33) The attribute
prefix fn does not correspond to any imported tag library

I thought ok, and added the same declaration to the /jsp/ascript.jsp include
file like in the main.jsp:

?xml version=1.0 encoding=utf-8?
jsp:root version=2.0 xmlns:jsp=http://java.sun.com/JSP/Page; 
xmlns=http://www.w3.org/1999/xhtml;
xmlns:c=http://java.sun.com/jsp/jstl/core;
xmlns:fn=http://java.sun.com/jsp/jstl/functions;
xmlns:html=/WEB-INF/struts-html-el.tld
xmlns:am=/WEB-INF/AccessManager2.tld
xmlns:bean=/WEB-INF/struts-bean-el.tld
script type=text/javascript
var newWindow;

function openInsertWindow()
{
c:url value=/messdatenPreloadAction.do var=link
c:param name=operation value=insertDataset/
/c:url
  newWindow =
window.open(${fn:escapeXml(link)},_blank,resizable=yes,scrollbars=yes,w
idth=800,height=600,status=yes);
}
...


but then i got the exception:

org.apache.jasper.JasperException: h3Validation error messages from
TagLibraryValidator for c/h3pnull: 
org.xml.sax.SAXParseException: Attribute bean bound to namespace
http://www.w3.org/2000/xmlns/; was already 
specified for element jsp:root./p

ok, this seems to be logical to me, because it is alredy declared in
main.jsp.

What can i do to fix this, to get the taglib known in the include but not
double import it???

thanks in advance
Martin Grüneberg
 



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



XSLT transformations with tomcat

2004-06-30 Thread Martin Monsorno
Hi *,

I have some questions about XSLT transformations with tomcat (4 and 5).

1.) There doesn't seem to be a XSLT-processor included in TomCat.
Isn't this mandatory for a J2EE web container?  Isn't this needed for
the transform taglibs?

2.) When removing the xalan.jar-package from my web-app, I get the
following error: 

 javax.xml.transform.TransformerFactoryConfigurationError: Provider 
org.apache.xalan.processor.TransformerFactoryImpl not found

Why does tomcat looks after the
org.apache.xalan.processor.TransformerFactoryImpl class?  I didn't
configured this implementation for being used.

Thanks for your help,

-- 
Martin

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



[OT] Problem unzipping files in servlet with german umlauts in filenames of zipentries.

2004-06-16 Thread Martin Grueneberg
Hello, I hope somebody can help me with this problem.
I have a servlet in my application which unzips a uploaded zip archive and stores the 
contained files. 
This works fine until the filename of a zipentry contains german umlauts.

For example in a zipfile a.zip is an entry äöü.txt.

When i get the ZipEntry for that file zipEntry.getName() returns me ???.txt instead of 
äöü.txt.
I think this has something to do with the right Characterencoding but I don't know how 
to do it.

thanks in advance
Martin

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

ant install gives HTTP 401 error

2004-06-08 Thread Martin Olsson
Hi!
I would like to start developing web services in Java, therefore I've 
installed the web services dev pack from Sun. This pack contains a 
couple of samples and a copy of Tomcat (where the web services can be 
tested/executed).

I've been trying to get the gs (first 'getting started' sample 
application/webService) to work properly today, but with little success. 
When I run ant install the files compile etc but when ant tries to 
deploy the gs into a Tomcat context I get an error saying:

file:C:/jwstutorial13/examples/common/targets.xml:15: 
java.io.IOException: Server returned HTTP response code: 401 for URL: 
http://localhost:8080/manager/install?path=%2Fgswar=file%3A%2Fjwstutorial13%2Fexamples%2Fgs%2Fbuild

I looked in the tutorial and I saw that under Common Problems this 
very problem is discussed. It says I should install a build.properties 
file containing my Tomcat username/password but I've done this already. 
I've also double checked that the login details given in the 
build.properties file match the username/password in the 
conf/tomcat-users.xml file. Futher, I've double checked the spelling of 
the filenames and I've setup the environment variables CATALINA_HOME 
etc (also my path contains java, javac, ant, tomcat etc).

So, apparently I'm getting this 401 Forbidden error even though I've 
setup the account properly. Anyone experienced something similar? Where 
can I get more information about this, except from the error message 
itself and the logs? Any hints or comments would be greatly appreciated! 
Thanks.

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


Apache 2, Tomcat 5, mod_jk2 with virtual hosts and multiple Tomcat instances

2004-06-08 Thread John Martin
Hi All,

I'm having problems integrating Apache 2.0.46, Tomcat 5.0.24 using connectors JK2 
2.0.2 on linux for multiple Tomcat instances.

I'm trying to run seperate instances of Tomcat for development environments that also 
correspond to different virtual hosts. I have managed to get the different instances 
of Tomcat working on there own, browsing to them using the relevant port numbers. If 
i then use mod_jk2 to connect to either instance seperately (without the other 
instance being configured), it all works ok, however when i try to run both (and 
configured) i get an Internal Server error for dev2, and the error in the Apache log 
file is:
 
[Mon Jun 07 22:26:13 2004] [error] channelSocket.open() connect failed 127.0.0.1:9109 
111 Connection refused
[Mon Jun 07 22:26:13 2004] [error] ajp13.connect() failed ajp13:localhost:9109
[Mon Jun 07 22:26:13 2004] [error] ajp13.service() failed to connect endpoint 
errno=111 Connection refused
[Mon Jun 07 22:26:13 2004] [error] ajp13.service() Error  forwarding 
ajp13:localhost:9109 1 1
[Mon Jun 07 22:26:13 2004] [notice] ajp13.done() close endpoint ajp13:localhost:9109 
error_state 1
[Mon Jun 07 22:26:13 2004] [error] lb.service() worker failed 12 for 
ajp13:localhost:9109
[Mon Jun 07 22:26:13 2004] [notice] lb.getWorker() All workers in error state, use the 
one with oldest error
[Mon Jun 07 22:26:13 2004] [notice] lb.getWorker() We tried all possible workers 5
[Mon Jun 07 22:26:13 2004] [error] lb_worker.service() all workers in error or 
disabled state
[Mon Jun 07 22:26:13 2004] [error] mod_jk.handler() Error connecting to tomcat 12

The development environments are dev2, dev3 etc and are different virtual hosts on 
server, server:

Workers2.properties
[logger.apache2]
level=DEBUG

[shm]
file=/usr/local/apache/logs/shm.file
size=1048576

# Example socket channel, override port and host.
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1

# define the server worker
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009

# Added for dev2
[channel.socket:localhost:9109]
port=9109
host=127.0.0.1
group=dev2

# define the worker
[ajp13:localhost:9109]
channel=channel.socket:localhost:9109
group=dev2

# new worker
[uri:dev2/*]
group=dev2

The mod_jk-server.conf

VirtualHost server
  ServerName server
  ServerAlias server.company.co.uk
  DocumentRoot /usr/local/tomcat/webapps/server
  ErrorLog logs/server-error_log
  TransferLog logs/server-access_log
  ScriptAlias /cgi-bin /usr/local/tomcat/webapps/server/cgi-bin
  location /*.jsp
JkUriSet worker ajp13:localhost:8009
  /location
  location /servlet/*
JkUriSet worker ajp13:localhost:8009
  /location
  location /manager/*
JkUriSet worker ajp13:localhost:8009
  /location
  location /*.do
JkUriSet worker ajp13:localhost:8009
  /location
/VirtualHost

The mod_jk-dev2.conf
VirtualHost dev2
  ServerName dev2
  ServerAlias dev2.company.co.uk
  DocumentRoot /usr/local/home/dev2/BUILD/htdocs
  ErrorLog logs/dev2-error_log
  TransferLog logs/dev2-access_log
  ScriptAlias /cgi-bin /usr/local/home/dev2/BUILD/htdocs/cgi-bin
  Location /*.jsp
JkUriSet group dev2
  /Location
  Location /servlet/*
JkUriSet group dev2
  /Location
  Location /*.do
JkUriSet group dev2
  /Location
/VirtualHost

Any help would be appreciated as i have trawled the mail archives and googled and 
haven't come up with much to help solve the problem.

Many thanks,
John




Re: apache, mod_jk, tomcat hungs

2004-05-12 Thread Beat De Martin
 Before you restart, what sort of forensics do you do? e.g.
 - check whether the Tomcat process really is unavailable
 - check network connectivity between Apache/Tomcat
 - check limits on the Tomcat and Apache processes, such as number
   of open sockets
My tomcat process is ruunig, I can access it locally.
It doesn't seem taht there are too many tomcat threads.

My workers.properties file has the following parameters:
worker.estudiodb.cachesize=200
worker.estudiodb.cache_timeout=300
worker.estudiodb.socket_keepalive=1
worker.estudiodb.socket_timeout=300

In server.xml I have:
 Ajp13Connector port=8009 tomcatAuthentication=false maxThreads=150
maxSpareThreads=50 minSpareThreads=10 /

In httpd.conf I have:
MaxRequestsPerChild 200
MaxClients 150

Are my settings bad ?
Cheers
Beat De Martin
Zürich, Switzerland

 On Tue, May 11, 2004 at 12:26:47PM +0200, Beat De Martin wrote:
 : I'm using Tomcat 3.3.1, Apache 1.3.27 and mod_jk 1.2.4.
^
 Do you have a test system on which you can try out Tomcat 4.1 or 5?
 Even if you've found a legit Tomcat 3.x bug, IIRC that product is not
 under active development...
 
 
 : Every two days my Tomcat hungs and I have to restart it.
 : Before Tomcat hungs I can see the following in mod_jk.log:
 :  ERROR: can't receive the response message from tomcat, network problems
 or
 : tomcat is down. err=-1
 :   [jk_ajp_common.c (1137)]: Error reading reply from tomcat. Tomcat is
 down
 : or network problems.
 :   [jk_ajp_common.c (1290)]: ERROR: Receiving from tomcat failed,
 recoverable
 : operation. err=0
 :  [jk_ajp_common.c (1309)]: sending request to tomcat failed in send
 loop.
 : err=0
 
 Before you restart, what sort of forensics do you do? e.g.
 - check whether the Tomcat process really is unavailable
 - check network connectivity between Apache/Tomcat
 - check limits on the Tomcat and Apache processes, such as number
   of open sockets
 
 etc., etc., etc.
 
 -QM
 
 -- 
 
 software  -- http://www.brandxdev.net
 tech news -- http://www.RoarNetworX.com
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-- 
Sie haben neue Mails! - Die GMX Toolbar informiert Sie beim Surfen!
Jetzt aktivieren unter http://www.gmx.net/info


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



apache, mod_jk, tomcat hungs

2004-05-11 Thread Beat De Martin
Hello folks
I'm using Tomcat 3.3.1, Apache 1.3.27 and mod_jk 1.2.4.
Every two days my Tomcat hungs and I have to restart it.
Before Tomcat hungs I can see the following in mod_jk.log:
 ERROR: can't receive the response message from tomcat, network problems or
tomcat is down. err=-1
  [jk_ajp_common.c (1137)]: Error reading reply from tomcat. Tomcat is down
or network problems.
  [jk_ajp_common.c (1290)]: ERROR: Receiving from tomcat failed, recoverable
operation. err=0
 [jk_ajp_common.c (1309)]: sending request to tomcat failed in send loop.
err=0

Any ideas ?
Cheers
Beat

-- 
Sie haben neue Mails! - Die GMX Toolbar informiert Sie beim Surfen!
Jetzt aktivieren unter http://www.gmx.net/info


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



Re: apache, mod_jk, tomcat hungs

2004-05-11 Thread Beat De Martin
Thank for being in te same boat ...
Do you mean restarting nightly could help getting less of these locks ?
Kind regards
Beat De Martin
Switzerland

 All I can say is you are not alone. Requests of our sort never seem to 
 be answered, and we've been asking them for months.
 Actually, by being answered I'm not saying that people don't post 
 replies, I just mean that I don't know of anyone who has fixed this 
 issue on their system.
 
 It sure sounds like the same issue that I'm having with mod_jk2 2.0.2, 
 apache 2.0.40, tomcat 4.1.30 or tomcat 4.1.27... but I can't be sure 
 that it is the same issue. My bet is that most of the tomcat developers 
 don't use connectors because they would rather keep things stable, and 
 introducing apache into the mix just means one more point of failure.
 
 Sorry I can't be of more help right now. I've tried using JMeter to 
 reproduce my lockups, and that hasn't helped me yet.
 Is there someone out there who would like to be paid to run a profiler 
 on some of my applications? Please contact me off-list, and if you can 
 solve my issue, I'll post the results to the list... I'm in contact with 
 two or three people from this list that are having the same type of 
 issues, and more requests for help come into the list weekly. We'd all 
 be happy for the help.
 
 Daniel Gibby
 
 Beat De Martin wrote:
 
 Hello folks
 I'm using Tomcat 3.3.1, Apache 1.3.27 and mod_jk 1.2.4.
 Every two days my Tomcat hungs and I have to restart it.
 Before Tomcat hungs I can see the following in mod_jk.log:
  ERROR: can't receive the response message from tomcat, network problems
 or
 tomcat is down. err=-1
   [jk_ajp_common.c (1137)]: Error reading reply from tomcat. Tomcat is
 down
 or network problems.
   [jk_ajp_common.c (1290)]: ERROR: Receiving from tomcat failed,
 recoverable
 operation. err=0
  [jk_ajp_common.c (1309)]: sending request to tomcat failed in send loop.
 err=0
 
 Any ideas ?
 Cheers
 Beat
 
   
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-- 
NEU : GMX Internet.FreeDSL
Ab sofort DSL-Tarif ohne Grundgebühr: http://www.gmx.net/dsl


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



RE: question on using multiple certificates in tomcat

2004-04-21 Thread Martin Alley
Before TLS extension server name indication is implemented in server and
browser (next year?), certificate is determined by which keystore is
used.

Keystore is determined by which connection is used, which means the
certificate selection is driven by the IP address  port number.

A keystore is expected to only have one certificate in it.  This is the
one that is sent.

HTH
Martin

-Original Message-
From: Yanamula, Bharath [mailto:[EMAIL PROTECTED] 
Sent: 21 April 2004 19:46
To: '[EMAIL PROTECTED]'
Subject: question on using multiple certificates in tomcat 

We have a Tomcat which is running with one servlet on https. This
application uses one certificate, for authentication purposes. 
 
Now we are planning to develop another servlet to be placed on the same
engine. We envisage this also to use a certificate. But the one it would
use
is a different one. 
 
I am new to this security and am trying to see what certificate would be
sent when. That is, say I sending a https request from the first client
application, would it send all the ertificates? Or would it just resolve
it
based on the name to which it is being sent to?
 
Thanks in advance.

CONFIDENTIALITY NOTICE:  The information in this e-mail is privileged
and
confidential.  Any use, copying or dissemination of any portion of this
e-mail by or to anyone other than the intended recipient(s) is
unauthorized.
If you have received this e-mail in error, please reply to sender and
delete
it from your system immediately.



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



RE: tomcat 4 vs 5 form based container auth filters

2004-04-16 Thread Martin Alley
FYI this is catered for in tomcat 5 with the filter-mapping/dispatcher
element (see servlet 2.4 spec).

Thanks to Bill Barker for the info.

Martin

-Original Message-
From: Martin Alley [mailto:[EMAIL PROTECTED] 
Sent: 13 April 2004 16:35
To: 'Tomcat Users List'
Subject: RE: tomcat 4 vs 5 form based container auth  filters

Anyone?

-Original Message-
From: Martin Alley [mailto:[EMAIL PROTECTED] 
Sent: 12 April 2004 16:42
To: 'Tomcat Users List'
Subject: RE: tomcat 4 vs 5 form based container auth  filters

Thanks Adam

It seems to me that the separation idea is not clear cut.  There is
certainly a down side.  I wonder whether this will stick.

Martin


-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED] 
Sent: 12 April 2004 13:48
To: Tomcat Users List
Subject: Re: tomcat 4 vs 5 form based container auth  filters

I can see Yoav is blitzing the mailing list right now. Perhaps you'll 
get a more authoritative answer from him or the other hardcore tomcat 
people.

One of the problems of excluding filters from the authentication request

is to do with character-encoding in the request - I remember someone 
whose realm included users with user-names containing accented 
characters that had to be converted to the correct character-encoding 
for the realm database. He had used a filter to do it but obviously had 
to find another way.

Adam

On 04/12/2004 02:34 PM Martin Alley wrote:
 Except with form based auth, you want the look at feel to be part of
the
 application?  
 
 What reasons did you hear? :-)
 
 Whilst not knowing the full reasons, it would be nice if there was
some
 config switch to control this, other wise it increases application
 maintainence overhead if you want to change the look and feel.
 
 I'll see if I can find anything in the tc5 release notes on this.
 
 Thanks again
 Martin
 
 
 -Original Message-
 From: Adam Hardy [mailto:[EMAIL PROTECTED] 
 Sent: 12 April 2004 13:13
 To: Tomcat Users List
 Subject: Re: tomcat 4 vs 5 form based container auth  filters
 
 AFAIK it has something to do with providing a clean seperation between

 the authentication (tomcat) and the application (your filter).
 
 I think there were probably several reasons though for it, which 
 outweighed the reasons against, and I have heard a few of them.
 
 
 Adam
 
 On 04/12/2004 01:50 PM Martin Alley wrote:
 
Hi Adam,

Why do you think this behaviour changed from tomcat4 ?

I haven't gone into the full architecture of sitemesh, as yet, but I
know it includes a filter.

Martin

-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED] 
Sent: 12 April 2004 11:26
To: Tomcat Users List
Subject: Re: tomcat 4 vs 5 form based container auth  filters

Yes your observations are correct. It's my understanding that filters 
are not invoked until after authentication. i.e. after the form-based 
login.

I have no experience of site-mesh, but it seems a bit weird anyway to 
put decorations on a page via a filter - surely you should be 
encapsulating that sort of stuff in a JSP or taglib?

Adam

On 04/12/2004 11:02 AM Martin Alley wrote:


Can anyone comment on this?

Thanks
Martin

-Original Message-
From: Martin Alley [mailto:[EMAIL PROTECTED] 
Sent: 09 April 2004 09:53
To: Tomcat Users List
Subject: tomcat 4 vs 5 form based container auth  filters

Hi,

Initial observation indicates that filters get executed when a form

for


form based container auth is served - under tomcat 4, but not under
tomcat 5. 

I'm using sitemesh.  The decorations go on the form based login page
under tomcat 4, but not under tomcat 5. 

I need to do more research, but can any one add to this?

Thanks
Martin





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



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





 
 


-- 
struts 1.2 + tomcat 5.0.19 + java 1.4.2
Linux 2.4.20 Debian


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



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



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



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



RE: SESSION PROBLEM in UNIX

2004-04-15 Thread Martin Alley
Do you know how the session is being tracked in the browser?  Cookie,
url?  Are you saying you use the same browser in each case?  Can you log
the http traffic?

Martin

-Original Message-
From: MUKUND Premchander [mailto:[EMAIL PROTECTED] 
Sent: 15 April 2004 04:26
To: Tomcat Users List
Subject: RE: SESSION PROBLEM in UNIX

hi,

Thank you for your reply and suggestion .
I have only one user and one browser window and I get this problem .
I also like to mention that in the starting of the JSP if I added a line
of code like  session = request.getSession(false),
then I don't get this problem at all .But I am not able to understand
why access to the session variable gives exception 
suddenly after some refresh if I don't do this.Also I checked the  codes
, no session invalidation is done nor a new session is created anywhere.

Thanks and Regards
Mukund

-Original Message-
From: Yansheng Lin [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 15, 2004 2:24 AM
To: 'Tomcat Users List'
Subject: RE: SESSION PROBLEM in UNIX



Hi, How about implementing HttpSessionListener so that you know when
your session is getting created and destroyed?  Also do you have
multiple users running the same jsp?  If you do, you may want to
synchronize that block of code.

Hope this helps:).

-Yan

-Original Message-
From: MUKUND Premchander [mailto:[EMAIL PROTECTED] 
Sent: April 14, 2004 07:41
To: Tomcat Users List
Subject: SESSION PROBLEM in UNIX


Hi,

I have a jsp page which is refreshed atuomatically every 10 seconds.I
get and put values in the session by using the implicit session variable
. Everything works fine for say 2-3 mins after that the implicit session
becomes null and throws a null pointer exception. 

I get a null pointer exception and session is printed as null but even
the if block (session == null) is not executed .

I printed the value of request.getSession(false);.This gives me session
object ,where as the implicit session does not have this after many
refresh interval  

During the first few refreshes both have the same value. 

Also note that this runs fine in Windows ,I get this problem only in
UNIX . I use tomcat 3.2 in unix and view using IE in windows 

I tried in tomcat 4 also I still get the same exception 

FIND below the code in JSP 
try{
  if (session == null){
  System.out.println(session is null:::);
  }
 System.out.println(session3:::+session.toString());
  if (session.isNew()) {
  System.out.println(HI);
 
session.setAttribute(BPRealtimeConstants.C_JPM_SESSION_FAIL_ID,failed)
;
   response.setHeader(Refresh,1; URL=/MCOne/BP/index.html);
   return;
  }
} catch (Exception e) {
   System.out.println(I am in exception );
   System.out.println(I am after hello
+request.getSession(false));
   e.printStackTrace();
}   
 
I am unble to find any resource on the net which might help me identify
the problem ,I am posting this for the second time . Can there be any
difference in session handling when tomcat is run in unix and Windows.
Any inputs will really help me solve this production problem
 
 
Thanks and Regards
Mukund
 
 


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


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



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



RE: tomcat 4 vs 5 form based container auth filters

2004-04-13 Thread Martin Alley
Anyone?

-Original Message-
From: Martin Alley [mailto:[EMAIL PROTECTED] 
Sent: 12 April 2004 16:42
To: 'Tomcat Users List'
Subject: RE: tomcat 4 vs 5 form based container auth  filters

Thanks Adam

It seems to me that the separation idea is not clear cut.  There is
certainly a down side.  I wonder whether this will stick.

Martin


-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED] 
Sent: 12 April 2004 13:48
To: Tomcat Users List
Subject: Re: tomcat 4 vs 5 form based container auth  filters

I can see Yoav is blitzing the mailing list right now. Perhaps you'll 
get a more authoritative answer from him or the other hardcore tomcat 
people.

One of the problems of excluding filters from the authentication request

is to do with character-encoding in the request - I remember someone 
whose realm included users with user-names containing accented 
characters that had to be converted to the correct character-encoding 
for the realm database. He had used a filter to do it but obviously had 
to find another way.

Adam

On 04/12/2004 02:34 PM Martin Alley wrote:
 Except with form based auth, you want the look at feel to be part of
the
 application?  
 
 What reasons did you hear? :-)
 
 Whilst not knowing the full reasons, it would be nice if there was
some
 config switch to control this, other wise it increases application
 maintainence overhead if you want to change the look and feel.
 
 I'll see if I can find anything in the tc5 release notes on this.
 
 Thanks again
 Martin
 
 
 -Original Message-
 From: Adam Hardy [mailto:[EMAIL PROTECTED] 
 Sent: 12 April 2004 13:13
 To: Tomcat Users List
 Subject: Re: tomcat 4 vs 5 form based container auth  filters
 
 AFAIK it has something to do with providing a clean seperation between

 the authentication (tomcat) and the application (your filter).
 
 I think there were probably several reasons though for it, which 
 outweighed the reasons against, and I have heard a few of them.
 
 
 Adam
 
 On 04/12/2004 01:50 PM Martin Alley wrote:
 
Hi Adam,

Why do you think this behaviour changed from tomcat4 ?

I haven't gone into the full architecture of sitemesh, as yet, but I
know it includes a filter.

Martin

-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED] 
Sent: 12 April 2004 11:26
To: Tomcat Users List
Subject: Re: tomcat 4 vs 5 form based container auth  filters

Yes your observations are correct. It's my understanding that filters 
are not invoked until after authentication. i.e. after the form-based 
login.

I have no experience of site-mesh, but it seems a bit weird anyway to 
put decorations on a page via a filter - surely you should be 
encapsulating that sort of stuff in a JSP or taglib?

Adam

On 04/12/2004 11:02 AM Martin Alley wrote:


Can anyone comment on this?

Thanks
Martin

-Original Message-
From: Martin Alley [mailto:[EMAIL PROTECTED] 
Sent: 09 April 2004 09:53
To: Tomcat Users List
Subject: tomcat 4 vs 5 form based container auth  filters

Hi,

Initial observation indicates that filters get executed when a form

for


form based container auth is served - under tomcat 4, but not under
tomcat 5. 

I'm using sitemesh.  The decorations go on the form based login page
under tomcat 4, but not under tomcat 5. 

I need to do more research, but can any one add to this?

Thanks
Martin





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



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





 
 


-- 
struts 1.2 + tomcat 5.0.19 + java 1.4.2
Linux 2.4.20 Debian


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



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



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



RE: tomcat 4 vs 5 form based container auth filters

2004-04-12 Thread Martin Alley
Can anyone comment on this?

Thanks
Martin

-Original Message-
From: Martin Alley [mailto:[EMAIL PROTECTED] 
Sent: 09 April 2004 09:53
To: Tomcat Users List
Subject: tomcat 4 vs 5 form based container auth  filters

Hi,

Initial observation indicates that filters get executed when a form for
form based container auth is served - under tomcat 4, but not under
tomcat 5. 

I'm using sitemesh.  The decorations go on the form based login page
under tomcat 4, but not under tomcat 5. 

I need to do more research, but can any one add to this?

Thanks
Martin





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



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



RE: tomcat 4 vs 5 form based container auth filters

2004-04-12 Thread Martin Alley
Hi Adam,

Why do you think this behaviour changed from tomcat4 ?

I haven't gone into the full architecture of sitemesh, as yet, but I
know it includes a filter.

Martin

-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED] 
Sent: 12 April 2004 11:26
To: Tomcat Users List
Subject: Re: tomcat 4 vs 5 form based container auth  filters

Yes your observations are correct. It's my understanding that filters 
are not invoked until after authentication. i.e. after the form-based 
login.

I have no experience of site-mesh, but it seems a bit weird anyway to 
put decorations on a page via a filter - surely you should be 
encapsulating that sort of stuff in a JSP or taglib?

Adam

On 04/12/2004 11:02 AM Martin Alley wrote:
 Can anyone comment on this?
 
 Thanks
 Martin
 
 -Original Message-
 From: Martin Alley [mailto:[EMAIL PROTECTED] 
 Sent: 09 April 2004 09:53
 To: Tomcat Users List
 Subject: tomcat 4 vs 5 form based container auth  filters
 
 Hi,
 
 Initial observation indicates that filters get executed when a form
for
 form based container auth is served - under tomcat 4, but not under
 tomcat 5. 
 
 I'm using sitemesh.  The decorations go on the form based login page
 under tomcat 4, but not under tomcat 5. 
 
 I need to do more research, but can any one add to this?
 
 Thanks
 Martin
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
struts 1.2 + tomcat 5.0.19 + java 1.4.2
Linux 2.4.20 Debian


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



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



RE: tomcat 4 vs 5 form based container auth filters

2004-04-12 Thread Martin Alley
Except with form based auth, you want the look at feel to be part of the
application?  

What reasons did you hear? :-)

Whilst not knowing the full reasons, it would be nice if there was some
config switch to control this, other wise it increases application
maintainence overhead if you want to change the look and feel.

I'll see if I can find anything in the tc5 release notes on this.

Thanks again
Martin


-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED] 
Sent: 12 April 2004 13:13
To: Tomcat Users List
Subject: Re: tomcat 4 vs 5 form based container auth  filters

AFAIK it has something to do with providing a clean seperation between 
the authentication (tomcat) and the application (your filter).

I think there were probably several reasons though for it, which 
outweighed the reasons against, and I have heard a few of them.


Adam

On 04/12/2004 01:50 PM Martin Alley wrote:
 Hi Adam,
 
 Why do you think this behaviour changed from tomcat4 ?
 
 I haven't gone into the full architecture of sitemesh, as yet, but I
 know it includes a filter.
 
 Martin
 
 -Original Message-
 From: Adam Hardy [mailto:[EMAIL PROTECTED] 
 Sent: 12 April 2004 11:26
 To: Tomcat Users List
 Subject: Re: tomcat 4 vs 5 form based container auth  filters
 
 Yes your observations are correct. It's my understanding that filters 
 are not invoked until after authentication. i.e. after the form-based 
 login.
 
 I have no experience of site-mesh, but it seems a bit weird anyway to 
 put decorations on a page via a filter - surely you should be 
 encapsulating that sort of stuff in a JSP or taglib?
 
 Adam
 
 On 04/12/2004 11:02 AM Martin Alley wrote:
 
Can anyone comment on this?

Thanks
Martin

-Original Message-
From: Martin Alley [mailto:[EMAIL PROTECTED] 
Sent: 09 April 2004 09:53
To: Tomcat Users List
Subject: tomcat 4 vs 5 form based container auth  filters

Hi,

Initial observation indicates that filters get executed when a form
 
 for
 
form based container auth is served - under tomcat 4, but not under
tomcat 5. 

I'm using sitemesh.  The decorations go on the form based login page
under tomcat 4, but not under tomcat 5. 

I need to do more research, but can any one add to this?

Thanks
Martin





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



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


 
 
 


-- 
struts 1.2 + tomcat 5.0.19 + java 1.4.2
Linux 2.4.20 Debian


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



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



RE: tomcat 4 vs 5 form based container auth filters

2004-04-12 Thread Martin Alley
Thanks Adam

It seems to me that the separation idea is not clear cut.  There is
certainly a down side.  I wonder whether this will stick.

Martin


-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED] 
Sent: 12 April 2004 13:48
To: Tomcat Users List
Subject: Re: tomcat 4 vs 5 form based container auth  filters

I can see Yoav is blitzing the mailing list right now. Perhaps you'll 
get a more authoritative answer from him or the other hardcore tomcat 
people.

One of the problems of excluding filters from the authentication request

is to do with character-encoding in the request - I remember someone 
whose realm included users with user-names containing accented 
characters that had to be converted to the correct character-encoding 
for the realm database. He had used a filter to do it but obviously had 
to find another way.

Adam

On 04/12/2004 02:34 PM Martin Alley wrote:
 Except with form based auth, you want the look at feel to be part of
the
 application?  
 
 What reasons did you hear? :-)
 
 Whilst not knowing the full reasons, it would be nice if there was
some
 config switch to control this, other wise it increases application
 maintainence overhead if you want to change the look and feel.
 
 I'll see if I can find anything in the tc5 release notes on this.
 
 Thanks again
 Martin
 
 
 -Original Message-
 From: Adam Hardy [mailto:[EMAIL PROTECTED] 
 Sent: 12 April 2004 13:13
 To: Tomcat Users List
 Subject: Re: tomcat 4 vs 5 form based container auth  filters
 
 AFAIK it has something to do with providing a clean seperation between

 the authentication (tomcat) and the application (your filter).
 
 I think there were probably several reasons though for it, which 
 outweighed the reasons against, and I have heard a few of them.
 
 
 Adam
 
 On 04/12/2004 01:50 PM Martin Alley wrote:
 
Hi Adam,

Why do you think this behaviour changed from tomcat4 ?

I haven't gone into the full architecture of sitemesh, as yet, but I
know it includes a filter.

Martin

-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED] 
Sent: 12 April 2004 11:26
To: Tomcat Users List
Subject: Re: tomcat 4 vs 5 form based container auth  filters

Yes your observations are correct. It's my understanding that filters 
are not invoked until after authentication. i.e. after the form-based 
login.

I have no experience of site-mesh, but it seems a bit weird anyway to 
put decorations on a page via a filter - surely you should be 
encapsulating that sort of stuff in a JSP or taglib?

Adam

On 04/12/2004 11:02 AM Martin Alley wrote:


Can anyone comment on this?

Thanks
Martin

-Original Message-
From: Martin Alley [mailto:[EMAIL PROTECTED] 
Sent: 09 April 2004 09:53
To: Tomcat Users List
Subject: tomcat 4 vs 5 form based container auth  filters

Hi,

Initial observation indicates that filters get executed when a form

for


form based container auth is served - under tomcat 4, but not under
tomcat 5. 

I'm using sitemesh.  The decorations go on the form based login page
under tomcat 4, but not under tomcat 5. 

I need to do more research, but can any one add to this?

Thanks
Martin





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



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





 
 


-- 
struts 1.2 + tomcat 5.0.19 + java 1.4.2
Linux 2.4.20 Debian


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



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



RE: Session behaviour across http/https boundary

2004-04-09 Thread Martin Alley
Hi Bill,

Thanks for clarifying.  

BTW Do you know if this policy in the browser, or if tomcat uses the
refer header to implement it on the server?

Thanks
Martin

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Bill Barker
Sent: 09 April 2004 06:22
To: [EMAIL PROTECTED]
Subject: Re: Session behaviour across http/https boundary


Martin Alley [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi,

 I have a small web app that appears to illustrate the following
 behaviour.
 Session started in http is carried over to https, but session started
in
 https is *not* carried over to http!

 Why?

This is for security reasons (so that it isn't possible to steal
sensitive
information that was entered in via SSL).




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



tomcat 4 vs 5 form based container auth filters

2004-04-09 Thread Martin Alley
Hi,

Initial observation indicates that filters get executed when a form for
form based container auth is served - under tomcat 4, but not under
tomcat 5. 

I'm using sitemesh.  The decorations go on the form based login page
under tomcat 4, but not under tomcat 5. 

I need to do more research, but can any one add to this?

Thanks
Martin





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



Session behaviour across http/https boundary

2004-04-08 Thread Martin Alley
Hi,

I have a small web app that appears to illustrate the following
behaviour.
Session started in http is carried over to https, but session started in
https is *not* carried over to http!

Why?


Web app has 3 pages
Index.jsp
Page2.jsp
Logout.jsp (does session invalidate  forward to index.jsp)

1) go to index.jsp as http (session1)
2) follow https link to page2.jsp (session1)
3) follow https link to logout.jsp 
4) now at https index.jsp with session2 (session2 created in https
world)
5) follow https link to page2.jsp again (session2)
6) follow *http* link to index.jsp (session 3!!!)

I don't understand why session 3 is created.

I read that old browsers don't maintain sessions between http and https;
I'm using Ie6

Can anyone explain this?

Thanks
Martin
PS Code is below.





**Index.jsp
%@ page import=javax.servlet.*, javax.servlet.http.*,
org.apache.commons.logging.*%

html
body
%
HttpServletRequest req = ( HttpServletRequest ) request;
HttpSession mysession = req.getSession(false  );

Log __log = LogFactory.getLog( this.getClass() );
__log.info(index.jsp);
 
__log.info(SessionID=+(mysession==null?null:mysession.getId()));
%
p
SessionID=%=(mysession==null?null:mysession.getId())%br/

/p

p
a
href=%=response.encodeURL(https://localhost:8443/sessiontest/page2.js
p)%page2/a
a
href=%=response.encodeURL(https://localhost:8443/sessiontest/logout.j
sp)%logout/abr/
/p
/body
/html
page2.jsp
%@ page import= javax.servlet.*, javax.servlet.http.*,
org.apache.commons.logging.*%
html
body
%
HttpServletRequest req = ( HttpServletRequest ) request;
HttpSession mysession = req.getSession(false  );

Log __log = LogFactory.getLog( this.getClass() );
__log.info(page2);
 
__log.info(SessionID=+(mysession==null?null:mysession.getId()));

%
p
SessionID=%=(mysession==null?null:mysession.getId())%br/

/p

p
a
href=%=response.encodeURL(http://localhost:8080/sessiontest/index.jsp
)%index page/abr/
a
href=%=response.encodeURL(https://localhost:8443/sessiontest/logout.j
sp)%logout/abr/
/p

/body
/html


*logout.jsp
%@ page import= javax.servlet.*, javax.servlet.http.*,
org.apache.commons.logging.*%
%
HttpServletRequest req = ( HttpServletRequest ) request;
HttpSession mysession = req.getSession(false  );
Log __log = LogFactory.getLog( this.getClass() );
__log.info(logout.jsp);
__log.info(pre invalidate
SessionID=+(mysession==null?null:mysession.getId()));
if (session!=null)
session.invalidate();


__log.info(post
invalidateSessionID=+(mysession==null?null:mysession.getId()));


RequestDispatcher rd =req.getRequestDispatcher(/index.jsp);
rd.forward(req, (HttpServletResponse)response);

%






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



  1   2   3   4   5   6   7   8   9   >