• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

shoping cart

 
maheshm morem
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, i want to make shoping cart how to make it , what i have to use it ?
 
shivani vidit
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use HttpSession api in servlet/jsp to develop shopping cart.
 
maheshm morem
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sir , i am new in this , i dont now how to do it . can you elobrate me please ?
 
shivani vidit
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can develop servlet or jsp. javax.servlet.http package provides you HttpsSession interface, whose object can be retrived from HttpRequest

you can refer the follwing link for more details....
http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/Servlet-Tutorial-Session-Tracking.html
 
maheshm morem
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<%@page language="java" import="java.sql.*, java.io.*" %>
<html>
<body>

<%
Connection connection = null;
ResultSet rs = null;
Statement st = null;
try {

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
connection = DriverManager.getConnection("jdbcdbc:mm1", "root", "mahesh");
st=connection.createStatement();
InputStream sImage;
rs = st.executeQuery("select * from save_image");
while(rs.next())
{

byte[] bytearray = new byte[1048576];
int size=0;
sImage = rs.getBinaryStream(1);
response.reset();
response.setContentType("image/jpeg");
while((size=sImage.read(bytearray))!= -1 ){
response.getOutputStream().write(bytearray,0,size);
}

}
}

catch (Exception ex) {
out.println("Found some error : "+ex);
}
finally {
// close all the connections.
//connection.close();
//psmnt.close();
}

%>
</body>
</html>
 
maheshm morem
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry bymistically i past it on this , i want to past somwhere else ,
thank you sir , i got idea about shoping cart, but problem is that i used that the session program after the login of user and set the attribute name and password to it ,and after that i forword to html page it working, and my html pages display but when i forword to jsp page it doesnt work. where i have to make session ?
thank you.
mahesh more
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic