Re: OT?:Can't include .js file on jsp page controlled by front controller servlet

2004-01-12 Thread Howard Watson
What does the js in your JSP do and how are you including it? Some text
from your JSP might help.

 [EMAIL PROTECTED] 01/12/04 09:58AM 
I may be getting in over my head here as I'm really not all that
familiar
with patterns. And I'm not sure that the pattern has anything to do
with
problem. But I have a controller servlet through which all web requests
must
pass. It has worked fine as is. Until I tried to include a .js file on
a jsp
page. In that case it seems to either print it out to page, rather
than
execute it, or it tries to use requestDispatcher portion of controller
servlet to forward/include it. Normally the requestDispatcher forwards
request to the requested page after it checks to see if user is logged
in.
But now it seems to go into an infinite loop when forwarding. And  I
guess
it's trying to use requestDispather.include because the .js resource
is
included via a src='http:...'  request. I know that this is a very
vague
question but I wonder if anyone has any clues as to where the problem
might
lie or what I can start experimenting with.

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



RE: Front Controller Servlet

2003-08-14 Thread Angus Mezick
Use a different extension or you aren't getting anywhere.

 -Original Message-
 From: Sharon Cohen [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, August 05, 2003 8:43 AM
 To: [EMAIL PROTECTED]
 Subject: Front Controller Servlet
 
 
 I am trying to build FrontController servlet for a web site 
 on Tomcat 4 ,
 after long time of changes on the web.xml file , I wasn't 
 able to achieve
 this pattern,
 the web.xml portion is :
 
 servlet-mapping
   servlet-nameFCservlet/servlet-name
   url-pattern*.jsp/url-pattern
 /servlet-mapping
 
 my problem start when the FrontController servlet needs to forward the
 request to other jsp pages
 and when he uses the Forward method , the tomcat activate my 
 FrontController
 again , and after a  while  I get : StackOverflowError .
 
 Thanks for any help
 Sharon
 
 -
 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: Front Controller Servlet

2003-08-14 Thread pete . storey
The reason it is crashing is because you are forwarding to a JSP page, 
however you have already taken over jsp processing in your servlet by 
declaring that it should handle *.jsp, thus it forwards in a circle until 
it runs out of stack space.
Try using another extension for your controller, such as .ktx as we use in 
ours.  This can then forward sucessfully to jsps! 

Should be:
servlet-mapping
  servlet-nameFCservlet/servlet-name
  url-pattern*.ktx/url-pattern
/servlet-mapping

Then your links can be to index.ktx instead and it will got through ok.
Pete

Kiss Technologies

http://www.kisstechnologies.co.uk/

4, Percy Street
London
W1T 1DF

Phone numbers:

Phone 020 7692 9922
Fax 020 7692 9923




Sharon Cohen [EMAIL PROTECTED]
05/08/2003 13:42
Please respond to Tomcat Users List
 
To: [EMAIL PROTECTED]
cc: 
Subject:Front Controller  Servlet


I am trying to build FrontController servlet for a web site on Tomcat 4 ,
after long time of changes on the web.xml file , I wasn't able to achieve
this pattern,
the web.xml portion is :

servlet-mapping
  servlet-nameFCservlet/servlet-name
  url-pattern*.jsp/url-pattern
/servlet-mapping

my problem start when the FrontController servlet needs to forward the
request to other jsp pages
and when he uses the Forward method , the tomcat activate my 
FrontController
again , and after a  while  I get : StackOverflowError .

Thanks for any help
Sharon

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




Front Controller Servlet

2003-08-14 Thread Sharon Cohen
I am trying to build FrontController servlet for a web site on Tomcat 4 ,
after long time of changes on the web.xml file , I wasn't able to achieve
this pattern,
the web.xml portion is :

servlet-mapping
  servlet-nameFCservlet/servlet-name
  url-pattern*.jsp/url-pattern
/servlet-mapping

my problem start when the FrontController servlet needs to forward the
request to other jsp pages
and when he uses the Forward method , the tomcat activate my FrontController
again , and after a  while  I get : StackOverflowError .

Thanks for any help
Sharon

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



RE: Front Controller Servlet

2003-08-14 Thread Yansheng Lin
Why do you use Struts Framework?  Just a suggestion, don't take me wrong.  I
have no idea what you want to do...


-Original Message-
From: Angus Mezick [mailto:[EMAIL PROTECTED] 
Sent: August 5, 2003 3:09 PM
To: Tomcat Users List
Subject: RE: Front Controller Servlet


Use a different extension or you aren't getting anywhere.

 -Original Message-
 From: Sharon Cohen [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, August 05, 2003 8:43 AM
 To: [EMAIL PROTECTED]
 Subject: Front Controller Servlet
 
 
 I am trying to build FrontController servlet for a web site 
 on Tomcat 4 ,
 after long time of changes on the web.xml file , I wasn't 
 able to achieve
 this pattern,
 the web.xml portion is :
 
 servlet-mapping
   servlet-nameFCservlet/servlet-name
   url-pattern*.jsp/url-pattern
 /servlet-mapping
 
 my problem start when the FrontController servlet needs to forward the
 request to other jsp pages
 and when he uses the Forward method , the tomcat activate my 
 FrontController
 again , and after a  while  I get : StackOverflowError .
 
 Thanks for any help
 Sharon
 
 -
 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]



Fwd: Re: Front Controller Servlet

2003-08-14 Thread Justin Ruthenbeck

Date: Tue, 05 Aug 2003 14:42:05 -0700
To: Tomcat Users List [EMAIL PROTECTED]
From: Justin Ruthenbeck [EMAIL PROTECTED]
Subject: Re: Front Controller  Servlet
At 05:42 AM 8/5/2003, you wrote:
I am trying to build FrontController servlet for a web site on Tomcat 4 ,
after long time of changes on the web.xml file , I wasn't able to achieve
this pattern,
the web.xml portion is :
servlet-mapping
  servlet-nameFCservlet/servlet-name
  url-pattern*.jsp/url-pattern
/servlet-mapping
my problem start when the FrontController servlet needs to forward the
request to other jsp pages
and when he uses the Forward method , the tomcat activate my FrontController
again , and after a  while  I get : StackOverflowError .
You say that you're using the forward() method -- why?  There are reasons 
to do this, but if you're trying to create a FrontController, then 
presumably you're not interested in hitting your jsps directly in the 
first place.  Is there any reason you aren't using a RequestDispatcher to 
dispatch/include your jsp page output instead of forwarding to the page?
Sorry -- reread this and realized my mind was wondering somewhere 
else.  Next time, remind me not to eat a big lunch and then try to think 
right away afterwards...

justin


Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential
   See http://www.nextengine.com/confidentiality.php

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


Re: Front Controller Servlet

2003-08-09 Thread Dionisio Ruiz de Zarate
and whoy don't use one filter?
i am usin one filter; in my web.xml i have mapped all my jsp pages (*.jsp)
to this filter, an the filter actions are made first and in the second fase
the systems shows me the jsp page
- Original Message - 
From: [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, August 06, 2003 12:59 AM
Subject: Re: Front Controller Servlet


 The reason it is crashing is because you are forwarding to a JSP page,
 however you have already taken over jsp processing in your servlet by
 declaring that it should handle *.jsp, thus it forwards in a circle until
 it runs out of stack space.
 Try using another extension for your controller, such as .ktx as we use in
 ours.  This can then forward sucessfully to jsps!

 Should be:
 servlet-mapping
   servlet-nameFCservlet/servlet-name
   url-pattern*.ktx/url-pattern
 /servlet-mapping

 Then your links can be to index.ktx instead and it will got through ok.
 Pete

 Kiss Technologies

 http://www.kisstechnologies.co.uk/

 4, Percy Street
 London
 W1T 1DF

 Phone numbers:

 Phone 020 7692 9922
 Fax 020 7692 9923




 Sharon Cohen [EMAIL PROTECTED]
 05/08/2003 13:42
 Please respond to Tomcat Users List

 To: [EMAIL PROTECTED]
 cc:
 Subject:Front Controller  Servlet


 I am trying to build FrontController servlet for a web site on Tomcat 4 ,
 after long time of changes on the web.xml file , I wasn't able to achieve
 this pattern,
 the web.xml portion is :

 servlet-mapping
   servlet-nameFCservlet/servlet-name
   url-pattern*.jsp/url-pattern
 /servlet-mapping

 my problem start when the FrontController servlet needs to forward the
 request to other jsp pages
 and when he uses the Forward method , the tomcat activate my
 FrontController
 again , and after a  while  I get : StackOverflowError .

 Thanks for any help
 Sharon

 -
 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: Front Controller Servlet

2003-08-08 Thread Bill Barker
I agree that the design isn't the greatest (but I've seen much worse ;-). To
do what you want, in FCServlet try something like:

if(request.getServletPath().endsWith(.jsp)) {
   RequestDispatcher rd = getServletContext().getNamedDispatcher(jsp);
   rd.forward(request, response);
   return;
}

Sharon Cohen [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I am trying to build FrontController servlet for a web site on Tomcat 4 ,
 after long time of changes on the web.xml file , I wasn't able to achieve
 this pattern,
 the web.xml portion is :

 servlet-mapping
   servlet-nameFCservlet/servlet-name
   url-pattern*.jsp/url-pattern
 /servlet-mapping

 my problem start when the FrontController servlet needs to forward the
 request to other jsp pages
 and when he uses the Forward method , the tomcat activate my
FrontController
 again , and after a  while  I get : StackOverflowError .

 Thanks for any help
 Sharon




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



Re: Front Controller Servlet

2003-08-07 Thread Justin Ruthenbeck
At 05:42 AM 8/5/2003, you wrote:
I am trying to build FrontController servlet for a web site on Tomcat 4 ,
after long time of changes on the web.xml file , I wasn't able to achieve
this pattern,
the web.xml portion is :
servlet-mapping
  servlet-nameFCservlet/servlet-name
  url-pattern*.jsp/url-pattern
/servlet-mapping
my problem start when the FrontController servlet needs to forward the
request to other jsp pages
and when he uses the Forward method , the tomcat activate my FrontController
again , and after a  while  I get : StackOverflowError .
You say that you're using the forward() method -- why?  There are reasons 
to do this, but if you're trying to create a FrontController, then 
presumably you're not interested in hitting your jsps directly in the first 
place.  Is there any reason you aren't using a RequestDispatcher to 
dispatch/include your jsp page output instead of forwarding to the page?

justin


Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential
   See http://www.nextengine.com/confidentiality.php

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


RE: Front Controller Servlet

2003-08-06 Thread Mike Curwen
That's because you're trying to implement as front controller
**servlet** as a JSP ?
 
Map your controller servlet to /foo (or anything *other* than *.jsp)
then requests could all go to the controller servlet, and your servlet
could send it off to any *.jsp page without invoking itself infinitely.

 -Original Message-
 From: Sharon Cohen [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, August 05, 2003 7:43 AM
 To: [EMAIL PROTECTED]
 Subject: Front Controller Servlet
 
 
 I am trying to build FrontController servlet for a web site 
 on Tomcat 4 , after long time of changes on the web.xml file 
 , I wasn't able to achieve this pattern, the web.xml portion is :
 
 servlet-mapping
   servlet-nameFCservlet/servlet-name
   url-pattern*.jsp/url-pattern
 /servlet-mapping
 
 my problem start when the FrontController servlet needs to 
 forward the request to other jsp pages and when he uses the 
 Forward method , the tomcat activate my FrontController again 
 , and after a  while  I get : StackOverflowError .
 
 Thanks for any help
 Sharon
 
 -
 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]