• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

shoping cart

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi, i want to make shoping cart how to make it , what i have to use it ?
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use HttpSession api in servlet/jsp to develop shopping cart.
 
maheshm morem
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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("jdbc:odbc: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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic