Skip to content
Advertisement

Tag: spring-mvc

How to not hardcoding image extensions in Java?

How to not hardcoding image extensions in Java? Above is my code. In the case statement, I have listed strings as hard-coded as jpg, jpeg…. This code is not flexible, so I’m sure there must be a better way. I’d appreciate it if you could give me a solution that I’m not aware of. Answer As one of possible ways,

HTTP status 500 error, Request processing failed; nested exception is org.hibernate.exception.SQLGrammarException: could not execute statement

I keep getting SQLGrammarException error, I could not find any syntax error from my code. Here is my controller, entity, DAO and JSP file code. Maybe my form tag in addProduct.jsp is wrong, but I could not find the solution. HomeController.java ProductDAOImpl.java Top.java addProduct.jsp Answer Analysis It looks like some names used in the database context (a table name, a

Advertisement