-
1. Re: HTTPS Scheme in pages.xml without httpsport or default p
pmuir Jan 9, 2008 7:20 PM (in response to nkhilnani)So create a custom Pages component that the extends the one in Seam and override the encodeScheme and make it apply the logic you want :)
-
2. Re: HTTPS Scheme in pages.xml without httpsport or default p
nkhilnani Jan 9, 2008 7:26 PM (in response to nkhilnani)Funny :)
I dont mind contributing code to the Seam project... i figured other may find the update useful as well, since a lot of websites with SSL dont always have a port number in the url.
How would i go about registering my custom component with seam once i have it coded... If possible, can provide some info or links?
Also, Is it possible for me to contribute code (since im a random person at this point)? How should i go about that?
Thanks,
Nik -
3. Re: HTTPS Scheme in pages.xml without httpsport or default p
pmuir Jan 9, 2008 7:52 PM (in response to nkhilnani)@Scope(ScopeType.APPLICATION) @BypassInterceptors @Name("org.jboss.seam.navigation.pages") @Install(precedence=BUILT_IN, classDependencies="javax.faces.context.FacesContext") public class MyPages extends Pages { ... public String encodeScheme(String viewId, FacesContext context, String url) {
To contribute, create a JIRA issue, describe your use case and how you have solved it, and attach a patch in diff format.
If we thinks it useful we will probably apply it straight away, otherwise it'll need some votes from users. -
4. Re: HTTPS Scheme in pages.xml without httpsport or default p
nkhilnani Jan 10, 2008 10:30 AM (in response to nkhilnani)Perfect!!
Thanks
Nik -
5. Re: HTTPS Scheme in pages.xml without httpsport or default p
nkhilnani Jan 10, 2008 12:12 PM (in response to nkhilnani)Hmm.. we noticed another issue.
When the Loadbalancer has SSL but internally redirects the requst to a tomcat not on SSL (to avoid having SLL at every level in the internal restricted network) the Seam framework sends back 302 (page moved) for every request to the login-view-id page and we get an infinite loop of 302 location login-view-id.
If the tomcat has SSL setup, it works as expected.
Does the Seam framework explicitly check if the current host scheme is SSL even if the request URL is https?
Thanks,
Nik -
6. Re: HTTPS Scheme in pages.xml without httpsport or default p
nkhilnani Jan 10, 2008 12:34 PM (in response to nkhilnani)oh, for info for others... the precedence should be FRAMEWORK , not BUILT_IN. Using built gives and error indicating two components were defined with the same precedence.
From the source code for the Install annotation/** * Precedence of all built-in Seam components */ public static final int BUILT_IN = 0; /** * Precedence to use for components of frameworks * which extend Seam */ public static final int FRAMEWORK = 10; /** * Predence of application components (the * default precedence) */ public static final int APPLICATION = 20; /** * Precedence to use for components which override * application components in a particular deployment */ public static final int DEPLOYMENT = 30; /** * Precedence to use for mock objects in tests */ public static final int MOCK = 40;
Thanks All!
Nik