[Burichan] [Futaba] [Gurochan] [Photon] - [Home]

Name
Link
Subject
Comment
File
Password (for post and file deletion)
Leave empty (spam trap):
  • Supported file types are: GIF, JPG, PNG
  • Maximum file size allowed is 1000 KB.
  • Images greater than 200x200 pixels will be thumbnailed.

File: 1214938951808.jpg -(27932 B, 231x205) Thumbnail displayed, click image for full size.
27932 No.1   [Reply]

Its serious business

>> No.2  
File: 1214939022853.jpg -(74827 B, 800x358) Thumbnail displayed, click image for full size.
74827
>> No.3  
File: 1214939122807.jpg -(50794 B, 590x397) Thumbnail displayed, click image for full size.
50794

excellent frog is excellent.

>> No.4  
File: 1214939195279.jpg -(44334 B, 600x450) Thumbnail displayed, click image for full size.
44334

kingsway garden mall parking lot

>> No.5  
File: 1214939272694.jpg -(451889 B, 1920x1140) Thumbnail displayed, click image for full size.
451889


File: 1208233340132.jpg -(29128 B, 570x327) Thumbnail displayed, click image for full size.
29128 No.1   [Reply]

<table>
<tr>

	<td colspan="2">
<% String message = (String)request.getAttribute("message");
if (message != null)out.println(message); %>
</td></tr>

<tr><td><h3>Your Cart</h3></td></tr>
<%
ArrayList theCart = new ArrayList();
theCart = (ArrayList)session.getAttribute("cart");
//theCart = (ArrayList)request.getAttribute("cart");
if (theCart != null){

int number = 0;
if( theCart.size() > 0){
number = theCart.size();
}
for (int c=0; c < number; c++)
{
ProductFormBean product = (ProductFormBean)theCart.get(c); //elementAt(c);
out.println("<tr><td>"+product.getProductId()+"</td><td>"
+product.getDescription()+"</td><td>"
+product.getQuantity()+"</td></tr>");
}

}
else{

out.println("Nothing returned");

}
%>
</table>

Comment too long. Click here to view the full text.
>> No.2  

ArrayList theCart = new ArrayList();

    if (session.getAttribute("cart") != null){
theCart = (ArrayList)session.getAttribute("cart");
}
beans.ProductFormBean theBean = (ProductFormBean)form;
managers.ProductManager manager = new managers.ProductManager();
    if (theBean.getProductId() == 0) {
request.setAttribute("message", "Product Id is required");
nextPage = mapping.findForward("failure");
}
else if (theBean.getQuantity() == 0) {
request.setAttribute("message", "Quantity is required");
nextPage = mapping.findForward("failure");
}
    else{
try{
theBean = manager.find(theBean);
if (theBean == null){
nextPage = mapping.findForward("failure");
request.setAttribute("message", "Error locating product");
}
else{
request.setAttribute("message", "Product Added to Cart");
theCart.add(theBean);
theCart.add(theBean);
//request.setAttribute("cart", theCart);
session.setAttribute("cart",theCart);

nextPage = mapping.findForward("success");
}
}
catch (Exception e){
request.setAttribute("message", e+" "+"exception error");
nextPage = mapping.findForward("failure");
}

// request.setAttribute("cart", theBean);

    }
return nextPage;
Comment too long. Click here to view the full text.
>> No.3  
public ProductFormBean find (ProductFormBean theBean) throws Exception
{
Session session = HibernateUtil.getSessionFactory().getCurrentSession();
session.beginTransaction();

ProductFormBean bean = (ProductFormBean)session.get(ProductFormBean.class, theBean.getProductId());

session.getTransaction().commit();
HibernateUtil.getSessionFactory().close();
return bean;
}
>> No.4  

package actions;

import javax.servlet.http.*;
import org.apache.struts.action.*;
import beans.*;
import java.util.*;

public final class AddToCartServlet extends Action
{

public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
ActionForward nextPage = null;
HttpSession session = request.getSession();

ArrayList theCart = new ArrayList();
if (session.getAttribute("cart") != null){
theCart = (ArrayList)session.getAttribute("cart");
}
beans.ProductFormBean theBean = (ProductFormBean)form;
managers.ProductManager manager = new managers.ProductManager();
    if (theBean.getProductId() == 0) {
request.setAttribute("message", "Product Id is required");
nextPage = mapping.findForward("failure");
}
else if (theBean.getQuantity() == 0) {
request.setAttribute("message", "Quantity is required");
nextPage = mapping.findForward("failure");
}
else{
try{
theBean = manager.find(theBean);
if (theBean == null){
nextPage = mapping.findForward("failure");
request.setAttribute("message", "Error locating product");
}
else{
request.setAttribute("message", "Product Added to Cart");
theCart.add(theBean);
//request.setAttribute("cart", theCart);
totaller bob = new totaller();
String total = bob.total(theCart);
session.setAttribute("cart", theCart);
nextPage = mapping.findForward("success");
}
}
catch (Exception e){
request.setAttribute("message", e+" "+"exception error");
nextPage = mapping.findForward("failure");
}

// request.setAttribute("cart", theBean);

    }
return nextPage;
}

}

Comment too long. Click here to view the full text.


File: 1193939807791.gif -(3184 B, 40x40) Thumbnail displayed, click image for full size.
3184 No.1   [Reply]

Wow didn't think this setup would go so smoothly.

>> No.2  
File: 1193948356829.jpg -(202413 B, 1280x1024) Thumbnail displayed, click image for full size.
202413
>> No.3  
File: 1204001367084.jpg -(278757 B, 852x724) Thumbnail displayed, click image for full size.
278757

Tabula Rasa was a disappointment to my eyes. Well actually my eyes thought it looked cool but really it was just lacking something.

>> No.4  
File: 1204004906164.jpg -(84557 B, 1280x720) Thumbnail displayed, click image for full size.
84557
>> No.5  
File: 1204005024903.jpg -(272476 B, 1280x720) Thumbnail displayed, click image for full size.
272476
>> No.6  
File: 1204005520234.jpg -(140230 B, 1280x1024) Thumbnail displayed, click image for full size.
140230

lol giant CATaPult



File: 1204000876393.jpg -(62379 B, 756x609) Thumbnail displayed, click image for full size.
62379 No.1   [Reply]

or am I being to hasty in my irrationalities



File: 1204000813465.jpg -(65382 B, 756x609) Thumbnail displayed, click image for full size.
65382 No.1   [Reply]

Are you one of those people who sit in the dark basement all alone surfin the web avoiding friends and family and yeah. Because I hate you.



File: 1202941980355.jpg -(19905 B, 389x391) Thumbnail displayed, click image for full size.
19905 No.1   [Reply]

this has nothing to do with everyone and everything to do with the unknown



File: 1200337570043.jpg -(111126 B, 1440x900) Thumbnail displayed, click image for full size.
111126 No.1   [Reply]

yes what the hell is this anyways



File: 1193946772903.jpg -(153481 B, 919x699) Thumbnail displayed, click image for full size.
153481 No.1   [Reply]

This one looks like Cowboy Gendo

>> No.2  
File: 1193947140616.jpg -(90069 B, 1084x2653) Thumbnail displayed, click image for full size.
90069


File: 1193939842774.jpg -(49705 B, 517x367) Thumbnail displayed, click image for full size.
49705 No.1   [Reply]

testing out the picture upload :D

>> No.2  
File: 1193940058915.jpg -(257964 B, 800x640) Thumbnail displayed, click image for full size.
257964
>> No.3  
File: 1193940069385.jpg -(57129 B, 750x600) Thumbnail displayed, click image for full size.
57129
>> No.4  
File: 1193940086748.jpg -(67682 B, 750x600) Thumbnail displayed, click image for full size.
67682
>> No.5  
File: 1193940147535.jpg -(89604 B, 600x750) Thumbnail displayed, click image for full size.
89604


Delete Post []
Password
Previous [0] Next