Replicating session across applications

2004-04-15 Thread Bernhard Slominski
Hi,

I use Tomcat 5.0.19 under Windows 2000 and have different applications
running on one tomcat instance.
When I set a session variable in one application it does not appear in the
other applications.
Is there an easy way to achive that?

Thanks 

Bernhard Slominski
Technical Project Manager

zooplus AG 
Eichenweg 4 RG. 
85774 Unterföhring 
Tel + 49. 89. 95 00 6 - 129
Fax + 49. 89. 95 00 6 - 500

mailto:[EMAIL PROTECTED] 
http://www.zooplus.com 



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



AW: Memory Leak

2004-04-15 Thread Bernhard Slominski
Hi,

I had a simalar problem when not closing database related stuff
(connections, resultsets, statemnts).
Does that apply to your application maybe?

Cheers

Bernhard

-Ursprüngliche Nachricht-
Von: Chanan Braunstein [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 15. April 2004 16:27
An: 'Tomcat Users List'
Betreff: Memory Leak


Hello,
I am having a problem with Tomcat 5.0.19 on windows with JDK 1.4.2_02.
The memory that java.exe is using keeps growing till the point that tomcat
stops responding. 
Using a profiler, doesn't seem to give me any clues. I can see the
memory being used by certain classes go up (mainly char[]) and even reach
all the way to the point that used java heap equals to the java heap, but
then GC kicks in and drops down back to where it was when I started the
test. However, the memory in the task manager keeps going up. For example
right now it is at 717,000 K, even though the heap used is at about 200,000
K. What am I missing here?
My current params are -server -Xrs -Xms356M -Xmx356M - I tried all kinds
of different sizes for the memory but that doesn't really help. Any
suggestions as to where (how) to look to find my memory leak?
 
 
Chanan Braunstein
Knovel Corp.
Web Development Manager
607-773-1840 x672
http://www.knovel.com
 
 

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



AW: Tomcat 5, cross context problem

2004-04-19 Thread Bernhard Slominski
Hi,

I posted the same question, and didn't get an answer, so I just did some
research on my own:

First of all the session is ALWAYS on application scope, this is not an
Tomcat specific behaviour but a requirement of the Specification:
SRV.7.3 Session Scope
HttpSession objects must be scoped at the application (or servlet context)
level.
The underlying mechanism, such as the cookie used to establish the session,
can be
the same for different contexts, but the object referenced, including the
attributes in
that object, must never be shared between contexts by the container.

So there is no way around this, if the sessions were relicated across the
applications it would violate the specification.

When you enable crossConext for your application:
Context crossContext=true docBase=testapp path=/testapp
reloadable=true
/Context

you can get the context for another application:
ServletContext context2 = context.getContext(/testapp);

and set attributes:
context2.setAttribute(test,JSP is great!);

But you cannot get to the session in the other application.

So what you can do is implement the session swapping on your own (Cookies,
via the Database) or merge your applications into one.

Some links from the Sun Forums:
http://forum.java.sun.com/thread.jsp?forum=33thread=259394
http://forum.java.sun.com/thread.jsp?forum=45thread=492484
http://forum.java.sun.com/thread.jsp?forum=33thread=318569

Please correct me, when I was wrong!

Cheers Bernhard


-Ursprüngliche Nachricht-
Von: Rainald Suchan [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 16. April 2004 11:50
An: [EMAIL PROTECTED]
Betreff: Tomcat 5, cross context problem


Hi,

I have 2 web applications, a JSP and a Servlet, that are in differed
contexts. For both I have set cross context to true. In the JSP I put
some attributes in the session and use a RequestDispatcher and call the
include() function to pass the request to the servlet. In the servlet I
get these attributes out of the session and put some other attributes in
the session. After returning to the JSP I get these new attributes again
out of the session. This all works ok with Tomcat 4. But now I tried
this with Tomcat 5.0.16 and the session passed between the two webapps
don't have the attributes in it any more in the other context. That
means If I put an attribute in the JSP in the session and get this
session back in the Servlet then this session doesn't contain my
attribute any more.
Is that a known issue with Tomcat 5?
Does anybody have a solution for this problem?

Regards

Rainald

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



AW: Tomcat 5 : java.lang.OutOfMemoryError

2004-04-20 Thread Bernhard Slominski
Maybe your query just returns too much results, because sometimes copies a
part of the data locally to your client and does the query processing there,
so for a serious Web Apllication Access is definitly the wrong choice,
consider using either SQL Server or maybe MySql.

Cheers

Bernhard

-Ursprüngliche Nachricht-
Von: Francesco Pellegrini [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 20. April 2004 12:05
An: Tomcat-User-ML
Betreff: Tomcat 5 : java.lang.OutOfMemoryError


Hi all,

I have Tomcat 5.0.18 with one java web application and database Access 2000.

When one Servlet/JSP try to make heavy query to database, tomcat shows
this error message :


HTTP Status 500 -




type Exception report

message

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

exception

javax.servlet.ServletException

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI
mpl.java:867)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:800)

org.apache.jsp.pannelli.telematica.visconsumi_jsp._jspService(visconsumi_jsp
.java:789)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
11)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)


root cause

java.lang.OutOfMemoryError


--

I've tried to modify the catilina.bat file, increased start memory  by set :

set CATALINA_OPTS= -server -Xmx1200M -Xms1200M -Xss256k

but i still having the same problem

How can I solve it?


Thans in advance for your kind attention,


Francesco.



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



session-config session-timout value from web.xml

2004-04-21 Thread Bernhard Slominski
Hi,

Is it possible, to extract the value that is is the web.xml file for session
timeout into my JSP page
session-config
session-timeout
5
/session-timeout
/session-config
I want to get the 5 minutes into the JSP page so I can use it for some
information.

Thanks for your help!

Bernhard 



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



AW: session-config session-timout value from web.xml

2004-04-21 Thread Bernhard Slominski
Thanks a lot, works!

-Ursprüngliche Nachricht-
Von: Daniel Gibby [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 21. April 2004 16:37
An: Tomcat Users List
Betreff: Re: session-config session-timout value from web.xml


Just follow your nose! ... I mean, the spec... It always knows!

session.getMaxInactiveInterval() is I believe the right thing to call... 
look at the docs to be sure which method you should be calling.

Bernhard Slominski wrote:

Hi,

Is it possible, to extract the value that is is the web.xml file for
session
timeout into my JSP page
session-config
session-timeout
5
/session-timeout
/session-config
I want to get the 5 minutes into the JSP page so I can use it for some
information.

Thanks for your help!

Bernhard 



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



AW: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-21 Thread Bernhard Slominski
Hi,

you can use something like HTTPUnit which just calls the web page with your
servlet.
Can can easiliy schedule the HTTPUnit Job, so it runs every 30mins.

Cheers

Bernhard

-Ursprüngliche Nachricht-
Von: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 21. Dezember 2004 16:44
An: Tomcat Users List
Betreff: How to run servlet for every 30 minutes in Tomcat 4.1.30


Hi,
I am using Tomcat4.1.30 version.
I have to develop a client application which looks in the database every 30
minutes,
to retrieve the status of an order and send the status to the remote client.
Again waits for the
The client's response and insert the repsonse back to the database.

I wanted to do this in a servlet, so is there any way that i could run this
servlet automatically inside the
Tomcat container, or is it configurable in servlet mapping? if so can
someone please suggest me with examples...


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

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



AW: Tomcat 5.0.28 exiting randomly

2005-01-13 Thread Bernhard Slominski
Hi Greg,

we had simalar problems and couldn't find out the exact reason.
We solved it by just making an automated nightly restart of Tomcat.
It's maybe just running out of memory after some time.

Cheers

Bernhard

-Ursprüngliche Nachricht-
Von: Greg Lappen [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 13. Januar 2005 01:30
An: Tomcat Users List
Betreff: Tomcat 5.0.28 exiting randomly


Hello-

I have been tracking down this problem for a while now and finally have 
some more information.  I am using Tomcat 5.0.28 on RedHat EL 3.0 with 
JDK 1.4.2_06 and we occasionally find that Tomcat is no longer running 
in our production server.  It runs fine for days, then suddenly the 
java process disappears.  I initially thought the JVM was crashing, but 
could not find any core files or log messages.

Then someone suggested to me that I install a shutdown hook with 
Runtime.addShutdownHook to see if somewhere System.exit() is being 
called.  Well, it turns out that it is.  Unfortunately, I don't think I 
can tell in my shutdown hook where the System.exit() call occurred.  I 
have reviewed our application code numerous times looking for 
System.exit() calls and have not found any.

Is it possible that it is coming from Tomcat itself, or someone is able 
to issue a shutdown command externally somehow?

Greg


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



Connections not released during reload

2005-01-13 Thread Bernhard Slominski
Hi,

I'm using the following conmfiguration:
- tomcat 5.0.28 
- Windows 2000 
- Oracle 9i database on Sun Solaris

I'm using the Tomcat connection pooling dbcp and have the following problem.
When reloading the applcation, the open connections are not released and
just stay open on the database forever.
These connections never die, even though the configuration to remove dead
connections is enabled.

I then get a whole set of new connections for the reloaded application.
Seems the reference to the old connections is just lost.  This only happens
when reloading the application, not during stop/start.

Is there a way to fix this (except stop/start of course :-))

Thanks

Bernhard 

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



AW: session across webapps

2005-01-13 Thread Bernhard Slominski
Hi Huu, 

First of all the session is ALWAYS on application scope, this is not an
Tomcat specific behaviour but a requirement of the Specification:
SRV.7.3 Session Scope
HttpSession objects must be scoped at the application (or servlet context)
level.
The underlying mechanism, such as the cookie used to establish the session,
can be
the same for different contexts, but the object referenced, including the
attributes in
that object, must never be shared between contexts by the container.

So there is no way around this, if the sessions were relicated across the
applications it would violate the specification.

When you enable crossConext for your application:
Context crossContext=true docBase=testapp path=/testapp
reloadable=true
/Context

you can get the context for another application:
ServletContext context2 = context.getContext(/testapp);

and set attributes:
context2.setAttribute(test,JSP is great!);

But you cannot get to the session in the other application.

So what you can do is implement the session swapping on your own (Cookies,
via the Database) or merge your applications into one.

Some links from the Sun Forums:
http://forum.java.sun.com/thread.jsp?forum=33thread=259394
http://forum.java.sun.com/thread.jsp?forum=45thread=492484
http://forum.java.sun.com/thread.jsp?forum=33thread=318569

Cheers Bernhard

-Ursprüngliche Nachricht-
Von: Kieu Huu Dung [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 13. Januar 2005 12:35
An: Tomcat Users List
Betreff: session across webapps


Hi all,

I prefer one (only one) session for all webapps
(Tomcat 5.0.28 and I've turned on SingleSignOn - user
login once for all webapps) or how can I know user is
in the same session between the login and logout when
he/she is in differents webapps.

Does anyone know is it possible or not? If possible
how can we do it? If not, is there another way to
share informations between webapps?

Thanks for your help,

Huu Dung Kieu.



__ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.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]



AW: Connections not released during reload

2005-01-13 Thread Bernhard Slominski
Antony,
thanks a lot, that's a very good idea and should fix it definitly!

Cheers

Bernhard

-Ursprüngliche Nachricht-
Von: Antony Paul [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 13. Januar 2005 11:56
An: Tomcat Users List
Betreff: Re: Connections not released during reload


Write a ServletContextLlistener and in its contextDestroyed() method
use the shutdown() method of the DBCP pool to close connections.

rgds
Antony Paul


On Thu, 13 Jan 2005 11:37:22 +0100, Bernhard Slominski
[EMAIL PROTECTED] wrote:
 Hi,
 
 I'm using the following conmfiguration:
 - tomcat 5.0.28
 - Windows 2000
 - Oracle 9i database on Sun Solaris
 
 I'm using the Tomcat connection pooling dbcp and have the following
problem.
 When reloading the applcation, the open connections are not released and
 just stay open on the database forever.
 These connections never die, even though the configuration to remove dead
 connections is enabled.
 
 I then get a whole set of new connections for the reloaded application.
 Seems the reference to the old connections is just lost.  This only
happens
 when reloading the application, not during stop/start.
 
 Is there a way to fix this (except stop/start of course :-))
 
 Thanks
 
 Bernhard
 
 -
 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]



AW: Long running requests and timeouts?

2005-01-17 Thread Bernhard Slominski
Hi Andrzej,

one possible workaround is compress the output, so the response is
compressed with zip compresseion and your response gets shorter.
You need a response filter for that, if this is an option an you need more
details let me know.

Cheers

Bernhard

-Ursprüngliche Nachricht-
Von: Andrzej Jan Taramina [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 17. Januar 2005 16:25
An: tomcat-user@jakarta.apache.org
Betreff: Long running requests and timeouts?


I have a situation where some requests that get sent to Tomcat are very long

running (basically batch operations).  I've been testing with a request that

takes just over 7 minutes to process and returns and XML document as a 
response.

The problem I'm having is that the response gets truncated.  It's always 
truncated at a consistent spot (3207 characters for some reason, that's what

Firefox reports).

Shorter running requests don't truncate anything, regardless of how long the

response might be.

I'm running Tomcat 5.0.28 and my Connector in the Tomcat server.xml file 
looks like:

Connector port=80
maxThreads=150 minSpareThreads=25 maxSpareThreads=75
enableLookups=false redirectPort=8443 acceptCount=100
debug=0 connectionTimeout=2 
disableUploadTimeout=true /

Is the connectionTimeout value the one that might be contributing to this 
behaviour?

Are there any other timeout settings that might affect this?

Thanks!

Andrzej Jan Taramina
Chaeron Corporation: Enterprise System Solutions
http://www.chaeron.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]



Reloading an application via command line

2004-09-23 Thread Bernhard Slominski
Hi,

for an automated build process I want to reload an application via command
line, is this possible?
The possibilties I found out so far were:
- ant script
- using the tomcat manager

Thanks

Bernhard Slominski


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



Forum instead of mailist!!

2004-10-11 Thread Bernhard Slominski
These autoreply is really annoying, but it can easily happen if you forget
to unsubscribe, before leaving on holiday
That's why I vote for a forum instead of a mailist!
Does anyone agree?

Cheers

Bernhard

-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 11. Oktober 2004 16:59
An: Tomcat Users List
Betreff: AutoReply: Tomcat 4 as an NT Service



Hello Tomcat Users List [EMAIL PROTECTED],
 
This refers to your mail with subject as Tomcat 4 as an NT Service.
Thank you for sending your CV and registering with A.S. Consultancy
Services.
 
Our team will review your CV and match it against current requirements. If
your profile matches with any ongoing opening, we will contact you by
telephone / email.
 
We recommend that you update your profile and send us an updated CV whenever
your contact details or your career path changes, so that your record is
up-to-date with us.
 
Please be assured that your CV will remain confidential with us and we will
submit your profile to our clients only after due consultation with you.
 
In case you require any further information please do contact us.
with warm regards,
 
Staffing Team
A.S. Consultancy Services 
#1205, 2nd Main, 2nd Cross, Vijayanagar, Bangalore - 560040, India
Tele - 91 80 2310 9012, Telefax - 91 80 2330 5364, Email -
[EMAIL PROTECTED] 
URL: www.asconsultancy.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]



AW: Not able to run .html and servlet in Tomcat 5

2004-09-29 Thread Bernhard Slominski
If you use it together with Apache it may be an Apache configuration problem

-Ursprüngliche Nachricht-
Von: Vivek Behal [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 29. September 2004 11:41
An: Tomcat Users List
Betreff: RE: Not able to run .html and servlet in Tomcat 5


yes. it is stable version 5.0.28.

Regards,
Vivek Behal.
 
The only thing that stands between a man and what he wants from life is
often merely the will to try it and the faith to believe that it is
possible


-Original Message-
From: Ben Souther [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 29, 2004 3:07 PM
To: Tomcat Users List
Subject: Re: Not able to run .html and servlet in Tomcat 5


Tomcat 5.0 or tomcat 5.5?
If you're just starting out, go with a stable version (5.0.28).

This tutorial should get you started:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/index.html

A static HTML page should show just fine.
What is the name of the page?
What are you typing in your browser's address window?
Remember, the address (after the domain) is case sensitive.






On Wed, 2004-09-29 at 05:00, Vivek Behal wrote:
 Hi,
I downloaded tomcat 5. I added a .html file to the webapps/Root folder
 but as i try to access it, gives me error with status 404. i.e the tomcat
is
 not able to locate the file.
Could you tell me what should i do to make it work. I deployed a
.class
 file in webapps/Root/WEb-INF/classes folder which was actually a servlet
 file . Tomcat is not able to access that also.
  So every tiems it gives me page not found error when i try to access it.
 Could you suggets me some way
  
 Regards,
 Vivek Behal.
  
 


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



AW: JSP compile hangs

2004-10-19 Thread Bernhard Slominski
Hi Eric,

did you check the generated code?
Maybe from the code you see what might be the problem.

Another possible solution is wrting your own EL function which replaces the
nested calls.

Cheers

Bernhard

-Ursprüngliche Nachricht-
Von: Eric Blenkush [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 19. Oktober 2004 08:27
An: [EMAIL PROTECTED]
Betreff: JSP compile hangs


Hi,

On Tomcat 5.5.2 I am experiencing very long compile times(and hangs)  
for certain JSP pages. The page has an EL expression like this:

${fn:toUpperCase((fn:toUpperCase((fn:toUpperCase((fn:toUpperCase((fn: 
toUpperCase((fn:toUpperCase((fn:toUpperCase((fn:toUpperCase((fn: 
toUpperCase((fn:toUpperCase((fn:toUpperCase((fn:toUpperCase((fn: 
toUpperCase((fn:toUpperCase((fn:toUpperCase((fn: 
toUpperCase(('b'}

If you remove the extraneous parenthesis it will compile and execute  
very quickly. However, if you add more nested calls to fn:toUpperCase  
compiling will again take a very long time. So, this may be related to  
the number of nested expressions. This is just a test case obviously  
but I am generating JSPs automatically and it is difficult if not  
impossible to avoid EL statements with these nested function calls.  
Resin can compile and execute these pages with ease but I want to stick  
with Tomcat.

Anyone know why this is so slow and how to fix it?

Thanks,
Eric Blenkush


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

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



AW: Deny access to a JSP page

2005-02-02 Thread Bernhard Slominski
Hi,

I think the easiest way is to add a security contsraint in you web.xml of
you web application:

web app...
   security-contraint
  web-resources-collection
   web-resource-nameTest/web-resource-name
 url-pattern/myjsps/*/url-pattern
  /web-resources-collection
  auth-contsraint/
  security-contraint
...

/web app

this will block all reuqests to the folder /myjsps
You can also block certain http methods or allow access th certain users,
check the spec for more details.

Cheers

Bernhard

-Ursprüngliche Nachricht-
Von: apuerta.foros [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 1. Februar 2005 20:23
An: tomcat-user@jakarta.apache.org
Betreff: Deny access to a JSP page



 Hi all.

 I'd like Tomcat to deny access to some JSPs with internal information.

 I can configure Apache to deny access depending on the user IP,
transparently.
 
 I'd like to do the same in Tomcat, but i don't now how.

 Any idea? Thanks.




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

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



AW: JasperException while running JSP

2005-02-18 Thread Bernhard Slominski
Hi,

in Tomcat Version 5.5.4 there is a bug in the JSP Compiler Jasper, it
sometiems looses the classpath (Bug:
http://issues.apache.org/bugzilla/show_bug.cgi?id=32330)
This is fixed in 5.5.7.

So there are two ways to fix it:
1. Restart Tomcat
2. Upgrade to 5.5.7

Cheers

Bernhard

-Ursprüngliche Nachricht-
Von: U K Laxmi [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 18. Februar 2005 04:27
An: tomcat-user@jakarta.apache.org
Betreff: JasperException while running JSP


I have integrated tomcat 5.5 with apache 2
successfully and i could able to run sample JSPs. Now
i created a jsp page which will inititate a Java
program called TestSQLLoad.java. TestSQLLoad.java
talks to Ms Access database and gets me reuired fields
from databasae and it will be displayed on browser
thro' JSP page test-db.jsp. I'm using Netscape 7.2
browser. When i run test-db.jsp after running tomcat 
apache, it gives JasperException. It's saying -
TestSQLLoad cannot be resolved or is not a type.

I created jar file with TestSQLLoad.java 
TestSQLLoad.class and put it in
TOMCAT_ROOT/webapps/web/WEB-INF/classes directory as
well as TOMCAT_ROOT/common/lib directories. Thinking
that class loader is unable to find the class, i put
the above directories in my class path as well. Where
i'm going wrong? What's happenning. Pls help.

Here is the exception that's displayed on the browser.

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

An error occurred at line: 7 in the jsp file:
/JSP/test-db.jsp
Generated servlet error:
TestSQLLoad cannot be resolved or is not a type

An error occurred at line: 7 in the jsp file:
/JSP/test-db.jsp
Generated servlet error:
TestSQLLoad cannot be resolved or is not a type



org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle
r.java:84)

org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:3
28)

org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5
56)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
96)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)

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



__ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.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]



AW: Getting other Sessions

2005-02-23 Thread Bernhard Slominski
Hi,
HttpSession.getAttributeNames()
should do what you want!
From the javadoc:

getAttributeNames
public java.util.Enumeration getAttributeNames()
Returns an Enumeration of String objects containing the names of all the
objects bound to this session.

Cheers

Bernhard

-Ursprüngliche Nachricht-
Von: Joseph Shraibman [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 23. Februar 2005 05:18
An: tomcat-user@jakarta.apache.org
Betreff: Getting other Sessions


I want to make an admin page in my application.  I needs to be able to 
get access to all the current Session objects to access their 
attributes.  Is this possible?

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

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



AW: Getting other Sessions

2005-02-23 Thread Bernhard Slominski
Hi Matt, Joseph,

you're right,  I was not reading Joseph's question properly, I thought he
want wants all objects IN the session.
I also can't think of another solution than Antony mentioned earlier.

Bernhard

-Ursprüngliche Nachricht-
Von: Dale, Matt [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 23. Februar 2005 10:25
An: Tomcat Users List
Betreff: RE: Getting other Sessions



Hi,

That doesn't answer Joseph's question. It tells him how to access the
objects in his own session but not how to access other peoples sessions. I
would be interested to see how this is done as well.

Ta
Matt

-Original Message-
From: Bernhard Slominski [mailto:[EMAIL PROTECTED]
Sent: 23 February 2005 09:17
To: 'Tomcat Users List'
Subject: AW: Getting other Sessions


Hi,
HttpSession.getAttributeNames()
should do what you want!
From the javadoc:

getAttributeNames
public java.util.Enumeration getAttributeNames()
Returns an Enumeration of String objects containing the names of all the
objects bound to this session.

Cheers

Bernhard

-Ursprüngliche Nachricht-
Von: Joseph Shraibman [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 23. Februar 2005 05:18
An: tomcat-user@jakarta.apache.org
Betreff: Getting other Sessions


I want to make an admin page in my application.  I needs to be able to 
get access to all the current Session objects to access their 
attributes.  Is this possible?

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



AW: possibly stupid question

2005-03-30 Thread Bernhard Slominski
Hi,

we use this instructions to log to a file. Sounds a bit complicated, but
should work:

Follow the following steps to setup a file named tomcat.log that has
internal Tomcat logging output to it:
   1. Create a file called log4j.properties with the following content and
save it into common/classes.
   2.
log4j.rootLogger=warn, R 
log4j.appender.R=org.apache.log4j.RollingFileAppender 
log4j.appender.R.File=${catalina.home}/logs/tomcat.log 
log4j.appender.R.MaxFileSize=10MB 
log4j.appender.R.MaxBackupIndex=10 
log4j.appender.R.layout=org.apache.log4j.PatternLayout 
log4j.appender.R.layout.ConversionPattern= ?p  ?t  ?c -  ?m?n 
log4j.logger.org.apache.catalina=DEBUG, R
   3. The log4j.jar and commons-loggin.jar will be put into your
$CATALINA_HOME/common/lib when you get the latest version of the
website_config libs (towards the end of this setup).
   4. Install Commons Logging and place the commons-logging.jar (not
commons-logging-api.jar) in $CATALINA_HOME/common/lib with the log4j jar.
   5. Start Tomcat
This log4j configuration sets up a file called tomcat.log in your Tomcat
logs folder with a maximum file size of 10MB and up to 10 backups. DEBUG
level is specified which will result in the most verbose output from Tomcat.


 -Ursprüngliche Nachricht-
 Von: news [mailto:[EMAIL PROTECTED] Auftrag von teknokrat
 Gesendet: Mittwoch, 30. März 2005 11:54
 An: tomcat-user@jakarta.apache.org
 Betreff: possibly stupid question
 
 
 I am running tomcat 5.5 on windows XP. There is no catalina.out file 
 being produced. Is this usual? How do i get a file of of everything 
 going to stdout?
 
 thanks
 
 
 -
 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]



JSP precompilation, jspc, NullPointerException

2005-04-12 Thread Bernhard Slominski
Hi,

I try to get the precompilation working with tomcat 5.5.7 under Windows NT.
I use the following target:
  target name=jspc 
taskdef classname=org.apache.jasper.JspC name=jasper2  
classpath id=jspc.classpath 
pathelement
location=${java.home}/../lib/tools.jar/ 
fileset dir=${tomcat.home}/bin 
include name=*.jar/ 
/fileset 
fileset dir=${tomcat.home}/server/lib 
include name=*.jar/ 
/fileset 
fileset dir=${tomcat.home}/common/lib 
include name=*.jar/ 
/fileset 
/classpath 
/taskdef 

jasper2 
 validateXml=false 
 uriroot=${webapp.path} 
 webXmlFragment=${webapp.path}/WEB-INF/generated_web.xml 
 outputDir=${webapp.path}/WEB-INF/src / 
  /target 

And I'm getting a NullPointer Exception (see below), looks like the Jasper
cannot be created.
Anyone has a clue why this happens?

Thanks for your help 

Bernhard

jspc:
  [jasper2] java.lang.NullPointerException
  [jasper2] at
org.apache.jasper.JspCompilationContext.createCompiler(JspCom
pilationContext.java:220)
  [jasper2] at org.apache.jasper.JspC.processFile(JspC.java:847)
  [jasper2] at org.apache.jasper.JspC.execute(JspC.java:989)
  [jasper2] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
  [jasper2] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:39)
  [jasper2] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:25)
  [jasper2] at java.lang.reflect.Method.invoke(Method.java:585)
  [jasper2] at
org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:123
)
  [jasper2] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
va:275)
  [jasper2] at org.apache.tools.ant.Task.perform(Task.java:364)
  [jasper2] at org.apache.tools.ant.Target.execute(Target.java:341)
  [jasper2] at org.apache.tools.ant.Target.performTasks(Target.java:369)
  [jasper2] at
org.apache.tools.ant.Project.executeTarget(Project.java:1214)

  [jasper2] at
org.apache.tools.ant.Project.executeTargets(Project.java:1062
)
  [jasper2] at org.apache.tools.ant.Main.runBuild(Main.java:673)
  [jasper2] at org.apache.tools.ant.Main.startAnt(Main.java:188)
  [jasper2] at
org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
  [jasper2] at
org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)

BUILD FAILED
D:\work\jspdeploy2\precompile.xml:25: org.apache.jasper.JasperException




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



AW: How to Deploy Replacement War

2005-04-13 Thread Bernhard Slominski
Hi Scott,

it's quite easy: you just have to copy the war-file across in your webapps
root.
Tomcat picks up the war file automatically and redeploys your application.
You don't have to mess around with the manager app. It normally only takes a
few seonds.
Depending on your configuration after some redeploys you might get some
memory problems, so if possible you should restart you Tomcat periodically,
like every night.

Cheers

Bernhard

 -Ursprüngliche Nachricht-
 Von: Scott Purcell [mailto:[EMAIL PROTECTED]
 Gesendet: Mittwoch, 13. April 2005 17:46
 An: tomcat-user@jakarta.apache.org
 Betreff: How to Deploy Replacement War
 
 
 Hello,
 
 I deployed a war file for a new project a couple of weeks 
 back. The war extracted, and the manager saw it, and all is 
 good. But now I need to replace that webapp, with a new war 
 file. Now the other day, I went to the manager, undeployed 
 the webapp, turned off Tomcat and deleted the webapp folder. 
 Then I put the war file under webapps and restarted the 
 server. But things got screwey and I had to repeat this a 
 couple of times, and also turn Tomcat off in order to remove the libs.
 
 Anyway, what is the proper protocol on how to properly 
 replace a webapp with a new war.
 
 
 Thanks,
 
 
 Scott K Purcell
 
 -
 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]



Precompilation of tag files

2005-04-14 Thread Bernhard Slominski
Hi,

after getting the jsp precompilation finally working, I want also want to do
the precompliation for tag files.
I'm using tomcat 5.5.7 on both Windows 2000 and Sun Solaris.
So something like this:
%@ taglib prefix=mytag tagdir=/WEB-INF/tags %
mytag:header/

The precompilation task generates servlets and servlet mappings in the
web.xml.
The jasper2 task also creates the servlet and even the class file for the
tag file.
But I don't see a chance to do the mapping to the compiled tag file servlet
in the web.xml.

Any ideas about this?

Thanks

Bernhard




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



AW: Compiling JSP files

2005-05-24 Thread Bernhard Slominski
Hi Charles,

what you can do is to use an ant task for do the precompilation.
This is a bit smarter than via the command line I guess.
The docu is under
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html#Web%20Appl
ication%20Compilation
It's not very well documented, it took me a while to finally get it working,
but it's working fine for me now.
So if you want to give it a try, I can give you some further assistance, if
needed.

Cheers 

Bernhard

 -Ursprüngliche Nachricht-
 Von: Charles P. Killmer [mailto:[EMAIL PROTECTED]
 Gesendet: Dienstag, 24. Mai 2005 15:47
 An: Tomcat Users List
 Betreff: Compiling JSP files
 
 
 I am having a problem where one of my jsp files won't compile.  Tomcat
 successfully creates the java file but it never creates the class file
 and hence never responds to the request for the page.  
  
 I am looking for what needs to be in the command line in order to
 manually compile the java file the gets created in order to look for
 errors in that process.
  
 This is what I have so far but I am getting errors.
 c:\jdk1.5.0\bin\javac -classpath
 %CLASSPATH%;C:\tomcat\work\Catalina\Site1\_;C:\tomcat\common\l
 ib\servlet
 .jar test_jsp.java
  
  
 Errors:
 test_jsp.java:5: package javax.servlet.jsp does not exist
 import javax.servlet.jsp.*;
 ^
 test_jsp.java:8: package org.apache.jasper.runtime does not exist
 public final class test_jsp extends
 org.apache.jasper.runtime.HttpJspBase
  ^
 test_jsp.java:9: package org.apache.jasper.runtime does not exist
 implements org.apache.jasper.runtime.JspSourceDependent {
 ^
  
  
 Thanks
 Charles
 

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



AW: Validation Frame work

2005-05-25 Thread Bernhard Slominski
I agree with Steve, but there is a much simpler possibility that the JS
validation does not work:
The user can just switch it off in the browser.
This might not be just to bypass validation, but maybe just for security
reasons, so for a business critical apllications I'd discourage anyone from
using it, if you have something like a guestbook, and the validation fails
and you end up with something like an entry without email address, so what.

Bernhard

 -Ursprüngliche Nachricht-
 Von: Steve Kirk [mailto:[EMAIL PROTECTED]
 Gesendet: Dienstag, 24. Mai 2005 20:02
 An: 'Tomcat Users List'
 Betreff: RE: Validation Frame work
 
 
 David is right, JS and serverside validation perform 
 different roles.  To
 expand on his comment a bit more, remember that the requests that your
 webapp receives could be sent by any HTTP client, not necessarily by a
 friendly web browser.  If someone were so inclined, they 
 could write their
 own HTTP client to interact with your webapp, that aimed to 
 deliberately
 submit bad data to your servlet, in which case your JS 
 validation would have
 been bypassed.  What they can't do is bypass your serverside 
 validation (or
 at least this is much harder).
 
 Just one trick that such nasty people might try is to insert 
 JS code in any
 form fields that you let them create or edit.  If this field 
 data is then
 displayed in other pages of your app, this might cause 
 anyone viewing that
 page on your site to download a trojan/virus/etc.  It's 
 really very easy to
 do.  And this is only one such exploit.  There are many others.
 
  -Original Message-
  From: David Smith [mailto:[EMAIL PROTECTED] 
  Sent: Tuesday 24 May 2005 16:19
  To: Tomcat Users List
  Subject: Re: Validation Frame work
  
  
  Because you should never trust the client. They may not be 
 submitting 
  from your form.  Javascript is just a nicety to save the 
 user a whole 
  request/response cycle just to find out a field is missing 
 or wrong. 
  Consider it a security issue.
  
  -- David
  
  raja buddha wrote:
  
   Hi all
   In struts why do we need validation frame work  we have 
 java script
   to do validations. Is there any extra advantage of using 
  the validation
   frame work
  
   raj
  
   _
   On the road to retirement? Check out MSN Life Events for 
  advice on how 
   to get there! 
 http://lifeevents.msn.com/category.aspx?cid=Retirement
  
  
   
  
 -
   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]



AW: jspServlet runs out of memory while compiling some jsp files using fork=true

2005-05-27 Thread Bernhard Slominski
Hi,

I would suggest that you do a precompilation of your jsps on a deployment
machine which is separate from the live machine.
So your compilation is not done on the live server, which might be on heavy
load.
Also you don't have the problem that the first visitor has to wait an awful
long time until the page get's displayed.

Cheers

Bernhard

 -Ursprüngliche Nachricht-
 Von: Vesa Varimo [mailto:[EMAIL PROTECTED]
 Gesendet: Freitag, 27. Mai 2005 12:45
 An: tomcat-user@jakarta.apache.org
 Betreff: jspServlet runs out of memory while compiling some jsp files
 using fork=true
 
 
 Hi,
 
 I'm having OutOfMemory error while Tomcat tries to compile 
 jsp files. The problem occures few times in day so it's quite 
 hard to repeat.
 Tomcat is configured to run javac in separate JVM with 
 fork=true option. I tried to give more memory for ant using 
 ANT_OPTS, but it didn't help.
 I read source code for the jasper compiler and there are 
 variables that configure how much memory is given to ant, but 
 I'm not able to configure them
 with jspServlet init parameters. 
 
 How should I resolved this? Is the Jikes compiler a solution 
 worth of trying?
 
 Stacktrace included below. I have hundreds of jars in 
 classpath... so I can't paste the whole compiler output.
 
 BR,
 
 Vesa Varimo
 [EMAIL PROTECTED]
 
 --
 --
 
 2005-05-26 21:42:53 StandardWrapperValve[jsp]: 
 Servlet.service() for servlet jsp threw exception 
 java.lang.OutOfMemoryError
 
 May 7, 2005 12:21:42 PM org.apache.jasper.compiler.Compiler 
 generateClass
 SEVERE: Javac exception
 Compile failed; see the compiler error output for details.
 at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:944)
 at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
 at 
 org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:379)
 at 
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
 at 
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
 at 
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
 at 
 org.apache.jasper.JspCompilationContext.compile(JspCompilation
 Context.java:511)
 at 
 org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
 Wrapper.java:295)
 at 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
 .java:292)
 at 
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
 at 
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
 er(ApplicationFilterChain.java:237)
 at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
 cationFilterChain.java:157)
 at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
 rapperValve.java:214)
 

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



AW: jspServlet runs out of memory while compiling some jsp files using fork=true

2005-05-27 Thread Bernhard Slominski
Hi,

I think it happens randomly because it depends on the actual load on the
server.
Where there is not much traffic it's OK, but with more traffic the server
runs out of memomry.
I see your point that you cannot control the webmasters.
But still with the problems you have and the obvious very big application
with 1 lines in a JSP (this must we a horror to maintain the code) and
hundreds of jars you should have a proper deployment process and not just
copying JSPs across.
It does not mean that it's more complicated, I implemented this in my
company with an ant script and it's really simple, stable and secure. Nobody
want's to go back to the old copy solution.

Cheers

Bernhard

 -Ursprüngliche Nachricht-
 Von: Vesa Varimo [mailto:[EMAIL PROTECTED]
 Gesendet: Freitag, 27. Mai 2005 14:59
 An: Tomcat Users List
 Betreff: Re: jspServlet runs out of memory while compiling some jsp
 files using fork=true
 
 
 
 Hi,
 
 no the webapp is running whole time without redeployments.
 The jsp pages are quite large, 5000-1 rows and there are 
 many of them. 
 Can this affect to memory usage of javac compiler?
 This is a strange problem, because sometimes these same pages 
 compile just 
 fine, sometimes they don't.
 
 
 Thx,
 
 Vesa
 
 - Original Message - 
 From: Steve Kirk [EMAIL PROTECTED]
 To: 'Tomcat Users List' tomcat-user@jakarta.apache.org
 Sent: Friday, May 27, 2005 3:32 PM
 Subject: RE: jspServlet runs out of memory while compiling 
 some jsp files 
 using fork=true
 
 
 Is the problem caused because you redeploy the whole webapp each time?
 Could you just deploy only those files that have changed?  I 
 can't imagine
 that this leads to overloading unless the numbers are massive...?
 
  -Original Message-
  From: Vesa Varimo [mailto:[EMAIL PROTECTED]
  Sent: Friday 27 May 2005 13:34
  To: Tomcat Users List
  Subject: Re: jspServlet runs out of memory while compiling
  some jsp files using fork=true
 
 
 
  Yes, that would be one solution, but not suitable for our
  case because our
  webmasters are constantly updating jsp pages on our
  production servers.
  Btw. I'm using tomcat 5.0.28.
 
  Thx,
 
  Vesa
 
  - Original Message - 
  From: Bernhard Slominski [EMAIL PROTECTED]
  To: 'Tomcat Users List' tomcat-user@jakarta.apache.org
  Sent: Friday, May 27, 2005 3:25 PM
  Subject: AW: jspServlet runs out of memory while compiling
  some jsp files
  using fork=true
 
 
  Hi,
 
  I would suggest that you do a precompilation of your jsps on
  a deployment
  machine which is separate from the live machine.
  So your compilation is not done on the live server, which
  might be on heavy
  load.
  Also you don't have the problem that the first visitor has to
  wait an awful
  long time until the page get's displayed.
 
  Cheers
 
  Bernhard
 
   -Ursprüngliche Nachricht-
   Von: Vesa Varimo [mailto:[EMAIL PROTECTED]
   Gesendet: Freitag, 27. Mai 2005 12:45
   An: tomcat-user@jakarta.apache.org
   Betreff: jspServlet runs out of memory while compiling some
  jsp files
   using fork=true
  
  
   Hi,
  
   I'm having OutOfMemory error while Tomcat tries to compile
   jsp files. The problem occures few times in day so it's quite
   hard to repeat.
   Tomcat is configured to run javac in separate JVM with
   fork=true option. I tried to give more memory for ant using
   ANT_OPTS, but it didn't help.
   I read source code for the jasper compiler and there are
   variables that configure how much memory is given to ant, but
   I'm not able to configure them
   with jspServlet init parameters.
  
   How should I resolved this? Is the Jikes compiler a solution
   worth of trying?
  
   Stacktrace included below. I have hundreds of jars in
   classpath... so I can't paste the whole compiler output.
  
   BR,
  
   Vesa Varimo
   [EMAIL PROTECTED]
  
   --
   --
  
   2005-05-26 21:42:53 StandardWrapperValve[jsp]:
   Servlet.service() for servlet jsp threw exception
   java.lang.OutOfMemoryError
  
   May 7, 2005 12:21:42 PM org.apache.jasper.compiler.Compiler
   generateClass
   SEVERE: Javac exception
   Compile failed; see the compiler error output for details.
   at
  org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:944)
   at
  org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
   at
   
 org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:379)
   at
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
   at
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
   at
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
   at
   org.apache.jasper.JspCompilationContext.compile(JspCompilation
   Context.java:511)
   at
   org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
   Wrapper.java:295)
   at
   org.apache.jasper.servlet.JspServlet.serviceJspFile

AW: Reloadable Hangs

2005-05-27 Thread Bernhard Slominski
Hi,

the thread death is caused by log4j.
You have to shutdown log4j when the context is destroyed:
see http://issues.apache.org/bugzilla/show_bug.cgi?id=26372 for more
details.

Cheers

Bernhard

 -Ursprüngliche Nachricht-
 Von: Ari Suutari [mailto:[EMAIL PROTECTED]
 Gesendet: Freitag, 27. Mai 2005 13:53
 An: tomcat-user@jakarta.apache.org
 Betreff: Re: Reloadable Hangs
 
 
 Hi,
 
  
  Context Reloadable == true
  
  When we compile  .java into .class, Tomcat will not serve 
 page anymore.
  We have to restart Tomcat inside Services or from the 
 Monitor Tomcat menu.
 
 We have seen same here. Tomcat = 5.0.28 hangs, there 
 seems to be a 
 ThreadDeath exception sometimes when reload is going on. 
 Environment
 is Windows XP and JDK 1.4.2.
  
  We have no problen with lower versions of Tomcat.
 
 I think that 5.0.25 used to work me.
 
 
 Aro S-
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



AW: jspServlet runs out of memory while compiling some jsp files using fork=true

2005-05-27 Thread Bernhard Slominski
Well the precompliation is quite simple:
You use an ant jasper task to make the java file from your jsp and then
compile these classes.
Then you do a mapping from the jsp to the class.
This is all done on a separate machine, I do the deployment as war file,
which is copied accross to the live machine.
It can all be done automatically.
Look at http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html

I post you the code from my buildfile.
The only thing is that you have to reload your app when you do this, so that
might be a problem for you.

target name=jspc depends=get-properties-stage 
mkdir dir=${webapproot}/src/

!-- define the jasper task --
taskdef classname=org.apache.jasper.JspC name=jasper2 

classpath id=jspc.classpath 
pathelement
location=${java.home}/../lib/tools.jar/ 
fileset dir=${tomcat.home}/bin 
include name=*.jar/ 
/fileset 
fileset dir=${tomcat.home}/server/lib 
include name=*.jar/ 
/fileset 
fileset dir=${tomcat.home}/common/lib 
include name=*.jar/ 
/fileset
fileset
dir=${webapproot}${webappname}/WEB-INF/lib 
include name=*.jar/
/fileset
/classpath
/taskdef 

!-- execute jasper, creates the servlet source files --
jasper2 
validateXml=false 
uriroot=${webapproot}${webappname} 
 
webXmlFragment=${webapproot}${webappname}/WEB-INF/generated_web.xml 
outputDir=${webapproot}/src / 

!-- compile the source files --
javac destdir=${webapproot}${webappname}/WEB-INF/classes
optimize=off
debug=on failonerror=false
srcdir=${webapproot}/src 
excludes=**/*.smap
classpath
pathelement
location=${webapproot}${webappname}/WEB-INF/classes/
pathelement
location=${tomcat.home}/common/classes/
pathelement
location=${tomcat.home}/shared/classes/
fileset dir=${tomcat.home}/common/lib
include name=*.jar/
/fileset
fileset dir=${tomcat.home}/shared/lib
include name=*.jar/
/fileset
fileset dir=${tomcat.home}/bin 
include name=*.jar/ 
/fileset 
fileset
dir=${webapproot}${webappname}/WEB-INF/lib 
include name=*.jar/
/fileset
/classpath
include name=** /
exclude name=tags/** /
/javac

!-- Load your precompiled snippet into a property --
loadfile property=precompiled

srcFile=${webapproot}${webappname}/WEB-INF/generated_web.xml
encoding=ISO-8859-1/

!-- Now replace the web.xml with a predifined snippet --
replace file=${webapproot}${webappname}/WEB-INF/web.xml
value=${precompiled}
replacetoken![CDATA[!-- precompile include
--]]/replacetoken
/replace
/target 






 -Ursprüngliche Nachricht-
 Von: Vesa Varimo [mailto:[EMAIL PROTECTED]
 Gesendet: Freitag, 27. Mai 2005 15:16
 An: Tomcat Users List
 Betreff: Re: jspServlet runs out of memory while compiling some jsp
 files using fork=true
 
 
 
 Hmh.. how does you deployment script work? Do you compile jsp 
 pages in some 
 other server than the live server?
 
 Well, I didn't write those pages :), I just have to live with 
 legacy code :D
 
 
 Vesa
 
 - Original Message - 
 From: Bernhard Slominski [EMAIL PROTECTED]
 To: 'Tomcat Users List' tomcat-user@jakarta.apache.org
 Sent: Friday, May 27, 2005 4:02 PM
 Subject: AW: jspServlet runs out of memory while compiling 
 some jsp files 
 using fork=true
 
 
 Hi,
 
 I think it happens randomly because it depends on the actual 
 load on the
 server.
 Where there is not much traffic it's OK, but with more 
 traffic the server
 runs out of memomry.
 I see your point that you cannot control the webmasters.
 But still with the problems you have and the obvious very

AW: Logging the HTTP headers

2005-06-03 Thread Bernhard Slominski
Hi Cristi,

they are in the Apache Logfile anyway, why do you want to log them again?

Bernhard

 -Ursprüngliche Nachricht-
 Von: cristi [mailto:[EMAIL PROTECTED]
 Gesendet: Donnerstag, 2. Juni 2005 10:04
 An: Tomcat Users List
 Betreff: Logging the HTTP headers
 
 
 Hello all
 
 Is there any posibility of logging the HTTP headers ?
 
 Thx.
 Cristi
 
 
 
 -
 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]



war file disappears during deployment

2005-06-09 Thread Bernhard Slominski
Hi,

I have a very strange phenomenon:
When I do a hot deployment of my application via war file, my application
disappears sometimes!
I'm using Tomcat 5.5.7 on Sun Solaris 7.
I post you my ant script, which I'm using.
As you can image, this is not very nice in a production environment. I try
to fix it by first stopping the application and then copying the war file
accross, but it's still the same.
You see some backup stuff in the antscript, maybe that's what's causing it,
but we need it, so the only solution, which I see is to stop and start
Tomcat, but that's not really acceptable in a 24xt environment.

target name=deploy
!-- build number --
buildnumber file=${backup}/${webappname}.number/
!-- copy the warfile to the backup directory --
copy file=${wars}/live/${webappname}.war
tofile=${backup}/${webappname}_${build.number}.jar/
!--  copy the remote file to the backup directory  -- 
scp
file=${adminremoteuser}:[EMAIL PROTECTED]:${remotedir}${w
ebappname}.war todir=${backup} trust=yes / 
!--  rename it to .backup -- 
move file=${backup}/${webappname}.war
tofile=${backup}/${webappname}.backup.war / 
!--  do (another) backup of the file from the live server
-- 
copy file=${backup}/${webappname}.backup.war
tofile=${backup}/${webappname}_${build.number}.backup.war / 
!-- stop the application -- 
  stop url=http://${adminremotehost}/manager;
username=${managerusername} password=${managerpassword}
path=/${webappname}/
!--  finally copy the war file to the remote server -- 
scp file=${wars}/live/${webappname}.war
todir=${adminremoteuser}:[EMAIL PROTECTED]:${remotedir}
trust=yes / 
/target

Thanks for your help!

Bernhard


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



Hot deployment - Your experience

2005-06-13 Thread Bernhard Slominski
Hi all,

I'm working on a backoffice admin application on Tomcat (5.5.7, Sun Solaris
9).
I try to do hot deployment via a war file, but it doesn't work at all for
me.
What I do is just to copy the war file across.

The problems I got (happens randomly):
- application including war file disappears
- Randon error messages, like log4j exceptions occur, it's fine after
restrating
- Tomcat hangs up

I just want to know if someone is using hot deployment  and interested how
you do it.

Thank you

Bernhard

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



AW: Hot deployment - Your experience

2005-06-13 Thread Bernhard Slominski
Hi Dirk,

thanks for your answer, that's a good point to look at.
Maybe the auto-deployment feature was the problem, I try to switch it off
and use the tomcat task.

Bernhard

 -Ursprüngliche Nachricht-
 Von: Dirk Weigenand [mailto:[EMAIL PROTECTED]
 Gesendet: Montag, 13. Juni 2005 14:43
 An: Tomcat Users List
 Betreff: Re: Hot deployment - Your experience
 
 
 Hi,
 
  --- Ursprüngliche Nachricht ---
  Von: Bernhard Slominski [EMAIL PROTECTED]
  An: 'Tomcat Users List' tomcat-user@jakarta.apache.org
  Betreff: Hot deployment - Your experience
  Datum: Mon, 13 Jun 2005 14:27:45 +0200
  
  Hi all,
  
  I'm working on a backoffice admin application on Tomcat (5.5.7, Sun
  Solaris
  9).
  I try to do hot deployment via a war file, but it doesn't 
 work at all for
  me.
  What I do is just to copy the war file across.
  
  The problems I got (happens randomly):
  - application including war file disappears
  - Randon error messages, like log4j exceptions occur, it's 
 fine after
  restrating
  - Tomcat hangs up
  
  I just want to know if someone is using hot deployment  and 
 interested how
  you do it.
  
  Thank you
  
  Bernhard
 
 
 i use the predefined task supplied with tomcat to deploy my 
 application to
 tomcat. There are no problems using these tasks.
 
 regards,
Dirk
 
 -- 
 Geschenkt: 3 Monate GMX ProMail gratis + 3 Ausgaben stern gratis
 ++ Jetzt anmelden  testen ++ http://www.gmx.net/de/go/promail ++
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



AW: Use JSPC

2005-06-16 Thread Bernhard Slominski
Hi Mino,

just one thing to add to the very good answer from Charl:
I post you my ant sccript, which does all together precompiling and
automatic generation of the web.xml file.
You might take it as a basis for your stuff.

Cheers

Bernhard

!-- do the precompilation --
target name=jspc depends=get-properties-stage  
mkdir dir=${webapproot}/src/

!-- define the jasper task --
taskdef classname=org.apache.jasper.JspC name=jasper2 

classpath id=jspc.classpath 
pathelement
location=${java.home}/../lib/tools.jar/ 
fileset dir=${tomcat.home}/bin 
include name=*.jar/ 
/fileset 
fileset dir=${tomcat.home}/server/lib 
include name=*.jar/ 
/fileset 
fileset dir=${tomcat.home}/common/lib 
include name=*.jar/ 
/fileset
fileset
dir=${webapproot}${webappname}/WEB-INF/lib 
include name=*.jar/
/fileset
/classpath
/taskdef 

!-- execute jasper, creates the servlet source files --
jasper2 
validateXml=false 
uriroot=${webapproot}${webappname} 
 
webXmlFragment=${webapproot}${webappname}/WEB-INF/generated_web.xml 
outputDir=${webapproot}/src / 

!-- compile the source files --
javac destdir=${webapproot}${webappname}/WEB-INF/classes
optimize=off
debug=on failonerror=false
srcdir=${webapproot}/src 
excludes=**/*.smap
classpath
pathelement
location=${webapproot}${webappname}/WEB-INF/classes/
pathelement
location=${tomcat.home}/common/classes/
pathelement
location=${tomcat.home}/shared/classes/
fileset dir=${tomcat.home}/common/lib
include name=*.jar/
/fileset
fileset dir=${tomcat.home}/shared/lib
include name=*.jar/
/fileset
fileset dir=${tomcat.home}/bin 
include name=*.jar/ 
/fileset 
fileset
dir=${webapproot}${webappname}/WEB-INF/lib 
include name=*.jar/
/fileset
/classpath
include name=** /
exclude name=tags/** /
/javac

!-- Load your precompiled snippet into a property --
loadfile property=precompiled

srcFile=${webapproot}${webappname}/WEB-INF/generated_web.xml
encoding=ISO-8859-1/

!-- Now replace the web.xml with a predifined snippet --
replace file=${webapproot}${webappname}/WEB-INF/web.xml
value=${precompiled}
replacetoken![CDATA[!-- precompile include
--]]/replacetoken
/replace
/target 

 -Ursprngliche Nachricht-
 Von: Charl Gerber [mailto:[EMAIL PROTECTED]
 Gesendet: Donnerstag, 16. Juni 2005 11:24
 An: Tomcat Users List
 Betreff: Re: Use JSPC
 
 
 If you have the generated java files, you can compile
 them like any other java class (remember to setup your
 classpath correctly, including some jars in the Tomcat
 libraries).
 
 Trickier to figure out first time round is to
 dynamically create the web.xml settings. Every .jsp
 now effectively becomes a servlet which needs to be
 added to your web.xml. Using ant its all done
 automatically, but getting it set up first time round
 can be tricky.
 
 Charl
 
 
 --- Giacomino Raccuia [EMAIL PROTECTED]
 wrote:
 
  Hi,
  I'd like to compile the JSP pages when I upload some
  new files on server 
  (tomcat 4.0.3) . I use the utility JSPC, but this
  generate only java 
  file but not the class file. I read that JRun has
  JSPC with -compile 
  argument while my JSPC utilty doesn't have thi
  argument.
  Is possible to generate class file with tomcat and
  JSPC? Or there is 
  another utility to use?
  
  Thanks in advance.
  Bye
  Mino
  
  
 
 -
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
  
  
 

AW: JSP pre-compile and Apache

2005-06-17 Thread Bernhard Slominski
Well there is one big advantage when using precompiled JSPs:
You're sure that all JSPs are compilable, so you don't get any compile
errors on your live site.
That gives your application more stability.

Bernhard

 -Ursprngliche Nachricht-
 Von: Charl Gerber [mailto:[EMAIL PROTECTED]
 Gesendet: Freitag, 17. Juni 2005 08:07
 An: Tomcat Users List
 Betreff: Re: JSP pre-compile and Apache
 
 
 I have the precompiled JSP's working with Apache now.
 Thanks.
 
 Apart from the first-time-hit compilation penalty on
 a normal jsp (as apposed to a precompiled one), why
 would you choose one option above the other?
 
 Standard jsp is easier to do updates if you work in an
 unpacked war setup - you just change the file and it
 is updated. Precompiled you have to acctually
 precompile the file.
 
 But how about performance and other issues? I guess it
 depends on your application, but is there somewhere a
 good checklist to determine when to choose the one
 option over the other?
 
 
 
 --- Terence M. Bandoian [EMAIL PROTECTED] wrote:
 
  Have you granted the site accessClassInPackage
  runtime permission?
  
  -Terence M. Bandoian
   [EMAIL PROTECTED]
  
   I used to precompile my JSP's (which worked great
  and
   was a big time saver in testing), but since
  running
   Tomcat 4.1.31 together with Apache, all sorts of
  weird
   errors occurred. I remember reading somewhere that
   Apache expected the actual jsp file, not the
  compiled
   version. So I reverted back to *not* precompiling
   JSP's and everything worked as expected.
  
   Question now, obviously there is a
  first-time-compile
   penalty per jsp, but once compiled, should
  performance
   be the same? How about the overhead to check if
  the
   .jsp file indeed matches the compiled version?
  
   Has someone managed to get precompiled JSP's
  running
   in combination with Apache?
  
  
 
 -
  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]



AW: AW: JSP pre-compile and Apache

2005-06-17 Thread Bernhard Slominski
It's not that it's not tested.
It can happen very easiliy, when you just forgot to check something in the
version control:
You added a method to a bean, change the JSP, it's working fine in you test
environment, you check in the JSP, but forget the bean, do the release and
you get the compile error on the live site.

That can't happen with precompliation.

 -Ursprngliche Nachricht-
 Von: Charl Gerber [mailto:[EMAIL PROTECTED]
 Gesendet: Freitag, 17. Juni 2005 10:28
 An: Tomcat Users List
 Betreff: Re: AW: JSP pre-compile and Apache
 
 
 With all due respect, I find that a weak argument. Its
 pretty dangerous to deploy anything to production
 without testing it on another (local) environment
 first. I would never change a jsp on production
 without checking it on another environment first.
 
 
  Well there is one big advantage when using
  precompiled JSPs:
  You're sure that all JSPs are compilable, so you
  don't get any compile
  errors on your live site.
  That gives your application more stability.
  
  Bernhard
  
   -Ursprngliche Nachricht-
   Von: Charl Gerber [mailto:[EMAIL PROTECTED]
   Gesendet: Freitag, 17. Juni 2005 08:07
   An: Tomcat Users List
   Betreff: Re: JSP pre-compile and Apache
   
   
   I have the precompiled JSP's working with Apache
  now.
   Thanks.
   
   Apart from the first-time-hit compilation
  penalty on
   a normal jsp (as apposed to a precompiled one),
  why
   would you choose one option above the other?
   
   Standard jsp is easier to do updates if you work
  in an
   unpacked war setup - you just change the file and
  it
   is updated. Precompiled you have to acctually
   precompile the file.
   
   But how about performance and other issues? I
  guess it
   depends on your application, but is there
  somewhere a
   good checklist to determine when to choose the one
   option over the other?
   
   
   
   --- Terence M. Bandoian [EMAIL PROTECTED]
  wrote:
   
Have you granted the site accessClassInPackage
runtime permission?

-Terence M. Bandoian
 [EMAIL PROTECTED]

 I used to precompile my JSP's (which worked
  great
and
 was a big time saver in testing), but since
running
 Tomcat 4.1.31 together with Apache, all sorts
  of
weird
 errors occurred. I remember reading somewhere
  that
 Apache expected the actual jsp file, not the
compiled
 version. So I reverted back to *not*
  precompiling
 JSP's and everything worked as expected.

 Question now, obviously there is a
first-time-compile
 penalty per jsp, but once compiled, should
performance
 be the same? How about the overhead to check
  if
the
 .jsp file indeed matches the compiled version?

 Has someone managed to get precompiled JSP's
running
 in combination with Apache?


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

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



AW: Use JSPC

2005-06-22 Thread Bernhard Slominski
Hi Nicolas,

what jspc basically needs, is acces to all the internal tomcat libraries,
as you see from the ant script:
${tomcat.home}/bin/*.jar
${tomcat.home}/server/lib/*.jar
${tomcat.home}/common/lib/*.jar

As well as all the libraries from you web application.
So what I did was just installing (unzipping) Tomcat on my deployment
machine, just in order to the able to do the precomplation. I think you can
also just download the deployer distribution
(http://jakarta.apache.org/site/downloads/downloads_tomcat-5.cgi) this
should contain all the stuff you need for the deployment. But I don't have
experience with the deployer application.

Conerning you web application: You need to include all the classes and
libraries in the classpath as well, but it doesn't have to be under
${tomcat.home}/webapps it can be anywhere on your deployment machine.
Maybe what's missing is that you have to include the /WEB-INF/classes
directory too in your ant script.
It's not in mine because I only use jar files in my webapp.

Good luck!

Bernhard


 -Ursprüngliche Nachricht-
 Von: Karasek-XID, Nicolas [mailto:[EMAIL PROTECTED]
 Gesendet: Mittwoch, 22. Juni 2005 10:26
 An: Tomcat Users List
 Betreff: RE: Use JSPC
 
 
 Hi bernhard,
 
 Just a few dumb questions on this, I still have problem to 
 generate servlets source files from jsp.
 From a previous message you sent on this subject in another 
 thread I guess I have a classpath problem in my jspc task ( 
 NullPointerException at 
 org.apache.jasper.JspCompilationContext.createCompiler(JspComp
 ilationContext.java:220) with tomcat 5.5.9).
 I think I have the correct values for getting tools.jar and 
 jasper jars in jspc.classpath.
 So, should the webapp be placed in tomcat webapps directory 
 in order to allow jspc work ? or maybe it doesn't matter ?
 Maybe someone have an idea on what I miss...
 
 -- 
 Nicolas
 
 
 -Original Message-
 From: Bernhard Slominski [mailto:[EMAIL PROTECTED] 
 Sent: jeudi 16 juin 2005 11:44
 To: 'Tomcat Users List'
 Subject: AW: Use JSPC
 
 Hi Mino,
 
 just one thing to add to the very good answer from Charl:
 I post you my ant sccript, which does all together precompiling and
 automatic generation of the web.xml file.
 You might take it as a basis for your stuff.
 
 Cheers
 
 Bernhard
 
   !-- do the precompilation --
   target name=jspc depends=get-properties-stage  
   mkdir dir=${webapproot}/src/
 
   !-- define the jasper task --
   taskdef classname=org.apache.jasper.JspC 
 name=jasper2 
 
   classpath id=jspc.classpath 
   pathelement
 location=${java.home}/../lib/tools.jar/ 
   fileset dir=${tomcat.home}/bin 
   include name=*.jar/ 
   /fileset 
   fileset 
 dir=${tomcat.home}/server/lib 
   include name=*.jar/ 
   /fileset 
   fileset 
 dir=${tomcat.home}/common/lib 
   include name=*.jar/ 
   /fileset
   fileset
 dir=${webapproot}${webappname}/WEB-INF/lib 
   include name=*.jar/
   /fileset
   /classpath
   /taskdef 
 
   !-- execute jasper, creates the servlet source 
 files --
   jasper2 
   validateXml=false 
   uriroot=${webapproot}${webappname} 
  
 webXmlFragment=${webapproot}${webappname}/WEB-INF/generated_web.xml 
   outputDir=${webapproot}/src / 
 
   !-- compile the source files --
   javac 
 destdir=${webapproot}${webappname}/WEB-INF/classes
   optimize=off
   debug=on failonerror=false
   srcdir=${webapproot}/src 
   excludes=**/*.smap
   classpath
   pathelement
 location=${webapproot}${webappname}/WEB-INF/classes/
   pathelement
 location=${tomcat.home}/common/classes/
   pathelement
 location=${tomcat.home}/shared/classes/
   fileset 
 dir=${tomcat.home}/common/lib
   include name=*.jar/
   /fileset
   fileset 
 dir=${tomcat.home}/shared/lib
   include name=*.jar/
   /fileset
   fileset dir=${tomcat.home}/bin 
   include name=*.jar/ 
   /fileset 
   fileset
 dir=${webapproot}${webappname}/WEB-INF/lib

AW: Use JSPC

2005-06-22 Thread Bernhard Slominski
 target name=jspc 
 
 taskdef classname=org.apache.jasper.JspC name=jasper2  
   classpath id=jspc.classpath 
 pathelement location=${java.home}/../lib/tools.jar/ 
 fileset dir=${tomcat.home}/bin 
   include name=*.jar/ 
 /fileset 
 fileset dir=${tomcat.home}/server/lib 
   include name=*.jar/ 
 /fileset 
 fileset dir=${tomcat.home}/common/lib 
   include name=*.jar/ 
 /fileset 
   /classpath 
 /taskdef 
 
 jasper2 
  validateXml=false 
  uriroot=${webapp.path} 
  
 webXmlFragment=${webapp.path}/WEB-INF/generated_web.xml 
  outputDir=${webapp.path}/WEB-INF/src / 
 
   /target
 

 However If someone see a point to check...

What I think is missing is the Webapplication classes in your classpath, so:
 fileset dir=${webapp.path}/lib 
   include name=*.jar/ 
 /fileset 
 fileset dir=${webapp.path}/classes 
   include name=**/*.class/ 
 /fileset 
But I didn't test this on my System.

But narrow it down I would do the following:
Just write a simple Hello world jsp and remove all other Jsps from your
application.
Try to get jasper working with this file, if it's working fine, then you
know an application specfic calls is not picked up.
If the Hello world jsp does not work, you know it's a Tomcat/JRE class
which is missing.

Cheers

Bernhard

 
 -Original Message-
 From: Bernhard Slominski [mailto:[EMAIL PROTECTED] 
 Sent: mercredi 22 juin 2005 11:07
 To: 'Tomcat Users List'
 Subject: AW: Use JSPC
 
 Hi Nicolas,
 
 what jspc basically needs, is acces to all the internal 
 tomcat libraries,
 as you see from the ant script:
 ${tomcat.home}/bin/*.jar
 ${tomcat.home}/server/lib/*.jar
 ${tomcat.home}/common/lib/*.jar
 
 As well as all the libraries from you web application.
 So what I did was just installing (unzipping) Tomcat on my 
 deployment
 machine, just in order to the able to do the precomplation. I 
 think you can
 also just download the deployer distribution
 (http://jakarta.apache.org/site/downloads/downloads_tomcat-5.cgi) this
 should contain all the stuff you need for the deployment. But 
 I don't have
 experience with the deployer application.
 
 Conerning you web application: You need to include all the classes and
 libraries in the classpath as well, but it doesn't have to be under
 ${tomcat.home}/webapps it can be anywhere on your deployment machine.
 Maybe what's missing is that you have to include the /WEB-INF/classes
 directory too in your ant script.
 It's not in mine because I only use jar files in my webapp.
 
 Good luck!
 
 Bernhard
 
 
  -Ursprüngliche Nachricht-
  Von: Karasek-XID, Nicolas [mailto:[EMAIL PROTECTED]
  Gesendet: Mittwoch, 22. Juni 2005 10:26
  An: Tomcat Users List
  Betreff: RE: Use JSPC
  
  
  Hi bernhard,
  
  Just a few dumb questions on this, I still have problem to 
  generate servlets source files from jsp.
  From a previous message you sent on this subject in another 
  thread I guess I have a classpath problem in my jspc task ( 
  NullPointerException at 
  org.apache.jasper.JspCompilationContext.createCompiler(JspComp
  ilationContext.java:220) with tomcat 5.5.9).
  I think I have the correct values for getting tools.jar and 
  jasper jars in jspc.classpath.
  So, should the webapp be placed in tomcat webapps directory 
  in order to allow jspc work ? or maybe it doesn't matter ?
  Maybe someone have an idea on what I miss...
  
  -- 
  Nicolas
  
  
  -Original Message-
  From: Bernhard Slominski [mailto:[EMAIL PROTECTED] 
  Sent: jeudi 16 juin 2005 11:44
  To: 'Tomcat Users List'
  Subject: AW: Use JSPC
  
  Hi Mino,
  
  just one thing to add to the very good answer from Charl:
  I post you my ant sccript, which does all together precompiling and
  automatic generation of the web.xml file.
  You might take it as a basis for your stuff.
  
  Cheers
  
  Bernhard
  
  !-- do the precompilation --
  target name=jspc depends=get-properties-stage  
  mkdir dir=${webapproot}/src/
  
  !-- define the jasper task --
  taskdef classname=org.apache.jasper.JspC 
  name=jasper2 
  
  classpath id=jspc.classpath 
  pathelement
  location=${java.home}/../lib/tools.jar/ 
  fileset dir=${tomcat.home}/bin 
  include name=*.jar/ 
  /fileset 
  fileset 
  dir=${tomcat.home}/server/lib 
  include name=*.jar/ 
  /fileset 
  fileset 
  dir=${tomcat.home}/common/lib 
  include name=*.jar/ 
  /fileset
  fileset
  dir=${webapproot}${webappname}/WEB-INF/lib

AW: tomcat list ant task queries

2005-06-23 Thread Bernhard Slominski
Hi Tim,

what you also can do is just checking if the directory of the webapp exists.
So this would be a check on the filesystem and not in Tomcat, but should
work as well.

Cheers

Bernhard
 
 -Ursprüngliche Nachricht-
 Von: Tim Diggins [mailto:[EMAIL PROTECTED]
 Gesendet: Donnerstag, 23. Juni 2005 13:28
 An: Tomcat
 Betreff: tomcat list ant task queries
 
 
 Hi -
 
 (using ant to deploy an application for testing purposes)
 
 Is there a way to use the list anttask to put the list of installed 
 tasks into a property?
 
 That way I could make a very flexible reload target which 
 would check 
 if the context was already in the list, and if it was then 
 undeploy it, 
 and then finally deploy it (otherwise the undeploy task generates an 
 error which stops the process).
 
 Or is there another (better) way to do this?
 
 thanks in advance
 
 Tim
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



AW: deploying war files

2005-06-27 Thread Bernhard Slominski
Hi Darren,

what I do is to deploy the war file as zip file, then extract it and reload
the applicataion.
It's not very nice, but it's working automatically in an ant script, I did
it because the war file deployment was to unstable.

Cheers

Bernhard

 -Ursprüngliche Nachricht-
 Von: Darren Carman [mailto:[EMAIL PROTECTED]
 Gesendet: Montag, 27. Juni 2005 15:39
 An: tomcat-user@jakarta.apache.org
 Betreff: deploying war files
 
 
 Hi,
 
 I have a project which generates log files within the project 
 area. When I deploy a war file to a running tomcat instance 
 the project appears to be deleted and re-created. Is there 
 anyway to deploy automatically without deleting these files 
 (or any files that exist in the project area that are not 
 deployed in the war file)?
 
 I use netbeans to generate the war file if that gives me any 
 more options on how to do this.
 
 Thanks in advance
 Darren
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



AW: Load all JSP pages on startup

2005-06-29 Thread Bernhard Slominski
 
 I don't want to precompile in my build script,

With the precompilation you can do the stuff you need, it automatically
creates the servlet mapping in the web.xml.
The only thing you have to add is the load-on-startup1/load-on-startup
part, but I think you can automate this as well.

So why don't you want precompilation?

Bernhard

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



AW: AW: Load all JSP pages on startup

2005-06-29 Thread Bernhard Slominski
 
 We have a custom (non-generated) web.xml, with some taglibs 
 and servlets defined in there.
 Precompilation is tomcat dependend I suppose?

You're right precompliation is tomcat dependent, but it works like this that
the ant task takes your (non-tomcat dependent) web.xml and just adds the
mappings for the precompiled JSPs, so it would still be possible to use one
single web.xml and then have a jsp server target-dependent precomplitation
task, but I don't know how that works in resin or Weblogic, and I see your
point now.

Sorry, but I don't have a better solution for you!

Bernhard

 
 I was hoping there was a simple way in the web deployment 
 descriptor to 
 load them all on startup, in a webserver independed way.
 

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



AW: AW: Load all JSP pages on startup

2005-06-29 Thread Bernhard Slominski
 
  
  We have a custom (non-generated) web.xml, with some taglibs 
  and servlets defined in there.
  Precompilation is tomcat dependend I suppose?
 
 You're right precompliation is tomcat dependent, but it works 
 like this that
 the ant task takes your (non-tomcat dependent) web.xml and 
 just adds the
 mappings for the precompiled JSPs, so it would still be 
 possible to use one
 single web.xml and then have a jsp server target-dependent 
 precomplitation
 task, but I don't know how that works in resin or Weblogic, 
 and I see your
 point now.

When thinking about it again I assume that the precompiled webapp with
Tomcat should also work in any other JSP container, as long as you have the
Tomcat libraries in your classpath, because in the end your compiled JSPs
are just normal servlets.

Bernhard

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



AW: AW: Load all JSP pages on startup

2005-06-30 Thread Bernhard Slominski
 
 It's even better than that: the webapp itself is portable, without the
 Tomcat libraries.  The precompilation process just churns 
 your JSPs into
 servlets at build time instead of runtime.
 

Let me add somthing here, it's right that the servlets are build at compile
time, but they still use Tomcat specific stuff.
Look at a generated servlet from a JSP:

...
public final class contactForm_jsp extends
org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
...

As you see it uses Tomcat sepcific stuff, when running this webapp on a
different container you need the Tomcat libraries in your classpath!

Bernhard

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



AW: Jsp Pre-compilation

2005-06-30 Thread Bernhard Slominski
Hi Nils,

two things:
1. I would use an absolute path instead of the realitive one ./hummingbird
I guess jasper just can't pick up your jsps!
2. outputDir: You set it to WEB-INF/classes but what you create are
actually java source files, so this is not right, even tohough it doesn't
explain the failure of the precompliation

Good luck

Bernhard

 -Ursprüngliche Nachricht-
 Von: Nils Liebelt [mailto:[EMAIL PROTECTED]
 Gesendet: Donnerstag, 30. Juni 2005 15:09
 An: tomcat-user@jakarta.apache.org
 Cc: [EMAIL PROTECTED]
 Betreff: Jsp Pre-compilation
 
 
 Hi all,
 
 I have trouble pre-compiling my jsp-pages. I wrote following 
 ant target:
 
   target name=jspc depends=build
 taskdef classname=org.apache.jasper.JspC name=jasper2
 classpath id=jspc.classpath 
   fileset dir=${tomcat.home}/bin 
 include name=*.jar/ 
   /fileset 
   fileset dir=${tomcat.home}/server/lib 
 include name=*.jar/ 
   /fileset 
   fileset dir=${tomcat.home}/common/lib 
 include name=*.jar/ 
   /fileset 
 /classpath  
 /taskdef
 jasper2 validateXml=false
   compile=true
   verbose=99
   listErrors=true
   uriroot=./hummingbird 
   
 webXmlFragment=./hummingbird/WEB-INF/generated_web.xml 
   outputDir=./hummingbird/WEB-INF/classes /
   /target   
 
 The task executes successful but it does not create a single 
 java file nor
 its outputs anything? I want execute the task out of my 
 project src folder.
 The libraries should be at the right place. I am really stuck here...
 
 
 Regards,
 
 Nils
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



AW: error while building with jakarta-ant-1.5.1

2005-07-01 Thread Bernhard Slominski

 
 Hi Tim,
 
 Iam sure that Iam using the right tools.jar, and it is containing the
 class com.sun.tools.javah.Main
 

I also think so, because that's what the errormessage says, it cannot find
the requested constructor.
I check my tools.jar (JDK 1.5.0_01) and I found this method signature, which
is obviously not there in your tools.jar.

package com.sun.tools.javah;
public class Main {
public Main() { /* compiled code */ }

public static void main(String[] strings) { /* compiled code */ }
}

Check yours and see if you have the same signature, if not you should update
or replace it.

Bernhard

 build: 
 /Tomcat/jakarta-ant-1.5.1/src/main/org/apache/tools/ant/taskde
 fs/optiona
 l/Javah.java:349: cannot resolve symbol
 symbol  : constructor Main (java.lang.String[])
 location: class com.sun.tools.javah.Main
 = new com.sun.tools.javah.Main(cmd.getArguments());
   ^
 

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



AW: URI of *_jsp.java

2005-07-11 Thread Bernhard Slominski
Hi Kristoffer,

the java files are under ${TOMCAT_HOME}\work\catalina\localhost ...
But you cannot get these files via URI, because that would mean that
everyone can see the sourcecode of your jsp.

It's not quite clear to me how you retrive the sutdent name from the
generated java file.
A better idea from my point of view is - if you use a version control system
- to get it directly from there,
or - if not - read it from the file system.

Cheers

Bernhard

 -Ursprüngliche Nachricht-
 Von: Kristoffer Nyborg Gregertsen [mailto:[EMAIL PROTECTED]
 Gesendet: Montag, 11. Juli 2005 13:05
 An: tomcat-user@jakarta.apache.org
 Betreff: URI of *_jsp.java
 
 
 Hi
 
 I'm working for the Department of Computer and Information 
 Science at the 
 Norwegian University of Science and Technology to make an 
 JSP-errorPage that 
 analyzes the students JSP runtime-exceptions and gives 
 easy-to-understand 
 feedback.
 
 
 Want I need to know:
 
 How do I obtain the URI of the java-file (like 
 index_jsp.java) generated by 
 Jasper?
 
 
 I've searched the APIs, but I can't find a easy way to obtain 
 this. I need to 
 read the java-file for presenting the student with the 
 codeline that caused 
 the exception.
 
 (Please foregive my ignorance, as a student of cybernetics 
 I'm used to program 
 for microcontrollers, not webapplications...)
 -- 
 
 Med vennlig hilsen - With kind regards
 
 Kristoffer Nyborg Gregertsen
 
 Student
 Department of Engineering Cybernetics
 Norwegian University of Science and Technology
 Trondheim
 Norway
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



AW: AW: URI of *_jsp.java

2005-07-11 Thread Bernhard Slominski
I see you point now, your smart ExceptionAnalyzer gives them the line in the
sourcecode so it's easier for them to find out what was wrong.
But unfortunatly I don't see a different way except to find out yourself as
you pointed out like:
{$TOMCAT_HOME}/work/catalina/{$WHATEVER_SERVER}/{$USER}/...

But as long as you don't change your server and applications names it still
should work fine via the filesystem.

Bernhard


 -Ursprüngliche Nachricht-
 Von: Kristoffer Nyborg Gregertsen [mailto:[EMAIL PROTECTED]
 Gesendet: Montag, 11. Juli 2005 14:49
 An: Tomcat Users List
 Betreff: Re: AW: URI of *_jsp.java
 
 
 On Monday 11 July 2005 14:01, Bernhard Slominski wrote:
  Hi Kristoffer,
 
  the java files are under ${TOMCAT_HOME}\work\catalina\localhost ...
  But you cannot get these files via URI, because that would mean that
  everyone can see the sourcecode of your jsp.
 
  It's not quite clear to me how you retrive the sutdent name from the
  generated java file.
  A better idea from my point of view is - if you use a 
 version control
  system - to get it directly from there,
  or - if not - read it from the file system.
 
  Cheers
 
  Bernhard
 
 Thanks for answering, Bernhard :-)
 
 Think I mixed up things a bit, I want to access the java-file 
 through the 
 filesystem with the UID that my servlet runs as.
 
 I have made a class called ExceptionAnalyzer that takes the 
 pageContext of the 
 JSP-errorPage as an argument and tries to extract as much 
 information as 
 possible.
 
 The students name doesn't really concern us, we don't keep 
 track of who has 
 done what wrong, the errorPage is only ment to help the 
 students understand 
 what they did wrong. We're using JSP as an first introduction 
 to programming 
 for all of the schools 1200 Master of Technology-freshmen.
 
 The code is very simple, like
 
 %
   for (int i=0; i  10; i++)
   out.println(Hello world!);
 %
 
 etc, so there is not really any point in preventing others 
 from seeing it.
 
 
 
 But, to get to the point:
 
 Is there no easy way I can ask Jasper or another 
 Tomcat-component where the 
 Java-source of the given JSP-servlet is located on the filesystem?
 
 
 
 Do I have to find it out myself like: 
 
 {$TOMCAT_HOME}/work/catalina/{$WHATEVER_SERVER}/{$USER}/...
 -- 
 
 Med vennlig hilsen - With kind regards
 
 Kristoffer Nyborg Gregertsen
 
 Student
 Department of Engineering Cybernetics
 Norwegian University of Science and Technology
 Trondheim
 Norway
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



AW: Preprocessing JSP pages

2005-07-18 Thread Bernhard Slominski
How about integrating it in your ant build script?
This changes your preprocessing from runtime to compile time.

Bernhard

 -Ursprüngliche Nachricht-
 Von: Edward Hibbert [mailto:[EMAIL PROTECTED]
 Gesendet: Montag, 18. Juli 2005 11:32
 An: tomcat-user@jakarta.apache.org
 Betreff: Preprocessing JSP pages
 
 
 Perhaps you can help me.
 
 We have an application which used Tomcat v4, which I'm 
 migrating to use 5.5.9.  We made some changes to the Tomcat 
 source to allow JSP pages to be preprocessed, so that we 
 could strip out/add in certain code branches at runtime based 
 on configuration.  We did this by making changes to e.g. 
 ParserController.java.
 
 In retrospect this wasn't a great idea, because it meant we 
 had to ship our own version of Tomcat, so we're looking at 
 removing these changes so that we can use a vanilla version of Tomcat.
 
 I can roll my own different version of this preprocessing, 
 e.g. as part of starting Tomcat.  But I'm wondering whether 
 there's a way you're supposed to do something like this?  
 E.g. is there a way you can register something to get invoked 
 when Tomcat is loading JSP, without having to hack the code to do so?
 
 Thanks for any help,
 
 Edward Hibbert.
 

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



AW: Deployment using WAR files

2005-07-19 Thread Bernhard Slominski
Hi Joaquim,

I think you always should do a COMPLETE release of the war file.
So you always have an atomic, conistent relase. 
When it comes to rollback, versioning etc. you're much better off in having
a complete release as war file.
You can use hot deployment, so when you copy the new war file across, it's
automatically deployed and you don't loose your sessions.
However, my experiences with hot deployment are terrible, it was not working
stable at all, I had many application crashes caused by hot deployment. 
So what I do now is build a war file, rename it as zip file and unzip it
manually, they reload the application, it's somehow stuid, but working
stable.

Cheers

Bernhard

 -Ursprüngliche Nachricht-
 Von: Insyde [mailto:[EMAIL PROTECTED]
 Gesendet: Montag, 18. Juli 2005 19:47
 An: Tomcat Users List
 Betreff: Deployment using WAR files
 
 
 Hello,
 
 I have some questions about many people working in the same 
 project and deploying using WAR file.
 
 I belong to a group that is developping a web application and 
 use TOMCAT to test it. At the beginning the deployment was 
 done by copying classes, jsp, and jar files etc to the folder 
 of our web application into webapps subdirectory of TOMCAT. 
 Then we decided to use a WAR file. However there are many 
 people working in the same web application and deployment 
 using a WAR means to undeploy and deploy the whole web 
 application. We thought that one possible solution could be 
 to copy the components of web application  to the folder of 
 web application as we used to do. But is that the correct way 
 to do it ? How to could we deploy part of a web application 
 using war files ? Is it possible to do it ? We wonder how 
 people work in order to solve or minimize this situation. 
 
 Thanks in advance for any help.
 
 Joaquim Roberto.
 

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



AW: Using a constant in a JSP

2005-07-20 Thread Bernhard Slominski
Hi,

this is simply not supported in EL! 
I submitted this already as an enhancement
https://jsp-spec-public.dev.java.net/issues/show_bug.cgi?id=134
But it won't be in the next release in JSP 2.1, that's for sure.
So you need to do a workaround:
- Use a bean to retrive the constant
- write an EL function

Cheers

Bernhard

 -Ursprüngliche Nachricht-
 Von: Guillaume Lederrey [mailto:[EMAIL PROTECTED]
 Gesendet: Mittwoch, 20. Juli 2005 16:10
 An: Tomcat Users List
 Betreff: Using a constant in a JSP
 
 
   Hello !
 
   This is probably a dumb question, but I'll try anyway. Please dont
 laugh at my ignorance ;-)
 
   I'm trying to use a constant (static final String) that is defined
 in a class. My code looks roughly so :
 
 
 %@ page 
 import='ch.tecost.siems.dao.care.planification.FrequencyType' %
 
 [...]
 
 html:radio name=form property=frequencyType
 value=${FrequencyType.MEAL_TIME}  [...] /
 
 
 
 Of course, this doesnt seem to work. What would be the right syntax ?
 I'm a bit lost and dont know exactly what I should be looking for.
 Yes, I tried Google with no success; or too much success (millions of
 page that dont exactly tell me what to do in this case) ...
 
   Thanks a lot for the time you will take to make me less ignorant !
 
 
 Guillaume
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



AW: Session ID's

2005-08-02 Thread Bernhard Slominski
Some small addition:
URL Rewriting is only used when cookies are switched off.
From the Servlet Spec:

SRV.7.1.3 URL Rewriting
URL rewriting is the lowest common denominator of session tracking. When a
client will not accept a cookie, URL rewriting may be used by the server as
the basis
for session tracking. URL rewriting involves adding data, a session ID, to
the URL
path that is interpreted by the container to associate the request with a
session.
The session ID must be encoded as a path parameter in the URL string. The
name of the parameter must be jsessionid. Here is an example of a URL
containing encoded path information:
http://www.myserver.com/catalog/index.html;jsessionid=1234

SRV.7.1.4 Session Integrity
Web containers must be able to support the HTTP session while servicing HTTP
requests from clients that do not support the use of cookies. To fulfill
this
requirement, Web containers commonly support the URL rewriting mechanism.

Bernhard

 -Ursprüngliche Nachricht-
 Von: Charles P. Killmer [mailto:[EMAIL PROTECTED]
 Gesendet: Dienstag, 2. August 2005 17:03
 An: Tomcat Users List
 Betreff: RE: Session ID's
 
 
 I was hoping there was a configuration setting that would tack the
 session id onto every hyperlink at runtime, much as PHP does.
 
 Charles
 
 -Original Message-
 From: Derrick Koes [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, August 02, 2005 9:20 AM
 To: Tomcat Users List
 Subject: RE: Session ID's
 
 Use HttpServletResponse.encodeURL(String url) 
 
 -Original Message-
 From: Charles P. Killmer [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, August 02, 2005 10:04 AM
 To: Tomcat Users List
 Subject: Session ID's
 
 Is there a configuration setting such that every local URL will be
 encoded with a session id if one is present?  I have developed a site
 that uses cookies to hold the session id and am getting 
 complaints from
 users that do not have cookies enabled.
  
 Thanks
 Charles
 
 -
 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]



AW: Session ID's

2005-08-03 Thread Bernhard Slominski
Well, nobody likes to go through the specs, an excellent book which covers
the session handling very well to is:
Head First Servlets and JSP
http://www.amazon.com/exec/obidos/tg/detail/-/0596005407/qid=1123053380/sr=8
-1/ref=pd_bbs_sbs_1/103-1556156-2935038?v=glances=booksn=507846

Bernhard


 -Ursprüngliche Nachricht-
 Von: Charles P. Killmer [mailto:[EMAIL PROTECTED]
 Gesendet: Dienstag, 2. August 2005 19:08
 An: Tomcat Users List
 Betreff: RE: Session ID's
 
 
 Thanks.  I will take a look through this.
 
 Charles 
 
 -Original Message-
 From: Bernhard Slominski [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, August 02, 2005 10:33 AM
 To: 'Tomcat Users List'
 Subject: AW: Session ID's
 
 Some small addition:
 URL Rewriting is only used when cookies are switched off.
 From the Servlet Spec:
 
 SRV.7.1.3 URL Rewriting
 URL rewriting is the lowest common denominator of session 
 tracking. When a client will not accept a cookie, URL 
 rewriting may be used by the server as the basis for session 
 tracking. URL rewriting involves adding data, a session ID, 
 to the URL path that is interpreted by the container to 
 associate the request with a session.
 The session ID must be encoded as a path parameter in the URL 
 string. The name of the parameter must be jsessionid. Here is 
 an example of a URL containing encoded path information:
 http://www.myserver.com/catalog/index.html;jsessionid=1234
 
 SRV.7.1.4 Session Integrity
 Web containers must be able to support the HTTP session while 
 servicing HTTP requests from clients that do not support the 
 use of cookies. To fulfill this requirement, Web containers 
 commonly support the URL rewriting mechanism.
 
 Bernhard
 
  -Ursprüngliche Nachricht-
  Von: Charles P. Killmer [mailto:[EMAIL PROTECTED]
  Gesendet: Dienstag, 2. August 2005 17:03
  An: Tomcat Users List
  Betreff: RE: Session ID's
  
  
  I was hoping there was a configuration setting that would tack the 
  session id onto every hyperlink at runtime, much as PHP does.
  
  Charles
  
  -Original Message-
  From: Derrick Koes [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, August 02, 2005 9:20 AM
  To: Tomcat Users List
  Subject: RE: Session ID's
  
  Use HttpServletResponse.encodeURL(String url)
  
  -Original Message-
  From: Charles P. Killmer [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, August 02, 2005 10:04 AM
  To: Tomcat Users List
  Subject: Session ID's
  
  Is there a configuration setting such that every local URL will be 
  encoded with a session id if one is present?  I have 
 developed a site 
  that uses cookies to hold the session id and am getting complaints 
  from users that do not have cookies enabled.
   
  Thanks
  Charles
  
  
 -
  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]
 

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



AW: JspC compile exception in tomcat-deployer 5.5.10

2005-08-16 Thread Bernhard Slominski
Hi Richard,

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

Cheers

Bernhard


taskdef classname=org.apache.jasper.JspC name=jasper2  
classpath id=jspc.classpath 
pathelement location=${java.home}/../lib/tools.jar/ 
fileset dir=${tomcat.home}/bin 
include name=*.jar/ 
  /fileset 
fileset dir=${tomcat.home}/server/lib 
include name=*.jar/ 
/fileset 
fileset dir=${tomcat.home}/common/lib 
include name=*.jar/ 
  /fileset
fileset dir=${webapproot}${webappname}/WEB-INF/lib 
include name=*.jar/
/fileset
/classpath
/taskdef 

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


Hello,

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

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

Here is how I've got the jasper2 task defined in my build.xml:
jasper2 validateXml=false 
 uriroot=${webapp.path} 
 webXmlFragment=${webapp.path}/WEB-INF/generated_web.xml
 addWebXmlMappings=true
 outputDir=${webapp.path}/WEB-INF/classes / 

Notice that I turned validateXml to false - otherwise I get the following
message:
[jasper2] org.xml.sax.SAXParseException: Document is invalid: no grammar
found.
I have compared and compared my web.xml to the spec and it seems to be OK.
It complains about position 9 in the 3rd line. Line 3 follows, position 9 is
the start of the xmlns= attribute:
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
... which appears to be fine.

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

Thanks in advance for any ideas.

 - Richard


Exception from running ant compile:

Loaded from C:\jakarta-tomcat-5.5.10-deployer\lib\jasper-compiler.jar
org/apache/jasper/compiler/AntCompiler.class
Class org.apache.jasper.compiler.AntCompiler loaded from ant loader
(parentFirst)
Class org.apache.tools.ant.BuildListener loaded from parent loader
(parentFirst)
Couldn't load Resource commons-logging.properties
Couldn't load Resource
META-INF/services/org.apache.commons.logging.LogFactory
Finding class org.apache.log4j.Logger
Finding class org.apache.log4j.Category
Finding class org.apache.log4j.spi.AppenderAttachable
Finding class org.apache.commons.logging.impl.Log4JLogger
Loaded from C:\jakarta-tomcat-5.5.10-deployer\lib\commons-logging.jar
org/apache/commons/logging/impl/Log4JLogger.class
Class org.apache.commons.logging.impl.Log4JLogger loaded from ant loader
(parentFirst)
Finding class org.apache.log4j.Category
Finding class org.apache.log4j.Category
  [jasper2] java.lang.NullPointerException
  [jasper2] at
org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext
.java:220)
  [jasper2] at org.apache.jasper.JspC.processFile(JspC.java:913)
  [jasper2] at org.apache.jasper.JspC.execute(JspC.java:1061)
  [jasper2] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
  [jasper2] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
  [jasper2] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
  [jasper2] at java.lang.reflect.Method.invoke(Method.java:585)
  [jasper2] at
org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:123)
  [jasper2] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
  [jasper2] at org.apache.tools.ant.Task.perform(Task.java:364)
  [jasper2] at org.apache.tools.ant.Target.execute(Target.java:341)
  [jasper2] at org.apache.tools.ant.Target.performTasks(Target.java:369)
  [jasper2] at

AW: JSP Precompilation

2005-08-18 Thread Bernhard Slominski
Maybe there are a few classfiles missing, which are only used with these two
jsps.

Bernhard

 -Ursprüngliche Nachricht-
 Von: Ramnish Kalsi [mailto:[EMAIL PROTECTED]
 Gesendet: Mittwoch, 17. August 2005 20:52
 An: 'Tomcat Users List'
 Betreff: JSP Precompilation
 
 
 I am trying to use jasper2 to pre-compile the JSPs as part of 
 build process.
 The compiler is complaining with the message:
 
 ERROR - the file 'blah/blah/jsp' generated the following 
 general exception:
 java.lang.NullPointerException'
 
 After spending some time, i realized that the jsp files which 
 had invalid
 usage of tags were the culprits.
 
 The errors disappeared after tag cleaning. Now this error is 
 only coming for
 2 files, and i am positive that there is nothing wrong with tags. 
 
 What could be other possible reasons ?
 
 Is there any way of configuring the compiler to output 
 detailed stacktrace,
 if it fails at any jsp file compilation.
 
 Tomcat version is 4.1.
 
 thanks,
 ramnish.
 
 
 **
 This email and any files transmitted with it are confidential and
 intended solely for the use of the individual or entity to whom they
 are addressed. If you have received this email in error please notify
 the system manager.
 
 This footnote also confirms that this email message has been swept by
 MIMEsweeper for the presence of computer viruses.
 
 www.mimesweeper.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]



AW: tomcat 5.5.9 not recompiling JSPs

2005-08-22 Thread Bernhard Slominski
You're both right.
But when you run your Webapplication under non-tomcat container you need the
tomcat libraries.
Also when going to dfferent versions of tomcat, so e.g. from 4 to 5.5 you
might get compatibility issues.

Bernhard 

 -Ursprüngliche Nachricht-
 Von: Allistair Crossley [mailto:[EMAIL PROTECTED]
 Gesendet: Montag, 22. August 2005 16:14
 An: Tomcat Users List
 Cc: [EMAIL PROTECTED]
 Betreff: RE: tomcat 5.5.9 not recompiling JSPs
 
 
 compiled pages are just classes, and so long as they are 
 mapped correctly in the web.xml you'll be ok.
 
  -Original Message-
  From: Paul Singleton [mailto:[EMAIL PROTECTED]
  Sent: 22 August 2005 15:13
  To: Tomcat Users List
  Cc: [EMAIL PROTECTED]
  Subject: Re: tomcat 5.5.9 not recompiling JSPs
  
  
  Mark Hagger wrote:
   ...
   Although to be honest I suspect that the best solution for 
  production
   boxes is to pre-compile all jsps into the war file anyway.
  
  Is this possible?  Don't different containers store the
  compiled pages in different places, with different names?
  
  Paul Singleton
  
  
  -- 
  No virus found in this outgoing message.
  Checked by AVG Anti-Virus.
  Version: 7.0.338 / Virus Database: 267.10.13/78 - Release 
  Date: 19/Aug/2005
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
 ---
 QAS Ltd.
 Registered in England: No 2582055
 Registered in Australia: No 082 851 474
 ---
 /FONT
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



AW: cross context info

2005-09-14 Thread Bernhard Slominski
Hi Alain, 

First of all the session is ALWAYS on application scope, this is not an
Tomcat specific behaviour but a requirement of the Specification:
SRV.7.3 Session Scope
HttpSession objects must be scoped at the application (or servlet context)
level.
The underlying mechanism, such as the cookie used to establish the session,
can be
the same for different contexts, but the object referenced, including the
attributes in
that object, must never be shared between contexts by the container.

So there is no way around this, if the sessions were replicated across the
applications it would violate the specification.

When you enable crossConext for your application:
Context crossContext=true docBase=testapp path=/testapp
reloadable=true
/Context

you can get the context for another application:
ServletContext context2 = context.getContext(/testapp);

and set attributes:
context2.setAttribute(test,JSP is great!);

But you cannot get to the session in the other application.

So what you can do is implement the session swapping on your own (Cookies,
via the Database) or merge your applications into one.

Some links from the Sun Forums:
http://forum.java.sun.com/thread.jsp?forum=33thread=259394
http://forum.java.sun.com/thread.jsp?forum=45thread=492484
http://forum.java.sun.com/thread.jsp?forum=33thread=318569

Cheers Bernhard

 -Ursprüngliche Nachricht-
 Von: Alain Gaeremynck [mailto:[EMAIL PROTECTED]
 Gesendet: Mittwoch, 14. September 2005 03:03
 An: Tomcat Users List
 Betreff: cross context info
 
 
 I have 2 webapps living on the same server and they are linked to the 
 same user experiance..  Now both apps require login but i 
 don't want my 
 users to have to login on both apps.  Also while they are browsing in 
 one context i don't want the session to expire for the other context. 
 
 so the question is  Is there a way to do session.setAtribute in one 
 context and retrieve it from another and also to link the 2 
 session so 
 that they don't expire or expire at the same time? 
 
 i'd like not to have to use hidden iframe and stuff like that
 
 thanks!
 
 -- 
 Alain Gaeremynck
 CTO Le Groupe Interstructure
 (514) 374-1110
 (514) 825-7810 cell
 weblog: http://www.sanssucre.ca
 (En informatique, comme en musique, n'importe quoi sauf du commercial)
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



AW: JSP 2.1 in Tomcat 6?

2005-09-19 Thread Bernhard Slominski
Hi Ron,

I don't know about the JSP 2.1 Support in Tomcat, but if you want to try it
out just use Glassfish: https://glassfish.dev.java.net/

Cheers 

Bernhard

 -Ursprüngliche Nachricht-
 Von: Ron Kiat [mailto:[EMAIL PROTECTED]
 Gesendet: Sonntag, 18. September 2005 18:16
 An: Tomcat Users List
 Betreff: JSP 2.1 in Tomcat 6?
 
 
 I understand that Tomcat 5.5 supports JSP 2.0. I heard that 
 JSP 2.1 has a 
 slightly different syntax for the Expression Language, and 
 Java 5 EE is 
 coming. Will the next build of 5.5 suppport JSP 2.1? Or will 
 there be Tomcat 
 6?
  Thanks,
 Ron
 

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



AW: Removing session id from url links

2005-09-22 Thread Bernhard Slominski
The session ids in the URL (URL Rewriting) are only used when cookies are
switched off as a fallback, so when cookies are switched on on your machine
you shouldn't see the session Id in the URL.

When you don't need a seesion on your page you can use this page directive
to switch off the session, so you won't have anything in the URL:
%@ page session=false %

Cheers

Bernhard

 -Ursprüngliche Nachricht-
 Von: Assaf [mailto:[EMAIL PROTECTED]
 Gesendet: Donnerstag, 22. September 2005 13:40
 An: Tomcat Users List
 Betreff: Removing session id from url links
 
 
 Hi,
 
 I have a problem with tomcat displaying urls on my
 site that include the jsessionid attached at the end.
 This is particularly a problem with search engine who
 crawl the site and index the page including the
 session id.
 
 Is there a way to disable it? 
 
 I am also using struts html:link so that might be
 the place to disable.
 
 Cheers,
 
 Assaf
 
 __
 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]
 

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



AW: AW: Removing session id from url links

2005-09-23 Thread Bernhard Slominski
Well, what you basically want to do is disable URL Rewriting.
What I saw so far it's not explicitly possible via the spec, but what you
can do is just not encoding the URL.
So I don't know struts, but can you not just use plain link?
An alternative would be to dig in the code of html:link and search for the
URL Encoding there and remove this. 
There must be something like encodeURL in the source code, which causes
the session id to be appended.

Bernhard

 -Ursprüngliche Nachricht-
 Von: Assaf [mailto:[EMAIL PROTECTED]
 Gesendet: Donnerstag, 22. September 2005 18:49
 An: Tomcat Users List
 Betreff: Re: AW: Removing session id from url links
 
 
 Thanks Bernard,
 
 My problem is to do with Search Engine bots. They seem
 to be getting jsessionid when they crawl and do not
 remove them. This causes them to index pages INCLUDING
 the session id and therefore it appears on the search
 engine listing. Any way to remove that?
 
 Assaf
 
 --- Bernhard Slominski
 [EMAIL PROTECTED] wrote:
 
  The session ids in the URL (URL Rewriting) are only
  used when cookies are
  switched off as a fallback, so when cookies are
  switched on on your machine
  you shouldn't see the session Id in the URL.
  
  When you don't need a seesion on your page you can
  use this page directive
  to switch off the session, so you won't have
  anything in the URL:
  %@ page session=false %
  
  Cheers
  
  Bernhard
  
   -Ursprüngliche Nachricht-
   Von: Assaf [mailto:[EMAIL PROTECTED]
   Gesendet: Donnerstag, 22. September 2005 13:40
   An: Tomcat Users List
   Betreff: Removing session id from url links
   
   
   Hi,
   
   I have a problem with tomcat displaying urls on my
   site that include the jsessionid attached at the
  end.
   This is particularly a problem with search engine
  who
   crawl the site and index the page including the
   session id.
   
   Is there a way to disable it? 
   
   I am also using struts html:link so that might
  be
   the place to disable.
   
   Cheers,
   
   Assaf
   
   __
   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]
   
  
 
 -
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
  
  
 
 
 
   
 __ 
 Yahoo! Mail - PC Magazine Editors' Choice 2005 
 http://mail.yahoo.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]



AW: How to PreCompile JSPs

2005-09-29 Thread Bernhard Slominski
From the Tomcat docs:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html


 -Ursprüngliche Nachricht-
 Von: Murali [mailto:[EMAIL PROTECTED]
 Gesendet: Donnerstag, 29. September 2005 16:54
 An: tomcat-user@jakarta.apache.org
 Betreff: How to PreCompile JSPs
 
 
 Hi ,
  Can you someone provide me some information on how to precompile JSPs
 (probably thousands of JSPs) ?
   Regards,
 Murali
 

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



AW: session state preserved across different applications

2005-09-29 Thread Bernhard Slominski
Hi Michael,

this comes up every so often, so here is just the answer, which I posted
some time ago:

First of all the session is ALWAYS on application scope, this is not an
Tomcat specific behaviour but a requirement of the Specification:
SRV.7.3 Session Scope
HttpSession objects must be scoped at the application (or servlet context)
level.
The underlying mechanism, such as the cookie used to establish the session,
can be
the same for different contexts, but the object referenced, including the
attributes in
that object, must never be shared between contexts by the container.

So there is no way around this, if the sessions were replicated across the
applications it would violate the specification.

When you enable crossConext for your application:
Context crossContext=true docBase=testapp path=/testapp
reloadable=true
/Context

you can get the context for another application:
ServletContext context2 = context.getContext(/testapp);

and set attributes:
context2.setAttribute(test,JSP is great!);

But you cannot get to the session in the other application.

So what you can do is implement the session swapping on your own (Cookies,
via the Database) or merge your applications into one.

Some links from the Sun Forums:
http://forum.java.sun.com/thread.jsp?forum=33thread=259394
http://forum.java.sun.com/thread.jsp?forum=45thread=492484
http://forum.java.sun.com/thread.jsp?forum=33thread=318569

Cheers Bernhard


 -Ursprüngliche Nachricht-
 Von: Michal Kwiatek [mailto:[EMAIL PROTECTED]
 Gesendet: Donnerstag, 29. September 2005 15:34
 An: Tomcat Users List
 Betreff: session state preserved across different applications


 Dear all,

 How is it possible to preserve session state across different
 applications deployed in tomcat?

 I'm pretty sure I saw it somewhere, but I can't remember
 where it was...

 Thanks in advance,
 Michał.
 

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

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



AW: Refresh ResourceBundle

2005-10-12 Thread Bernhard Slominski
Hi,

you can write a class which handles the loading of the resoucres, so you can
control the behaviour.
We have the resource bundles in the DB, so we can administer it via the DB
without restarting the application

Cheers

Bernhard

 -Ursprüngliche Nachricht-
 Von: Roland Carlsson [mailto:[EMAIL PROTECTED]
 Gesendet: Mittwoch, 12. Oktober 2005 15:20
 An: tomcat-user@jakarta.apache.org
 Betreff: Refresh ResourceBundle
 
 
 Hi!
 
 I'm using the i18n taglibrary to i18n a site i'm working on. The 
 administration features not only i18n but also contentmanagement. The 
 problem is that I can't find out how to refresh my 
 ResourceBundle in any 
 kind of way other than restart the whole webapp.
 
 Are there any way to tell tomcat to reload ResourceBundles?
 
 Thanks in advance
 Roland Carlsson
 
 -
 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]