Results 1 to 2 of 2
  1. #1
    vaibhavspawar is offline Member
    Join Date
    Jun 2010
    Rep Power

    Default JSP code executing directly on loading the page...

    Hello all,
    I've written some JSP code to calls some another java class function, inside the javascript function. I've called the function on 'onClick' event. But while loading the page in Tomcat, my JSP code gets executed directly. Please help.


  2. #2
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Rep Power


    JSP is server-side, java is client side, thus you cannot directly call jsp code from javascript. To communicate between the two, use something like AJAX.

Similar Threads

  1. Replies: 2
    Last Post: 02-02-2011, 04:51 PM
  2. page loading in jsp
    By sridevisala in forum JavaServer Faces (JSF)
    Replies: 1
    Last Post: 01-04-2010, 01:25 PM
  3. Why is Refresh neccessary after loading the page?
    By Tokajac in forum JavaServer Pages (JSP) and JSTL
    Replies: 3
    Last Post: 04-03-2009, 06:26 AM
  4. Loading Page Tutorial For Java
    By hitmen in forum AWT / Swing
    Replies: 0
    Last Post: 03-07-2009, 06:40 AM
  5. Dynamically loading the jsp page to the application
    By shekar in forum JavaServer Pages (JSP) and JSTL
    Replies: 3
    Last Post: 04-09-2008, 04:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts