|From a survey by rebellabs|
26 January 2015
18 January 2015
I have a little old webapp connecting to a DB using a glassfish ConnectionPool.
This used to run fine but on a more recent glassfish (4.0) I do net get a good datasource from Glassfish, resulting in a Table/View <name> does not exist error message (the message is a general symptom for a failed DB connection, which can have many other reasons).
The problem exists if I configure the DataSource in web.xml and also if I inject it using @Resource.
The solution is to explicitly map the application reference to the JNDI name in WEB-INF/glassfish-web.xml:
<resource-ref> <res-ref-name>jdbc/theDB</res-ref-name> <jndi-name>jdbc/theDB</jndi-name> </resource-ref>
If you don't, Glassfish returns a ConnectionPoolDataSource. Some people corrected this by refering in their web.xml to the ConnectionPoolDataSource, but the solution above will work both for web.xml and Resource injection.
- Java EE7 javadoc
- or get it from java EE download page
- MIME types list
- Core servlets
- Compressing Servlet Filter
- For servlet 3.1 you need to delegate extra abstract methods (isReady, setWriteListener) to the ServletOutputStream you are wrapping
- Writing JSPX documents
- JSP technology home
- Firefox RESTClient addon
11 January 2015
Your first NetBeans project
- On the start page click the Learn & Discover tab
- Under Demo's and Tutorials select Java SE applications
- Start the Java Quick Start Tutorial
- view, search & change shortcuts: tools => options => keymap
- You can set the keymap to a profile from another IDE (Eclipse, IntelliJ...) here as well.
- help => keyboard shortcuts card. The pdf that is shown, lives in
- Some additional useful shortcuts:
- Go to
- to definition: CTRL click
- to implementation: CTRL ALT click
- Code completion
- autocomplete popup (+ javadoc): CTRL SPACE
- javadoc inline popup: CTRL SHIFT SPACE
- ALT F1 to see in browse
- Netbeans bundles plenty of javadoc you can browse supplied javadoc for your project libraries from help>Javadoc references
- complete to recently typed word: CTRL k
- Add semicolon at end of line: CTRL ;
- Add new line below + go there: SHIFT ENTER
- fold/unfold code: CTRL –/+
- members/herarchy of current selection: CTRL/ALT SHIFT F12
- After you ran a program, and corrected some errors Rerun using the >> buttons.
- The lighter double arrows below allow you to rerun with different parameters. You can change the arguments you run with in the Ant properties window.
- Similar options are available for (individual) tests.
- You can also launch an individual test by positioning the cursor in the method and selecting "Run focused test" from the right click menu.
Netbeans comes with plenty of sample projects for you to explore
HTTP MonitorIn the properties of your Server you can enable the HTTP monitor.
When the server receives an HTTP request, NetBeans will show a window with all request (but not all response) details. (You may have to undeploy/redeploy your webapp for the monitor to show up).
9 January 2015
JSR numbers are included as links.
Servers are webcontainers.Take care, web containers do not include JSF. You have to add it yourself or use an enterprise application server. Enterprise application servers are included in the
complete Java EE version overview.
|Java EE||servlet||JSP||EL||JSTL||JSF||MVC||Server||What’s new|
asynchronous servlets, EL method calls, more...
|tomcat 8 |
|HTML 5, non blocking (Listener) servlet IO|
|369 4.0||371 1.0||tomcat 9 (future)||HTTP/2|
The table below lists the components in latest versions of the Java Enterprise Edition.
- I put the most important changes in red.
- Components with a (version number) between brackets are proposed for removal in a future release.
- JAX-WS is intended to replace JAX-RPC
- An x indicates a technology is removed from the specification
- JSR's are shown as hyperlinked numbers.
- SE indicates that an API was moved to the standard edition
- eventually followed with the version number
- Java SE version history is in a separate post
- Web technologies are in a separate post
- EJB history is in a separate post
- I added some application servers at the bottom of the table.
|Java SE||59 1.4||176 5||270 6||336 7||337 7|
|EJB||153 2.1||220 3.0||318 3.1||345 3.2|
|EE Management||77 1.0||373 2.0|
|JMS||914 1.1||1.1||1.1||343 2.0||368 2.1|
|Connector (JCA)||112 1.5||1.5||322 1.6||1.7|
|Java Activation Framework |
|Web Services 109||1.1||1.2||1.3|
|Web Services Metadata 181||2.0||SE|
|JAX-WS (SOAP) 224||1.0||2.0||SE (2.1)||SE (2.2)|
|JAX-RS (REST)||311 1.1|
|339 2.0||370 2.1|
|JSON-P||353 1.0||374 2.1|
|JAXR (UDDI Registry)||1.0||1.0||(1.0)|
|SOAP with attachments |
|container authorisation (JACC) 115||1.0||1.1||1.4||1.5|
|container authentication (JASPIC) 196||1.0||1.1|
|Common annotations 250||1.0||1.1||1.2|
|Java Persistence (JPA)||1.0||317 2.0||338 2.1|
|Bean Validation||303 1.0||349 1.1|
|CDI for Java EE||299 1.0||346 1.1||365 2.0|
|DI for Java 330||1.0|
|Concurrency utilities 236||1.0|
|State management 350||1.0|
|Batch processing 352||1.0|
|Glassfish||2||3 (12/2009)||4 (5/2013)|
|JBoss||4||5||7 (7/2011)||8 (2/2014)|
|IBM Websphere||6||7||8 (6/2011)||-|
|Apache Geronimo||1||2||3 (7/2012)||-|
- J2EE 1.3(2001) introduced
- Message Driven Beans
- Local interfaces
- Profiles are a subset of the spec.
- Java EE Web profile (only profile currently defined)
- java SE
- web technologies,
- JTA, common annotations, JPA, validation, managed beans, interceptors, CDI, DI
- EJB Lite
- Stateless, Stateful, and Singleton session beans
- asynchronous session beans (EJB 3.2)
- only local EJB interfaces or no interfaces
- non persistent timer only (EJB 3.2)
- No Message Driven beans and remote invocation.
- JAX-RS (Java EE7)
- implemented by
- Resin 4
- Apache TomEE