Skip to content

Instantly share code, notes, and snippets.

@incepttechnologies
incepttechnologies / flash4
Created August 7, 2014 22:14
read a value from flash scope
public String someViewAction() {
System.out.println("flashExampleBean.someViewAction called");
Flash fl = FacesContext.getCurrentInstance().getExternalContext().getFlash();
Set flSet = fl.keySet();
System.out.println("FL set size = " + flSet.size()
+ ", i1 value=" + fl.get("i1")
+ ", i2 value=" + fl.get("i2")
+ ", i3 value=" + fl.get("i3"));
return "index_1";
@incepttechnologies
incepttechnologies / flash3
Created August 7, 2014 22:02
put a value in flash scope
<h:outputText value="#{flash['i1']}"></h:outputText>
<h:outputText value="#{flash.keep.i2}"></h:outputText>
@incepttechnologies
incepttechnologies / flash2
Created August 7, 2014 22:01
put a value in flash scope
<c:set target="#{flash}" property="i2" value="Incept"></c:set>
@incepttechnologies
incepttechnologies / flash1
Last active August 29, 2015 14:05
put a value in flash scope
<h:outputText style="color: blue; font-weight: bold" value="flash.i1= "/>
<h:inputText id="i1" label="Input1: " value="#{flash.i1}"></h:inputText>
@Named
@RequestScoped
public class IndexBean implements Serializable {
@Inject
ImplementerIntf obj;
<beans xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
<alternatives>
<class>com.incept.cdialternative.ImplementerC</class>
</alternatives>
</beans>
@Alternative
public class ImplementerA implements ImplementerIntf{
@Override
public String showImplementer() {
return this.getClass().getName();
}
}
@incepttechnologies
incepttechnologies / verifyKeytab
Created January 3, 2014 18:47
Verify keytab files
The contents of keytab file can be verified using either Unix/linux ktutil or klist commands or java ktab utility.
(1)
-bash-3.2$ ktutil
ktutil: rkt krba01.keytab
ktutil: list
slot KVNO Principal
---- ---- ------------------------------------------------------------------------------------------------
@incepttechnologies
incepttechnologies / krb5login.conf
Last active December 31, 2015 23:49
kerberos config file for weblogic
com.sun.security.jgss.krb5.initiate {
com.sun.security.auth.module.Krb5LoginModule required
principal="service_krba01@INCEPT.LAB" doNotPrompt=true
useKeyTab=true keyTab=krba01.keytab
storeKey=true debug=true;
};
com.sun.security.jgss.accept {
com.sun.security.auth.module.Krb5LoginModule required
principal="service_krba01@INCEPT.LAB" doNotPrompt=true
@incepttechnologies
incepttechnologies / krb5.conf
Last active May 9, 2019 03:27
kerberos configuration file "krb5.conf"
[libdefaults]
default_realm = INCEPT.LAB
default_tkt_enctypes = rc4-hmac
default_tgs_enctypes = rc4-hmac
ticket_lifetime = 600
# to support multiple enc types, provide a space separated list --
# default_tkt_enctypes = aes128-cts rc4-hmac
[realms]