-
1. Re: Request Parameter not found
cptnkirk Sep 27, 2006 2:00 PM (in response to wsollers)@RequestParameter is for HTTP request params.
http://host/page.jsf?username=Steve
@RequestParameter("username")
String username;
assert username == Steve
I'd guess the problem here is that you don't actually have a request parameter with this data or that Seam has no idea how translate from this string (how did you generate the string?) into an X509Certificate[]. -
2. Re: Request Parameter not found
wsollers Sep 27, 2006 2:17 PM (in response to wsollers)Ok, point taken looked into the servlet dox, it is a request attribute passed through jk...
NOT a request parameter.
going to try:
@In(value="javax.servlet.request.X509Certificate", scope=ScopeType.EVENT) -
3. Re: Request Parameter not found
wsollers Sep 27, 2006 3:15 PM (in response to wsollers)@In didn't work. However this did:
FacesContext ctx = FacesContext.getCurrentInstance();
HttpServletRequest currentRequest = (HttpServletRequest) ctx.getExternalContext().getRequest();
userCerts3 = ( X509Certificate[] ) currentRequest.getAttribute( "javax.servlet.request.X509Certificate" );
Its like the WebRequestContext that should be in my context heirarchy is just messed up. Using Seam nightly from 9/17 going to try todays build next.
Any help or pointers appreciated. -
4. Re: Request Parameter not found
norman.richards Sep 27, 2006 5:54 PM (in response to wsollers)I can verify that @In works appropriated for request attributes.
-
5. Re: Request Parameter not found
wsollers Sep 27, 2006 9:05 PM (in response to wsollers)Hmmm I tried @In as follows:
@In(value="javax.servlet.request.X509Certificate", scope=ScopeType.EVENT)
Use case was a Stateless Session Bean for logging on ( Hooking up Seam Auth stuff )
And injected value was null.
But:
FacesContext ctx = FacesContext.getCurrentInstance();
HttpServletRequest currentRequest = (HttpServletRequest) ctx.getExternalContext().getRequest();
userCerts3 = ( X509Certificate[] ) currentRequest.getAttribute( "javax.servlet.request.X509Certificate" );
Worked.
I will recheck my notes.
Thanks for the help. ( Still waiting for Lockheed to get the Dev support contract in place.) -
6. Re: Request Parameter not found
fhh Sep 28, 2006 11:11 AM (in response to wsollers)If you are try to inject this into a session bean you have to declare the seam interceptor - either by using the @Interceptor-Annotation or by using components.xml.
Regards
fhh