Selasa, 25 Oktober 2016

How to initialize parameters in servlets in java

Most of the time, data (Ex: admin email, database username and password, user roles etc…) need to be provided in the production mode (client choice). Initialization parameters can reduce the complexity and maintenance. Initialization parameters are specified in the web.xml file as follows: 1 2 3 4 5 6 7 8 <servlet> <servlet-name>Name of servlet</servlet-name> <servlet-class>Servlet class</servlet-class> <init-param> <param-name>Mail</param-name> <param-value>admin@company.com</param-value> </init-param> </servlet>   Initialization parameters are stored as key value pairs. They are included in web.xml file inside init-param tags. The key is specified using theparam-name tags and value is specified using the param-value tags.   Servlet initialization parameters are

The post How to initialize parameters in servlets in java appeared first on Coding Security.


How to initialize parameters in servlets in java
read more

Tidak ada komentar:

Posting Komentar