Results 1 to 2 of 2
- 10-19-2010, 02:23 PM #1
Member
- Join Date
- Mar 2010
- Posts
- 7
- Rep Power
- 0
Retrieving the data posted to a JSP file from HTML file
Pls take a look at following code snippet :
showname.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Insert title here</title>
</head>
<body>
Welcome :
<%!String name=request.getParameter("username"); %>
<%
out.println("My name is " + name );
%>
</body>
</html>
form.html
<html>
<head>
<title>Enter your name</title>
</head>
<body>
<p> </p>
<form method="POST" action="showname.jsp">
<p><font color="#800000" size="5">Enter your name:</font><input type
="text" name="username" size="20"></p>
<p><input type="submit" value="Submit" name="B1"></p>
</form>
</body>
</html>
It shows the error: request in showname.jsp cannot be resolved!!Last edited by marie; 10-19-2010 at 02:24 PM. Reason: incompltete
- 10-21-2010, 08:37 AM #2
Member
- Join Date
- Oct 2010
- Posts
- 2
- Rep Power
- 0
Similar Threads
-
Capturing Data From A Html File
By nickrowe_2k in forum New To JavaReplies: 185Last Post: 06-28-2010, 10:42 AM -
Retrieving data from text file and putting it into comboboxes
By the reporter in forum AWT / SwingReplies: 3Last Post: 06-02-2010, 06:58 PM -
how to search xml file data based on the given keyword from html form?
By nicemothi in forum XMLReplies: 0Last Post: 04-04-2008, 09:36 AM -
storing and retrieving a file as such
By anil_manu in forum Advanced JavaReplies: 0Last Post: 03-11-2008, 01:27 PM -
how to upload a file along with html form data
By pranith in forum Java ServletReplies: 3Last Post: 07-30-2007, 02:33 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks