How to use Eclipse for JavaEE developers.
This guide shows how to develop Java EE applications using Eclipse JavaEE IDE.
Install Eclipse JEE
- Download and install Eclipse for JEE developers.
- Go to eclipse marketplase (help -> eclipse market) and type cvs. Download and install it.
- Go to CVS server perspective and paste in the URL from sourceforge.net. Example for SF developers:
- Right-click on the "php-java-bridge" connection and select "Check out as ..." -> "Project in workspace" -> finish
- After download, switch back to the Java EE perspective and solve the tomcat missing problem as follows:
- Right click on the issue, select "quick fix" and complete the wizard (choose tomcat 7 download if you do not have tomcat already installed). Wait until tomcat is installed (look in the right bottom corner), until the issue goes away.
- Go to the servers tab, right-click on "add/remove ..." and deploy "php-java-bridge". Do not start the server yet.
AllTests. Open it.
t. Wait until all unit tests are green.
- Start the tomcat server by selecting the "servers" tab and right-click on it. Select start or debug.
- Open an internet browser and browse to http://localhost:8080/JavaBridge
JSR223 and Servlet ContextLoaderListenerPlease note that you must use
engine.setContext(new PhpServletScriptContext(...))in a servlet environment. The standard JSR223 API examples will not run in tomcat. The servlet environment needs a decorated ScriptContext, for example
Please see jsp+php.jsp for an example.
If you ignore this, the thread- and connection pools from the standalone version are used, which have different parameters than the pools from the servlet ContextLoaderListener. Your application server will hang after a few hundred requests:
PHP_FCGI_CONNECTION_POOL_SIZEgo hand in hand with the PHP FCGI parameters
PHP_FCGI_CHILDRENwhich are passed to the PHP FCGI process environment when the FCGI process pool is started.
For further information please see the PHP/Java Bridge API documentation.