Difference between getServletContext().setInitParameter and getServletContext().setAttribute() in Servlet

Is there any difference between getServletContext().setInitParameter and getServletContext().setAttribute() ?

Answers


Yes they are different, although both have application scope.

Init parameters are set during start-up and can not be changed once start-up has completed.

Context parameters can be set, removed or changed at any point while the application is running.


Need Your Help

Connect to an Oracle database

c# database oracle11g database-connection

I'm trying to connect to an Oracle database but when the the code is executing the line:

JpaItemWriter: no transaction is in progress

java spring jpa spring-batch

I'd like to use JpaItemWriter to batch persist entities. But when I use the following code to persist, I'm told: