Switching between http and https in struts-config
Hi, I'm new to the list. I'm working on a webapp where some of the pages should be accessed through HTTPS and others through HTTP. For example, login and registration need to be secure, but once the registration is done and we go to the user home page, we can go back to the nonsecure site. All pages, secure and nonsecure, are being served by the same Tomcat instance. I'm wondering about the best way to handle this in the struts config file. If you are allowed to put fully qualified URLS in a forward path attribute, that could be one solution, but it loses portability and that file has to be edited every time we want to deploy the app to another machine with another hostname. To be more concrete, let's say we go to this page: https://mysite.com/appname/login.do The action contains multiple forwards, all of which will continue to be served by https since we started with an https url. But I want at least one of those forwards to return to the nonsecure site. (I also want to do the converse). Anyone have some ideas on this? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ensuring valid forwards
My codebase has a lot of lines like this in struts actions: return mapping.findForward(foo); If I make a typo and it turns out that foo is not a valid forward according to the struts config file, when I hit the action in the browser, I get a blank page. Not my designated error page. Is there some sort of struts-centric way to ensure that an exception is thrown and my error page appears? I just want to know if there is an existing mechanism to do this. I could easily write a method to do it (to be called instead of mapping.findForward()) but it seems that this is something Struts should handle. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ensuring valid forwards
On 6/13/05, Frank W. Zammetti [EMAIL PROTECTED] wrote: But again, I'm not certain this type of problem will be caught because I'm not even sure an exception is thrown in such a case. If it isn't that strikes me as a bug. Anyone else know for sure? I don't think it does throw an exception. I tried putting just the findForward() line in a try/catch block and nothing was thrown. Also, no stack traces appear in my tomcat log except a broken pipe error when trying to render the error page (there is nothing weird in the error page itself that would cause this). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]