Jar packages that require jbossall-client.jar packages and related EJB interfaces and classes (or add EJB projects as dependency Projects)
Modify Tomcat Port
Find the Tomcat \ conf \ Server. xml file, and then find the followingCode:
Port = "8080" maxthreads = "150" minsparethreads = "25" maxsparethreads = "75"
Enablelookups = "false" redirectport = "8443" acceptcount = "100"
DEBUG = "0" connectiontimeout = "20000"
Disableuploadtimeout = "true"/>
Modify Port = "8080.
Modify Tomcat password:
Conf/tomcat-users.xml
<? XML version = '1. 0' encoding = 'utf-8'?>
<Tomcat-users>
<Role rolename = "manager"/>
<User Username = "admin" Password = "admin" roles = "manager"/>
</Tomcat-users>
Add the red part.
Unchanged access code
<% Properties props = New Properties (); props. setproperty (" Java. Naming. Factory. Initial "," Org. jnp. Interfaces. namingcontextfactory "); Props. setproperty (" Java. Naming. provider. url "," Localhost: 1099 "); Props. setproperty (" Java. Naming. Factory. url. pkgs ","Org. JBoss. Naming "); Initialcontext CTX; Try {CTX = New Initialcontext (props); ihelloworld H = (ihelloworld) CTX. Lookup (" Helloworld/remote "); Out. println (H. sayhello (" Persia. "));} Catch (Namingexception e) {out. println (E. getmessage () ;}%>