Results 1 to 5 of 5
  1. #1
    Ms.Ranjan is offline Member
    Join Date
    Jun 2008
    Posts
    85
    Rep Power
    0

    Default JSP simple application

    Hi I am learning JSP,and i was trying an example from a tutorial.The codes of the html and the jsp page are given below.The maillist.html gets the first name from the user and when the submit button of the form is clicked it goes to second page showemail.jsp.The showemail.jsp should display the firstname of the user in the table,but its not displaying..

    i am not able to identify what the problem is..can anyone plz help..



    maillist.html
    Java Code:
    <html>
    <head><title>Email List application</title></head>
    <body>
    <h1>Join Our email List</h1>
    
    <p>To join our email list,enter your name and email address below<br>
    Then,click on the Submit button </p>
            
            <form action="showemail.jsp" method="get">
    	<table cellspacing="5" border="0">
    	   <tr>
                        <td align="right">First name</td>
                        <td><input type="text" name="firstName"></td>
    	   </tr>
                    <tr>
                    <td></td>
                    <td><br><input type="submit" value="Submit"></td>
                    </tr>
    	</table>
            </form>
    </body>
    </html>
    showemail.jsp
    Java Code:
    <html>
    <head><title>Email List Application</title></head>
    <body>
    <h1>Thanks for joining our email List</h1>
    <br>
    
    <% 
        String firstName=request.getParameter("firstName");   
    %>
    
    <p>Here is the information that you entered</p>
    
       <table cellspacing="5" cellpadding="5" border="1">
         <tr>
             <td align="right">First name:</td>
             <td><%= firstName %></td>
         </tr>
       </table>
    </body>
    
    </html>

  2. #2
    gedelakranthi is offline Member
    Join Date
    Aug 2008
    Posts
    3
    Rep Power
    0

    Default

    Does the first page "maillist.html" has loaded or not.

  3. #3
    Ms.Ranjan is offline Member
    Join Date
    Jun 2008
    Posts
    85
    Rep Power
    0

    Default

    yes the first page "maillist.html" is loaded i could give the first name and click the submit button and the second page "showemail.jsp" is loaded but the name is not displayed in the table...

    i am not able to identify where the problem is..

  4. #4
    sukatoa's Avatar
    sukatoa is offline Senior Member
    Join Date
    Jan 2008
    Location
    Cebu City, Philippines
    Posts
    556
    Rep Power
    7

    Default

    Have you turned on the web server?
    freedom exists in the world of ideas

  5. #5
    lmno646 Guest

    Question neoprene laptop bags

    都会型时尚neoprene laptop bags 15.4寸 NBN-132◆主袋直入式电脑层有高密度吸震式加厚护垫,装电脑更安心 ◆前袋内附有电话袋、及笔插,可放置各种随身用品 ◆附手把-人体工学、可调整式/分离式附垫背带 ◆自动修复单/双向尼龙拉链 ◆全袋均采用高级雾银金属配件。

Similar Threads

  1. Replies: 0
    Last Post: 06-23-2008, 11:16 PM
  2. Simple example Client Server Application
    By ferosh in forum Networking
    Replies: 1
    Last Post: 04-01-2007, 10:36 AM

Posting Permissions

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