HTML calling a Servlet?

Discussions

Web tier: servlets, JSP, Web frameworks: HTML calling a Servlet?

  1. HTML calling a Servlet? (5 messages)

    My requirements dictate that I call my servlet from HTML.
    The servlet then uses JNDI to look up an EJB.
    Both my servlet and EJB work within the VisualCafeEE IDE, but I cannot get it to run outside that environment.
    Could you please send me the correct HTML and Servlet source code. I can be reached at cbasoli at edeploy dot com or 303-854-3216.
     
    Thank you, 'Soli

    Threaded Messages (5)

  2. HTML calling a Servlet?[ Go to top ]

    Hi ,

    I am sure you can do this by this :
    <FORM method="POST" action="full_path_of_servlet/servlet_name" >
    .....
    .....
    </FORM>

    so by clicking a button your servlet will be triggered and do whatever you want to do in servlet .

    hope this lelps ,
    Avijit
  3. HTML calling a Servlet?[ Go to top ]

    yes use
    <FORM method="POST" action="full_path_of_servlet/servlet_name" >
    .....
    .....
    </FORM>

    however, the "full_path_of_servlet" piece of the action command may be causing you problems. The default configuration for most IDEs is "/servlet/" so your form would be
    <FORM method="POST" action="servlet/loginservlet" >
    for the loginservlet.

    however, if you work in a multiple application environment someone could have set up an "application alias" for your project. If that has happened then you will need to put whatever that is in place of the word servlet above.

  4. HTML calling a Servlet?[ Go to top ]

    Hello,
    How do you for call a servlet without using <form ... action="MaServlet" >


    Thank you
  5. HTML calling a Servlet?[ Go to top ]

    Use href in anchor tag
    -Mohit
  6. Hello World ![ Go to top ]

    My requirements dictate that I call my servlet from HTML.
    The servlet then uses JNDI to look up an EJB.
    Both my servlet and EJB work within the VisualCafeEE IDE, but I cannot get it to run outside that environment.
    Could you please send me the correct HTML and Servlet source code. I can be reached at cbasoli at edeploy dot com or 303-854-3216.
     
    Thank you, 'Soli
    Does TSS looks like as a Javascript/HTML newbie forum ?