3 Replies - 698 Views - Last Post: 03 February 2011 - 11:47 PM

#1 tscott  Icon User is offline

  • D.I.C Regular

Reputation: 2
  • View blog
  • Posts: 370
  • Joined: 30-January 09

2 Forms in 1 html file not working in eclipse

Posted 03 February 2011 - 11:33 AM

For whatever reason eclipse doesn't like that I'm using 2 forms in 1 file 2 call two different servlets. Is this common how do I fix it I've tried to google the issue and read that what I'm doing is fine so I'm not getting the problem. Thanks guys



<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<form ID="Form2" action="FirstServlet" method="post">
<input type="submit"  value="Push me for first servlet" />
</form> 
<form id="Form3"> action="SecondServlet" method="post">
<input type="submit"  value="Push me for second servlet" /> 
</form>
</body>
</html>



Is This A Good Question/Topic? 0
  • +

Replies To: 2 Forms in 1 html file not working in eclipse

#2 Prasildas  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 7
  • Joined: 03-February 11

Re: 2 Forms in 1 html file not working in eclipse

Posted 03 February 2011 - 11:53 AM

Hi,,,


try this code..


<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<form ID="Form2" action="FirstServlet" method="post">
<input type="submit"  value="Push me for first servlet" />
</form>
<form id="Form3" action="SecondServlet" method="post">
<input type="submit"  value="Push me for second servlet" />
</form>
</body>
</html>




and the FirstServlet and the SecondServlet should be . Java files either servlets or class files


Thankyou

for more ask
Was This Post Helpful? 1
  • +
  • -

#3 tscott  Icon User is offline

  • D.I.C Regular

Reputation: 2
  • View blog
  • Posts: 370
  • Joined: 30-January 09

Re: 2 Forms in 1 html file not working in eclipse

Posted 03 February 2011 - 12:38 PM

lol it worked but how did you do that? What did you change in my code I can't tell
Was This Post Helpful? 0
  • +
  • -

#4 Dean_Grobler  Icon User is offline

  • D.I.C Regular

Reputation: 39
  • View blog
  • Posts: 390
  • Joined: 15-January 10

Re: 2 Forms in 1 html file not working in eclipse

Posted 03 February 2011 - 11:47 PM

View Posttscott, on 03 February 2011 - 12:38 PM, said:

lol it worked but how did you do that? What did you change in my code I can't tell


Look at your line 11. You have an extra " > " in there right after you state the form ID...
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1