Welcome to Dream.In.Code
Click Here
Getting Java Help is Easy!

Join 117,522 Java Programmers for FREE! Ask your question and get quick answers from experts. There are 2,066 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



struts

 
Reply to this topicStart new topic

struts, shopping cart

vij485
post 3 Jul, 2008 - 02:06 AM
Post #1


New D.I.C Head

*
Joined: 3 Jul, 2008
Posts: 3

this is one example cant post whole project here
CODE

package com.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.form.LoginForm;


/**
* Action class to add items to the cart.
*/

public class LoginAction extends Action {

    

    public ActionForward execute(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {
        HttpSession session= request.getSession();
        LoginForm  loginForm=(LoginForm)form;    
        
        //    String result=null;
        
//        if(loginForm.getUserName().equals("vijay") && loginForm.getPassword().equals("vijay"))
//            return mapping.findForward("success");
//        else
    //        result = "fail";
        return mapping.findForward("success");
    }

}


** Edit ** code.gif
User is offlineProfile CardPM

Go to the top of the page


pbl
post 3 Jul, 2008 - 03:02 PM
Post #2


D.I.C Lover

Group Icon
Joined: 6 Mar, 2008
Posts: 2,276



Thanked 132 times

Dream Kudos: 75
My Contributions


And the question is ?
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 10/7/08 03:15PM

Live Java Help!

Java Tutorials

Reference Sheets

Java Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month