My HTML Page having for :

<form method="POST" action="logon.jsp">
                  <table border="0" width="597" height="1">
                    <tr>
                                                <td ><input type="text"
name="T1" size="20"></td>
                    </tr>
                    <tr>
                          <td><input name="T2" size="8" type="password"
maxlength="8"><br><br> </td>
                    </tr>
                    <tr>
                        <td ><input type="submit" value="Submit"
name="Submit"> &nbsp;&nbsp;&nbsp;&nbsp;
                        <input type="reset" value="Reset" name="Reset">

                         <a href="http://localhost:8080/logon.jsp">Click
Me</a>
                        </td>
                    </tr>
                  </table>
  </form>


My JSP file being called when the form is submitted :

<HTML>
<HEAD>
<TITLE>Logon Page</TITLE>
</HEAD>
</BODY>

<%@ page import="java.sql.*"%>

<%!
    String UserName = "";
    String Password = "";
%>


<%
    UserName = request.getParameter("T1");

    if(UserName == null)
        UserName = "";

    Password = request.getParameter("T2");

    if(Password == null)
        Password = "";
%>

<%
    if(UserName.equals("") || Password.equals(""))
    {
        out.println("Please insert username and password...");
        System.out.println("Please insert username and password...");
    }
    else
    {
        System.out.println("Going to display the forwarding page...");
%>

<jsp:forward page="mainform.html"/>


<% } System.out.println("Coming out...2"); %>


</BODY>
</HTML>

I am working with Javawebserver2.0. Both of my .jsp and .html files are in
the public_html directory of the server.

When I run it it gives me

                                        405 Method not allowed
error in the browser window.

Any help will be highly appreciated.

Thanks in advance,
Anup Singh

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to