Results 1 to 4 of 4
  1. #1
    jugalrockz is offline Member
    Join Date
    Jan 2011
    Posts
    1
    Rep Power
    0

    Unhappy Jsp n html simple program

    Hello people,


    I have configured TOMCAT6.0. I followed the following steps to configure:
    1. Opened catalina n gave the path. JAVA_HOME="JDK1.6_PATH"
    2. Opened CMD gave the tomcat path... STARTED THE SERVER.Then STOPPED IT
    3. Installed Netbeans6.1, configured tomcat server in it.



    Later i typed a simple program with JSP N HTML:
    The following is the HTML code:
    <html>

    <head>
    <title>HELLO WORLD123</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
    <form action="index.jsp">
    firstname<input type="text" name="firstname" value="username">
    password<input type="password" name="password" value="password">
    <input type="submit" value="submit">
    </form>
    </body>
    </html>


    JSP code:


    <html>
    <head>
    <title>123</title>
    </head>
    <body>
    <h2>Hello World!</h2>

    <%
    String firstname=request.getParameter("firstname");
    String lastname=request.getParameter("lastname");
    %>

    <%=firstname%>
    <%=lastname%>

    <form action="newhtml.html" method="post">
    <input type="submit" value="return">
    </form>
    </body>
    </html>



    When i save n run this program the browser is giving a diff output. It is showing the out of index.jsp. The output looks like the following:

    Hello World!




    Please help me solve this issue. What should i do now.

  2. #2
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    6

    Default

    Cross posted at JSP N HTML SIMPLE PROGRAM - Java Programming Forums. See Crossposting Problems for why this message is here

  3. #3
    saurabh1989 is offline Member
    Join Date
    Jan 2011
    Posts
    7
    Rep Power
    0

    Default

    <mod edit: deleted hijack post>
    Last edited by Fubarable; 01-29-2011 at 07:47 PM. Reason: <mod edit: deleted hijack post>

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

Similar Threads

  1. Problem with very simple program
    By iratus in forum New To Java
    Replies: 13
    Last Post: 11-07-2010, 04:43 PM
  2. Simple program help
    By jtyler in forum New To Java
    Replies: 3
    Last Post: 09-20-2010, 07:43 AM
  3. simple program
    By blastoff in forum New To Java
    Replies: 5
    Last Post: 04-14-2010, 11:25 PM
  4. simple chat program
    By munishmhr in forum Networking
    Replies: 2
    Last Post: 03-25-2009, 04:00 PM
  5. Simple Program
    By TheRocket in forum Advanced Java
    Replies: 15
    Last Post: 12-30-2008, 02:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •