Hi,

I had to make output to broswer in bean for some reasons. i did like this:
test1.html:
   <% out.println("step1"); %>
   <jsp:useBean id="Func" scope="session" class="genufunc.func" />
   <%
    Func.testoutput(response);
    %>

func.java:
   package genufunc;
   import java.io.*;
   import java.util.*;
   import javax.servlet.*;
   import javax.servlet.http.*;
   public class func {
     public void testoutput(HttpServletResponse response) {
       HttpServletResponse Response;
       PrintWriter out;
       Response = response;
       try {
         out = Response.getWriter();
       }
       catch(IOException ex){ ex.printStackTrace();}
       out.println("step2");
     }
  }

But the output result in broswer was: "step2 step1" and not  "step1 step2"
as i image.
How can i do in right order?

Regards
Shao

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to