you are writing your code in the client side.
thats why it can't recognize the javax.servlet.http.HttpServlet since
it is not supported by the gwt libraries.
On 22 avr, 07:28, 剑涛 何 <hejiant...@gmail.com> wrote:
> I code a servlet in GWT:
> Line 8: public class AddServvlet extends HttpServlet{
> private static final long serialV = 1L;
> protected void doPost(HttpServletRequest req,HttpServletResponse res)
> {
> int a = Integer.parseInt(req.getParameter("a"));
> int b = Integer.parseInt(req.getParameter("b"));
> try {
> res.getWriter().print(a+b);
> } catch (IOException e) {
> // TODO: handle exception
> }
> }}
>
> when I run the project in IE,it say: [ERROR] [hellogwt] - Line 8: No
> source code is available for type javax.servlet.http.HttpServlet; did
> you forget to inherit a required module?
> [ERROR] [hellogwt] - Line 10: No source code is available for type
> javax.servlet.http.HttpServletRequest; did you forget to inherit a
> required module?
> [ERROR] [hellogwt] - Line 10: No source code is available for type
> javax.servlet.http.HttpServletResponse; did you forget to inherit a
> required module?
> thank you!
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment