EJB is simple to configure

zhaozj2021-02-16  70

Database configuration: Reference to% jboss_home% / server / default / deploy Refer to HSDL_DS.XML New Access_DS.XML (I connected to the Access database with ODBC), configure the JDNI name and database driver in the data source (I use Sun.jdbc.odbc.jdbcodbcdriver, there is a username password, and some parameters of the connection pool.

Web deployment: Package the JSP file and web.xml and the Class used to encapsulate to WAR: war - -pic (mainly required pictures) --- JSP file - Web-inf - Web .XML (To configure servlet and url mapping) - Classes - Java file servlet class --lib - I needed the package or servlet class Class I use Ant packaging WAR. Put the WAR file into the JBoss_Home% / Server / Default / Deploy.

EJB deployment: Writing EJB Class and EJB-jar.xml Packaging into EAR (i.eit JAR): JAR (EAR) - --MEAT-IJB-JAR.XML - Place the EJB Package Package Package Package Put EAR in% JBoss_Home% / Server / Default / Depoy.

The above is set (I am the entity bean called in the session bean, and the session bean called in JSP). Running the run command under% jboss_home% / bin (actually executing run.bat), start JBoss. Open the browser to run http: // localhost: 8080 / YourWebApplication / Yourjspurl here YourWebapplication is your name and WAR file name, Yourjspurl is a map of JSP in Web.xml. You can see your JSP page.

转载请注明原文地址:https://www.9cbs.com/read-14758.html

New Post(0)