Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_java thread: java.io.Exception


Message #1 by "lousai" <lousai@t...> on Sat, 6 Jan 2001 16:29:52 -0000
May I know what is this error mean as I can run the jsp file. Below is my
code.

<%@  page import=" java.io.*" %>
<%@  page import=" javax.servlet.http.* " %>
<%@  page import=" java.sql.*" %>


<jsp:useBean id='SCART' scope='session' class='scart.ShoppingCart' type="scart.ShoppingCart" />


<!-- Clear out Shopping Cart -->
<%
	
	//-Make sure is login first
	//- if not redirect them to login1.jsp
	
   	try{

	HttpSession mySession = request.getSession(true);
    System.out.println("Here");
  	if(mySession.getValue("LoggedIn") != null)
  	{  System.out.println("He");
      		if(! ((Boolean)mySession.getValue("LoggedIn")).booleanValue())
        	response.sendRedirect("Login1.jsp");
  	}
  	else
    	 System.out.println("re");
		response.sendRedirect("Login1.jsp");
	//- end checking
  
 	//String  user = (String)mySession.getValue("Username3");
    	//out.println("User " +user);
	SCART.clear();
%>

<!-- Build url string -->
<%
	String url = "http://127.0.0.1:8080/examples/jsp/loginapp/Main.jsp";
	//mySession.invalidate(0);
%>

<HTML>

<HEAD>
<TITLE> Receipt </TITLE>
<META HTTP-EQUIV="refresh" CONTENT="4; URL=<%out.print(url);%>">
</HEAD>

<BODY>
<img src="images/etc/receipt.GIF">

<!-- get customer's name -->
<% System.out.println("Hering");
 String name = request.getParameter("cardname");
%>

<h3>
Thank you <%=request.getParameter("cardname")%> for purchasing your books from
us! <p>


<% mySession.invalidate();
System.out.println("ring");
	}
	catch( IOException e)
	{
		System.out.println("****ed");
	}
	%>
Please shop with us again soon!<p>


</H3>


<em><strong>This page will automatically reset.</FONT></em> </strong>

</BODY>
</HTML>

-----------------------end code---------------------

---
You are currently subscribed to pro_java as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-pro_java-$subst('Recip.MemberIDChar')@p2p.wrox.com

  Return to Index