Thank you for your reply....
ya for example suppose the user enter the user name password and then the page should not move to another screen.now i am trying in struts..
i did some sample code...the code look like this...
this is JSP PAGE::
<%@ page import="TestApp.TestJava" %>
<%
TestJava T= new TestJava(response);
T.CreateHeader(response);
String Screen = (String)request.getParameter("SCREENCODE");
System.out.println("Screen1 "+Screen);
if (Screen==null)
Screen="";
if (Screen=="")
{
T.NoScreenCode(response);
out.println("Screen:"+Screen);
}
else if (Screen.equals("FIRST"))
{
System.out.println("Screen2 "+Screen);
T.FirstScreenCode(response,request);
out.println("Screen");
}
T.EndHeader(response);
%>
In Servlet File:
public TestJava(HttpServletResponse response) throws ServletException, IOException
{
out =response.getWriter();
System.out.print("123");
}
public void NoScreenCode(HttpServletResponse response)
throws ServletException, IOException {
System.out.print("------------------------");
out.write("<form method=Post target=index.jsp>") ;
out.write("<Input Type=Text Name=Text>");
out.write("<Input Type=Text Name=Pass>");
out.write("<Input Type=hidden Name=SCREENCODE value=FIRST >");
out.write("<Input Type=Submit Value=submit Name=btn >");
out.write("</form>");
}
public void FirstScreenCode(HttpServletResponse response,HttpServletRequest request)
throws ServletException, IOException
{
System.out.println("***************** "+request.getParameter("SCREENCODE"));
System.out.println("FIRST");
//out.write("<form method=Post target=index.jsp>") ;
out.write("USer Name ");
//out.write("<H1>"+request.getParameter("Text")+"</h1>" );
//out.write("<Input Type=Text Name=Pass>");
//out.write("<Input Type=hidden Name=SCREENCODE value=SECOND >");
//out.write("<Input Type=Submit Value=submit Name=btn >");
//out.write("</form>");
}
public void CreateHeader(HttpServletResponse response)
throws ServletException, IOException {
PrintWriter out =response.getWriter();
out.write("<html> <head> <title>KALEES PAGE</title> </head> <body>");
out.write("<form method=Post target=index.jsp>") ;
}
i don't know..is this is useful for reference.....