[JBoss Portal] - Re: Calling JAAS
by creative77
There are several Handlers in the Jboss security jar. I tested mine using the UserPassword handler and it worked. I gersonjohan used the client which is I believe the default method. There are several others all requiring different information passed to them.
I'm not an expert but, the handler takes the users credentials so it can be associated to an authentication service such as the ones found in login config, used in creating a login context. In essence it takes care of creating the principle structures and populating user information.
Once this information has been bound then as gersonjohan's code shows you just call login().
Note, that this method is the authentication authorization phase, and does not activate any portal permission. This is handled by filters in the web.xml file and filter classes usually reading the filter and redirecting to the secure context path. I am assuming that JBoss has handlers or managers that map the authorized user and role to the portals permissions.
In the past when I have used JAAS I put the redirect and set up permissions from my filter class. My problem is I am not sure how this is done in JBoss.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4072023#4072023
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4072023
18Â years, 9Â months
[JBoss Seam] - How to correctly start pageflows
by mail.mickeï¼ gmail.com
Hi
I've been experimenting with pageflows a bit and different ways of starting them, prefferably I would like to start it in a way which doesn't require a backing bean method.
This works for me:
|
| <s:link value="Start anno" action="#{dummyBacking.startPageFlowAnno}"/>
|
| @Begin(pageflow="test")
| public void startPageFlowAnno(){
| System.out.println("Trying to start the page flow via annotation.");
| }
|
|
But the following two doesn't (the first approach actually kills the webapp):
|
| <s:link value="Start comp params" action="#{dummyBacking.startPageFlow}" propagation="begin" pageflow="test"/>
| <s:link value="Start comp params" action="start" propagation="begin" pageflow="test"/>
| public String startPageFlow(){
| System.out.println("Trying to start the page flow via s:link parameters.");
| return "start";
| }
|
| <s:link value="Manual PageFlow start in code" action="#{dummyBacking.manualStartFlow}"/>
| public String manualStartFlow() {
| Pageflow.instance().begin("test");
| return "start";
| }
|
|
The pageflow definition:
|
| <pageflow-definition
| xmlns="http://jboss.com/products/seam/pageflow"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation=
| "http://jboss.com/products/seam/pageflow http://jboss.com/products/seam/pageflow-2.0.xsd"
| name="test">
|
| <start-state name="start">
| <transition to="startPage">
| <action expression="#{dummyBacking.resetNumber}"/>
| </transition>
| </start-state>
|
| <page view-id="/pageflow/start.xhtml" name="startPage" no-conversation-view-id="/pageflow/start.xhtml">
| <redirect/>
| <transition name="next" to="subPage1">
| <action expression="#{dummyBacking.incNumber}"/>
| </transition>
| <transition name="ManualStartFlow" to="subPage2"/>
| </page>
|
| <page view-id="/pageflow/flow1.xhtml" name="subPage1" no-conversation-view-id="/pageflow/start.xhtml">
| <redirect/>
| <transition name="next" to="subPage2">
| <action expression="#{dummyBacking.incNumber}"/>
| </transition>
| <transition name="prev" to="startPage"/>
| </page>
|
| <page view-id="/pageflow/flow2.xhtml" name="subPage2" no-conversation-view-id="/pageflow/start.xhtml">
| <redirect/>
| <transition name="next" to="endPage"/>
| <transition name="prev" to="subPage1"/>
| </page>
|
| <page view-id="/pageflow/end.xhtml" name="endPage" no-conversation-view-id="/pageflow/start.xhtml">
| <redirect/>
| <transition name="prev" to="subPage2"/>
| </page>
|
| </pageflow-definition>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4072022#4072022
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4072022
18Â years, 9Â months
[JBossCache] - Re: cache replication node went out !
by nayyares
Hi,
Thanks for the reply, i restart Jboss with following command
$/jboss-dir/bin/run.sh -c all
the stuff i have noticed in log that can give some clue is,
----------------------------------------------------------------
[INFO] [mycluster] Number of cluster member: 1
[INFO] [mycluster] Other Members: 0
[INFO] [mycluster] New cluster view for partition mycluster (id:0, delta:0)
[INFO] [mycluster] Dead Members: 0 ([])
[INFO] [mycluster] New Members: 0 ([])
[INFO] [mycluster] All Members: 1 ([])
.....
---------------------------------------------------------
while at the time i have given ./run.sh -c all , command there were four other cluster node running !
how can i check that whether other cluster nodes are visible to this server?
any clue, thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4072019#4072019
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4072019
18Â years, 9Â months
[JBoss Seam] - MethodBinding with parameter containing custom el function
by cdanielw
I?m using Seam?s neat feature where MethodBinding can have parameters. It?s absolutely great! However, I can?t seem to get it to take custom el-function as parameters.
E.g.:
<h:commandLink ... action="#{myBackingBean.doSomething(foo:someFunction())}"/>
Using the el function by itself works fine.
I?m running Seam 1.2.1, facelets 1.1.11, a MyFaces 1.1.6 nightly and Tomcat 5.5.23. I also tried with MyFaces 1.2.0 and Tomcat 6.0.13.
Putting a breakpoint in MethodExpressionHelper.findParamTypes():
* With JSF 1.1, the ELContext is facelets LegacyELContext, and its EmptyFunctionMapper will obviously not find my functions.
* With JSF 1.2, the FunctionMapper is null.
Here is the exception being thrown in the JSF 1.1 version:
javax.faces.el.EvaluationException: /test.xhtml @24,97 action="#{ myBackingBean. doSomething (foo:someFunction())}":
| Function ' foo:someFunction ' not found
| at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:73)
| at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
| at javax.faces.component.UICommand.broadcast(UICommand.java:109)
| etc.
I think the root cause of the exception has been lost somewhere on the way. My guess is that it comes from ExpressionBuilder.visit().
Am I doing something wrong, or isn?t this supported? It would be a great feature to have!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4072013#4072013
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4072013
18Â years, 9Â months