• Post Reply Bookmark Topic Watch Topic
  • New Topic

generally Servlet problem

 
Tular Monis
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It takes a lot of time to run this Servlet but it shows me everytime some mistakes.... can someone help me bring this Servlet to work please? which mistakes i got here?

and how i do code the else Method with the Java script(its in the code commented) ?

here the code that i wrote

help me please ^^

 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see a lot of flaws in the code, but you forget to elaborate about the actual problem you´re struggling with. What happens? What happens not?
Or did you expect you´re at a "Here is the code, it doesn´t work, so fix it!" forum? Too bad

Please read this: http://faq.javaranch.com/java/TellTheDetails
 
Balu Sadhasivam
Ranch Hand
Posts: 874
Android Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

It takes a lot of time to run this Servlet but it shows me everytime some mistakes.... can someone help me bring this Servlet to work please? which mistakes i got here?


We cannot run and find out the error for you.

in the else method , whatever that has to be rendered to html including the Javascrpt has tobe embeeded in double quotes , and any javascript alert statement which uses double quotes can be replaced with singlequotes.
 
Balu Sadhasivam
Ranch Hand
Posts: 874
Android Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It takes a lot of time to run this Servlet but it shows me everytime some mistakes.... can someone help me bring this Servlet to work please? which mistakes i got here?


We cannot run and find out the error for you. Please post the errors


in the else method , whatever that has to be rendered to html including the Javascrpt has tobe embeeded in double quotes , and any javascript alert statement which uses double quotes can be replaced with singlequotes.
 
Satya Maheshwari
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Tular Monis
I would suggest to split your code as follows:
1.Move business logic to beans(POJO)
2.Move Presentation logic to JSP
3.Let servlet contain logic of binding together the business tier and UI.

This way your code would be far more understandable and easier to debug.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!