Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doGet() method error

 
annem sujan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



the above code generates error as

AddorMul.java:25: illegal start of expression
public void doGet(HttpServletRequest req, HttpServletResponse re
s) throws ServletException, IOException
^
AddorMul.java:29: ';' expected
}
^
please solve the problem...
 
Paul Clapham
Sheriff
Posts: 21581
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chances are your code is missing a brace somewhere. (One of the } or { characters.)

If you had posted your code in the Code tags and indented it neatly, it would be easier to spot. Why don't you try that? You can edit your post; highlight the code and click the Code button above the posting box. Or just indent it correctly in your text editor.
 
annem sujan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ya i checked, but this is not due to braces...
 
annem sujan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i got it...its due to incorrect closing of brackets
 
Ankit Garg
Sheriff
Posts: 9580
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your doGet method is inside the init method

[Edit: he saw it before me ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic