Initialize the context in following way:
InitialContext context = new WildFlyInitialContext();
add import "org.wildfly.naming.client.WildFlyInitialContext" to your JSP/servlet
EJB lookup should be in following form:
e.g :
String myURl="/Calculator_EJB3/CalculatorBean!com.javacodegeeks.ejb.CalculatorRemote"; ops = (CalculatorRemote) context.lookup("ejb:"+myURl);
Add "wildfly-config.xml" into your application META-INF directory
EJB3 Server side changes:
Add application user:
$JBOSS_HOME/bin: ./add-user.sh -a -u admin -p admin
Note: make sure have applied jboss eap 7.1.3 patch to eap.