How does Tiles effect filters and URL mapping?

2003-07-25 Thread Bailey, Shane C.


I am wondering if I have a filter set up and I map *.jsp for it to do
something will using Tiles cause the mapping not to do that something with
my JSP pages?  I mean, once my JSPs are all combined into a page is that
page no longer a JSP (as far as the filter is concerned)?



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



Re: How does Tiles effect filters and URL mapping?

2003-07-25 Thread Craig R. McClanahan


On Fri, 25 Jul 2003, Bailey, Shane C. wrote:

 Date: Fri, 25 Jul 2003 11:42:58 -0400
 From: Bailey, Shane C. [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: 'Struts Users Mailing List' [EMAIL PROTECTED]
 Subject: How does Tiles effect filters and URL mapping?



 I am wondering if I have a filter set up and I map *.jsp for it to do
 something will using Tiles cause the mapping not to do that something with
 my JSP pages?  I mean, once my JSPs are all combined into a page is that
 page no longer a JSP (as far as the filter is concerned)?


Filters are based on the incoming request URL, and have no idea what
technologies you actually use to compose the response.  However, filters
are *not* applied when a RequestDispatcher.forward() is done (although
you'll have this option in Servlet 2.4), so in a Struts based app you
would need to map your filter on the incoming Action's URL, not the page's
URL.

Craig

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



RE: How does Tiles effect filters and URL mapping?

2003-07-25 Thread Bailey, Shane C.

OK.

So some things make sense and some things don't know about a problem I am
having.

I am trying to go from the main home page to the User Management (UM) home
page with a link. And the main home page is in my main module and my UM home
page is in my usermgmt module.

So I do this in my main module home page:
html:link forward=usermgmt.homeUser Management/html:link

In my main module struts config:
forward   name=usermgmt.home path=/usermgmt/home.do/

In my UM module struts config:
actionpath=/home
parameter=doc.home
type=org.apache.struts.actions.ForwardAction 
scope=request
/action

So my filter should be able to filter on /usermgmt/home.do but since that is
then guided by a ForwardAction to the page doc.home then doc.home JSPs will
not have been filtered, correct?


It sounds like I just need to not use the ForwardAction with /home mapping
and use a regular action instead and I will get the request variables set
by my filter?




-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 25, 2003 11:58 AM
To: Struts Users Mailing List
Subject: Re: How does Tiles effect filters and URL mapping?



On Fri, 25 Jul 2003, Bailey, Shane C. wrote:

 Date: Fri, 25 Jul 2003 11:42:58 -0400
 From: Bailey, Shane C. [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: 'Struts Users Mailing List' [EMAIL PROTECTED]
 Subject: How does Tiles effect filters and URL mapping?



 I am wondering if I have a filter set up and I map *.jsp for it to do
 something will using Tiles cause the mapping not to do that something with
 my JSP pages?  I mean, once my JSPs are all combined into a page is that
 page no longer a JSP (as far as the filter is concerned)?


Filters are based on the incoming request URL, and have no idea what
technologies you actually use to compose the response.  However, filters
are *not* applied when a RequestDispatcher.forward() is done (although
you'll have this option in Servlet 2.4), so in a Struts based app you
would need to map your filter on the incoming Action's URL, not the page's
URL.

Craig

-
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: How does Tiles effect filters and URL mapping?

2003-07-25 Thread Craig R. McClanahan


On Fri, 25 Jul 2003, Bailey, Shane C. wrote:

 Date: Fri, 25 Jul 2003 12:19:54 -0400
 From: Bailey, Shane C. [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: 'Struts Users Mailing List' [EMAIL PROTECTED]
 Subject: RE: How does Tiles effect filters and URL mapping?


 OK.

 So some things make sense and some things don't know about a problem I am
 having.

 I am trying to go from the main home page to the User Management (UM) home
 page with a link. And the main home page is in my main module and my UM home
 page is in my usermgmt module.

 So I do this in my main module home page:
 html:link forward=usermgmt.homeUser Management/html:link

 In my main module struts config:
 forward   name=usermgmt.home path=/usermgmt/home.do/

 In my UM module struts config:
 actionpath=/home
   parameter=doc.home
   type=org.apache.struts.actions.ForwardAction
   scope=request
 /action

 So my filter should be able to filter on /usermgmt/home.do but since that is
 then guided by a ForwardAction to the page doc.home then doc.home JSPs will
 not have been filtered, correct?


Presuming /usermgmt is the context path to your application, then you
would set your filter mapping to be /home.do, and the page to which this
action forwards will indeed be filtered.


 It sounds like I just need to not use the ForwardAction with /home mapping
 and use a regular action instead and I will get the request variables set
 by my filter?


Craig





 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]
 Sent: Friday, July 25, 2003 11:58 AM
 To: Struts Users Mailing List
 Subject: Re: How does Tiles effect filters and URL mapping?



 On Fri, 25 Jul 2003, Bailey, Shane C. wrote:

  Date: Fri, 25 Jul 2003 11:42:58 -0400
  From: Bailey, Shane C. [EMAIL PROTECTED]
  Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
  To: 'Struts Users Mailing List' [EMAIL PROTECTED]
  Subject: How does Tiles effect filters and URL mapping?
 
 
 
  I am wondering if I have a filter set up and I map *.jsp for it to do
  something will using Tiles cause the mapping not to do that something with
  my JSP pages?  I mean, once my JSPs are all combined into a page is that
  page no longer a JSP (as far as the filter is concerned)?
 

 Filters are based on the incoming request URL, and have no idea what
 technologies you actually use to compose the response.  However, filters
 are *not* applied when a RequestDispatcher.forward() is done (although
 you'll have this option in Servlet 2.4), so in a Struts based app you
 would need to map your filter on the incoming Action's URL, not the page's
 URL.

 Craig

 -
 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: How does Tiles effect filters and URL mapping?

2003-07-25 Thread Bailey, Shane C.

Thanks for your help Craig. I am close to solving my problem but after
trying to use a simple example (a regular action, then mapping.findForward
to a tile with no redirect attribute specified so I assume redirect is false
by default) to test my filter / request and a strange thing is happening...

Even with the simple action test I either Struts or JRun4 is acting in an
unexpected way.  In my Action the value for request.getClass().getName() is
org.securityfilter.filter.SecurityRequestWrapper and in the JSP (tile)
page that is forwarded with the RequestDispatcher.forward the value of %=
request.getClass().getName() % is jrun.servlet.ForwardRequest.

I am guessing it is a JRun4 specific reason (and not Struts) why the same
request object isn't available in the JSP as is in the prior Action.  Your
thoughts?




-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 25, 2003 1:00 PM
To: Struts Users Mailing List
Subject: RE: How does Tiles effect filters and URL mapping?



On Fri, 25 Jul 2003, Bailey, Shane C. wrote:

 Date: Fri, 25 Jul 2003 12:19:54 -0400
 From: Bailey, Shane C. [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: 'Struts Users Mailing List' [EMAIL PROTECTED]
 Subject: RE: How does Tiles effect filters and URL mapping?


 OK.

 So some things make sense and some things don't know about a problem I am
 having.

 I am trying to go from the main home page to the User Management (UM) home
 page with a link. And the main home page is in my main module and my UM
home
 page is in my usermgmt module.

 So I do this in my main module home page:
 html:link forward=usermgmt.homeUser Management/html:link

 In my main module struts config:
 forward   name=usermgmt.home path=/usermgmt/home.do/

 In my UM module struts config:
 actionpath=/home
   parameter=doc.home
   type=org.apache.struts.actions.ForwardAction
   scope=request
 /action

 So my filter should be able to filter on /usermgmt/home.do but since that
is
 then guided by a ForwardAction to the page doc.home then doc.home JSPs
will
 not have been filtered, correct?


Presuming /usermgmt is the context path to your application, then you
would set your filter mapping to be /home.do, and the page to which this
action forwards will indeed be filtered.


 It sounds like I just need to not use the ForwardAction with /home mapping
 and use a regular action instead and I will get the request variables
set
 by my filter?


Craig





 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]
 Sent: Friday, July 25, 2003 11:58 AM
 To: Struts Users Mailing List
 Subject: Re: How does Tiles effect filters and URL mapping?



 On Fri, 25 Jul 2003, Bailey, Shane C. wrote:

  Date: Fri, 25 Jul 2003 11:42:58 -0400
  From: Bailey, Shane C. [EMAIL PROTECTED]
  Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
  To: 'Struts Users Mailing List' [EMAIL PROTECTED]
  Subject: How does Tiles effect filters and URL mapping?
 
 
 
  I am wondering if I have a filter set up and I map *.jsp for it to do
  something will using Tiles cause the mapping not to do that something
with
  my JSP pages?  I mean, once my JSPs are all combined into a page is that
  page no longer a JSP (as far as the filter is concerned)?
 

 Filters are based on the incoming request URL, and have no idea what
 technologies you actually use to compose the response.  However, filters
 are *not* applied when a RequestDispatcher.forward() is done (although
 you'll have this option in Servlet 2.4), so in a Struts based app you
 would need to map your filter on the incoming Action's URL, not the page's
 URL.

 Craig

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

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



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

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



RE: How does Tiles effect filters and URL mapping?

2003-07-25 Thread Craig R. McClanahan


On Fri, 25 Jul 2003, Bailey, Shane C. wrote:

 Date: Fri, 25 Jul 2003 14:18:54 -0400
 From: Bailey, Shane C. [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: 'Struts Users Mailing List' [EMAIL PROTECTED]
 Subject: RE: How does Tiles effect filters and URL mapping?


 Thanks for your help Craig. I am close to solving my problem but after
 trying to use a simple example (a regular action, then mapping.findForward
 to a tile with no redirect attribute specified so I assume redirect is false
 by default) to test my filter / request and a strange thing is happening...

 Even with the simple action test I either Struts or JRun4 is acting in an
 unexpected way.  In my Action the value for request.getClass().getName() is
 org.securityfilter.filter.SecurityRequestWrapper and in the JSP (tile)
 page that is forwarded with the RequestDispatcher.forward the value of %=
 request.getClass().getName() % is jrun.servlet.ForwardRequest.

 I am guessing it is a JRun4 specific reason (and not Struts) why the same
 request object isn't available in the JSP as is in the prior Action.  Your
 thoughts?


In order to implement the semantics of RequestDispatcher, it is generally
required to wrap the original request object.  But that should make no
difference to your application, because the same attributes, parameters,
and request property values are still visible through the wrapper.

Craig

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



url mapping

2002-10-29 Thread Amit Badheka
I would like to map my url for jsp pages in web.xml,
The pages are kept as -
/jsp/*.jsp

so, everytime when I call any page I have to use url as ctx/jsp/some.jsp.

Can anybody tell me how should I map my url so that I can directly call the jsp 
page(without prefixing /jsp).

Thanks.



Re: url mapping

2002-10-29 Thread David Graham
The easy answer to this is that you should not be referencing the jsps 
directly anyways.  Your users should see urls ending in .do so you can 
change where the jsp is or which jsp renders the result later without them 
knowing.

David






From: Amit Badheka [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: url mapping
Date: Wed, 30 Oct 2002 10:19:01 +0530

I would like to map my url for jsp pages in web.xml,
The pages are kept as -
/jsp/*.jsp

so, everytime when I call any page I have to use url as ctx/jsp/some.jsp.

Can anybody tell me how should I map my url so that I can directly call the 
jsp page(without prefixing /jsp).

Thanks.


_
Broadband? Dial-up? Get reliable MSN Internet Access. 
http://resourcecenter.msn.com/access/plans/default.asp


--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org



Re: url mapping

2002-10-29 Thread Amit Badheka
Thanks for reply, David.

You are right, but when I uses the page reference in struts-config etc then
I want to avoid using /jsp/some.jsp.
I am not thinking about user view, but the programmer's view.

So, I just want to know is there anyway I can avoid /jsp.

- Original Message -
From: David Graham [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 30, 2002 10:42 AM
Subject: Re: url mapping


 The easy answer to this is that you should not be referencing the jsps
 directly anyways.  Your users should see urls ending in .do so you can
 change where the jsp is or which jsp renders the result later without them
 knowing.

 David






 From: Amit Badheka [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: url mapping
 Date: Wed, 30 Oct 2002 10:19:01 +0530
 
 I would like to map my url for jsp pages in web.xml,
 The pages are kept as -
  /jsp/*.jsp
 
 so, everytime when I call any page I have to use url as
ctx/jsp/some.jsp.
 
 Can anybody tell me how should I map my url so that I can directly call
the
 jsp page(without prefixing /jsp).
 
 Thanks.


 _
 Broadband? Dial-up? Get reliable MSN Internet Access.
 http://resourcecenter.msn.com/access/plans/default.asp


 --
 To unsubscribe, e-mail:
mailto:struts-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail:
mailto:struts-user-help;jakarta.apache.org





--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




Re: url mapping

2002-10-29 Thread Craig R. McClanahan


On Wed, 30 Oct 2002, Amit Badheka wrote:

 Date: Wed, 30 Oct 2002 11:03:40 +0530
 From: Amit Badheka [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: Re: url mapping

 Thanks for reply, David.

 You are right, but when I uses the page reference in struts-config etc then
 I want to avoid using /jsp/some.jsp.
 I am not thinking about user view, but the programmer's view.

 So, I just want to know is there anyway I can avoid /jsp.


If you don't want to reference them as /jsp/foo.jsp', then put the JSP
pages in the top-level directory of your webapp, instead of in a jsp
subdirectory.

The struts-config.xml file must reflect the actual context-relative path
of where the pages exist.  If you don't like the resulting path, change
where you put the pages!

Craig


--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




Re: url mapping

2002-10-29 Thread Amit Badheka
Thanks Craig,

So should I accept it as ultimate solution, and no way to do it with url
mapping.

- Original Message -
From: Craig R. McClanahan [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, October 30, 2002 11:19 AM
Subject: Re: url mapping




 On Wed, 30 Oct 2002, Amit Badheka wrote:

  Date: Wed, 30 Oct 2002 11:03:40 +0530
  From: Amit Badheka [EMAIL PROTECTED]
  Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
  To: Struts Users Mailing List [EMAIL PROTECTED]
  Subject: Re: url mapping
 
  Thanks for reply, David.
 
  You are right, but when I uses the page reference in struts-config etc
then
  I want to avoid using /jsp/some.jsp.
  I am not thinking about user view, but the programmer's view.
 
  So, I just want to know is there anyway I can avoid /jsp.
 

 If you don't want to reference them as /jsp/foo.jsp', then put the JSP
 pages in the top-level directory of your webapp, instead of in a jsp
 subdirectory.

 The struts-config.xml file must reflect the actual context-relative path
 of where the pages exist.  If you don't like the resulting path, change
 where you put the pages!

 Craig


 --
 To unsubscribe, e-mail:
mailto:struts-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail:
mailto:struts-user-help;jakarta.apache.org





--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




Re: url mapping

2002-10-29 Thread David Graham
So, you want to map the mapping?  LOL, follow Craig's advice and just move 
the pages :-).

David






From: Amit Badheka [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: url mapping
Date: Wed, 30 Oct 2002 11:03:40 +0530

Thanks for reply, David.

You are right, but when I uses the page reference in struts-config etc then
I want to avoid using /jsp/some.jsp.
I am not thinking about user view, but the programmer's view.

So, I just want to know is there anyway I can avoid /jsp.

- Original Message -
From: David Graham [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 30, 2002 10:42 AM
Subject: Re: url mapping


 The easy answer to this is that you should not be referencing the jsps
 directly anyways.  Your users should see urls ending in .do so you can
 change where the jsp is or which jsp renders the result later without 
them
 knowing.

 David






 From: Amit Badheka [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: url mapping
 Date: Wed, 30 Oct 2002 10:19:01 +0530
 
 I would like to map my url for jsp pages in web.xml,
 The pages are kept as -
  /jsp/*.jsp
 
 so, everytime when I call any page I have to use url as
ctx/jsp/some.jsp.
 
 Can anybody tell me how should I map my url so that I can directly call
the
 jsp page(without prefixing /jsp).
 
 Thanks.


 _
 Broadband? Dial-up? Get reliable MSN Internet Access.
 http://resourcecenter.msn.com/access/plans/default.asp


 --
 To unsubscribe, e-mail:
mailto:struts-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail:
mailto:struts-user-help;jakarta.apache.org





--
To unsubscribe, e-mail:   
mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: 
mailto:struts-user-help;jakarta.apache.org


_
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org



Re: url mapping

2002-10-29 Thread Craig R. McClanahan


On Wed, 30 Oct 2002, Amit Badheka wrote:

 Date: Wed, 30 Oct 2002 11:26:50 +0530
 From: Amit Badheka [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: Re: url mapping

 Thanks Craig,

 So should I accept it as ultimate solution, and no way to do it with url
 mapping.

Somewhere, you are going to have to specify the *actual* context-relative
path of your pages, even if it were possible to do this with mappings.
Therefore, it's not possible to make this invisible, because otherwise the
servlet container will never find them.

If you don't like the context-relative URLs of your JSP pages, then you
should put the pages (inside your webapp) where they create the URLs you
like.  The URL of a JSP page is the *result* of where you put the JSP
file, not the *cause*.

Craig



 - Original Message -
 From: Craig R. McClanahan [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Wednesday, October 30, 2002 11:19 AM
 Subject: Re: url mapping


 
 
  On Wed, 30 Oct 2002, Amit Badheka wrote:
 
   Date: Wed, 30 Oct 2002 11:03:40 +0530
   From: Amit Badheka [EMAIL PROTECTED]
   Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
   To: Struts Users Mailing List [EMAIL PROTECTED]
   Subject: Re: url mapping
  
   Thanks for reply, David.
  
   You are right, but when I uses the page reference in struts-config etc
 then
   I want to avoid using /jsp/some.jsp.
   I am not thinking about user view, but the programmer's view.
  
   So, I just want to know is there anyway I can avoid /jsp.
  
 
  If you don't want to reference them as /jsp/foo.jsp', then put the JSP
  pages in the top-level directory of your webapp, instead of in a jsp
  subdirectory.
 
  The struts-config.xml file must reflect the actual context-relative path
  of where the pages exist.  If you don't like the resulting path, change
  where you put the pages!
 
  Craig
 
 
  --
  To unsubscribe, e-mail:
 mailto:struts-user-unsubscribe;jakarta.apache.org
  For additional commands, e-mail:
 mailto:struts-user-help;jakarta.apache.org
 
 



 --
 To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




RE: Problems changing example to use /action URL mapping

2002-04-12 Thread Craig R. McClanahan



On Wed, 10 Apr 2002, Rob Jellinghaus wrote:

 Date: Wed, 10 Apr 2002 10:14:23 -0800
 From: Rob Jellinghaus [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: RE: Problems changing example to use /action URL mapping

 At 07:28 AM 4/10/2002 -0400, Galbreath, Mark wrote:
 Is this what you have in web.xml?
 
servlet-mapping
  servlet-nameaction/servlet-name
  url-pattern/action/*/url-pattern
/servlet-mapping

 Yes, that's what I have.  Works fine with 1.0.2.

 From: Jay sissom [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, April 09, 2002 10:20 PM
 Subject: Re: Problems changing example to use /action URL mapping
 
 If you are using Struts 1.1b, I've heard that /action/* mapping will
 not work.  Struts 1.1b supports multiple config files and it determines
 which to use based on the path, so it will only work based on the
 extension.

 I don't see how this could be true.  It is the *servlet* that extracts the
 /action from the invoked URI -- the path passed in the request is just the
 final part matching the *.  How could a change in Struts version affect the
 behavior of the container?


To be precise, the *multi-app support* in Struts 1.1-b1 does not support
path-based matching.  If you continue to use a single Struts application
in a webapp (which is essentially what every Struts 1.0-based app is),
path based matching should continue to work the way it always has.

If it doesn't work that way (or if it's different from the way 1.0
worked), please submit a bug report so we can get it fixed:

  http://nagoya.apache.org/bugzilla/

 Cheers,
 Rob


Craig




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




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




RE: Problems changing example to use /action URL mapping

2002-04-10 Thread Galbreath, Mark

Is this what you have in web.xml?

  servlet-mapping
servlet-nameaction/servlet-name
url-pattern/action/*/url-pattern
  /servlet-mapping

BTW:  just to be funny we did:

  servlet-mapping
servlet-nameaction/servlet-name
url-pattern/*.asp/url-pattern
  /servlet-mapping

Mark

-Original Message-
From: Jay sissom [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 09, 2002 10:20 PM
To: Struts Users Mailing List
Subject: Re: Problems changing example to use /action URL mapping


If you are using Struts 1.1b, I've heard that /action/* mapping will 
not work.  Struts 1.1b supports multiple config files and it determines 
which to use based on the path, so it will only work based on the 
extension.

I heard this at a BOF session at JavaOne, but I haven't tried it myself.

Jay


On Tue, 9 Apr 2002, Rob Jellinghaus wrote:

 I am dinking around with the struts-example app, trying to convert it from

 using *.do servlet mapping to /action/* servlet mapping.
 
 The problem is that it's extremely confusing!
 
 Where is the best explanation of how servlet mapping and struts-config.xml

 interact?  Right now I tried changing all the *.do URLs to be /action/* 
 instead, throughout the .jsp's and struts-config.xml, and let's just say
it 
 didn't work.  In fact, there are situations where *no* permutation of URLs

 works.
 
 I am sure there are some basic things I'm not understanding about how base

 URLs, servlet URL mapping (I'm using Tomcat), and Struts action lookup 
 work.  But how to learn better?
 
 All clues appreciated.
 Cheers,
 Rob
 
 
 --
 To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
 


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

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




RE: Never mind (was Re: Problems changing example to use /action URL mapping)

2002-04-10 Thread Galbreath, Mark

Don't be - this was a very useful bit of information!  Thanks for sharing.

Mark

-Original Message-
From: Rob Jellinghaus [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 09, 2002 11:46 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: Never mind (was Re: Problems changing example to use /action
URL mapping)


Well, I got my IDEA (http://www.intellij.com/idea) configuration set up to 
run Struts under Tomcat in the debugger (thank goodness for built-in remote 
debugging support!).  Compiled the Struts source, compiled the 
struts-example source, started setting breakpoints and looking at things.

It turns out, as you all know, that the action names are post-mapping, so 
an /action/* servlet mapping converts an URI of 
/struts-example/action/logon to an action name of /logon.  It also, of 
course, turns out that all HREF entries and other paths *do* include the 
/action context.

Once I understood that, I was able to get rid of *.do.

Next time I won't be so quick to ask questions :-)
GOD I LOVE OPEN SOURCE!
Cheers!
Rob


At 05:54 PM 4/9/2002 -0800, Rob Jellinghaus wrote:
I am dinking around with the struts-example app, trying to convert it from 
using *.do servlet mapping to /action/* servlet mapping.

The problem is that it's extremely confusing!

Where is the best explanation of how servlet mapping and struts-config.xml 
interact?  Right now I tried changing all the *.do URLs to be /action/* 
instead, throughout the .jsp's and struts-config.xml, and let's just say 
it didn't work.  In fact, there are situations where *no* permutation of 
URLs works.

I am sure there are some basic things I'm not understanding about how base 
URLs, servlet URL mapping (I'm using Tomcat), and Struts action lookup 
work.  But how to learn better?

All clues appreciated.
Cheers,
Rob


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



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

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




Problems changing example to use /action URL mapping

2002-04-09 Thread Rob Jellinghaus

I am dinking around with the struts-example app, trying to convert it from 
using *.do servlet mapping to /action/* servlet mapping.

The problem is that it's extremely confusing!

Where is the best explanation of how servlet mapping and struts-config.xml 
interact?  Right now I tried changing all the *.do URLs to be /action/* 
instead, throughout the .jsp's and struts-config.xml, and let's just say it 
didn't work.  In fact, there are situations where *no* permutation of URLs 
works.

I am sure there are some basic things I'm not understanding about how base 
URLs, servlet URL mapping (I'm using Tomcat), and Struts action lookup 
work.  But how to learn better?

All clues appreciated.
Cheers,
Rob


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




Re: Problems changing example to use /action URL mapping

2002-04-09 Thread Jay sissom

If you are using Struts 1.1b, I've heard that /action/* mapping will 
not work.  Struts 1.1b supports multiple config files and it determines 
which to use based on the path, so it will only work based on the 
extension.

I heard this at a BOF session at JavaOne, but I haven't tried it myself.

Jay


On Tue, 9 Apr 2002, Rob Jellinghaus wrote:

 I am dinking around with the struts-example app, trying to convert it from 
 using *.do servlet mapping to /action/* servlet mapping.
 
 The problem is that it's extremely confusing!
 
 Where is the best explanation of how servlet mapping and struts-config.xml 
 interact?  Right now I tried changing all the *.do URLs to be /action/* 
 instead, throughout the .jsp's and struts-config.xml, and let's just say it 
 didn't work.  In fact, there are situations where *no* permutation of URLs 
 works.
 
 I am sure there are some basic things I'm not understanding about how base 
 URLs, servlet URL mapping (I'm using Tomcat), and Struts action lookup 
 work.  But how to learn better?
 
 All clues appreciated.
 Cheers,
 Rob
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 


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




Never mind (was Re: Problems changing example to use /action URL mapping)

2002-04-09 Thread Rob Jellinghaus

Well, I got my IDEA (http://www.intellij.com/idea) configuration set up to 
run Struts under Tomcat in the debugger (thank goodness for built-in remote 
debugging support!).  Compiled the Struts source, compiled the 
struts-example source, started setting breakpoints and looking at things.

It turns out, as you all know, that the action names are post-mapping, so 
an /action/* servlet mapping converts an URI of 
/struts-example/action/logon to an action name of /logon.  It also, of 
course, turns out that all HREF entries and other paths *do* include the 
/action context.

Once I understood that, I was able to get rid of *.do.

Next time I won't be so quick to ask questions :-)
GOD I LOVE OPEN SOURCE!
Cheers!
Rob


At 05:54 PM 4/9/2002 -0800, Rob Jellinghaus wrote:
I am dinking around with the struts-example app, trying to convert it from 
using *.do servlet mapping to /action/* servlet mapping.

The problem is that it's extremely confusing!

Where is the best explanation of how servlet mapping and struts-config.xml 
interact?  Right now I tried changing all the *.do URLs to be /action/* 
instead, throughout the .jsp's and struts-config.xml, and let's just say 
it didn't work.  In fact, there are situations where *no* permutation of 
URLs works.

I am sure there are some basic things I'm not understanding about how base 
URLs, servlet URL mapping (I'm using Tomcat), and Struts action lookup 
work.  But how to learn better?

All clues appreciated.
Cheers,
Rob


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



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




Re: URL mapping

2001-07-17 Thread Gregor Rayman

Chris Callaghan [EMAIL PROTECTED] asks:


 Hey all,
 
 I want to be able to map a URL to certain JSPs which may or may not have 
 an action involved with them e.g
 map /logon to logon.jsp which also has as action also called logon
 also /tour to tour.jsp which has no associated action.
 
 How can I do this with struts?
 
 Cheers
 Chris

You can do it with your http server, not with struts.

--
gR




RE: URL mapping

2001-07-17 Thread Rey Francois

You could, but I would favor the use of the 'forward' attribute in the
'action' element in the struts-config.xml.
Here is an extract of the documentation in the DTD:
 forward Context-relative path of the servlet or JSP resource
that
 will process this request, instead of instantiating and
 calling the Action class specified by type.  Exactly
one
 of forward, include, or type must be specified.


Doing it this way makes it very easy to map to an action at a later stage if
the requirements have changed.

Fr.


-Original Message-
From: Gregor Rayman [mailto:[EMAIL PROTECTED]]
Sent: 17 July 2001 12:25
To: [EMAIL PROTECTED]
Subject: Re: URL mapping


Chris Callaghan [EMAIL PROTECTED] asks:


 Hey all,
 
 I want to be able to map a URL to certain JSPs which may or may not have 
 an action involved with them e.g
 map /logon to logon.jsp which also has as action also called logon
 also /tour to tour.jsp which has no associated action.
 
 How can I do this with struts?
 
 Cheers
 Chris

You can do it with your http server, not with struts.

--
gR


The information in this email is confidential and is intended solely
for the addressee(s).
Access to this email by anyone else is unauthorised. If you are not
an intended recipient, you must not read, use or disseminate the
information contained in the email.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of Capco.

http://www.capco.com
***




Re: URL mapping

2001-07-17 Thread Aapo Laakkonen

  I want to be able to map a URL to certain JSPs which may or may not have
  an action involved with them e.g map /logon to logon.jsp which also has
as
  action also called logon also /tour to tour.jsp which has no associated
action.
 
  How can I do this with struts?

action path=/logon forward=/logon.jsp/




Re: URL mapping

2001-07-17 Thread Gregor Rayman

Of course. But with this action-forward approach, you can forward only *.do
URLs.
Please correct me, if I am wrong.

--
gR


- Original Message -
From: Rey Francois [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 17, 2001 12:25 PM
Subject: RE: URL mapping


 You could, but I would favor the use of the 'forward' attribute in the
 'action' element in the struts-config.xml.
 Here is an extract of the documentation in the DTD:
  forward Context-relative path of the servlet or JSP resource
 that
  will process this request, instead of instantiating and
  calling the Action class specified by type.  Exactly
 one
  of forward, include, or type must be specified.


 Doing it this way makes it very easy to map to an action at a later stage if
 the requirements have changed.

 Fr.


 -Original Message-
 From: Gregor Rayman [mailto:[EMAIL PROTECTED]]
 Sent: 17 July 2001 12:25
 To: [EMAIL PROTECTED]
 Subject: Re: URL mapping


 Chris Callaghan [EMAIL PROTECTED] asks:


  Hey all,
 
  I want to be able to map a URL to certain JSPs which may or may not have
  an action involved with them e.g
  map /logon to logon.jsp which also has as action also called logon
  also /tour to tour.jsp which has no associated action.
 
  How can I do this with struts?
 
  Cheers
  Chris

 You can do it with your http server, not with struts.

 --
 gR

 
 The information in this email is confidential and is intended solely
 for the addressee(s).
 Access to this email by anyone else is unauthorised. If you are not
 an intended recipient, you must not read, use or disseminate the
 information contained in the email.
 Any views expressed in this message are those of the individual
 sender, except where the sender specifically states them to be
 the views of Capco.

 http://www.capco.com
 ***





Re: URL mapping

2001-07-17 Thread Aapo Laakkonen

 Of course. But with this action-forward approach, you can forward only
*.do
 URLs. Please correct me, if I am wrong.

It depends on what you specify as an extension for struts controller in your
web.xml file.




RE: URL mapping

2001-07-17 Thread Rey Francois

No, you can forward to whatever path can be used to construct a
RequestDipatcher object, as shown in the ActionServlet.processForward()
method (which I pasted below). That includes .jsp paths.
Fr.

/**
 * Process a forward requested by this mapping, if any.  Return
 * codetrue/code if processing of this request should continue (i.e.
 * be processed by an Action class), or codefalse/code if we have
 * already handled this request.
 *
 * @param mapping The ActionMapping we are processing
 * @param request The request we are processing
 * @param response The response we are processing
 *
 * @exception IOException if the included resource throws an exception
 * @exception ServletException if the included resource throws an
 *  exception
 */
protected boolean processForward(ActionMapping mapping,
 HttpServletRequest request,
 HttpServletResponse response)
throws IOException, ServletException {

// Are we going to process this request?
String forward = mapping.getForward();
if (forward == null)
return (true);

//unwrap the multipart request if there is one
if (request instanceof MultipartRequestWrapper) {
request = ((MultipartRequestWrapper) request).getRequest();
}
// Construct a request dispatcher for the specified path
RequestDispatcher rd =
getServletContext().getRequestDispatcher(forward);
if (rd == null) {
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
   internal.getMessage(requestDispatcher,
   forward));
return (false);
}


-Original Message-
From: Gregor Rayman [mailto:[EMAIL PROTECTED]]
Sent: 17 July 2001 13:29
To: [EMAIL PROTECTED]
Subject: Re: URL mapping


Of course. But with this action-forward approach, you can forward only *.do
URLs.
Please correct me, if I am wrong.

--
gR


- Original Message -
From: Rey Francois [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 17, 2001 12:25 PM
Subject: RE: URL mapping


 You could, but I would favor the use of the 'forward' attribute in the
 'action' element in the struts-config.xml.
 Here is an extract of the documentation in the DTD:
  forward Context-relative path of the servlet or JSP resource
 that
  will process this request, instead of instantiating
and
  calling the Action class specified by type.
Exactly
 one
  of forward, include, or type must be specified.


 Doing it this way makes it very easy to map to an action at a later stage
if
 the requirements have changed.

 Fr.


 -Original Message-
 From: Gregor Rayman [mailto:[EMAIL PROTECTED]]
 Sent: 17 July 2001 12:25
 To: [EMAIL PROTECTED]
 Subject: Re: URL mapping


 Chris Callaghan [EMAIL PROTECTED] asks:


  Hey all,
 
  I want to be able to map a URL to certain JSPs which may or may not have
  an action involved with them e.g
  map /logon to logon.jsp which also has as action also called logon
  also /tour to tour.jsp which has no associated action.
 
  How can I do this with struts?
 
  Cheers
  Chris

 You can do it with your http server, not with struts.

 --
 gR

 
 The information in this email is confidential and is intended solely
 for the addressee(s).
 Access to this email by anyone else is unauthorised. If you are not
 an intended recipient, you must not read, use or disseminate the
 information contained in the email.
 Any views expressed in this message are those of the individual
 sender, except where the sender specifically states them to be
 the views of Capco.

 http://www.capco.com
 ***



The information in this email is confidential and is intended solely
for the addressee(s).
Access to this email by anyone else is unauthorised. If you are not
an intended recipient, you must not read, use or disseminate the
information contained in the email.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of Capco.

http://www.capco.com
***




Re: URL mapping

2001-07-17 Thread Ted Husted

Struts doesn't map URLS per se, that's up to the container and Web
server. 

You can use the html:link tag to code logical names into your JSP's, and
then have Struts insert the appropriate path at runtime

forward name=logon   path=/logon.jsp/
forward name=tourpath=/tour.jps/

Which in a JSP would be referenced with 

html:link forward=logon ...
html:link forward=tour ...

Otherwise, you would have to create tour/ and logon/ directories, and
then name your JSP's

tour/index.jsp
logon/index.jsp

which would be handled by the Web server normally.


-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/


Chris Callaghan wrote:
 
 Hey all,
 
 I want to be able to map a URL to certain JSPs which may or may not have
 an action involved with them e.g
 map /logon to logon.jsp which also has as action also called logon
 also /tour to tour.jsp which has no associated action.
 
 How can I do this with struts?
 
 Cheers
 Chris



Re: URL mapping

2001-07-17 Thread Chris Callaghan

Thanks Ted (and everyone else!)

I was using html:link href=logon / rather than forward=logon

Cheers
Chris

Ted Husted wrote:

Struts doesn't map URLS per se, that's up to the container and Web
server. 

You can use the html:link tag to code logical names into your JSP's, and
then have Struts insert the appropriate path at runtime

forward name=logon   path=/logon.jsp/
forward name=tour   path=/tour.jps/

Which in a JSP would be referenced with 

   html:link forward=logon ...
   html:link forward=tour ...

Otherwise, you would have to create tour/ and logon/ directories, and
then name your JSP's

tour/index.jsp
logon/index.jsp

which would be handled by the Web server normally.


-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/


Chris Callaghan wrote:

Hey all,

I want to be able to map a URL to certain JSPs which may or may not have
an action involved with them e.g
map /logon to logon.jsp which also has as action also called logon
also /tour to tour.jsp which has no associated action.

How can I do this with struts?

Cheers
Chris







URL mapping

2001-07-16 Thread Chris Callaghan

Hey all,

I want to be able to map a URL to certain JSPs which may or may not have 
an action involved with them e.g
map /logon to logon.jsp which also has as action also called logon
also /tour to tour.jsp which has no associated action.

How can I do this with struts?

Cheers
Chris