[JBoss Seam] - Problem with ajax4jsf resources with WebSphere v6.1.0.9 and
by titou09
When testing the hibernate2 sample of seam 2.0 beta, on was v6.1.0.9, the ajax4jsf resources URI are not routed to the aja4jsf filter.
Aja4jsf adds the following line in the pages with aja4jsf tags (ie pages book.xhtml, main.xhml, register.xhtml):
| <script type="text/javascript" src="/<my context root>/a4j.res/org.ajax4jsf.framework.ajax.AjaxScript"></script>
|
But this resource (it returns the javascript that holds the A4J function) is never processed ("A4J" is not defined in firefox error console) by WAS due to 2 problems :
First problem:
It seems that on was v6.1.0.9, a request is routed to a filter only if a servlet-mapping is defined for the URL. In my web.xml file, I have the following for filters and servlets:
| <filter>
| <filter-name>Seam Filter</filter-name>
| <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
| </filter>
| <filter-mapping>
| <filter-name>Seam Filter</filter-name>
| <url-pattern>/*</url-pattern>
| </filter-mapping>
| <servlet>
| <servlet-name>Faces Servlet</servlet-name>
| <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
| <load-on-startup>1</load-on-startup>
| </servlet>
| <servlet>
| <servlet-name>Seam Resource Servlet</servlet-name>
| <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
| <load-on-startup>2</load-on-startup>
| </servlet>
| <servlet-mapping>
| <servlet-name>Faces Servlet</servlet-name>
| <url-pattern>*.seam</url-pattern>
| </servlet-mapping>
| <servlet-mapping>
| <servlet-name>Seam Resource Servlet</servlet-name>
| <url-pattern>/seam/resource/*</url-pattern>
| </servlet-mapping>
|
It seems that even if the URI match the pattern for the filter, the filter never sees this request because (IMO), there is no servlet with a matchng pattern
Adding the following lines in web.xml makes the "/a4j.res/org.ajax4jsf.framework.ajax.AjaxScript" to be processed by the seam filter
| <servlet-mapping>
| <servlet-name>Seam Resource Servlet</servlet-name>
| <url-pattern>/a4j.res/*</url-pattern>
| </servlet-mapping>
|
I will ask the IBM support and eventually open a PMR for this.
But even with this, the browser never receives the ajax4jsf javascript related to the "/a4j.res/org.ajax4jsf.framework.ajax.AjaxScript" URI.
Second problem:
In the org.jboss.seam.servlet.SeamFilter.java at line 66, "bf.getUrlPattern()" for the ajax4jsf filter returns "*.seam"
So as the requested resource ("/a4j.res/org.ajax4jsf.framework.ajax.AjaxScript" ) does not match the pattern, it is not processed by the ajax4jsf filter.
In org.jboss.seam.servlet.SeamFilter.java, adding the line "bf.setUrlPattern(null);" in line 66 as follow, makes it work:
| if (filter instanceof AbstractFilter) {
| AbstractFilter bf = (AbstractFilter) filter;
|
| log.debug(" pattern=" + bf.getUrlPattern()); ---> display "*.seam"
| bf.setUrlPattern(null); ---> ugly hack
|
| if (bf.isMappedToCurrentRequestPath(request)) {
| filter.doFilter(request, response, this);
| } else {
| this.doFilter(request, response);
| }
| } else {
| filter.doFilter(request, response, this);
| }
|
Is this second problem a WebSphere problem? is it a configuration problem? is it a bug in seam?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4064800#4064800
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4064800
18Â years, 12Â months
[Security & JAAS/JBoss] - Re: JBoss Portal Login
by kpalania
Thanks Sohil. This is what I did -
* Modified portal-server.war/WEB-INF/login-config.xml and added a new security realm, "myrealm".
* This security realm uses a bunch of custom, stacked login modules that another application (say, app1) deployed to JBoss uses. App1 works fine and user is authenticated successfully.
* I modified jboss-web.xml and changed the security realm name from "portal" to "myrealm".
* However, authentication to app2 (JBoss Portal) fails and I don't see anything useful even when I turn on DEBUG level logging (for Apache and JBoss). It just says "authentication failed" and I don't see the request go as far as my custom login module implementations (debug stmts in those class files are not logged).
One last thing, after I am authenticated against app1, if I try to login to app2, it seems to go through except that I can't access the Portlet configuration screens etc, that are SSL enabled (redirect happens to a different SSL port, and I get a "resource not found" exception.
Thanks for your help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4064798#4064798
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4064798
18Â years, 12Â months
[JBossWS] - wsconsume warning message: Cannot resolve the name?
by davidchen
Hi, there:
I'm using jboss-4.2.0.GA (jbossws-1.2.1GA), to run the bare document example "DocBareServiceImpl". Everything seems fine when deploying the endpoint to jboss. However, I got warning message like:
| C:\jboss-4.2.0.GA\bin>wsconsume -k http://127.0.0.1:8080/jbossws-samples-baredoc/DocBareService?wsdl
| warning: src-resolve: Cannot resolve the name 'ns1:SubmitBareResponse' to a(n) 'type definition' component.line ? of http://127.0.0.1:8080/jbossws-samples-baredoc/DocBareService?wsdl#types?s...
|
And then, in stub generated by wsconsume, the bare document implement become wrapped style like:
| @WebMethod(operationName = "SubmitPO")
| @RequestWrapper(localName = "SubmitPO", targetNamespace = "http://document.samples.jaxws.webservice.TestCodes.dds.com/", className = "org.jboss.test.ws.jaxws.samples.soapbinding.SubmitBareRequest")
| @ResponseWrapper(localName = "SubmitPOResponse", targetNamespace = "http://document.samples.jaxws.webservice.TestCodes.dds.com/", className = "org.jboss.test.ws.jaxws.samples.soapbinding.SubmitBareResponse")
| public void submitPO(
| @WebParam(name = "product", targetNamespace = "http://soapbinding.samples.jaxws.ws.test.jboss.org/")
| String product,
| @WebParam(name = "name", targetNamespace = "http://soapbinding.samples.jaxws.ws.test.jboss.org/", mode = WebParam.Mode.OUT)
| Holder<String> name,
| @WebParam(name = "price", targetNamespace = "http://soapbinding.samples.jaxws.ws.test.jboss.org/", mode = WebParam.Mode.OUT)
| Holder<Integer> price);
|
So, the question is:
1. Any problem with that warning message?
2. Should the stub code be bare document style something like?:
| public SubmitBareResponse submitPO(SubmitBareRequest poRequest)
|
Highly appreciated if any help you can give. And thanks a lot in advance.
David
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4064795#4064795
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4064795
18Â years, 12Â months
[Security & JAAS/JBoss] - Re: RMI over SSL - mutual authentication
by rtrancoso
Hello Evka,
im desesperate trying to achieve at least rmi+ssl handshake. Ive read a lot os documents but nothing. I did one try pretty like the configurations you post here and nothing.
If you can help-me to start maybe I can reach the solution because my last requeriment (to implement) is that one. To provide a secure media to access EJB3. (im using 4.0.4.GA ).
Can you give-me some directions of where I can find more about it? or just what you put here can be usefull?
And another question. How can be safe to do a client authenticate in a ssl session with a certificate? anyone with this will not be able to get this secure connection?
I saw that none in the whole internet know how to do that! (or just hide it :P)
You can contact me direct by mail on rubentrancoso a+ gmail d0t com
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4064794#4064794
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4064794
18Â years, 12Â months