Results 1 to 6 of 6
  1. #1
    sandor is offline Member
    Join Date
    Apr 2007
    Location
    Pennsylvania,USA
    Posts
    45
    Rep Power
    0

    Default servlet question

    I am trying to learn java servlet. If there is an web application which is a combination of java servlet and JSP and I hit the website and I want to see the flow of the program, I know in php you can put echo's to see the flow of the program how can I do that in java? that it prints on my brower so that i can see the flow of my program?

  2. #2
    sandor is offline Member
    Join Date
    Apr 2007
    Location
    Pennsylvania,USA
    Posts
    45
    Rep Power
    0

    Default

    oops put this in the wrong forum. Can it get moved to servlet? thx
    Last edited by levent; 04-30-2007 at 07:26 AM. Reason: Thread is moved to Servlet forum.

  3. #3
    goldhouse is offline Senior Member
    Join Date
    Mar 2007
    Posts
    134
    Rep Power
    0

    Default

    From my limited understanding all JSP ' s are converted to servlets and then it goes through the generic servlet life cycle.
    If you want to see how the code execute you can here also add scritplets(System.out.println) which will answer your question . I think

  4. #4
    levent Guest

    Default

    From my limited understanding all JSP ' s are converted to servlets and then it goes through the generic servlet life cycle.
    If you want to see how the code execute you can here also add scritplets(System.out.println) which will answer your question . I think

    I guess those will be printed to the console of the http server, not to the browser. For browser, you can print those to the web page for debugging purposes.

  5. #5
    goldhouse is offline Senior Member
    Join Date
    Mar 2007
    Posts
    134
    Rep Power
    0

    Default

    yes you are right levent , You can write to the page using the printwriter aviable from the " response.getWriter() "

  6. #6
    jaykishan is offline Member
    Join Date
    Dec 2007
    Posts
    3
    Rep Power
    0

    Default

    <%
    Something like this....

    out = response.getWriter();
    out.println("I am on this.jsp page");

    out is a default object which is available on each and every jsp page.
    %>

Similar Threads

  1. Question mark colon operator question
    By orchid in forum Advanced Java
    Replies: 9
    Last Post: 12-19-2010, 08:49 AM
  2. Servlet vs JSP
    By javaplus in forum Java Servlet
    Replies: 5
    Last Post: 06-26-2008, 10:19 PM
  3. my first servlet
    By sireesha in forum Java Servlet
    Replies: 3
    Last Post: 04-09-2008, 03:11 PM
  4. Replies: 1
    Last Post: 08-07-2007, 03:47 PM
  5. Servlet question
    By Peter in forum Java Servlet
    Replies: 2
    Last Post: 07-04-2007, 01:34 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
  •