Re: Mapping Struts controller servlet to webapp root: trouble
On August 13, 2003 05:30 pm, Sgarlata Matt wrote: As far as I know this is an issue that is specific to your web server and outside the scope of struts. For example, in tomcat I believe the solution is to put your app in the tomcat root/webapps/ROOT directory. No, I was wondering about mapping the Struts servlet to the webapp's root URL, not putting a webapp at the server's root. I have still not heard from anyone if Struts doesn't support it. That's what I am talking about (web.xml): servlet-mapping servlet-nameaction/servlet-name url-pattern/*/url-pattern /servlet-mapping Paul Hope that helps, Matt - Original Message - From: Paul Yunusov [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 11:51 AM Subject: Re: Mapping Struts controller servlet to webapp root: trouble On August 13, 2003 11:03 am, Bailey, Shane C. wrote: If I remember correctly, from looking at the source code, Struts determines what extension (or prefix) to add to the request. If /* is used I could see how it could screw things up. You don't want images and things like that going through Struts anyway, I wouldn't think. Why do you want to do /* (at least for Struts URL pattern)? Thanks, I see how the way Struts parses URLs could confuse it. I want to map Struts to the webapp's root because my webapp doesn't contain any static content and I want to limit all requests to Struts-defined actions. Can anyone confirm Struts does not support /* mapping for its controller servlet? Thank you, Paul -Original Message- From: Paul Yunusov [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 11:05 AM To: [EMAIL PROTECTED] Subject: Mapping Struts controller servlet to webapp root: trouble I was wondering if anyone has heard of issues arising when the contoller is mapped to a webapp's root. I am talking about this: servlet-mapping servlet-nameaction/servlet-name url-pattern/*/url-pattern /servlet-mapping where action is the Struts controller. Struts seems to return a 400 error with such mapping when it tries to make a forward from an Action instance saying that the request was syntactically incorrect. url-pattern/struts/*/url-pattern or url-pattern*.do/url-pattern are commong but I was wondering about the /* mapping. Anyone heard of any issues with this? Thanks, Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Mapping Struts controller servlet to webapp root: trouble
I guess I am more saying, I'm pretty sure, by looking at Struts source code (granted a week or so ago), that you can't do /*. So I am suggesting to use a filter. But looking at a different piece of the source maybe the solution is to not have a mapping specified at all. Sounds ugly, dangerous; but there is a comment in the source that states, Use our servlet mapping, if one is specified: /** * Return the form action converted into a server-relative URL. */ public static String getActionMappingURL(String action, PageContext pageContext) { HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); StringBuffer value = new StringBuffer(request.getContextPath()); ModuleConfig config = (ModuleConfig) pageContext.getRequest().getAttribute(Globals.MODULE_KEY); if (config != null) { value.append(config.getPrefix()); } // Use our servlet mapping, if one is specified String servletMapping = (String) pageContext.getAttribute(Globals.SERVLET_KEY, PageContext.APPLICATION_SCOPE); if (servletMapping != null) { String queryString = null; int question = action.indexOf(?); if (question = 0) { queryString = action.substring(question); } String actionMapping = getActionMappingName(action); if (servletMapping.startsWith(*.)) { value.append(actionMapping); value.append(servletMapping.substring(1)); } else if (servletMapping.endsWith(/*)) { value.append(servletMapping.substring(0, servletMapping.length() - 2)); value.append(actionMapping); } else if (servletMapping.equals(/)) { value.append(actionMapping); } if (queryString != null) { value.append(queryString); } } // Otherwise, assume extension mapping is in use and extension is // already included in the action property else { if (!action.startsWith(/)) { value.append(/); } value.append(action); } // Return the completed value return (value.toString()); } -Original Message- From: Paul Yunusov [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 6:02 PM To: Struts Users Mailing List Subject: Re: Mapping Struts controller servlet to webapp root: trouble On August 13, 2003 05:40 pm, Bailey, Shane C. wrote: Do you want to add a filter which will look over every request prior to Struts getting any requests? That might be one possibility. If you have never written a filter then one I know where you can get source for is at securityfilter.sourceforge.net that one isn't doing necessarily what you want but it is a (working with source) example. No, all I want is to route every request to a webapp through a Struts controller servlet. The only obvious option, which is mapping the servlet to the /* pattern in web.xml, doesn't seem to work. That's why I am wondering if Struts supports this kind of mapping or not, or if this is a bug. Thanks, Paul - Original Message - From: Paul Yunusov [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 11:51 AM Subject: Re: Mapping Struts controller servlet to webapp root: trouble Thanks, I see how the way Struts parses URLs could confuse it. I want to map Struts to the webapp's root because my webapp doesn't contain any static content and I want to limit all requests to Struts-defined actions. Can anyone confirm Struts does not support /* mapping for its controller servlet? Thank you, Paul -Original Message- From: Paul Yunusov [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 11:05 AM To: [EMAIL PROTECTED] Subject: Mapping Struts controller servlet to webapp root: trouble I was wondering if anyone has heard of issues arising when the contoller is mapped to a webapp's root. I am talking about this: servlet-mapping servlet-nameaction/servlet-name url-pattern/*/url-pattern /servlet-mapping where action is the Struts controller. Struts seems to return a 400 error with such mapping when it tries to make a forward from an Action instance saying that the request was syntactically incorrect. url-pattern/struts/*/url-pattern or url-pattern*.do/url-pattern are commong but I was wondering about the /* mapping. Anyone heard of any issues with this? Thanks, Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e
RE: Mapping Struts controller servlet to webapp root: trouble
If I remember correctly, from looking at the source code, Struts determines what extension (or prefix) to add to the request. If /* is used I could see how it could screw things up. You don't want images and things like that going through Struts anyway, I wouldn't think. Why do you want to do /* (at least for Struts URL pattern)? -Original Message- From: Paul Yunusov [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 11:05 AM To: [EMAIL PROTECTED] Subject: Mapping Struts controller servlet to webapp root: trouble I was wondering if anyone has heard of issues arising when the contoller is mapped to a webapp's root. I am talking about this: servlet-mapping servlet-nameaction/servlet-name url-pattern/*/url-pattern /servlet-mapping where action is the Struts controller. Struts seems to return a 400 error with such mapping when it tries to make a forward from an Action instance saying that the request was syntactically incorrect. url-pattern/struts/*/url-pattern or url-pattern*.do/url-pattern are commong but I was wondering about the /* mapping. Anyone heard of any issues with this? Thanks, Paul - 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: Mapping Struts controller servlet to webapp root: trouble
As far as I know this is an issue that is specific to your web server and outside the scope of struts. For example, in tomcat I believe the solution is to put your app in the tomcat root/webapps/ROOT directory. Hope that helps, Matt - Original Message - From: Paul Yunusov [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 11:51 AM Subject: Re: Mapping Struts controller servlet to webapp root: trouble On August 13, 2003 11:03 am, Bailey, Shane C. wrote: If I remember correctly, from looking at the source code, Struts determines what extension (or prefix) to add to the request. If /* is used I could see how it could screw things up. You don't want images and things like that going through Struts anyway, I wouldn't think. Why do you want to do /* (at least for Struts URL pattern)? Thanks, I see how the way Struts parses URLs could confuse it. I want to map Struts to the webapp's root because my webapp doesn't contain any static content and I want to limit all requests to Struts-defined actions. Can anyone confirm Struts does not support /* mapping for its controller servlet? Thank you, Paul -Original Message- From: Paul Yunusov [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 11:05 AM To: [EMAIL PROTECTED] Subject: Mapping Struts controller servlet to webapp root: trouble I was wondering if anyone has heard of issues arising when the contoller is mapped to a webapp's root. I am talking about this: servlet-mapping servlet-nameaction/servlet-name url-pattern/*/url-pattern /servlet-mapping where action is the Struts controller. Struts seems to return a 400 error with such mapping when it tries to make a forward from an Action instance saying that the request was syntactically incorrect. url-pattern/struts/*/url-pattern or url-pattern*.do/url-pattern are commong but I was wondering about the /* mapping. Anyone heard of any issues with this? Thanks, Paul - 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]
Mapping Struts controller servlet to webapp root: trouble
I was wondering if anyone has heard of issues arising when the contoller is mapped to a webapp's root. I am talking about this: servlet-mapping servlet-nameaction/servlet-name url-pattern/*/url-pattern /servlet-mapping where action is the Struts controller. Struts seems to return a 400 error with such mapping when it tries to make a forward from an Action instance saying that the request was syntactically incorrect. url-pattern/struts/*/url-pattern or url-pattern*.do/url-pattern are commong but I was wondering about the /* mapping. Anyone heard of any issues with this? Thanks, Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mapping Struts controller servlet to webapp root: trouble
Thanks, Shane, I'll look into that. Paul On August 13, 2003 06:15 pm, Bailey, Shane C. wrote: I guess I am more saying, I'm pretty sure, by looking at Struts source code (granted a week or so ago), that you can't do /*. So I am suggesting to use a filter. But looking at a different piece of the source maybe the solution is to not have a mapping specified at all. Sounds ugly, dangerous; but there is a comment in the source that states, Use our servlet mapping, if one is specified: /** * Return the form action converted into a server-relative URL. */ public static String getActionMappingURL(String action, PageContext pageContext) { HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); StringBuffer value = new StringBuffer(request.getContextPath()); ModuleConfig config = (ModuleConfig) pageContext.getRequest().getAttribute(Globals.MODULE_KEY); if (config != null) { value.append(config.getPrefix()); } // Use our servlet mapping, if one is specified String servletMapping = (String) pageContext.getAttribute(Globals.SERVLET_KEY, PageContext.APPLICATION_SCOPE); if (servletMapping != null) { String queryString = null; int question = action.indexOf(?); if (question = 0) { queryString = action.substring(question); } String actionMapping = getActionMappingName(action); if (servletMapping.startsWith(*.)) { value.append(actionMapping); value.append(servletMapping.substring(1)); } else if (servletMapping.endsWith(/*)) { value.append(servletMapping.substring(0, servletMapping.length() - 2)); value.append(actionMapping); } else if (servletMapping.equals(/)) { value.append(actionMapping); } if (queryString != null) { value.append(queryString); } } // Otherwise, assume extension mapping is in use and extension is // already included in the action property else { if (!action.startsWith(/)) { value.append(/); } value.append(action); } // Return the completed value return (value.toString()); } -Original Message- From: Paul Yunusov [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 6:02 PM To: Struts Users Mailing List Subject: Re: Mapping Struts controller servlet to webapp root: trouble On August 13, 2003 05:40 pm, Bailey, Shane C. wrote: Do you want to add a filter which will look over every request prior to Struts getting any requests? That might be one possibility. If you have never written a filter then one I know where you can get source for is at securityfilter.sourceforge.net that one isn't doing necessarily what you want but it is a (working with source) example. No, all I want is to route every request to a webapp through a Struts controller servlet. The only obvious option, which is mapping the servlet to the /* pattern in web.xml, doesn't seem to work. That's why I am wondering if Struts supports this kind of mapping or not, or if this is a bug. Thanks, Paul - Original Message - From: Paul Yunusov [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 11:51 AM Subject: Re: Mapping Struts controller servlet to webapp root: trouble Thanks, I see how the way Struts parses URLs could confuse it. I want to map Struts to the webapp's root because my webapp doesn't contain any static content and I want to limit all requests to Struts-defined actions. Can anyone confirm Struts does not support /* mapping for its controller servlet? Thank you, Paul -Original Message- From: Paul Yunusov [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 11:05 AM To: [EMAIL PROTECTED] Subject: Mapping Struts controller servlet to webapp root: trouble I was wondering if anyone has heard of issues arising when the contoller is mapped to a webapp's root. I am talking about this: servlet-mapping servlet-nameaction/servlet-name url-pattern/*/url-pattern /servlet-mapping where action is the Struts controller. Struts seems to return a 400 error with such mapping when it tries to make a forward from an Action instance saying that the request was syntactically incorrect. url-pattern/struts/*/url-pattern or url-pattern*.do/url-pattern are commong but I was wondering about the /* mapping. Anyone heard of any issues with this? Thanks, Paul
Re: Mapping Struts controller servlet to webapp root: trouble
On August 13, 2003 06:56 pm, Craig R. McClanahan wrote: On Wed, 13 Aug 2003, Paul Yunusov wrote: Date: Wed, 13 Aug 2003 17:46:57 -0400 From: Paul Yunusov [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Mapping Struts controller servlet to webapp root: trouble On August 13, 2003 05:30 pm, Sgarlata Matt wrote: As far as I know this is an issue that is specific to your web server and outside the scope of struts. For example, in tomcat I believe the solution is to put your app in the tomcat root/webapps/ROOT directory. No, I was wondering about mapping the Struts servlet to the webapp's root URL, not putting a webapp at the server's root. I have still not heard from anyone if Struts doesn't support it. That's what I am talking about (web.xml): servlet-mapping servlet-nameaction/servlet-name url-pattern/*/url-pattern /servlet-mapping If you're using JSPs, this mapping will totally disable them because it maps things like /index.jsp back to the controller servlet again. That's exactly what happened. Thanks for pointing this out to me. Struts requires either a prefix-match (/do/*) or extension-match (*.do) mapping. See Section 5.4.2 of the User Guide. I know why now. Thanks. Paul Craig Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mapping Struts controller servlet to webapp root: trouble
On Wed, 13 Aug 2003, Paul Yunusov wrote: Date: Wed, 13 Aug 2003 17:46:57 -0400 From: Paul Yunusov [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Mapping Struts controller servlet to webapp root: trouble On August 13, 2003 05:30 pm, Sgarlata Matt wrote: As far as I know this is an issue that is specific to your web server and outside the scope of struts. For example, in tomcat I believe the solution is to put your app in the tomcat root/webapps/ROOT directory. No, I was wondering about mapping the Struts servlet to the webapp's root URL, not putting a webapp at the server's root. I have still not heard from anyone if Struts doesn't support it. That's what I am talking about (web.xml): servlet-mapping servlet-nameaction/servlet-name url-pattern/*/url-pattern /servlet-mapping If you're using JSPs, this mapping will totally disable them because it maps things like /index.jsp back to the controller servlet again. Struts requires either a prefix-match (/do/*) or extension-match (*.do) mapping. See Section 5.4.2 of the User Guide. Paul Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Mapping Struts controller servlet to webapp root: trouble
Do you want to add a filter which will look over every request prior to Struts getting any requests? That might be one possibility. If you have never written a filter then one I know where you can get source for is at securityfilter.sourceforge.net that one isn't doing necessarily what you want but it is a (working with source) example. - Original Message - From: Paul Yunusov [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 11:51 AM Subject: Re: Mapping Struts controller servlet to webapp root: trouble Thanks, I see how the way Struts parses URLs could confuse it. I want to map Struts to the webapp's root because my webapp doesn't contain any static content and I want to limit all requests to Struts-defined actions. Can anyone confirm Struts does not support /* mapping for its controller servlet? Thank you, Paul -Original Message- From: Paul Yunusov [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 11:05 AM To: [EMAIL PROTECTED] Subject: Mapping Struts controller servlet to webapp root: trouble I was wondering if anyone has heard of issues arising when the contoller is mapped to a webapp's root. I am talking about this: servlet-mapping servlet-nameaction/servlet-name url-pattern/*/url-pattern /servlet-mapping where action is the Struts controller. Struts seems to return a 400 error with such mapping when it tries to make a forward from an Action instance saying that the request was syntactically incorrect. url-pattern/struts/*/url-pattern or url-pattern*.do/url-pattern are commong but I was wondering about the /* mapping. Anyone heard of any issues with this? Thanks, Paul - 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]
Re: Mapping Struts controller servlet to webapp root: trouble
On August 13, 2003 05:40 pm, Bailey, Shane C. wrote: Do you want to add a filter which will look over every request prior to Struts getting any requests? That might be one possibility. If you have never written a filter then one I know where you can get source for is at securityfilter.sourceforge.net that one isn't doing necessarily what you want but it is a (working with source) example. No, all I want is to route every request to a webapp through a Struts controller servlet. The only obvious option, which is mapping the servlet to the /* pattern in web.xml, doesn't seem to work. That's why I am wondering if Struts supports this kind of mapping or not, or if this is a bug. Thanks, Paul - Original Message - From: Paul Yunusov [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 11:51 AM Subject: Re: Mapping Struts controller servlet to webapp root: trouble Thanks, I see how the way Struts parses URLs could confuse it. I want to map Struts to the webapp's root because my webapp doesn't contain any static content and I want to limit all requests to Struts-defined actions. Can anyone confirm Struts does not support /* mapping for its controller servlet? Thank you, Paul -Original Message- From: Paul Yunusov [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 11:05 AM To: [EMAIL PROTECTED] Subject: Mapping Struts controller servlet to webapp root: trouble I was wondering if anyone has heard of issues arising when the contoller is mapped to a webapp's root. I am talking about this: servlet-mapping servlet-nameaction/servlet-name url-pattern/*/url-pattern /servlet-mapping where action is the Struts controller. Struts seems to return a 400 error with such mapping when it tries to make a forward from an Action instance saying that the request was syntactically incorrect. url-pattern/struts/*/url-pattern or url-pattern*.do/url-pattern are commong but I was wondering about the /* mapping. Anyone heard of any issues with this? Thanks, Paul - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mapping Struts controller servlet to webapp root: trouble
On August 13, 2003 11:03 am, Bailey, Shane C. wrote: If I remember correctly, from looking at the source code, Struts determines what extension (or prefix) to add to the request. If /* is used I could see how it could screw things up. You don't want images and things like that going through Struts anyway, I wouldn't think. Why do you want to do /* (at least for Struts URL pattern)? Thanks, I see how the way Struts parses URLs could confuse it. I want to map Struts to the webapp's root because my webapp doesn't contain any static content and I want to limit all requests to Struts-defined actions. Can anyone confirm Struts does not support /* mapping for its controller servlet? Thank you, Paul -Original Message- From: Paul Yunusov [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 11:05 AM To: [EMAIL PROTECTED] Subject: Mapping Struts controller servlet to webapp root: trouble I was wondering if anyone has heard of issues arising when the contoller is mapped to a webapp's root. I am talking about this: servlet-mapping servlet-nameaction/servlet-name url-pattern/*/url-pattern /servlet-mapping where action is the Struts controller. Struts seems to return a 400 error with such mapping when it tries to make a forward from an Action instance saying that the request was syntactically incorrect. url-pattern/struts/*/url-pattern or url-pattern*.do/url-pattern are commong but I was wondering about the /* mapping. Anyone heard of any issues with this? Thanks, Paul - 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: Mapping Struts controller servlet to webapp root: trouble
I am in a hurry too much lately. Let me complete that sentence. If I remember correctly, from looking at the source code, Struts determines what extension (or prefix) to add to the request by parsing the URL mapping in the web.xml. If /* is used I could see how it could screw things up. -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 11:04 AM To: 'Struts Users Mailing List' Subject: RE: Mapping Struts controller servlet to webapp root: trouble If I remember correctly, from looking at the source code, Struts determines what extension (or prefix) to add to the request. If /* is used I could see how it could screw things up. You don't want images and things like that going through Struts anyway, I wouldn't think. Why do you want to do /* (at least for Struts URL pattern)? -Original Message- From: Paul Yunusov [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 11:05 AM To: [EMAIL PROTECTED] Subject: Mapping Struts controller servlet to webapp root: trouble I was wondering if anyone has heard of issues arising when the contoller is mapped to a webapp's root. I am talking about this: servlet-mapping servlet-nameaction/servlet-name url-pattern/*/url-pattern /servlet-mapping where action is the Struts controller. Struts seems to return a 400 error with such mapping when it tries to make a forward from an Action instance saying that the request was syntactically incorrect. url-pattern/struts/*/url-pattern or url-pattern*.do/url-pattern are commong but I was wondering about the /* mapping. Anyone heard of any issues with this? Thanks, Paul - 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]
SSL Ext and the Struts Controller class issue.
I want to use the SSL Ext plugin. But, I also need to use Tiles. So, how do I set up SSLExt with the org.apache.struts.action.SecureRequestProcessor, verse the org.apache.struts.tiles.TilesRequestProcessor controller class I have now? --- Thanks... Mick Knutson --- _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SSL Ext and the Struts Controller class issue.
OK, looking through the sslext.jar, I found the SecureTilesRequestProcessor. But, I have a new error that seems very odd. I use the containers j_security_check within a login.jsp, not a struts action. So, when I try to access any secured page, I am prompted for a username and password. Then I am re-directed to the requested page. In this case, registrationView.do is the requested page. Well, I get the username/password prompt just fine, and then even get the SSL dialog from IE. But then, instead of getting directed to localhost:8443/registrationView.do, I get this URL in the location bar, , but I get a page cannot be displayed. Here is the stack trace I get: === :10,213 INFO [SecurityContextFilter] processing request /registrationView.do :10,244 INFO [SecurityContextFilter] processing username. :10,244 INFO [TilesRequestProcessor] Tiles definition factory found for request processor ''. :10,260 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true :28,869 INFO [SecurityContextFilter] processing request /registrationView.do;jsessionid=5bjnpnjglufda :28,885 INFO [SecurityContextFilter] processing request /registrationView.do;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda :28,901 INFO [SecurityContextFilter] processing request /registrationView.do;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5 jglufda :28,916 INFO [SecurityContextFilter] processing request /registrationView.do;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5 jglufda;jsessionid=5bjnpnjglufda :28,948 INFO [SecurityContextFilter] processing request /registrationView.do;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5 jglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda :28,963 INFO [SecurityContextFilter] processing request /registrationView.do;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5 jglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda :28,994 INFO [SecurityContextFilter] processing request /registrationView.do;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5 jglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda :29,026 INFO [SecurityContextFilter] processing request /registrationView.do;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5 jglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda :29,057 INFO [SecurityContextFilter] processing request /registrationView.do;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5 jglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessio bjnpnjglufda :29,088 INFO [SecurityContextFilter] processing request /registrationView.do;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5 jglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessio bjnpnjglufda;jsessionid=5bjnpnjglufda :29,135 INFO [SecurityContextFilter] processing request /registrationView.do;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5 jglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessio bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda :29,166 INFO [SecurityContextFilter] processing request /registrationView.do;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5 jglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessio bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda :29,213 INFO [SecurityContextFilter] processing request /registrationView.do;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5 jglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessio bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda :29,244 INFO [SecurityContextFilter] processing request /registrationView.do;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5 jglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessio bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda :29,291 INFO [SecurityContextFilter] processing request /registrationView.do;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5 jglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessionid=5bjnpnjglufda;jsessio
Struts Controller
Hi, I have read some information about controller tag which is used in strusts_config.xml but I did not get the idea. WHERE this controller could be usefull? What I have read is: from theserverside.com The controller element is new to version 1.1. Prior to version 1.1, the ActionServlet contained the controller functionality and you had to extend that class to override the functionality. In version 1.1 however, Struts has moved most of the controller functionality to the new RequestProcessor class. The ActionServlet still receives the requests, but then delegates the request handling to an instance of the RequestProcessor class that has been installed. This allows you to declaratively assign the processor class and modify its functionality. Alireza. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts Controller
On Sun, 2 Feb 2003, Alireza Fattahi wrote: Date: Sun, 2 Feb 2003 09:58:07 +0330 From: Alireza Fattahi [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: Struts Controller Hi, I have read some information about controller tag which is used in strusts_config.xml but I did not get the idea. WHERE this controller could be usefull? The controller element in struts-config.xml does not define an object per se. Instead, it defines a set of configuration parameters that modify how the org.apache.struts.action.RequestProcessor class will perform its work. For example, if you do *not* want the RequestProcessor to automatically create a Locale object (from the user's browser configuration for language preference), and store it in the session, you would say: controller ... locale=false .../ in your struts-config.xml file. By default, Struts does this for you (because most people want it), but it's your option to turn the feature off if you don't need it. In Struts 1.0.2, everything in the controller element was set via initialization parameters to the controller servlet itself. That does not work for Struts 1.1, because you can have different settings for different application modules. Thus, we had to move the settings into the struts-config.xml file instead. What I have read is: from theserverside.com The controller element is new to version 1.1. Prior to version 1.1, the ActionServlet contained the controller functionality and you had to extend that class to override the functionality. In version 1.1 however, Struts has moved most of the controller functionality to the new RequestProcessor class. The ActionServlet still receives the requests, but then delegates the request handling to an instance of the RequestProcessor class that has been installed. This allows you to declaratively assign the processor class and modify its functionality. You can, in fact, have your own separate RequestProcessor subclass per application module, if you want. However, the most common use for the controller element is to configure things like create a Locale object automatically on a per-module basis, instead of having to make one global decision for all modules. Alireza. Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Communication/Relation between Struts controller and HTTP server/Servlet engine
Hi, I have to write a document about Struts implementation in my project. Now I understand the Struts components well but I have problems in explaining the request flow between the web browser and Struts. More precisely the relation between the HTTP Server (Apache) with the servlet extension (Tomcat) and the Struts application. I am not sure but I believe that the HTTP server and the Servlet engine communicate through TCP-IP, are they ? In the Struts diagrams the request arrives to the ActionServlet, but they are some steps between the browser and the Struts controller how the ActionServlet is instantiated for instance? This component is created when Apache-Tomcat starts up and is destroyed when Apache-Tomcat is closed, isn't it ? A lot of people only know the HTTP Server concept, it isn't easy to introduce the concepts of Servlet engine and Struts framework. Can someone send me a diagram or explain me the communication between the Struts controller components (like Actionservlet, RequestProcessor, ContextServletListener) and the HTTP Server - Servlet engine ? Tanks a lot in advance. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Communication/Relation between Struts controller and HTTP server/Servlet engine
On Mon, 1 Jul 2002, Heligon Sandra wrote: Date: Mon, 1 Jul 2002 15:12:59 +0200 From: Heligon Sandra [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: Communication/Relation between Struts controller and HTTP server/ Servlet engine Hi, I have to write a document about Struts implementation in my project. Now I understand the Struts components well but I have problems in explaining the request flow between the web browser and Struts. More precisely the relation between the HTTP Server (Apache) with the servlet extension (Tomcat) and the Struts application. I am not sure but I believe that the HTTP server and the Servlet engine communicate through TCP-IP, are they ? If you look at the usual Struts diagram (like the one in the User's Guide), the incoming (to Struts) arrow comes from the servlet container (i.e. via the Servlet API). What happens before that is up to what container you are using and how it's configured. For example, just with Tomcat you have at least the following choice: * Tomcat Standalone -- Tomcat itself implements HTTP/1.1 and can be used directly as the web server in addition to its ability to run servlet and JSP based applications. * Tomcat via Web Connector -- You can use a web connector like mod_jk to configure Apache (or IIS) as the module that performs the HTTP protocol, and then uses a TCP/IP connection to forward requests to Tomcat for servlets and JSP pages. The Tomcat instance can be on a different server, and there is primitive support for having multiple back-end Tomcat instances (poor man's load balancing). * Tomcat Embedded -- In some configurations, you embed Tomcat inside the same process as the web server (doesn't work on Apache 1.3 on Unix, because there are multiple processes), and the connection between the web server and Tomcat is JNI calls. Fortunately, you don't have to care about how this all works when you write your Struts app (or any other servlet/JSP based app; it is not at all specific to Struts). In the Struts diagrams the request arrives to the ActionServlet, but they are some steps between the browser and the Struts controller how the ActionServlet is instantiated for instance? The controller is instantiated once for the entire webapp, by the servlet container. The details are in the Servlet Specification which you can download at: http://java.sun.com/products/servlet/download.html This component is created when Apache-Tomcat starts up and is destroyed when Apache-Tomcat is closed, isn't it ? Depends on your web.xml settings. If you include a load-on-startup configuration value, the controller servlet will be initialized when the webapp starts up (the usual case). Otherwise, it will be initialized on the first request to this webapp. A lot of people only know the HTTP Server concept, it isn't easy to introduce the concepts of Servlet engine and Struts framework. Can someone send me a diagram or explain me the communication between the Struts controller components (like Actionservlet, RequestProcessor, ContextServletListener) and the HTTP Server - Servlet engine ? Since this actually has nothing to do with Struts specifically, you really want to go look at the documentation for your particular container to understand how that part is put together. The important thing to remember is that the overall architecture is *not* monolithic -- you can switch between any of the Tomcat+Apache configurations described earlier, for example, with zero changes to your servlet/JSP based application. Tanks a lot in advance. Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]