Posts by rodolfo.mendes • 151 points
4 posts
-
1
votes1
answer5435
viewsA: How to fix the error: HTTP Status 500 - Servlet Execution threw an Exception?
JVM is charging that the Sqlexception exception is not being handled in any of the methods in its Contactodao class: java.lang.Error: Unresolved Compilation problem: Unhandled Exception type…
-
4
votes1
answer311
viewsA: When to use Supertype or Subtype when returning the method?
It makes a difference if the method in question will be overwritten by a Subclass in the future (I lose flexibility when extending depending on than I declare as Type of Return)? Yes. It makes a…
-
2
votes2
answers167
viewsA: Use of the database connection class
If you don’t want to map your tables, you can query them through native queries. You create a native query as follows: EntityManager em = getEntityManager(); //query em tabelas não mapeadas, usar…
-
5
votes2
answers114
viewsA: How to get a Date String?
To parse a date, you must use the class Simpledateformat, and to get the individual fields you must use the class Calendar: DateFormat df = new SimpleDateFormat("dd/MM/yyyy"); Date data =…