Re: cross context include

2004-03-03 Thread Aadi Deshpande
I've been struggling with the same problem.  I read the bug report, but 
it only adresses part of the problem, the part that doesn't retrieve the 
session properly.  I actually patched the code independently and have 
discovered another problem, that somehow sessions are either getting 
lost or mixed up when you do cross context imports  in at least one 
advanced scenario :

1) page Z in context 'a' import a page X from context 'b'
2) page X in context 'b' imports a page Y in context 'a'
in this case, the session that was created when you import page X in 
context b is the session that's available in page Y in context a.

here's my test case  ---

test_page1.jsp ( context '/profile' ) :

   %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %
   Test of cross context imports :
   % request.getSession().setAttribute(test_attrib, 12345); %
   % out.println(test_attrib in ( test_page1.jsp ) is  +
   session.getAttribute(test_attrib) ); %br/
   % out.println(session id (  in test_page1.jsp) is :  +
   request.getSession().getId() ); % br/
   c:import url=/test_other.jsp context=/ /
test_other.jsp ( context '/' ) :

   %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %
   % request.getSession().setAttribute(test_other_attrib, 54321 ); %
   % out.println(test attrib ( in test_other.jsp ) is :  +
   request.getSession().getAttribute(test_attrib) ); %br/
   % out.println(test other attrib ( in test_other.jsp) is :  +
   request.getSession().getAttribute(test_other_attrib) ); %br/
   % out.println(session id (  in test_other.jsp) is :  +
   request.getSession().getId() ); % br/
   c:import url=/test_page2.jsp context=/profile/
test_page2.jsp ( context '/profile' ) :

   %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %
   % out.println(test_attrib ( in test_page2.jsp ) is  +
   session.getAttribute(test_attrib) ); % br/
   % out.println(test other attrib ( in test_page2.jsp) is :  +
   request.getSession().getAttribute(test_other_attrib) ); % br/
   % out.println(session id (  in test_page2.jsp) is :  +
   request.getSession().getId() ); % br/


The output i get when I hit test_page1.jsp is :

Test of cross context imports : test_attrib in ( test_page1.jsp ) is 12345
session id ( in test_page1.jsp) is : 2796EBFF6C413841B7B2D496D7E8FD3F
test attrib ( in test_other.jsp ) is : null
test other attrib ( in test_other.jsp) is : 54321
session id ( in test_other.jsp) is : 2796EBFF6C413841B7B2D496D7E8FD3F
test_attrib ( in test_page2.jsp ) is null
test other attrib ( in test_page2.jsp) is : 54321
session id ( in test_page2.jsp) is : 2796EBFF6C413841B7B2D496D7E8FD3F
The output I get when i hit test_other.jsp is :

test attrib ( in test_other.jsp ) is : null
test other attrib ( in test_other.jsp) is : 54321
session id ( in test_other.jsp) is : 55B2068D3011D727DF15068ADAD713E2
test_attrib ( in test_page2.jsp ) is null
test other attrib ( in test_page2.jsp) is : null
session id ( in test_page2.jsp) is : 55B2068D3011D727DF15068ADAD713E2
the output that i get when i hit test_page2.jsp :

test_attrib ( in test_page2.jsp ) is 12345
test other attrib ( in test_page2.jsp) is : null
session id ( in test_page2.jsp) is : 2796EBFF6C413841B7B2D496D7E8FD3F
Any hints on how to resolve it?

Asim Alp wrote:

If indeed we need to put it on all pages, then yes, it's no problem.  
We do have a couple perl geniuses on staff :)  I'm sure we'll find a 
way to get around it.

My main concern right now is to to understand the reason of the 
problem first.  I read the bug report, but still can't understand why 
an extra session prevents our c:imports from working?

Asim

On Mar 2, 2004, at 1:46 PM, Mike Curwen wrote:

If you have a perl genius on staff, he can do ALL pages with a single
command.  Scary stuff, but cool when it works. :)
-Original Message-
From: Asim Alp [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 02, 2004 12:33 PM
To: Tomcat Users List
Subject: Re: cross context include
I guess we'll have to find a way of going over the 10,000+ pages.
Maybe we can write a small program to automate it.  I don't
like dirty
solutions :)  If this is indeed a bug in our software, it
should better
be fixed.
One last question though.  As much as I know, setting page session to
false only means that there is no need to create an
additional session.
  What's this have to do with c:imports?  Why does an
additional session
prevent our c:imports?
Asim

On Mar 2, 2004, at 1:15 PM, Remy Maucherat wrote:

Asim Alp wrote:

Thank you for your prompt replies.  I just read the bug, and
understood what the problem was.
Now, though, I have another question.  Is there a way of

setting page

session to false at a higher level.  For example somewhere

from the

server.xml file?  My problem is that we have over 100

websites with

tens of thousands of jsp pages.  Every single one of these

JSP pages

rely on these c:imports...  It's almost impossible for us to
manually go over each one of these jsp pages and add the %@ page
session=false

Re: cross context include

2004-03-03 Thread Aadi Deshpande
More research...once the context gets set in a c:import, it seems like 
that's the way it's stuck for the life of the HttpRequest.  ..

i.e. in my example below..
   if i start at page Z, the context always remains as 'a'
   if I start at page X, the context always remains as 'b'
so it looks like tomcat can't handle more than one context switch, maybe 
because the request that is created for the initial page is the one 
that's passed down ( instead of a separate internal request being 
created for the import )

Any more thoughts?

Aadi Deshpande wrote:

I've been struggling with the same problem.  I read the bug report, 
but it only adresses part of the problem, the part that doesn't 
retrieve the

session properly.  I actually patched the code independently and have 
discovered another problem, that somehow sessions are either getting 
lost or mixed up when you do cross context imports  in at least one 
advanced scenario :

1) page Z in context 'a' import a page X from context 'b'
2) page X in context 'b' imports a page Y in context 'a'
in this case, the session that was created when you import page X in 
context b is the session that's available in page Y in context a.

here's my test case  ---

test_page1.jsp ( context '/profile' ) :

   %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %
   Test of cross context imports :
   % request.getSession().setAttribute(test_attrib, 12345); %
   % out.println(test_attrib in ( test_page1.jsp ) is  +
   session.getAttribute(test_attrib) ); %br/
   % out.println(session id (  in test_page1.jsp) is :  +
   request.getSession().getId() ); % br/
   c:import url=/test_other.jsp context=/ /
test_other.jsp ( context '/' ) :

   %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %
   % request.getSession().setAttribute(test_other_attrib, 54321 );
%
   % out.println(test attrib ( in test_other.jsp ) is :  +
   request.getSession().getAttribute(test_attrib) ); %br/
   % out.println(test other attrib ( in test_other.jsp) is :  +
   request.getSession().getAttribute(test_other_attrib) ); %br/
   % out.println(session id (  in test_other.jsp) is :  +
   request.getSession().getId() ); % br/
   c:import url=/test_page2.jsp context=/profile/
test_page2.jsp ( context '/profile' ) :

   %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %
   % out.println(test_attrib ( in test_page2.jsp ) is  +
   session.getAttribute(test_attrib) ); % br/
   % out.println(test other attrib ( in test_page2.jsp) is :  +
   request.getSession().getAttribute(test_other_attrib) ); % br/
   % out.println(session id (  in test_page2.jsp) is :  +
   request.getSession().getId() ); % br/


The output i get when I hit test_page1.jsp is :

Test of cross context imports : test_attrib in ( test_page1.jsp ) is
12345
session id ( in test_page1.jsp) is : 2796EBFF6C413841B7B2D496D7E8FD3F
test attrib ( in test_other.jsp ) is : null
test other attrib ( in test_other.jsp) is : 54321
session id ( in test_other.jsp) is : 2796EBFF6C413841B7B2D496D7E8FD3F
test_attrib ( in test_page2.jsp ) is null
test other attrib ( in test_page2.jsp) is : 54321
session id ( in test_page2.jsp) is : 2796EBFF6C413841B7B2D496D7E8FD3F
The output I get when i hit test_other.jsp is :

test attrib ( in test_other.jsp ) is : null
test other attrib ( in test_other.jsp) is : 54321
session id ( in test_other.jsp) is : 55B2068D3011D727DF15068ADAD713E2
test_attrib ( in test_page2.jsp ) is null
test other attrib ( in test_page2.jsp) is : null
session id ( in test_page2.jsp) is : 55B2068D3011D727DF15068ADAD713E2
the output that i get when i hit test_page2.jsp :

test_attrib ( in test_page2.jsp ) is 12345
test other attrib ( in test_page2.jsp) is : null
session id ( in test_page2.jsp) is : 2796EBFF6C413841B7B2D496D7E8FD3F
Any hints on how to resolve it?

Asim Alp wrote:

If indeed we need to put it on all pages, then yes, it's no problem.  
We do have a couple perl geniuses on staff :)  I'm sure we'll find a 
way to get around it.

My main concern right now is to to understand the reason of the 
problem first.  I read the bug report, but still can't understand why 
an extra session prevents our c:imports from working?

Asim

On Mar 2, 2004, at 1:46 PM, Mike Curwen wrote:

If you have a perl genius on staff, he can do ALL pages with a single
command.  Scary stuff, but cool when it works. :)
-Original Message-
From: Asim Alp [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 02, 2004 12:33 PM
To: Tomcat Users List
Subject: Re: cross context include
I guess we'll have to find a way of going over the 10,000+ pages.
Maybe we can write a small program to automate it.  I don't
like dirty
solutions :)  If this is indeed a bug in our software, it
should better
be fixed.
One last question though.  As much as I know, setting page session

to

false only means that there is no need to create an
additional session.
  What's this have to do with c:imports?  Why does an
additional session
prevent our c:imports?
Asim

On Mar 2, 2004, at 1:15

Re: cross context include

2004-03-03 Thread Aadi Deshpande
 other attrib ( in test_page2.jsp) is : null
session id ( in test_page2.jsp) is : 55B2068D3011D727DF15068ADAD713E2
the output that i get when i hit test_page2.jsp :

test_attrib ( in test_page2.jsp ) is 12345
test other attrib ( in test_page2.jsp) is : null
session id ( in test_page2.jsp) is : 2796EBFF6C413841B7B2D496D7E8FD3F
Any hints on how to resolve it?

Asim Alp wrote:

If indeed we need to put it on all pages, then yes, it's no 
problem.  We do have a couple perl geniuses on staff :)  I'm sure 
we'll find a way to get around it.

My main concern right now is to to understand the reason of the 
problem first.  I read the bug report, but still can't understand 
why an extra session prevents our c:imports from working?

Asim

On Mar 2, 2004, at 1:46 PM, Mike Curwen wrote:

If you have a perl genius on staff, he can do ALL pages with a single
command.  Scary stuff, but cool when it works. :)
-Original Message-
From: Asim Alp [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 02, 2004 12:33 PM
To: Tomcat Users List
Subject: Re: cross context include
I guess we'll have to find a way of going over the 10,000+ pages.
Maybe we can write a small program to automate it.  I don't
like dirty
solutions :)  If this is indeed a bug in our software, it
should better
be fixed.
One last question though.  As much as I know, setting page session


to

false only means that there is no need to create an
additional session.
  What's this have to do with c:imports?  Why does an
additional session
prevent our c:imports?
Asim

On Mar 2, 2004, at 1:15 PM, Remy Maucherat wrote:

Asim Alp wrote:

Thank you for your prompt replies.  I just read the bug, and
understood what the problem was.
Now, though, I have another question.  Is there a way of



setting page

session to false at a higher level.  For example somewhere



from the

server.xml file?  My problem is that we have over 100



websites with

tens of thousands of jsp pages.  Every single one of these



JSP pages

rely on these c:imports...  It's almost impossible for us to
manually go over each one of these jsp pages and add the %@ page
session=false% line to each of them.  Can you think of an an
easier solution to my problem?




Yes, take advantage that this is OSS and patch your Tomcat


;) Or use

the replacement class (put in
server/classes/org/apache/catalina/core).
--
x
Remy Maucherat
Developer  Consultant
JBoss Group (Europe) SaRL
x


-


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







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


cross context include

2004-03-02 Thread Asim Alp
My application was running without any problems on Tomcat 5.0.18.   
After upgrading to Tomcat 5.0.19, I started having problems with my  
cross context includes.  I haven't changed a single line of code.   
Server.xml is the same as well.  Here is the host section on my  
server.xml:

Host name=www.domain1.com debug=0 appBase=webapps/domains  
unpackWARs=true autoDeploy=true xmlValidation=false  
xmlNamespaceAware=false
	Logger	className=org.apache.catalina.logger.FileLogger  
directory=logs prefix=BXSCI_ suffix=.log timestamp=true/
			
	Context path= docBase=domain1 debug=0 crossContext=true  
caseSensitive=false /
	Context path=/jsp-apps docBase=jsp-apps debug=0  
crossContext=true caseSensitive=false /
/Host

In the / context, my index.jsp is as follows:

%@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
c:import url=/shared/header.jsp context=/jsp-apps /
.
In the /jsp-apps context /shared/header.jsp is just a simple JSP page.

Here is the error message I get:

javax.servlet.ServletException: /shared/header.jsp
 
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageCont 
extImpl.java:867)
 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex 
tImpl.java:800)
org.apache.jsp.index_jsp._jspService(index_jsp.java:123)
 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja 
va:311)
 
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
javax.servlet.jsp.JspTagException: /shared/header.jsp
 
org.apache.taglibs.standard.tag.common.core.ImportSupport.acquireString( 
Unknown Source)
 
org.apache.taglibs.standard.tag.common.core.ImportSupport.doEndTag(Unkno 
wn Source)
 
org.apache.jsp.index_jsp._jspx_meth_c_import_0(index_jsp.java:142)
org.apache.jsp.index_jsp._jspService(index_jsp.java:54)
 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja 
va:311)
 
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)

Any ideas?

Asim

Re: cross context include

2004-03-02 Thread Remy Maucherat
Asim Alp wrote:
My application was running without any problems on Tomcat 5.0.18.   
After upgrading to Tomcat 5.0.19, I started having problems with my  
cross context includes.  I haven't changed a single line of code.   
Server.xml is the same as well.  Here is the host section on my  
server.xml:

Host name=www.domain1.com debug=0 appBase=webapps/domains  
unpackWARs=true autoDeploy=true xmlValidation=false  
xmlNamespaceAware=false
LoggerclassName=org.apache.catalina.logger.FileLogger  
directory=logs prefix=BXSCI_ suffix=.log timestamp=true/
   
Context path= docBase=domain1 debug=0 crossContext=true  
caseSensitive=false /
Context path=/jsp-apps docBase=jsp-apps debug=0  
crossContext=true caseSensitive=false /
/Host

In the / context, my index.jsp is as follows:

%@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
c:import url=/shared/header.jsp context=/jsp-apps /
.
I tried it and it works for me.
%@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
Foo1br
c:import url=/dates/date.jsp context=/jsp-examples /
brFoo2
Your context needs to be crossContext, of course.

--
x
Rémy Maucherat
Developer  Consultant
JBoss Group (Europe) SàRL
x
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: cross context include

2004-03-02 Thread Asim Alp
I found the reason of the previous error message.  However, I'm still 
having a problem.  This time my c:import ... tag doesn't load anything 
at all.

Here is my setup:

/test.jsp (context )
%@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
This is test.jspbrbr
c:import url=/hello.jsp context=/jsp-apps /
/hello.jsp (context /jsp-apps)
Hello World!br
When I view /test.jsp, I only get:
This is test.jsp
In my browser.

I tried one more thing.  I replaced test.jsp with the following:
%@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
This is test.jspbrbr
c:import url=http://www.yahoo.com; /
It worked!  I got a page that says This is test.jsp at the top 
followed by the frontpage of yahoo.com.

Any suggestions?

Asim

On Mar 2, 2004, at 11:45 AM, Remy Maucherat wrote:

Asim Alp wrote:
My application was running without any problems on Tomcat 5.0.18.   
After upgrading to Tomcat 5.0.19, I started having problems with my  
cross context includes.  I haven't changed a single line of code.   
Server.xml is the same as well.  Here is the host section on my  
server.xml:
Host name=www.domain1.com debug=0 appBase=webapps/domains  
unpackWARs=true autoDeploy=true xmlValidation=false  
xmlNamespaceAware=false
LoggerclassName=org.apache.catalina.logger.FileLogger  
directory=logs prefix=BXSCI_ suffix=.log timestamp=true/
   Context path= docBase=domain1 debug=0 
crossContext=true  caseSensitive=false /
Context path=/jsp-apps docBase=jsp-apps debug=0  
crossContext=true caseSensitive=false /
/Host
In the / context, my index.jsp is as follows:
%@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
c:import url=/shared/header.jsp context=/jsp-apps /
.
I tried it and it works for me.
%@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
Foo1br
c:import url=/dates/date.jsp context=/jsp-examples /
brFoo2
Your context needs to be crossContext, of course.

--
x
Rémy Maucherat
Developer  Consultant
JBoss Group (Europe) SàRL
x
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


Re: cross context include

2004-03-02 Thread Asim Alp
I noticed something interesting.  I tried your example using 
/dates/date.jsp in the jsp-examples context.  It worked.

I opened date.jsp and noticed the line: %@ page session=false% at 
the top of it.

I pasted this line in my hello.jsp and it worked.  Any idea why I need 
this line on Tomcat 5.0.19, but not on 5.0.18?

So, to clarify things:

/test.jsp in context :
%@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
This is test.jspbrbr
c:import url=/hello.jsp context=/jsp-apps /
/hello.jsp in context jsp-apps:
Hello World!
The output of /test.jsp on Tomcat 5.0.18 is:
This is test.jsp
Hello World!
The output of the same file on Tomcat 5.0.19 is:
This is test.jsp
When I replace /hello.jsp with the following:
%@ page session=false%
Hello World!
The output on Tomcat 5.0.19 becomes:
This is test.jsp
Hello World!
Isn't this weird?

Asim

On Mar 2, 2004, at 12:04 PM, Asim Alp wrote:

I found the reason of the previous error message.  However, I'm still 
having a problem.  This time my c:import ... tag doesn't load 
anything at all.

Here is my setup:

/test.jsp (context )
%@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
This is test.jspbrbr
c:import url=/hello.jsp context=/jsp-apps /
/hello.jsp (context /jsp-apps)
Hello World!br
When I view /test.jsp, I only get:
This is test.jsp
In my browser.

I tried one more thing.  I replaced test.jsp with the following:
%@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
This is test.jspbrbr
c:import url=http://www.yahoo.com; /
It worked!  I got a page that says This is test.jsp at the top 
followed by the frontpage of yahoo.com.

Any suggestions?

Asim

On Mar 2, 2004, at 11:45 AM, Remy Maucherat wrote:

Asim Alp wrote:
My application was running without any problems on Tomcat 5.0.18.   
After upgrading to Tomcat 5.0.19, I started having problems with my  
cross context includes.  I haven't changed a single line of code.   
Server.xml is the same as well.  Here is the host section on my  
server.xml:
Host name=www.domain1.com debug=0 appBase=webapps/domains  
unpackWARs=true autoDeploy=true xmlValidation=false  
xmlNamespaceAware=false
LoggerclassName=org.apache.catalina.logger.FileLogger  
directory=logs prefix=BXSCI_ suffix=.log timestamp=true/
   Context path= docBase=domain1 debug=0 
crossContext=true  caseSensitive=false /
Context path=/jsp-apps docBase=jsp-apps debug=0  
crossContext=true caseSensitive=false /
/Host
In the / context, my index.jsp is as follows:
%@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
c:import url=/shared/header.jsp context=/jsp-apps /
.
I tried it and it works for me.
%@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
Foo1br
c:import url=/dates/date.jsp context=/jsp-examples /
brFoo2
Your context needs to be crossContext, of course.

--
x
Rémy Maucherat
Developer  Consultant
JBoss Group (Europe) SàRL
x
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


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


Re: cross context include

2004-03-02 Thread Remy Maucherat
Asim Alp wrote:
I found the reason of the previous error message.  However, I'm still 
having a problem.  This time my c:import ... tag doesn't load anything 
at all.

Here is my setup:

/test.jsp (context )
%@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
This is test.jspbrbr
c:import url=/hello.jsp context=/jsp-apps /
/hello.jsp (context /jsp-apps)
Hello World!br
When I view /test.jsp, I only get:
This is test.jsp
In my browser.

I tried one more thing.  I replaced test.jsp with the following:
%@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
This is test.jspbrbr
c:import url=http://www.yahoo.com; /
It worked!  I got a page that says This is test.jsp at the top 
followed by the frontpage of yahoo.com.

Any suggestions?
So I moved my test.jsp to the root folder, added a ROOT.xml context file 
with crossContext=true, and it still works.

Your response is committed. Look in the logs for the stack trace of the 
error.

--
x
Rémy Maucherat
Developer  Consultant
JBoss Group (Europe) SàRL
x
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: cross context include

2004-03-02 Thread Remy Maucherat
Asim Alp wrote:
When I replace /hello.jsp with the following:
%@ page session=false%
Hello World!
The output on Tomcat 5.0.19 becomes:
This is test.jsp
Hello World!
Isn't this weird?
No. See bug 27309.

--
x
Rémy Maucherat
Developer  Consultant
JBoss Group (Europe) SàRL
x
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: cross context include

2004-03-02 Thread Asim Alp
Thank you for your prompt replies.  I just read the bug, and understood 
what the problem was.

Now, though, I have another question.  Is there a way of setting page 
session to false at a higher level.  For example somewhere from the 
server.xml file?  My problem is that we have over 100 websites with 
tens of thousands of jsp pages.  Every single one of these JSP pages 
rely on these c:imports...  It's almost impossible for us to manually 
go over each one of these jsp pages and add the %@ page 
session=false% line to each of them.  Can you think of an an easier 
solution to my problem?

Thanks,

Asim

On Mar 2, 2004, at 12:40 PM, Remy Maucherat wrote:

Asim Alp wrote:
When I replace /hello.jsp with the following:
%@ page session=false%
Hello World!
The output on Tomcat 5.0.19 becomes:
This is test.jsp
Hello World!
Isn't this weird?
No. See bug 27309.

--
x
Rémy Maucherat
Developer  Consultant
JBoss Group (Europe) SàRL
x
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


Re: cross context include

2004-03-02 Thread Remy Maucherat
Asim Alp wrote:

Thank you for your prompt replies.  I just read the bug, and understood 
what the problem was.

Now, though, I have another question.  Is there a way of setting page 
session to false at a higher level.  For example somewhere from the 
server.xml file?  My problem is that we have over 100 websites with tens 
of thousands of jsp pages.  Every single one of these JSP pages rely on 
these c:imports...  It's almost impossible for us to manually go over 
each one of these jsp pages and add the %@ page session=false% line 
to each of them.  Can you think of an an easier solution to my problem?
Yes, take advantage that this is OSS and patch your Tomcat ;)
Or use the replacement class (put in 
server/classes/org/apache/catalina/core).

--
x
Rémy Maucherat
Developer  Consultant
JBoss Group (Europe) SàRL
x
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: cross context include

2004-03-02 Thread Asim Alp
I guess we'll have to find a way of going over the 10,000+ pages.  
Maybe we can write a small program to automate it.  I don't like dirty 
solutions :)  If this is indeed a bug in our software, it should better 
be fixed.

One last question though.  As much as I know, setting page session to 
false only means that there is no need to create an additional session. 
 What's this have to do with c:imports?  Why does an additional session 
prevent our c:imports?

Asim

On Mar 2, 2004, at 1:15 PM, Remy Maucherat wrote:

Asim Alp wrote:

Thank you for your prompt replies.  I just read the bug, and 
understood what the problem was.
Now, though, I have another question.  Is there a way of setting page 
session to false at a higher level.  For example somewhere from the 
server.xml file?  My problem is that we have over 100 websites with 
tens of thousands of jsp pages.  Every single one of these JSP pages 
rely on these c:imports...  It's almost impossible for us to 
manually go over each one of these jsp pages and add the %@ page 
session=false% line to each of them.  Can you think of an an 
easier solution to my problem?
Yes, take advantage that this is OSS and patch your Tomcat ;)
Or use the replacement class (put in 
server/classes/org/apache/catalina/core).

--
x
Rémy Maucherat
Developer  Consultant
JBoss Group (Europe) SàRL
x
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: cross context include

2004-03-02 Thread Mike Curwen
If you have a perl genius on staff, he can do ALL pages with a single
command.  Scary stuff, but cool when it works. :)

 -Original Message-
 From: Asim Alp [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, March 02, 2004 12:33 PM
 To: Tomcat Users List
 Subject: Re: cross context include
 
 
 I guess we'll have to find a way of going over the 10,000+ pages.  
 Maybe we can write a small program to automate it.  I don't 
 like dirty 
 solutions :)  If this is indeed a bug in our software, it 
 should better 
 be fixed.
 
 One last question though.  As much as I know, setting page session to 
 false only means that there is no need to create an 
 additional session. 
   What's this have to do with c:imports?  Why does an 
 additional session 
 prevent our c:imports?
 
 Asim
 
 On Mar 2, 2004, at 1:15 PM, Remy Maucherat wrote:
 
  Asim Alp wrote:
 
  Thank you for your prompt replies.  I just read the bug, and
  understood what the problem was.
  Now, though, I have another question.  Is there a way of 
 setting page 
  session to false at a higher level.  For example somewhere 
 from the 
  server.xml file?  My problem is that we have over 100 
 websites with 
  tens of thousands of jsp pages.  Every single one of these 
 JSP pages 
  rely on these c:imports...  It's almost impossible for us to 
  manually go over each one of these jsp pages and add the %@ page 
  session=false% line to each of them.  Can you think of an an 
  easier solution to my problem?
 
  Yes, take advantage that this is OSS and patch your Tomcat 
 ;) Or use 
  the replacement class (put in 
  server/classes/org/apache/catalina/core).
 
  --
  x
  Rémy Maucherat
  Developer  Consultant
  JBoss Group (Europe) SàRL
  x
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Re: cross context include

2004-03-02 Thread Asim Alp
If indeed we need to put it on all pages, then yes, it's no problem.  
We do have a couple perl geniuses on staff :)  I'm sure we'll find a 
way to get around it.

My main concern right now is to to understand the reason of the problem 
first.  I read the bug report, but still can't understand why an extra 
session prevents our c:imports from working?

Asim

On Mar 2, 2004, at 1:46 PM, Mike Curwen wrote:

If you have a perl genius on staff, he can do ALL pages with a single
command.  Scary stuff, but cool when it works. :)
-Original Message-
From: Asim Alp [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 02, 2004 12:33 PM
To: Tomcat Users List
Subject: Re: cross context include
I guess we'll have to find a way of going over the 10,000+ pages.
Maybe we can write a small program to automate it.  I don't
like dirty
solutions :)  If this is indeed a bug in our software, it
should better
be fixed.
One last question though.  As much as I know, setting page session to
false only means that there is no need to create an
additional session.
  What's this have to do with c:imports?  Why does an
additional session
prevent our c:imports?
Asim

On Mar 2, 2004, at 1:15 PM, Remy Maucherat wrote:

Asim Alp wrote:

Thank you for your prompt replies.  I just read the bug, and
understood what the problem was.
Now, though, I have another question.  Is there a way of
setting page
session to false at a higher level.  For example somewhere
from the
server.xml file?  My problem is that we have over 100
websites with
tens of thousands of jsp pages.  Every single one of these
JSP pages
rely on these c:imports...  It's almost impossible for us to
manually go over each one of these jsp pages and add the %@ page
session=false% line to each of them.  Can you think of an an
easier solution to my problem?
Yes, take advantage that this is OSS and patch your Tomcat
;) Or use
the replacement class (put in
server/classes/org/apache/catalina/core).
--
x
Rémy Maucherat
Developer  Consultant
JBoss Group (Europe) SàRL
x

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


Possible Bug in 4.1.27 - RequestDispatcher fails after cross context include

2004-01-08 Thread Scott Goldstein
I have two web applications, client and server (attached). In the client web 
application, there is a single servlet, ClientServlet which performs an 
include to another servlet, ServerServlet, in server web application. This is 
done through the following code:

ServletContext serverServletContext = 
getServletContext().getContext(SERVER_CONTEXT_ROOT);
RequestDispatcher requestDispatcher = 
serverServletContext.getRequestDispatcher(SERVER_SERVLET_PATH);
requestDispatcher.include(httpServletRequest, httpServletResponse);

This portion of the test case works as expected.

The ServerServlet will then attempt to include a jsp file, test.jsp, within 
the server web application using the following:
RequestDispatcher dispatcher = httpServletRequest.getRequestDispatcher
(/test.jsp);
dispatcher.include(httpServletRequest, httpServletResponse);

This, however, does not work as expected. Although the dispatcher is not null, 
the content of the jsp is not displayed.

Note that if you invoke the ServletServlet directly, without going through the 
ClientServlet of the Client web application, the jsp is displayed as expected.

Thoughts?

Scott

 
-
 Shanje.NET
 The webmaster's 1st choice for Windows 2003 Hosting
   http://www.Shanje.NET/
-

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