Win a copy of Getting started with Java programming language this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

doGet() method error  RSS feed

 
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: 22114
36
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: 9599
36
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 ]
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!