Title: RE: Initilization parameters from properties file

Hi,
        I think you shoud understand the difference bet POST & GET protocol method. Post happens at submission and thus not able to set intialization parameter. Use doGet for these activities.

Am I right?
regds,
Jatin


    -----Original Message-----
    From:   Vijay Vangara [SMTP:[EMAIL PROTECTED]]
    Sent:   Tuesday, May 16, 2000 11:02 AM
    To:     [EMAIL PROTECTED]
    Subject:        Initilization parameters from properties file

    Hai All,
    i have got a problem here.I am trying to initilize some parameters through
    the properties file.but when i am using the
    service() or doGet() methods it is working fine.but when i am using the
    doPost() it is saying some "Bad ......"..
    My code is like this

    public class Exam extends HttpServlet
    {
            String s = " ";

            public void init(ServletConfig sc) throws ServletException
            {
                    super.init(sc);
                    s = getInitParameter("xyz");
            }

            public void doPost(HttpServletRequest request, HttpServletResponse
    response)
                            throws ServletException, IOException
            {
                    response.setContentType("text/html");
                    PrintWriter writer = response.getWriter();

                    writer.println("<html><body>" + s + "welcome
    world</body></html>");
            }
    }

    ___________________________________________________________________________
    To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
    of the message "signoff SERVLET-INTEREST".

    Archives: http://archives.java.sun.com/archives/servlet-interest.html
    Resources: http://java.sun.com/products/servlet/external-resources.html
    LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to