Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get init parameter of servlet at web.xml from jsp?

Tags:

jsp

web.xml is

<servlet>
    <servlet-name>index</servlet-name>
    <jsp-file>/index.jsp</jsp-file>
    <init-param>
        <param-name>heading</param-name>
        <param-value>This is heading</param-value>
    </init-param>
</servlet>
<servlet-mapping>
    <servlet-name>index</servlet-name>
    <url-pattern>/index</url-pattern>
</servlet-mapping>. 

How can I get init parameter "heading" from jsp page?

like image 329
Pyae Thu Aung Avatar asked Dec 15 '22 14:12

Pyae Thu Aung


1 Answers

<%=config.getInitParameter("heading")%>

Regards.

like image 51
Grim Avatar answered Jan 29 '23 02:01

Grim