i have created 2 files
1.chat.html

<HTML>
    <HEAD>
        <TITLE>Enter your name</TITLE>
    </HEAD>

    <BODY>
        <H1>Enter your name</H1>
        <FORM NAME="form1" ACTION="chat123.jsp" METHOD="POST">
            <INPUT TYPE="TEXT" NAME="text">
            <INPUT TYPE="SUBMIT" VALUE="Submit">
        </FORM>
    </BODY>
</HTML>

2.chat123.jsp

<HTML>
    <HEAD>
        <TITLE>
            Using Java in JSP
        </TITLE>
    </HEAD>

    <BODY>
        <H1>Using Java in JSP</H1>
            Your Name is
        
          <% out.println(request.getParameter ("text")); %>
    </BODY>
</HTML>

When i click on the submit button , the text in the text box is supposed to be printed but its not.

Besides this code works properly only in IE , when i run it in Firefox , instead of executing the chat123.jsp file , all the source code is displayed.

I ran all the code in Wampserver .
i have no idea where i went wrong , i would be glad if you guys can help me out.

May be your right. but is there any way i can perform this simple task of just printing the text.

Download netbean sdk. It will be suitable for you.

IDE is irrelevant

Besides this code works properly only in IE , when i run it in Firefox , instead of executing the chat123.jsp file , all the source code is displayed.

I ran all the code in Wampserver .
i have no idea where i went wrong , i would be glad if you guys can help me out.

Problem is obvious

  • all the source code is displayed
  • I ran all the code in Wampserver

WAMP is for PHP not Java (You could possible run it on that Apache server, but that would require additional configuration which is not always the simple one). You need Tomcat and because you do not have or not running Tomcat you see whole source code

kudos to peter_budo , yeah now i get this stuff ...
its printing the text i enter.

Is there any web server which is generic and runs all the web technologies like PHP and JSP n all .

This article has been dead for over six months. Start a new discussion instead.