How do I read servlet context initilization parameters?

package org.kodejava.example.servlet;

import java.util.Enumeration;

import javax.servlet.Servlet;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class ContextInitParameter extends HttpServlet implements Servlet {

    public ContextInitParameter() {

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    doPost(request, response);

    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        PrintWriter writer = response.getWriter();

        // Get an instance of ServletContext
        ServletContext context = getServletContext();

        // To read context initialization parameter we can call context.getInitParameter() 
        // and pass the name of initialization parameter to be read. If the named
        // parameter does not exists the returned value will be null. 
        // In this example we read an initialization parameter called LOG.PATH
        String logPath = context.getInitParameter("LOG.PATH");
        writer.println("Log Path: " + logPath + "<br/>");

        // Reads all the name of servlet's initialization parameters. If the
        // servlet doesn't have any an empty enumeration will be returned.
        Enumeration enumeration = context.getInitParameterNames();
        while (enumeration.hasMoreElements()) {
            String paramName = (String) enumeration.nextElement();
            String paramValue = context.getInitParameter(paramName);               

            writer.println("Context Init Param: [" + paramName + " = " + paramValue + "]<br/>");

How do I read an applet parameters?

package org.kodejava.example.applet;

import java.applet.Applet;
import java.awt.Color;
import java.awt.Graphics;

public class AppletParameterExample extends Applet {
    private String name = "";

    public void init() {
        // Here we read a parameter named name from the applet tag definition
        // in our html file.
        name = getParameter("name");

    public void paint(Graphics g) {
        g.drawString("Hello " + name + ", Welcome to the Applet World.", 0, 0);

Now we have the applet code ready. To enable the web browser to execute the applet create the following html page.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  <title>Parameterized Applet</title>
    <applet code="org.kodejava.example.applet.AppletParameterExample" 
            height="150" width="350">
        <param name="name" value="Mr. Bean" />