• Post Reply Bookmark Topic Watch Topic
  • New Topic

My servlet don't work  RSS feed

 
milka forrich
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the follow code and dont work! and I don't know why. I been serching for all web and don't work

this is html/jsp


this is servlet



and servlet configuration



HELP!
 
Swastik Dey
Rancher
Posts: 1782
14
Android Eclipse IDE Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What exactly do you mean by won't work? What is the issue you are facing?
 
milka forrich
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the alert dont appear(sorry, my english is not good)
i need the a servlet return a text/html, and when don't work, i try to see why, so i used a simple code, and never return a response.
 
Swastik Dey
Rancher
Posts: 1782
14
Android Eclipse IDE Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does this help?

 
milka forrich
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, I had something like that and don't work.

this was my original code

 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
milka forrich wrote:I had something like that and don't work.

Here's a little hint for getting the most out of this site: never say "it doesn't work." - that gives folks here no information on which to base any responses. Always say what, exactly, you did, and what, exactly, was the result, giving as much detail as possible.
 
milka forrich
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My problem is the servlet nerver response.

I charge the servlet independent and work fine. But when I call it, don't return.

Testing I only want that the function, showme an alert, to see if the calling work (Say again, sorry my english)
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. any error report in server logs?

2. instead of write.flush(); use write.close();

3. all servlet need an init() method, NOT a constructor - see any servlet tutorial

Bill
 
milka forrich
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok,

anyway, finally i found my error... url!
I new in this of ajax, so my mistake was de url...

thanks you to all, thanks you very much
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!