java.io.FileNotFoundException: /var/lib/tomcat5.5/work/Catalina/localhost/admin/SESSIONS.ser (Permission denied)

2008-04-25 Thread Toni Tortosa

Hello,

I've also this error

Apr 25, 2008 7:37:41 AM org.apache.catalina.session.StandardManager doUnload
SEVERE: IOException while saving persisted sessions: 
java.io.FileNotFoundException: 
/var/lib/tomcat5.5/work/Catalina/localhost/admin/SESSIONS.ser 
(Permission denied)
java.io.FileNotFoundException: 
/var/lib/tomcat5.5/work/Catalina/localhost/admin/SESSIONS.ser 
(Permission denied)

   at java.io.FileOutputStream.open(Native Method)
   at java.io.FileOutputStream.(FileOutputStream.java:179)
   at java.io.FileOutputStream.(FileOutputStream.java:70)
   at 
org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:488)
   at 
org.apache.catalina.session.StandardManager.unload(StandardManager.java:462)
   at 
org.apache.catalina.session.StandardManager.stop(StandardManager.java:666)
   at 
org.apache.catalina.core.StandardContext.stop(StandardContext.java:4358)
   at 
org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:892)
   at 
org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1164)

   at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1135)
   at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:312)
   at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)

   at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1054)
   at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1066)
   at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:447)
   at 
org.apache.catalina.core.StandardService.stop(StandardService.java:512)

   at org.apache.catalina.core.StandardServer.stop(StandardServer.java:743)
   at org.apache.catalina.startup.Catalina.stop(Catalina.java:601)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:576)
   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:585)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)

In serveral paths tomcat is trying to search sessions.ser, but I can see 
that it doesn't exist. Is this file created automatically, or maybe an 
error in my tomcat installation?


Deb 4.
Tomcat 5.5.
Java 1.5.

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



RE: Wily Introscope

2008-04-25 Thread Antonio Vidal Ferrer
Hi:

Actually, I have 10 tomcat 5.5 servers running on Solaris 10 (x86), and
using Wily Introscope 7.1.

If there is any doubt I can help you with, please let me know.

Best,



***
Antonio Vidal Ferrer   Globalia Corporación
Empresarial
Senior System Manager  Carretera Arenal Llucmajor km
21.5
Globalia Sistemas y Comunicaciones S.L.    www.globalia-corp.com 
[EMAIL PROTECTED] 07620 Llucmajor - Islas
Baleares – España
T: (0034) 971-178464   T: (0034) 971-178100
M: (0034) 647-995481

***



-Original Message-
From: Fred K [mailto:[EMAIL PROTECTED] 
Sent: viernes, 25 de abril de 2008 4:15
To: Tomcat Users List
Subject: Re: Wily Introscope

Hi,

yes (solaris and linux - no difference)  note that there is some
information about on the http://wilytech.com > community (this peer
support area is open to all customers).

Rgds - Fred
On Thu, Apr 24, 2008 at 6:13 PM, Vance A. Arocho
<[EMAIL PROTECTED]> wrote:
>
> Anyone have any experience using Wily Introscope with Tomcat (version 4.1)
> running under Solaris ?
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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


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



Re: Runtime created files not accessible.Some progress.

2008-04-25 Thread Andreas


One big thnx to all of you who have shown interest in my situation.

There has been some "progress"...

Marcus, I didnt try your code, since the problem doesnt occur just with 
java, but also

if i manually create a new folder/file in windows while the server is up.
I get same problem.

The other thing I noticed is that, if i create new folder/file in windows 
environment,
in the ROOT context path, where there are already applications running on 
the server,

then the server DOES SEE THEM.
for example, there is this path:C:\Program Files\Apache Software 
Foundation\Tomcat 6.0\webapps\ROOT

and i create the folder a and the file b.txt,
then i can give the url: http://localhost:8080/a/b.txt
and tomcat DOES OPEN IT!!!

The problem exists with all kind of web applications created with NetBEans!!
Not particularly JSF, since I also had it with simple JSP...

Any idea what kind of configuration and in which file could cause this 
thing...???

Could it be that i dont form the URL properly maybe???

Thank you all very very much.

Andreas. 



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



Re: Default servlet doesn't encode URI on redirect?

2008-04-25 Thread Benoit Maisonny

Christopher Schultz wrote:


Benoit,

Benoit Maisonny wrote:
| I suspect someone forgot to encode the URI in the Location: HTTP header
| on the 302 response, but maybe there is something missing in our
| configuration?

What is the default character set of the running JVM?


UTF-8, according to java.nio.charset.Charset.defaultCharset().name().
The JVM is a 1.6.0_03, BTW.

Benoit



- -chris




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



Re: need help with "connectionTimeout" and "connection_pool_timeout"

2008-04-25 Thread Rainer Jung

Hello Pavel,

Pavel Pragin wrote:

1)I am having an issue withTomcat running out of threads it seems:


OS? Versions?


ps -dfm | grep tomc

tomcat   16983 1  0 Apr23 ?00:01:39 /usr/java/bin/java
-Xmx2000m -Djava.awt.headless=true
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties
-Djava.endorsed.dirs=/opt/tomcat/endorsed -classpath
:/opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/commons-logging-api.jar
-Dcatalina.base=/opt/tomcat -Dcatalina.home=/opt/tomcat
-Djava.io.tmpdir=/opt/tomcat/temp org.apache.catalina.startup.Bootstrap
start

tomcat   - -  0 Apr23 -00:00:14 -

tomcat   - -  0 Apr23 -00:00:00 -

tomcat   - -  0 Apr23 -00:00:00 -

tomcat   - -  0 Apr23 -00:00:00 -

tomcat   - -  0 Apr23 -00:00:00 -

tomcat   - -  0 Apr23 -00:00:03 -

tomcat   - -  0 Apr23 -00:00:00 -

tomcat   - -  0 Apr23 -00:00:00 -

tomcat   - -  0 Apr23 -00:00:00 -

tomcat   - -  0 Apr23 -00:00:00 -

tomcat   - -  0 Apr23 -00:00:23 -

...

70 hreads and up


70 threads is not much. There should in general be no problem with such 
low numbers. If you really need them is another question ;)



2)It looks like tomcat is not closing idle connections. I read there are
2 parameters that I can tweak idle connection time out with.  I think
its "connectionTimeout" and "connection_pool_timeout".



I know where to set "connectionTimeout" it's my server.xml, but not sure
about not sure about "connection_pool_timeout". What's the difference
between these 2 parameters?


connectionTimeout is the Tomcat side and applies to Tomcat's connectors.
connection_pool_timeout is only used, in case you front your tomcat with 
a web server as a reverse proxy *and* you connect the web server and 
Tomcat with mod_jk (httpd) or the isapi or nsapi plugin derived from 
mod_jk using the AJP protocol (not: http). In this case you can set 
connection_pool_timeout in the mod_jk configuration of the web server 
(usually workers.properties).



Snippet from my server.xml file:




So this is an http connector, unrelated to mod_jk and thus unrelated to 
connection_pool_timeout.


If you really think, that you need less threads than 70, take a thread 
dump of the Tomcat JVM (kill -QUIT). It will got to catalina.out and 
tell you, what those threads are doing/waiting for.



Thank a million


Regards,

Rainer


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



Re: Runtime created files not accessible.SOLUTION FINALLY!!!

2008-04-25 Thread Andreas

ONCE AGAIN THNX TO ALL!

It turned out that NetBeans deployment in Tomcat was destroying 
everything


The solution was to clean and build the project with Netbeans, but manuall 
deploy the war file from

the Tomcat Manager...

Now everything works as it should...

I just can't believe the frustration and waste of time NetBeans stupuid 
deploying mechanisms have caused me...


So to anyone who might have the same situation, be careful...

Take care all and keep up the good work and the healthy supporting IT 
community

that saves people's lives :)

Best Regards,

Andreas, Greece.


- Original Message - 
From: "Andreas" <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Friday, April 25, 2008 10:38 AM
Subject: Re: Runtime created files not accessible.Some progress.




One big thnx to all of you who have shown interest in my situation.

There has been some "progress"...

Marcus, I didnt try your code, since the problem doesnt occur just with 
java, but also

if i manually create a new folder/file in windows while the server is up.
I get same problem.

The other thing I noticed is that, if i create new folder/file in windows 
environment,
in the ROOT context path, where there are already applications running on 
the server,

then the server DOES SEE THEM.
for example, there is this path:C:\Program Files\Apache Software 
Foundation\Tomcat 6.0\webapps\ROOT

and i create the folder a and the file b.txt,
then i can give the url: http://localhost:8080/a/b.txt
and tomcat DOES OPEN IT!!!

The problem exists with all kind of web applications created with 
NetBEans!!

Not particularly JSF, since I also had it with simple JSP...

Any idea what kind of configuration and in which file could cause this 
thing...???

Could it be that i dont form the URL properly maybe???

Thank you all very very much.

Andreas.

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





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



RES: Runtime created files not accessible.SOLUTION FINALLY!!!

2008-04-25 Thread Milanez, Marcus

Here comes NetBeans to 'save' the day... I had a similar problem working
on a Swing project... My non java files kept being excluded all the
time... 

-Mensagem original-
De: Andreas [mailto:[EMAIL PROTECTED] 
Enviada em: sexta-feira, 25 de abril de 2008 07:42
Para: Tomcat Users List
Assunto: Re: Runtime created files not accessible.SOLUTION FINALLY!!!

ONCE AGAIN THNX TO ALL!

It turned out that NetBeans deployment in Tomcat was destroying
everything

The solution was to clean and build the project with Netbeans, but
manuall deploy the war file from the Tomcat Manager...

Now everything works as it should...

I just can't believe the frustration and waste of time NetBeans stupuid
deploying mechanisms have caused me...

So to anyone who might have the same situation, be careful...

Take care all and keep up the good work and the healthy supporting IT
community that saves people's lives :)

Best Regards,

Andreas, Greece.

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



RE: java.io.FileNotFoundException: /var/lib/tomcat5.5/work/Catalina/localhost/admin/SESSIONS.ser(Permission denied)

2008-04-25 Thread Caldarale, Charles R
> From: Toni Tortosa [mailto:[EMAIL PROTECTED] 
> Subject: java.io.FileNotFoundException: 
> /var/lib/tomcat5.5/work/Catalina/localhost/admin/SESSIONS.ser(
> Permission denied)
> 
> Apr 25, 2008 7:37:41 AM 
> org.apache.catalina.session.StandardManager doUnload
> SEVERE: IOException while saving persisted sessions: 
> java.io.FileNotFoundException: 
> /var/lib/tomcat5.5/work/Catalina/localhost/admin/SESSIONS.ser 
> (Permission denied)

Tomcat is apparently not running with a uid that has access to that
path.  You need to fix that, either by changing the ownership and
permissions on tomcat5.5/work, or running Tomcat under a more
appropriate userid.

 - Chuck


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

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



RE: Debian 4.0. and java 6

2008-04-25 Thread Caldarale, Charles R
> From: Toni Tortosa [mailto:[EMAIL PROTECTED] 
> Subject: Debian 4.0. and java 6
> 
> Well, I tried to install java6 in my debian by means of backports 
> unstable

Why don't you install a real JVM download from the Sun web site?  You
should remove the existing one first to avoid confusion.

Alternatively, when you build on your JDK 6 platform, set the target for
1.5 to allow such classes to be used on your existing server JVM.

(This is all basic Java, nothing to do with Tomcat.)

 - Chuck


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

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



RE: Share session cookie across subdomains

2008-04-25 Thread Zach Cox

Hi Matthias - Unfortunately I think the Response class is just as ill-suited
for wrapping/extending as the Request class is.  Which boggles my mind -
isn't wrapping the Request and/or Response one of the primary intended
usages of Filters & Valves?  The Servlet API provides
HttpServletRequestWrapper and HttpServletResponseWrapper just for that
purpose.  But because Tomcat adds a ton of extra stuff in their Request &
Response implementations those wrappers are useless.

Thanks,
Zach



Reich, Matthias wrote:
> 
> Hi,
> 
> I haven't thought about the idea in detail, but would it be possible to
> wrap the response?
> The wrapper would have to ensure that cookie replacement is applied
> before any data is written to the output stream or writer.
> A remaining issue would be that encoded (redirect-) URLs in the response
> must also be modified.
> 
> -- Matthias
> 
> -Original Message-
> From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, April 23, 2008 9:51 PM
> To: Tomcat Users List
> Subject: Re: Share session cookie across subdomains
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Zach,
> 
> Zach Cox wrote:
> | Hi Chris - I'm not sure what this will accomplish:
> |
> | public Request(Request wrapped)
> | {
> | ~this.wrapped = wrapped;
> | }
> |
> | public whatever doWhatever(args)
> | {
> | ~super.doWhatever(args);
> | }
> |
> | 1) this.wrapped is never used so what's the point of saving it?
> 
> Sorry, I meant "wrapper.doWhatever(args)";
> 
> I've taken a closer look at this class and my suggestion is impossible
> as there is a final method in the class. :(
> 
> Looks like valves are not nearly as useful as they should be. double :(
> 
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iEYEARECAAYFAkgPkzoACgkQ9CaO5/Lv0PB1fgCgutaBFqLgjPK2H16yWJ04YxAn
> D3oAn0eLFzc8sHiWft3yKvtxFIbRLryI
> =hwi6
> -END PGP SIGNATURE-
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Share-session-cookie-across-subdomains-tp16787390p16894923.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Could not load java.lang.Object.

2008-04-25 Thread Jaime Schettini
Everytime I start Tomcat, I get this info: "Could not load
java.lang.Object". I'm using Tomcat 6.0.14 embedded in NetBeans + Hibernate
+ JSF1.2 + Richfaces 3.2.0.
First of all I thought that I was missing some annotated class in
hibernate.cfg.xml, but I filled it with all my classes and the info is still
appearing. What do I have to do to make it desappear?

Thanks in advance.

Below is the full stacktrace:

INFO: Illegal access: this web application instance has been stopped
already.  Could not load java.lang.Object.  The eventual following stack
trace is caused by an error thrown for debugging purposes as well as to
attempt to terminate the thread which caused the illegal access, and has no
functional impact.
java.lang.IllegalStateException
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1244)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
at
com.sun.faces.application.ConverterPropertyEditorFactory$DisposableClassLoader.loadClass(ConverterPropertyEditorFactory.java:447)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.newInstance0(Class.java:326)
at java.lang.Class.newInstance(Class.java:308)
at
java.beans.PropertyEditorManager.findEditor(PropertyEditorManager.java:79)
at
com.sun.faces.application.ApplicationImpl.addPropertyEditorIfNecessary(ApplicationImpl.java:652)
at
com.sun.faces.application.ApplicationImpl.addConverter(ApplicationImpl.java:623)
at
com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:754)
at
com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:505)
at
com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:402)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
at
org.apache.catalina.core.StandardContext.reload(StandardContext.java:3086)
at
org.apache.catalina.manager.ManagerServlet.reload(ManagerServlet.java:912)
at
org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:358)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:196)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)


Tomcat -- manager

2008-04-25 Thread Khurram H Khan
I need to know if Tomcat is deployed on a production environment, how 
can I use its manager to stop and start a web application. I have 
created a role named manager and its username and password. When I go to 
URL http://IP_ADDRESS/manager/stop?path=/My_WebAp, it asks me for a 
username and password. And I provide the username and password for the 
role manager but it keeps asking me for username and password. I have 
done the same thing with another tomcat which is accessed through vpn on 
port 8080 and that one works fine, I supply a username and passowrd and 
it accepts the username and password and stops/starts my web application.


I would appreciate it if someone could guide what I need to do 
differently in the case of production environment where tomcat is 
accessed through port 80.


Regards
Khurram


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



Re: Tomcat -- manager

2008-04-25 Thread Mark Thomas

Khurram H Khan wrote:
I would appreciate it if someone could guide what I need to do 
differently in the case of production environment where tomcat is 
accessed through port 80.


Nothing. Something in your production configuration is wrong/different. 
Maybe you are using a different realm (since the memory realm is for 
testing, not production use).


Mark


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



Re: Default servlet doesn't encode URI on redirect?

2008-04-25 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Benoit,

Benoit Maisonny wrote:
| Christopher Schultz wrote:
|>
|> Benoit,
|>
|> Benoit Maisonny wrote:
|> | I suspect someone forgot to encode the URI in the Location: HTTP header
|> | on the 302 response, but maybe there is something missing in our
|> | configuration?
|>
|> What is the default character set of the running JVM?
|
| UTF-8, according to java.nio.charset.Charset.defaultCharset().name().
| The JVM is a 1.6.0_03, BTW.

How about checking the value of the system property "file.encoding"?

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

iEYEARECAAYFAkgR2LoACgkQ9CaO5/Lv0PAqTQCfZSxBip+lUCInkgCdSOnKlx0V
w3kAoKEy/5rMxJVe+Y2wUIRa0+Pk3w3e
=2jSq
-END PGP SIGNATURE-

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



Re: Debian 4.0. and java 6

2008-04-25 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Toni,

Toni Tortosa wrote:
| I have compiled openbravo software in my local laptop with tomcat 5.5.
| and java 6

[snip]

| My server is debian and it runs tomcat 5.5. and java 5.

There's your problem: you are trying to run classes compiled using a
newer compiler (Java 6) with an older JVM (Java 5).

| Must I have modify something else to do run tomcat 5.5 with java 6 in my
| Debian 4 server? Somebody have tried this?

As Chuck suggests, download Sun's JVM and install it yourself, rather
than using Debian's package-managed versions. It doesn't look like Sun's
JDK or JRE 1.6.x are available through apt-get. If you want to know more
about running Debian's package on Debian, you should ask someone at Debian.

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

iEYEARECAAYFAkgR2/gACgkQ9CaO5/Lv0PARMwCcCNdaPIBWu2ywRFoPuDfR4b06
+z0AmgP3Ql01xdebeUH4uZO92MH2svOw
=mb+1
-END PGP SIGNATURE-

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



Re: Share session cookie across subdomains

2008-04-25 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Zach,

Zach Cox wrote:
| Hi Matthias - Unfortunately I think the Response class is just as
ill-suited
| for wrapping/extending as the Request class is.  Which boggles my mind -
| isn't wrapping the Request and/or Response one of the primary intended
| usages of Filters & Valves?

Filters, yes. Apparently, not Valves :(

I wonder if the Tomcat devs would accept a patch to change this.

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

iEYEARECAAYFAkgR3IUACgkQ9CaO5/Lv0PAKGwCfYGKXcA0VEKLLkp2ilAnlYy/E
rtwAoKCxanMCJbnW/zG3wd16254bnWX/
=1HA0
-END PGP SIGNATURE-

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



Re: Could not load java.lang.Object.

2008-04-25 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jaime,

Jaime Schettini wrote:
| Everytime I start Tomcat, I get this info: "Could not load
| java.lang.Object". I'm using Tomcat 6.0.14 embedded in NetBeans +
Hibernate
| + JSF1.2 + Richfaces 3.2.0.

What OS? What JDK/JRE? Did you install it yourself? If so, how?

Are you setting a CLASSPATH environment variable?

What happens if you remove your webapp from the deployment directory?
Does Tomcat start up correctly in that case?

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

iEYEARECAAYFAkgR3YoACgkQ9CaO5/Lv0PBBwACfdqV/Lk8qDHuQkPXGg6uKDJQM
TXMAnRUAAxAAqJdbf5ONEaqPB4g0dPY9
=PeJF
-END PGP SIGNATURE-

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



Realm/active directory: How do you search for users in different organization?

2008-04-25 Thread Thierry Lam
I'm currently using the following realm configuration(Tomcat 5.5) and it's 
working fine:

   ldap://domain.com";
referrals="follow"
userBase="DC=domain,DC=com"
userSearch="(sAMAccountName={0})"
userSubtree="true"
allRolesMode="strictAuthOnly"
   />

However, I want to set it up so that I can refine my search in the following 
two specific locations only:

OU=Mails,DC=domain,DC=com
OU=Services,DC=domain,DC=com

How can I use Realm to do a search in the above two locations only?

Thierry

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



Re: Realm/active directory: How do you search for users in different organization?

2008-04-25 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Thierry,

Thierry Lam wrote:
| I'm currently using the following realm configuration(Tomcat 5.5) and
| it's working fine:
|
|ldap://domain.com";
| referrals="follow"
| userBase="DC=domain,DC=com"
| userSearch="(sAMAccountName={0})"
| userSubtree="true"
| allRolesMode="strictAuthOnly"
|/>
|
| However, I want to set it up so that I can refine my search in the
| following two specific locations only:
|
| OU=Mails,DC=domain,DC=com
| OU=Services,DC=domain,DC=com
|
| How can I use Realm to do a search in the above two locations only?

You should just have to modify your userSearch to include a more complex
search specification. Something like:

userSearch="(&(sAMAccount={0})(|(OU=Mails)(OU=Services))"

Hope that helps,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgR5D8ACgkQ9CaO5/Lv0PDxuACgqtIrDRMJYPieKSPP0Aa1RTY5
W+0AnjPDE1cPT+QLltLx/NUNpNV58zOi
=RR1i
-END PGP SIGNATURE-

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



Re: Realm/active directory: How do you search for users in different organization?

2008-04-25 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Thierry,

Christopher Schultz wrote:
| userSearch="(&(sAMAccount={0})(|(OU=Mails)(OU=Services))"

Hmm... that might not work. See the last comment on this page:
http://confluence.atlassian.com/display/DEV/How+to+write+a+LDAP+search+filter

Sorry :(

- -chris

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

iEYEARECAAYFAkgR5JcACgkQ9CaO5/Lv0PB1ygCgpwC5uNOl9a94Kt9Nqo2/6hR9
dc8An3Dzgbpo5M5sZFjqOdc+PBi1iTjS
=tEE5
-END PGP SIGNATURE-

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



RE: Wily Introscope

2008-04-25 Thread Vance A. Arocho
Fred and Antonio, thanks for responding.

I'm working with one of the Unix admins in my department, and will ask him
if he can try the wileytech.com site, since he should have a customer login
ID.

We tried updating one of the shell scripts for our Tomcat server, and now
it refuses to start up again, here are the most recent messages found in
the 'console.hist' file:

  HISTTIME_1208811683
  Failed to load Main Class: org.apache.catalina.startup.Bootstrap
  HISTTIME_1208897601
  Exception in thread "main" java.lang.NoClassDefFoundError:
WILY_JAVA_OPTIONS

The 'Failed to load Main Class' message also appears as the only message in
the 'console.dat' log file.




   
 "Antonio Vidal
 Ferrer"   
 <[EMAIL PROTECTED]  To 
 obalia-sistemas.c "'Tomcat Users List'"   
 om>  
cc 
 04/25/2008 03:19  
 AMSubject 
   RE: Wily Introscope 
   
 Please respond to 
   "Tomcat Users   
   List"   
 <[EMAIL PROTECTED] 
 che.org>  
   
   




Hi:

Actually, I have 10 tomcat 5.5 servers running on Solaris 10 (x86), and
using Wily Introscope 7.1.

If there is any doubt I can help you with, please let me know.

Best,




***
Antonio Vidal Ferrer   Globalia Corporación
Empresarial
Senior System Manager  Carretera Arenal Llucmajor
km
21.5
Globalia Sistemas y Comunicaciones S.L.    www.globalia-corp.com
[EMAIL PROTECTED] 07620 Llucmajor - Islas
Baleares – España
T: (0034) 971-178464   T: (0034) 971-178100
M: (0034) 647-995481


***



-Original Message-
From: Fred K [mailto:[EMAIL PROTECTED]
Sent: viernes, 25 de abril de 2008 4:15
To: Tomcat Users List
Subject: Re: Wily Introscope

Hi,

yes (solaris and linux - no difference)  note that there is some
information about on the http://wilytech.com > community (this peer
support area is open to all customers).

Rgds - Fred
On Thu, Apr 24, 2008 at 6:13 PM, Vance A. Arocho
<[EMAIL PROTECTED]> wrote:
>
> Anyone have any experience using Wily Introscope with Tomcat (version
4.1)
> running under Solaris ?
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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


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


IMPORTANT NOTICE:  This e-mail and any attachments may contain confidential or 
sensitive information which is, or may be, legally privileged or otherwise 
protected by law from further disclosure.  It is intended only for the 
addressee.  If you received this in error or from someone who was not 
authorized to send it to you, please do not distribute, copy or use it or any 
attachments.  Please notify the sender immediately by reply e-mail and delete 
this from your system. Thank you for your cooperation.



Fw: Wily Introscope

2008-04-25 Thread Vance A. Arocho

There's two versions of the 'setenv.sh' script that reference a
'WILY_JAVA_OPTIONS' environment variable, I'll check with the Unix admin
I'm working with to see to which one he tried.


- Forwarded by Vance A. Arocho/BHNSM/ISHSG/DIVADMIN/DOH on 04/25/2008
10:11 AM -
   
 Vance A.  
 Arocho/BHNSM/ISHS 
 G/DIVADMIN/DOH To 
   "Tomcat Users List" 
 04/25/2008 10:07 
 AM cc 
   
   Subject 
   RE: Wily Introscope(Document link:  
   Vance A. Arocho)
   
   
   
   
   
   



Fred and Antonio, thanks for responding.

I'm working with one of the Unix admins in my department, and will ask him
if he can try the wileytech.com site, since he should have a customer login
ID.

We tried updating one of the shell scripts for our Tomcat server, and now
it refuses to start up again, here are the most recent messages found in
the 'console.hist' file:

  HISTTIME_1208811683
  Failed to load Main Class: org.apache.catalina.startup.Bootstrap
  HISTTIME_1208897601
  Exception in thread "main" java.lang.NoClassDefFoundError:
WILY_JAVA_OPTIONS

The 'Failed to load Main Class' message also appears as the only message in
the 'console.dat' log file.




   
 "Antonio Vidal
 Ferrer"   
 <[EMAIL PROTECTED]  To 
 obalia-sistemas.c "'Tomcat Users List'"   
 om>  
cc 
 04/25/2008 03:19  
 AMSubject 
   RE: Wily Introscope 
   
 Please respond to 
   "Tomcat Users   
   List"   
 <[EMAIL PROTECTED] 
 che.org>  
   
   




Hi:

Actually, I have 10 tomcat 5.5 servers running on Solaris 10 (x86), and
using Wily Introscope 7.1.

If there is any doubt I can help you with, please let me know.

Best,




***
Antonio Vidal Ferrer   Globalia Corporación
Empresarial
Senior System Manager  Carretera Arenal Llucmajor
km
21.5
Globalia Sistemas y Comunicaciones S.L.    www.globalia-corp.com
[EMAIL PROTECTED] 07620 Llucmajor - Islas
Baleares – España
T: (0034) 971-178464   T: (0034) 971-178100
M: (0034) 647-995481


***



-Original Message-
From: Fred K [mailto:[EMAIL PROTECTED]
Sent: viernes, 25 de abril de 2008 4:15
To: Tomcat Users List
Subject: Re: Wily Introscope

Hi,

yes (solaris and linux - no difference)  note that there is some
information about on the http://wilytech.com > community (this peer
support area is open to all customers).

Rgds - Fred
On Thu, Apr 24, 2008 at 6:13 PM, Vance A. Arocho
<[EMAIL PROTECTED]> wrote:
>
> Anyone have any experience using Wily Introscope with Tomcat (version
4.1)
> running under Solaris ?
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To

RE: Realm/active directory: How do you search for users in different organization?

2008-04-25 Thread Thierry Lam
Does anyone know how I can specify two different realms so that each one of 
them search a different organization?

From: Christopher Schultz [EMAIL PROTECTED]
Sent: Friday, April 25, 2008 10:03 AM
To: Tomcat Users List
Subject: Re: Realm/active directory: How do you search for users in different 
organization?

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Thierry,

Christopher Schultz wrote:
| userSearch="(&(sAMAccount={0})(|(OU=Mails)(OU=Services))"

Hmm... that might not work. See the last comment on this page:
http://confluence.atlassian.com/display/DEV/How+to+write+a+LDAP+search+filter

Sorry :(

- -chris

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

iEYEARECAAYFAkgR5JcACgkQ9CaO5/Lv0PB1ygCgpwC5uNOl9a94Kt9Nqo2/6hR9
dc8An3Dzgbpo5M5sZFjqOdc+PBi1iTjS
=tEE5
-END PGP SIGNATURE-

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


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



Re: Mini HOW-TO: Tomcat as a service on Windows Server 2003 64-bit edition

2008-04-25 Thread Swapnil.Kale

Hey folks,
Finally i found the one i wanted. Did a google recently and found this: If
you are looking for 64 bit amd exe for tomcat here is the solution.

Background

To install Tomcat in a 64bit architecture, download the ZIP installer from
the Apache web site and unzipped.

At this point
•   Tomcat can be started by using startup.bat or shutdown using 
shutdown.bat 
•   Tomcat can not be used as a Windows service since Tomcat6.exe and
Tomcat6w.exe are intended for 32bit hardware

Steps 

1)  Download from the Apache repository the corresponding version of
Tomcat6.exe and Tomcat6w.exe for your platform

If your platform is AMD64 (This will work with Intel processors based an
AMD64)
http://svn.apache.org/viewvc/tomcat/tc6.0.x/tags/TOMCAT_6_0_16/res/procrun/amd64/

If your platform is Itanium, use
http://svn.apache.org/viewvc/tomcat/tc6.0.x/tags/TOMCAT_6_0_16/res/procrun/ia64/

2)  Rename/save the existing Tomcat6.exe and Tomcat6w.exe from your
%CATALINA_HOME%\bin directory 

3)  Move the downloaded copies to %CATALINA_HOME%\bin

4)  From the command prompt, install Tomcat as a service, running the
following command

Service.bat install


5)  Before Tomcat is started, make sure you have allocated enough memory to
Tomcat

Double-click Tomcat6w.exe and set the memory sizes required

6)  Now you can start Tomcat as a service. You could use any of the 
following
methods:

•   From Start  Settings  Control Panel  Administrative Tools  Services
•   Use the General tab in the Apache Tomcat Properties window




Swapnil.Kale wrote:
> 
> Hi there, 
> Thanks a lot for this meaningful info.
> 
> I too have a similar requirement:
> running the Tomcat on 64 bit OS  8G RAM>
> 
> I followed the commands below .
> I installed the 64 bit JRE from Sun, Installed 32 bit tomcat.
> Edited all the necessary values in the registry for the node "Wow6432Node"
> 
> I copied the 64bit compiled exe from bugzilla . 
> 
> However i'm now getting a strange error when i try to run the exe from the
> command line or try to run the tomcat from the services.msc.  
> 
> 
> 
> C:\Tomcat55\bin>tomcat5.exe
> [2007-10-16 17:39:16] [402  prunsrv.c] [error]
> The system cannot find the file specified.
> [2007-10-16 17:39:16] [1246 prunsrv.c] [error]
> Load configuration failed
> 
> C:\Tomcat55\bin>prunsrv.exe
> [2007-10-16 17:41:40] [402  prunsrv.c] [error]
> The system cannot find the file specified.
> [2007-10-16 17:41:40] [1246 prunsrv.c] [error]
> Load configuration failed
> 
> C:\Tomcat55\bin>tomcat5.exe.64bit
> [2007-10-16 17:41:51] [402  prunsrv.c] [error]
> The system cannot find the file specified.
> [2007-10-16 17:41:51] [1246 prunsrv.c] [error]
> Load configuration failed
> 
> However the tomcat5w.exe  runs fine and the service window opens
> up. I tried running the server  from there, but no luck there/
> 
> I confirmed all the entries once again in the registry. 
> 
> Have you encountered similar problem? 
> 
> Please suggest input. I'm stuck now.
> 
> Thanks in advance.
> 
> Swapnil
> 
> 
> 
> 
> 
> 
> Richard Mundell wrote:
>> 
>> Dear all,
>>  
>> While Tomcat will run happily on a 64-bit edition of Windows by running
>> it
>> directly through a 64-bit build of Java, the native Windows "Service"
>> support which is bundled with Tomcat 5.5.x is presently 32-bit only.
>> 
>> The reason to run Tomcat in a 64-bit environment is to run with large
>> memory
>> allocations (we have the requirement to run with around 4GB of heap
>> space).
>> At best you can squeeze about 1.5GB of heap allocation in a Windows
>> 32-bit
>> environment. To run larger than that you'll need a 64-bit CPU and OS.
>> 
>> There's a couple of outstanding 'bugzilla' tickets (35869 & 39327)
>> requesting this support but the Tomcat developers obviously haven't had a
>> chance to build it into the core package yet.
>> 
>> So, in the meantime, for anyone attempting to run Tomcat in 64-bit mode
>> in
>> Windows so save you the pain and extensive Googling to find a solution,
>> here's a (very) brief HOW-TO. (Note that I've got this working on Windows
>> 2003 Server Standard 64-bit edition on an Intel chipset - I'd imagine the
>> same instructions would work fine on AMD environments and XP 64-bit).
>> 
>> 1) Download and install the 64 bit edition of Java for Windows
>> 2) Download and install the 32 bit version of Tomcat 5.5.x for Windows
>> 3) Recompile 'procrun' (which is the binary
>> $CATALINA_ROOT/bin/Tomcat5.exe
>> in the Windows distribution) using the patch listed in Bugzilla ticket
>> 39327
>> (http://issues.apache.org/bugzilla/show_bug.cgi?id=39327) and replace
>> Tomcat5.exe with the newly compiled "prunsrv.exe".
>> 4) Add the registry keys to Windows which are listed at the end of this
>> email (don't forget to adjust them to use your server's paths for the JVM
>> and Tomcat).
>> 5) Using regedit, edit the HKLM\SOFTWARE\Apache Software
>> Foundation\Procrun
>> 2.0\Tomcat5\Parameters\Java\Options and adjust for m

Request Help: Tomcat and Quad core processor

2008-04-25 Thread Suhas Subramanya
Hello,

I need your help and advice in resolving the following SocketException error
I am getting from the catalina.log file.

Apr 14, 2008 8:05:54 AM org.apache.jk.core.MsgContext action
WARNING: Error sending end packet
java.net.SocketException: Software caused connection abort: socket write
error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:518)
at org.apache.jk.common.JkInputStream.endMessage(JkInputStream.java:112)
at org.apache.jk.core.MsgContext.action(MsgContext.java:293)
at org.apache.coyote.Response.action(Response.java:182)
at org.apache.coyote.Response.finish(Response.java:304)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:204)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)

The specifications of the server is:
Dell 2950, 4GB 667 MHz (4x1GB) RAM, Dual Quad Core Xeon Processor,
Windows 2003, IIS 6.0, JDK 1.5.07, Tomcat 5.5.17, ISAPI Redirector 1.2.14

I have another test server on the same subnet with the same specifications
mentioned above except that it has Dual Single Core processor. This server
has no problem.

Please let me know how this issue can be resolved.

Thank you very much for your time.

Regards,
Subram


Re: Realm/active directory: How do you search for users in different organization?

2008-04-25 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Thierry,

Thierry Lam wrote:
| Does anyone know how I can specify two different realms so that each
| one of them search a different organization?

I have no experience with it, but my understanding is that JAASRealm is
capable of utilizing multiple sub-realms.

- -chris

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

iEYEARECAAYFAkgR/6wACgkQ9CaO5/Lv0PDabwCfVrrNq4UarplstmTUNbZQPomP
AxkAoKhWVrXukOV5GEspNIMF7Wrp+6ZL
=/ETM
-END PGP SIGNATURE-

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



Re: simple way to rewrite simple URL portion

2008-04-25 Thread DIGLLOYD INC

I've got another issue--

I want to place an index.jsp file in certain directories that simply  
loads another page eg:



This works fine for a page in the same directory.  But my site uses  
relative links heavily, so if I do this:




All that pages relative links don't work, since they seem to be  
relative to the originating directory, not the parent directory.


I want to use relative links, I have a huge amount of static content,  
so this is a real headache.


Any solution to this?  It seems bizarre that a forward doesn't  
reestablish the correct directory.



Lloyd


On Apr 24, 2008, at 10:57 AM, Ken Bowen wrote:


Take a look at

http://tuckey.org/urlrewrite/

I found it very easy to use for exactly the kind of problem you  
described.


P.S. Your eagles are great.

On Apr 24, 2008, at 12:53 PM, DIGLLOYD INC wrote:

I'm looking for a very very basic URL-rewriting filter--simple text  
substitution.  I suppose I can write my own since the functionality  
I need is so limited, but I was hoping there was something built-in  
in Tomcat.


For past reasons, I get requests that include the path "bike/ 
free".  Right now those all 404 into /errors/error404.html.  The  
bike/free requests will probably stay around for years (hundreds of  
originating links), so I want to permanently map "bike/free" to  
"diglloyd/free" eg:


  http://diglloyd.com/bike/free/...
to:
  http://diglloyd.com/diglloyd/free/...

What's the easiest way to alter any URL containing "bike/free" to  
read "diglloyd/free"?


Lloyd


Lloyd Chambers
http://diglloyd.com

[Mac OS X 10.5.2 Intel, Tomcat 6.0.16]







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



Lloyd Chambers
http://diglloyd.com

[Mac OS X 10.5.2 Intel, Tomcat 6.0.16]





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



Re: Request Help: Tomcat and Quad core processor

2008-04-25 Thread Mark Thomas

Suhas Subramanya wrote:

Please let me know how this issue can be resolved.


Tell your users not to click on the stop button whilst waiting for their 
page to appear.


Mark


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



Re: simple way to rewrite simple URL portion

2008-04-25 Thread Mark Thomas

DIGLLOYD INC wrote:

I've got another issue--


Then start another thread.

Mark


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



Re: Share session cookie across subdomains

2008-04-25 Thread Zach Cox

Again, I'll point out that Tomcat's Request class is not designed properly
for extension and offer these two proposed solutions, both of which would
need to be implemented in core Tomcat source code by Tomcat developers:

1) Let users specify the fully-qualified name of a Request subclass in
server.xml, then instantiate that class any time a Request object is needed. 
Maybe something like this:



Internally, there could be a RequestFactory that any client could get a new
Request object from.  It would either instantiate Request directly if no
 element was specified in server.xml, or instaniate a Request
subclass if one was specified.

2) Provide a copy constructor in the Request class so that Request can be
properly subclassed and any Valve can wrap the Request instance passed-in to
the invoke() method with an instance of the subclass to pass downstream. 
This is the constructor that would be needed:

public Request(Request request)

This constructor would copy all of the passed-in request's state into its
own state, so that this new Request instance can be used further down the
pipeline exactly as the passed-in request would have been.

Thanks,
Zach



Christopher Schultz-2 wrote:
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Zach,
> 
> Zach Cox wrote:
> | Hi Matthias - Unfortunately I think the Response class is just as
> ill-suited
> | for wrapping/extending as the Request class is.  Which boggles my mind -
> | isn't wrapping the Request and/or Response one of the primary intended
> | usages of Filters & Valves?
> 
> Filters, yes. Apparently, not Valves :(
> 
> I wonder if the Tomcat devs would accept a patch to change this.
> 
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iEYEARECAAYFAkgR3IUACgkQ9CaO5/Lv0PAKGwCfYGKXcA0VEKLLkp2ilAnlYy/E
> rtwAoKCxanMCJbnW/zG3wd16254bnWX/
> =1HA0
> -END PGP SIGNATURE-
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Share-session-cookie-across-subdomains-tp16787390p16898364.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Request Help: Tomcat and Quad core processor

2008-04-25 Thread Suhas Subramanya
Hello Mark,

I confirmed that the users do not click on any of the buttons (stop,
refresh, back etc) before the page gets loaded on the browser. The users
have occasionally received the following message on the browser.
"Software caused connection abort: recv failed"

Thank you.
Suhas

On Fri, Apr 25, 2008 at 12:43 PM, Mark Thomas <[EMAIL PROTECTED]> wrote:

> Suhas Subramanya wrote:
>
>> Please let me know how this issue can be resolved.
>>
>
> Tell your users not to click on the stop button whilst waiting for their
> page to appear.
>
> Mark
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


simple JSP redirect to another page -- how to deal with relative URLs

2008-04-25 Thread DIGLLOYD INC
I previously asked about remapping URLs and got some helpful  
responses. In a nutshell, this was recommended:

http://tuckey.org/urlrewrite/

Looks very good for some purposes.

But I also want to solve a much simpler problem--

I have a very large amount of static content (articles), with each  
article in its own directory.  A main Table of Contents links to the  
start page in each directory, which is *not* index.html (eg some-main- 
page.html).  I don't want to rename or change those pages as they have  
world-wide direct links to them--they have to stay as-is.  But I do  
want to insert an index.jsp page without altering any content.


For many of these folders inserting a trival index.jsp solves the  
index-page problem:

<%@ include file="the-main-page.html" %>

(though I do wonder if google consider this unacceptable duplicate  
content)


My pages all use relative links eg "..", "./", etc.  So this works  
***when the page being included is in the same directory**.


But when the include page is in another directory, none of the  
relative links work.  None of these variants do the right thing; any  
referenced images cannot be found.


<%@ include  file="../ReviewInfo.html" %>



The jsp:forward directive seems perfect, but the flaw of not changing  
the current location (eg no "cd" is done first) makes it useless for  
this purpose.  Or does it?  Is there something I'm missing here?


Alternately, is there some other trivial solution?

URL-rewriting is not appropriate in this case; there is no particular  
pattern, just a fair number of specific cases.  I was hoping for a  
simple 1-line index.jsp in each directory.


Lloyd


Lloyd Chambers
http://diglloyd.com

[Mac OS X 10.5.2 Intel, Tomcat 6.0.16]





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



Re: simple JSP redirect to another page -- how to deal with relative URLs

2008-04-25 Thread David kerber

DIGLLOYD INC wrote:
I previously asked about remapping URLs and got some helpful 
responses. In a nutshell, this was recommended:

http://tuckey.org/urlrewrite/

Looks very good for some purposes.

But I also want to solve a much simpler problem--

I have a very large amount of static content (articles), with each 
article in its own directory.  A main Table of Contents links to the 
start page in each directory, which is *not* index.html (eg 
some-main-page.html).  I don't want to rename or change those pages as 
they have world-wide direct links to them--they have to stay as-is.  
But I do want to insert an index.jsp page without altering any content.


For many of these folders inserting a trival index.jsp solves the 
index-page problem:

<%@ include file="the-main-page.html" %>

(though I do wonder if google consider this unacceptable duplicate 
content)


My pages all use relative links eg "..", "./", etc.  So this works 
***when the page being included is in the same directory**.


But when the include page is in another directory, none of the 
relative links work.  None of these variants do the right thing; any 
referenced images cannot be found.


<%@ include  file="../ReviewInfo.html" %>



The jsp:forward directive seems perfect, but the flaw of not changing 
the current location (eg no "cd" is done first) makes it useless for 
this purpose.  Or does it?  Is there something I'm missing here?


Alternately, is there some other trivial solution?

URL-rewriting is not appropriate in this case; there is no particular 
pattern, just a fair number of specific cases.  I was hoping for a 
simple 1-line index.jsp in each directory.
Your examples may be simplified from the real thing, but remember what 
the .'s mean:  a single one means the current folder, and a double means 
the parent of the current folder.  So get into another directory at the 
same level (both subfolders of the same parent folder), you need to go 
up with the double dot, and then back down into the other folder.  For 
example, if you are in folder B, which is a subfolder of A, and you want 
to get into C, which is also a subfolder of A, you need to do:  
../C/myotherpage.html.


HTH
D



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



Re: simple JSP redirect to another page -- how to deal with relative URLs

2008-04-25 Thread DIGLLOYD INC

David,

Yes, I understand how relative paths work.

The problem is that the jsp include directives:
- include an html page that is *not* in the same directory as the jsp  
page;
- the relative links in the included html file are supposed to be  
relative to their own directory not the directory of the JSP.


eg:
/foo/bar/index.jsp
/foo/some-page.html

index.jsp contains


This doesn't work; a link "images/foo.jpg" in some-page.html ends up  
being /foo/bar/images/foo.jpg instead of /foo/images/foo.jpg.


Lloyd

On Apr 25, 2008, at 12:40 PM, David kerber wrote:


DIGLLOYD INC wrote:
I previously asked about remapping URLs and got some helpful  
responses. In a nutshell, this was recommended:

http://tuckey.org/urlrewrite/

Looks very good for some purposes.

But I also want to solve a much simpler problem--

I have a very large amount of static content (articles), with each  
article in its own directory.  A main Table of Contents links to  
the start page in each directory, which is *not* index.html (eg  
some-main-page.html).  I don't want to rename or change those pages  
as they have world-wide direct links to them--they have to stay as- 
is.  But I do want to insert an index.jsp page without altering any  
content.


For many of these folders inserting a trival index.jsp solves the  
index-page problem:

<%@ include file="the-main-page.html" %>

(though I do wonder if google consider this unacceptable duplicate  
content)


My pages all use relative links eg "..", "./", etc.  So this works  
***when the page being included is in the same directory**.


But when the include page is in another directory, none of the  
relative links work.  None of these variants do the right thing;  
any referenced images cannot be found.


<%@ include  file="../ReviewInfo.html" %>



The jsp:forward directive seems perfect, but the flaw of not  
changing the current location (eg no "cd" is done first) makes it  
useless for this purpose.  Or does it?  Is there something I'm  
missing here?


Alternately, is there some other trivial solution?

URL-rewriting is not appropriate in this case; there is no  
particular pattern, just a fair number of specific cases.  I was  
hoping for a simple 1-line index.jsp in each directory.
Your examples may be simplified from the real thing, but remember  
what the .'s mean:  a single one means the current folder, and a  
double means the parent of the current folder.  So get into another  
directory at the same level (both subfolders of the same parent  
folder), you need to go up with the double dot, and then back down  
into the other folder.  For example, if you are in folder B, which  
is a subfolder of A, and you want to get into C, which is also a  
subfolder of A, you need to do:  ../C/myotherpage.html.


HTH
D



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



Lloyd Chambers
http://diglloyd.com

[Mac OS X 10.5.2 Intel, Tomcat 6.0.16]





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



Re: simple JSP redirect to another page -- how to deal with relative URLs

2008-04-25 Thread David Smith
I see the problem.  You could use absolute paths in jsp includes and the 
servlet container would understand them as relative to the webapp's root 
as opposed to the server's root:


Say you have this file layout

webapp
|index.jsp
|article1
|index.jsp
|article1.html
|article2
|index.jsp
|article1.html

article2/index.jsp could simply have file="/article1/article1.html" /> and it would find article1.html in the 
article1 folder.


--David

DIGLLOYD INC wrote:
I previously asked about remapping URLs and got some helpful 
responses. In a nutshell, this was recommended:

http://tuckey.org/urlrewrite/

Looks very good for some purposes.

But I also want to solve a much simpler problem--

I have a very large amount of static content (articles), with each 
article in its own directory.  A main Table of Contents links to the 
start page in each directory, which is *not* index.html (eg 
some-main-page.html).  I don't want to rename or change those pages as 
they have world-wide direct links to them--they have to stay as-is.  
But I do want to insert an index.jsp page without altering any content.


For many of these folders inserting a trival index.jsp solves the 
index-page problem:

<%@ include file="the-main-page.html" %>

(though I do wonder if google consider this unacceptable duplicate 
content)


My pages all use relative links eg "..", "./", etc.  So this works 
***when the page being included is in the same directory**.


But when the include page is in another directory, none of the 
relative links work.  None of these variants do the right thing; any 
referenced images cannot be found.


<%@ include  file="../ReviewInfo.html" %>



The jsp:forward directive seems perfect, but the flaw of not changing 
the current location (eg no "cd" is done first) makes it useless for 
this purpose.  Or does it?  Is there something I'm missing here?


Alternately, is there some other trivial solution?

URL-rewriting is not appropriate in this case; there is no particular 
pattern, just a fair number of specific cases.  I was hoping for a 
simple 1-line index.jsp in each directory.


Lloyd


Lloyd Chambers
http://diglloyd.com

[Mac OS X 10.5.2 Intel, Tomcat 6.0.16]





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




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



Re: simple JSP redirect to another page -- how to deal with relative URLs

2008-04-25 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Lloyd,

DIGLLOYD INC wrote:
| My pages all use relative links eg "..", "./", etc.  So this works
| ***when the page being included is in the same directory**.
|
| But when the include page is in another directory, none of the relative
| links work.  None of these variants do the right thing; any referenced
| images cannot be found.
|
| <%@ include  file="../ReviewInfo.html" %>
| 
| 

This is a very weird way to do things. You should either generate
content /or/ forward. Why are you doing both?

Instead of using a forward, why not do a redirect? That way, the new
request has the correct URL and your relative paths should be correct.

- -chris

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

iEYEARECAAYFAkgSOW4ACgkQ9CaO5/Lv0PCZtgCgwMQ2Nq53WFJV1qA2UtOVT62P
aroAoLf5WOFn4FKM/4PN1TtFukZPSUkI
=/4tC
-END PGP SIGNATURE-

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



Re: simple JSP redirect to another page -- how to deal with relative URLs

2008-04-25 Thread Hassan Schroeder
On Fri, Apr 25, 2008 at 1:00 PM, DIGLLOYD INC <[EMAIL PROTECTED]> wrote:
>
>  The problem is that the jsp include directives:
>  - include an html page that is *not* in the same directory as the jsp page;

I've never -- and that's a long time, web-wise :-) -- liked relative paths
for this reason, among others.

If I were you I'd bite the bullet and fix 'em once and for all.

-- 
Hassan Schroeder  [EMAIL PROTECTED]

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



Re: Tomcat not sending JSESSIONID (servlet session cookie) with new sessions

2008-04-25 Thread Timothy Washington
Yeah. I had to bring that code up to the servlet level and strip it down before 
I saw it. It was buried between a lot of comments. So when you told me to look 
for the differences, it was like in pair-programming where someone points out 
the obvious. I knew it was something obvious!! 

Thanks for the extra brain ;)
Tim


- Original Message 
From: Christopher Schultz <[EMAIL PROTECTED]>
To: Tomcat Users List 
Sent: Thursday, April 24, 2008 12:01:07 PM
Subject: Re: Tomcat not sending JSESSIONID (servlet session cookie) with new 
sessions

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Tim,

Timothy Washington wrote:
| Ok, got it. There was a buried 'response.rest()' call that I didn't
| see before.

response.reset?

- -chris





  __
Looking for the perfect gift? Give the gift of Flickr! 

http://www.flickr.com/gift/

Re: simple JSP redirect to another page -- how to deal with relative URLs

2008-04-25 Thread DIGLLOYD INC

Hassan,

As I said there are other issues.  Making them fixed paths would mean  
I couldn't edit them, copy them (for revisions, etc) without having to  
fix up numerous pages.  And the uses are not only when routed through  
a web server.


Lloyd

On Apr 25, 2008, at 1:08 PM, Hassan Schroeder wrote:

On Fri, Apr 25, 2008 at 1:00 PM, DIGLLOYD INC  
<[EMAIL PROTECTED]> wrote:


The problem is that the jsp include directives:
- include an html page that is *not* in the same directory as the  
jsp page;


I've never -- and that's a long time, web-wise :-) -- liked relative  
paths

for this reason, among others.

If I were you I'd bite the bullet and fix 'em once and for all.

--
Hassan Schroeder  [EMAIL PROTECTED]

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



Lloyd Chambers
http://diglloyd.com

[Mac OS X 10.5.2 Intel, Tomcat 6.0.16]





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



Re: simple JSP redirect to another page -- how to deal with relative URLs

2008-04-25 Thread DIGLLOYD INC

Christopher,

Well, I'm not a web expert, so if there's a better way (redirect) I'm  
all ears.


From what I can find by googling, redirects have a slew of issues of  
their own. But I'm a newbie at this, so I might be misunderstanding.


How would I do a redirect in Tomcat for my stated issue, keeping in  
mind that doing so is case-by-case, not a nice regexp pattern.


Lloyd

On Apr 25, 2008, at 1:05 PM, Christopher Schultz wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Lloyd,

DIGLLOYD INC wrote:
| My pages all use relative links eg "..", "./", etc.  So this works
| ***when the page being included is in the same directory**.
|
| But when the include page is in another directory, none of the  
relative
| links work.  None of these variants do the right thing; any  
referenced

| images cannot be found.
|
| <%@ include  file="../ReviewInfo.html" %>
| 
| 

This is a very weird way to do things. You should either generate
content /or/ forward. Why are you doing both?

Instead of using a forward, why not do a redirect? That way, the new
request has the correct URL and your relative paths should be correct.

- -chris

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

iEYEARECAAYFAkgSOW4ACgkQ9CaO5/Lv0PCZtgCgwMQ2Nq53WFJV1qA2UtOVT62P
aroAoLf5WOFn4FKM/4PN1TtFukZPSUkI
=/4tC
-END PGP SIGNATURE-

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



Lloyd Chambers
http://diglloyd.com

[Mac OS X 10.5.2 Intel, Tomcat 6.0.16]





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



Re: simple JSP redirect to another page -- how to deal with relative URLs

2008-04-25 Thread DIGLLOYD INC
Thanks, I've tried that.  Including with a full path still makes the  
included file relative to the directory in which the jsp resides.



On Apr 25, 2008, at 1:02 PM, David Smith wrote:

I see the problem.  You could use absolute paths in jsp includes and  
the servlet container would understand them as relative to the  
webapp's root as opposed to the server's root:


Say you have this file layout

webapp
|index.jsp
|article1
|index.jsp
|article1.html
|article2
|index.jsp
|article1.html

article2/index.jsp could simply have  and it would find article1.html in the article1  
folder.


--David

DIGLLOYD INC wrote:
I previously asked about remapping URLs and got some helpful  
responses. In a nutshell, this was recommended:

http://tuckey.org/urlrewrite/

Looks very good for some purposes.

But I also want to solve a much simpler problem--

I have a very large amount of static content (articles), with each  
article in its own directory.  A main Table of Contents links to  
the start page in each directory, which is *not* index.html (eg  
some-main-page.html).  I don't want to rename or change those pages  
as they have world-wide direct links to them--they have to stay as- 
is.  But I do want to insert an index.jsp page without altering any  
content.


For many of these folders inserting a trival index.jsp solves the  
index-page problem:

<%@ include file="the-main-page.html" %>

(though I do wonder if google consider this unacceptable duplicate  
content)


My pages all use relative links eg "..", "./", etc.  So this works  
***when the page being included is in the same directory**.


But when the include page is in another directory, none of the  
relative links work.  None of these variants do the right thing;  
any referenced images cannot be found.


<%@ include  file="../ReviewInfo.html" %>



The jsp:forward directive seems perfect, but the flaw of not  
changing the current location (eg no "cd" is done first) makes it  
useless for this purpose.  Or does it?  Is there something I'm  
missing here?


Alternately, is there some other trivial solution?

URL-rewriting is not appropriate in this case; there is no  
particular pattern, just a fair number of specific cases.  I was  
hoping for a simple 1-line index.jsp in each directory.


Lloyd


Lloyd Chambers
http://diglloyd.com

[Mac OS X 10.5.2 Intel, Tomcat 6.0.16]





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




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



Lloyd Chambers
http://diglloyd.com

[Mac OS X 10.5.2 Intel, Tomcat 6.0.16]





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



Re: simple JSP redirect to another page -- how to deal with relative URLs

2008-04-25 Thread Hassan Schroeder
On Fri, Apr 25, 2008 at 1:12 PM, DIGLLOYD INC <[EMAIL PROTECTED]> wrote:

>  As I said there are other issues.  Making them fixed paths would mean I
> couldn't edit them, copy them (for revisions, etc) without having to fix up
> numerous pages.

Right, it's work to fix them -- but you're spending time and effort now
to find a way to work around a standard JSP behavior. Fix 'em once,
do it the right way from now on, you're golden :-)

> And the uses are not only when routed through a web server.

Not sure what that means, but...

FWIW!
-- 
Hassan Schroeder  [EMAIL PROTECTED]

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



Re: simple JSP redirect to another page -- how to deal with relative URLs

2008-04-25 Thread David Smith
Never mind .. I saw your other responses and the best solution is the 
redirect option.  After following the redirect, the browser will have 
the correct URL for calculating the full url of each of the page's 
resources.


--David

David Smith wrote:
I see the problem.  You could use absolute paths in jsp includes and 
the servlet container would understand them as relative to the 
webapp's root as opposed to the server's root:


Say you have this file layout

webapp
|index.jsp
|article1
|index.jsp
|article1.html
|article2
|index.jsp
|article1.html

article2/index.jsp could simply have file="/article1/article1.html" /> and it would find article1.html in 
the article1 folder.


--David

DIGLLOYD INC wrote:
I previously asked about remapping URLs and got some helpful 
responses. In a nutshell, this was recommended:

http://tuckey.org/urlrewrite/

Looks very good for some purposes.

But I also want to solve a much simpler problem--

I have a very large amount of static content (articles), with each 
article in its own directory.  A main Table of Contents links to the 
start page in each directory, which is *not* index.html (eg 
some-main-page.html).  I don't want to rename or change those pages 
as they have world-wide direct links to them--they have to stay 
as-is.  But I do want to insert an index.jsp page without altering 
any content.


For many of these folders inserting a trival index.jsp solves the 
index-page problem:

<%@ include file="the-main-page.html" %>

(though I do wonder if google consider this unacceptable duplicate 
content)


My pages all use relative links eg "..", "./", etc.  So this works 
***when the page being included is in the same directory**.


But when the include page is in another directory, none of the 
relative links work.  None of these variants do the right thing; any 
referenced images cannot be found.


<%@ include  file="../ReviewInfo.html" %>



The jsp:forward directive seems perfect, but the flaw of not changing 
the current location (eg no "cd" is done first) makes it useless for 
this purpose.  Or does it?  Is there something I'm missing here?


Alternately, is there some other trivial solution?

URL-rewriting is not appropriate in this case; there is no particular 
pattern, just a fair number of specific cases.  I was hoping for a 
simple 1-line index.jsp in each directory.


Lloyd


Lloyd Chambers
http://diglloyd.com

[Mac OS X 10.5.2 Intel, Tomcat 6.0.16]





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




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




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



Re: simple JSP redirect to another page -- how to deal with relative URLs

2008-04-25 Thread David Fisher

Seconded.

DIGLLOYD said the following:

From what I can find by googling, redirects have a slew of issues of  
their own. But I'm a newbie at this, so I might be misunderstanding.


The only trouble I've had with redirects is when you redirect to a  
page which redirects to a page which redirects to a page. Browsers  
consider more than a few redirects in a row to be a bad thing and they  
stop. My experience taught me (about 7 years ago) that more then 2 was  
pushing things.


DIGLLOYD are only replacing a single generation of files, as you do  
this "relinking" how many links do you want to "forward" or "redirect"?


Regards,
Dave

On Apr 25, 2008, at 3:27 PM, David Smith wrote:

Never mind .. I saw your other responses and the best solution is  
the redirect option.  After following the redirect, the browser will  
have the correct URL for calculating the full url of each of the  
page's resources.


--David

David Smith wrote:
I see the problem.  You could use absolute paths in jsp includes  
and the servlet container would understand them as relative to the  
webapp's root as opposed to the server's root:


Say you have this file layout

webapp
|index.jsp
|article1
|index.jsp
|article1.html
|article2
|index.jsp
|article1.html

article2/index.jsp could simply have  and it would find article1.html in the article1  
folder.


--David

DIGLLOYD INC wrote:
I previously asked about remapping URLs and got some helpful  
responses. In a nutshell, this was recommended:

http://tuckey.org/urlrewrite/

Looks very good for some purposes.

But I also want to solve a much simpler problem--

I have a very large amount of static content (articles), with each  
article in its own directory.  A main Table of Contents links to  
the start page in each directory, which is *not* index.html (eg  
some-main-page.html).  I don't want to rename or change those  
pages as they have world-wide direct links to them--they have to  
stay as-is.  But I do want to insert an index.jsp page without  
altering any content.


For many of these folders inserting a trival index.jsp solves the  
index-page problem:

<%@ include file="the-main-page.html" %>

(though I do wonder if google consider this unacceptable duplicate  
content)


My pages all use relative links eg "..", "./", etc.  So this works  
***when the page being included is in the same directory**.


But when the include page is in another directory, none of the  
relative links work.  None of these variants do the right thing;  
any referenced images cannot be found.


<%@ include  file="../ReviewInfo.html" %>



The jsp:forward directive seems perfect, but the flaw of not  
changing the current location (eg no "cd" is done first) makes it  
useless for this purpose.  Or does it?  Is there something I'm  
missing here?


Alternately, is there some other trivial solution?

URL-rewriting is not appropriate in this case; there is no  
particular pattern, just a fair number of specific cases.  I was  
hoping for a simple 1-line index.jsp in each directory.


Lloyd


Lloyd Chambers
http://diglloyd.com

[Mac OS X 10.5.2 Intel, Tomcat 6.0.16]





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




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




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





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



Setting Tomcat memory usage

2008-04-25 Thread Chris Richmond
Hello all,

 

I read the documentation on the Tomcat6 site and I have attempted to modify
the max jvm memory settings when tomcat starts up by modifying Catalina.bat,
but it *appears* to have no effect.

 

Here is a summary of the situation and what I have done.

 

I am using Tomcat6 stable release, WinXP, java 1.6

I am running tomcat from zip distribution and not from an installed windows
service.  I am using the startup/shutdown .bat files to start/stop my tomcat
instance 

I have run some test code in a simple web service inside of tomcat to
determine the max memory settings for the JVM that tomcat is using.

 

Runtime rt = Runtime.getRuntime();

return rt.maxMemory();

 

the value that gets returned : 66650112


I shutdown tomcat, and modified Catalina.bat with the following in the
JAVA_OPTS section(I included the surrounding remarks for context)

 

rem   JAVA_OPTS   (Optional) Java runtime options used when the "start",

rem   "stop", or "run" command is executed

set JAVA_OPTS = -Xms512m -Xmx512m

 

I then restarted tomcat, ran my service call above and it still returns the
same value for maxmemory from within my tomcat webservice.

 

>From reading the Tomcat Docs/ FAQ, and Googling I think that I am setting
what I need to set(Catalina.bat), but it seems to have no effect.

 

What resource am I not taking advantage of with this information, or what am
I missing to set the max memory usage in the JVM when Tomcat starts up?

 

Thank you for your time in reading this,

 

Chris



Re: Bending Jasper to My Will

2008-04-25 Thread Gennis Emerson

Andy Clark wrote:


I want Jasper to look for JSP and Tag files in a
specific location (e.g. based on a request param);
and then fall back to a default location if the
file is not found. This would be extremely useful
for skinning a webapp.



We do something a little like this in a database application to allow 
sites to create custom pages on a per-database or per-view level. 
There's a directory of default JSP files which can be overridden by 
creating subdirectories. When the controller servlet is supposed to 
forward to a given JSP, it checks the request for the database and view 
names and first looks for a JSP in jsp//, then in 
jsp/, then defaults to the one in jsp if no custom version was 
found. To allow sites to customize JSPs that are included by the 
standard JSPs, we wrote a custom include tag that does the same lookup.


I'm not sure what you'd do about tag files. Aren't they resolved at page 
compilation time, so you can't change where the tag points to at request 
time? Maybe your application's tag files could include their bodies somehow.


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



Re: simple JSP redirect to another page -- how to deal with relative URLs

2008-04-25 Thread Bill Barker

"DIGLLOYD INC" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Christopher,
>
> Well, I'm not a web expert, so if there's a better way (redirect) I'm  all 
> ears.
>
> From what I can find by googling, redirects have a slew of issues of 
> their own. But I'm a newbie at this, so I might be misunderstanding.
>
> How would I do a redirect in Tomcat for my stated issue, keeping in  mind 
> that doing so is case-by-case, not a nice regexp pattern.
>

If I were given this problem, I'd probably write a Filter that uses a 
properties files to resolve references.  Something like:

public void doFilter(ServletRequest request, ServletResponse response, 
FilterChain chain)
throws IOException, ServletException {
 if(request instanceof HttpServletRequest && response instanceof 
HttpServletResponse) {
  HttpServletRequest hrequest = (HttpServletRequest)request;
  HttpServletResponse hresponse = (HttpServletResponse)response;
  String req = hrequest.getServletPath();
  if(req.length() > 0)
req = req.substring(1).replace('/','.');
  String where = map.get(req);
  if(where != null) {
   hresponse.sendRedirect(where);
   return;
 }
}
chain.doFilter(request, response);
}

> Lloyd
>
> On Apr 25, 2008, at 1:05 PM, Christopher Schultz wrote:
>
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>>
>> Lloyd,
>>
>> DIGLLOYD INC wrote:
>> | My pages all use relative links eg "..", "./", etc.  So this works
>> | ***when the page being included is in the same directory**.
>> |
>> | But when the include page is in another directory, none of the 
>> relative
>> | links work.  None of these variants do the right thing; any  referenced
>> | images cannot be found.
>> |
>> | <%@ include  file="../ReviewInfo.html" %>
>> | 
>> | 
>>
>> This is a very weird way to do things. You should either generate
>> content /or/ forward. Why are you doing both?
>>
>> Instead of using a forward, why not do a redirect? That way, the new
>> request has the correct URL and your relative paths should be correct.
>>
>> - -chris
>>
>> -BEGIN PGP SIGNATURE-
>> Version: GnuPG v1.4.9 (MingW32)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>
>> iEYEARECAAYFAkgSOW4ACgkQ9CaO5/Lv0PCZtgCgwMQ2Nq53WFJV1qA2UtOVT62P
>> aroAoLf5WOFn4FKM/4PN1TtFukZPSUkI
>> =/4tC
>> -END PGP SIGNATURE-
>>
>> -
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
> Lloyd Chambers
> http://diglloyd.com
>
> [Mac OS X 10.5.2 Intel, Tomcat 6.0.16]
>
>
>
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> 




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



Re: Request Help: Tomcat and Quad core processor

2008-04-25 Thread Bill Barker

"Mark Thomas" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Suhas Subramanya wrote:
>> Please let me know how this issue can be resolved.
>
> Tell your users not to click on the stop button whilst waiting for their 
> page to appear.
>

That one should probably be moved down to DEBUG.  It is caused by mod_jk 
being over-aggressive in recycling connections and/or the browser closing 
the connection once all of the content has been sent.  I'll take this one.

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




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



RE: Setting Tomcat memory usage

2008-04-25 Thread Caldarale, Charles R
> From: Chris Richmond [mailto:[EMAIL PROTECTED] 
> Subject: Setting Tomcat memory usage
> 
> set JAVA_OPTS = -Xms512m -Xmx512m

Take out the spaces around the equals sign.  Windows interprets the
above as a setting for "JAVA_OPTS " (note the trailing space) rather
than "JAVA_OPTS", so it will be ignored by the scripts.

 - Chuck


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

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