Tree View through JSP and Java Script

Hi,
I am looking for code or ideas of a Tree Structure as shown in in the left side frame of admin console of Sun App server 7 on the browser. I need to create a tree structure which will work on the browser like it works on the Sun App Server 7 admin console. If you had any idea or code, please share with me. I would like to have some idea before I start building it. The tree will be build from the database. So any database design is also helpful. I am planning to have that tree using JSP and EJB.
Please help. If you are not clear what I am looking for, then please drop a line in this forum, so that I can explain it fine.
Thanks in advance.
Amit

You can use the JSP Tree Tag I have developed. This helps you both structuring the tree model itself + it takes care of displaying the tree in a nice way. You can change all HTML code used to display the tree. Also you can build trees dynamically instead of just displaying static trees. Take a look at it here:
http://www.jenkov.dk/projects/treetag/treetag.jsp
Kind Regards,
Jakob Jenkov

Similar Messages

  • Design View blank, JSP and Java views fine

    I'm running JSC 2.1, I have 2 gig of memory. I'm not able to see the design view on one of my jsps, but the error message in the log isn't very helpful.
    I did a cut-and-paste from another jsp view in another file -- is there something else I have to copy? If so, what and where to?
    Any help appreciated.
    Stack trace is below (I get five of the same errors with different line numbers; I'm only including one stack trace here):
    java.lang.NullPointerException
    at com.sun.rave.designer.DesignerTopComp.componentShowing(DesignerTopComp.java:868)
    at org.netbeans.core.multiview.MultiViewPeer.showCurrentElement(MultiViewPeer.java:233)
    at org.netbeans.core.multiview.MultiViewPeer.showCurrentElement(MultiViewPeer.java:205)
    at org.netbeans.core.multiview.MultiViewPeer$SelectionListener.selectionChanged(MultiViewPeer.java:480)
    at org.netbeans.core.multiview.MultiViewModel.fireSelectionChanged(MultiViewModel.java:224)
    at org.netbeans.core.multiview.MultiViewModel.setActiveDescription(MultiViewModel.java:93)
    at org.netbeans.core.multiview.MultiViewModel$BtnGroup.setSelected(MultiViewModel.java:274)
    at javax.swing.JToggleButton$ToggleButtonModel.setSelected(JToggleButton.java:215)
    at javax.swing.ButtonGroup.setSelected(ButtonGroup.java:139)
    at org.netbeans.core.multiview.MultiViewModel$BtnGroup.setSelected(MultiViewModel.java:270)
    at javax.swing.JToggleButton$ToggleButtonModel.setSelected(JToggleButton.java:215)
    at javax.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:250)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
    at java.awt.Component.processMouseEvent(Component.java:5488)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
    at java.awt.Component.processEvent(Component.java:5253)
    at java.awt.Container.processEvent(Container.java:1966)
    at java.awt.Component.dispatchEventImpl(Component.java:3955)
    at java.awt.Container.dispatchEventImpl(Container.java:2024)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
    at java.awt.Container.dispatchEventImpl(Container.java:2010)
    at java.awt.Window.dispatchEventImpl(Window.java:1774)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
    [catch] at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

    I figured out the problem. The Java code had gotten out of sync with the jsp code, so the design view didn't know how to render the components. It's a pain to fix, but it can be done. Go through your jsp code component by component, and make sure there are declarations, getters, and setters for each id in the components. Also make sure the java code doesn't contain declarations, getters, and setters for any components that you didn't create (you can see these in the jsp view at the bottom of the file).

  • HELP!!!!! JSP and Java Script

    Hi,
    I have a JSP file that I need to create 3 drop lists (choice list). If one of these 3 choice lists is selected, then the other 2 need to deselected and disabled. I need help with the code.
    Do I use JavaScript or Java? Below is the html code. I would really appreciate any help on this.
    Thanks,
    BK
    <!--
    Refer to the directory gary/reportingstd/getReqs.jsp to see how to get the value from the
    choice list and other fields.
    -->
    <html>
    <head><title>New Window Example</title>
    <STYLE TYPE="text/css" >
    td { font-size: 11px }
    th { font-size: 11px }
    body { background-color: #666666 }
    </STYLE>
    <SCRIPT>
    /* When press CANCEL button, the dialog box disappears. */
         function Closer()
              window.close();
         function checkForm()
         var f = document.queryForm;
    * Checks if an account number is entered. If not, an error message dialog pops up
    * to the user.
    * Checks if a business unit was chosen. If not, an error message dialog pops up
    * to the user.
         buChoice = f.buList.selectedIndex;
              if (f.buList.options[buChoice].value == "")
                   alert("Please choose a business unit.");
                   f.buList.focus();
                   f.toDate.select();
                   return false;
         * This <code>statusMsg()</code>is to give the user feedback while data is being entered by
         * creating a status message. This script lets you modify what is displayed in this bar,
         * giving you the ability to send messages to the user while he interacts with filling out
         * the fields.Status Messages are the phrases you see in the status bar at the bottom of a
         * window or dialog.
         * For instance: For the account number text field, as long as the cursor is in this text
         * field of Account #, there's a message at the bottom of the dialog box informing, " Enter
         * only numeric characters."
         * @param msgType
         * @ mesage the data structure to store the messages sent to the users
         function statusMsg(msgType)
    var message = "";
    if (msgType == "integer")
    message = "Enter numeric characters.";
    if (msgType == "integerDate")
    message = "between 1990 and 2010";
    if (msgType == "ListBU")
    message = "Choose which BU?";
    if (msgType == "ListMonth")
    message = "Choose a month."
    window.defaultStatus = message;
    window.status = message;
    </script>
    </head>
    <body onFocus="statusMsg('')">
    <FORM NAME= "queryForm" onSubmit = "return checkForm()" ACTION="Welcome.html">
    <TABLE Border="0" cellspacing="2" cellpadding="4">
    <TR>     
    <TD ALIGN=left>Company Code:</TD>
    <TD WIDTH="20%"><SELECT Name=choiceMonths1 size=1 onFocus="statusMsg('ListMonth')">
    <option value="" selected>
    <OPTION Value="01">01
    <OPTION Value="02"> 02
    <OPTION Value="03"> 03
    <OPTION Value="04"> 04
    <OPTION Value="05"> 05
    <OPTION Value="06"> 06
    </SELECT></TD>
         <TR>
         <TD ALIGN=left>RegionID:</TD>
         <TD><select name=buList onFocus="statusMsg('ListBU')"> // onChange = "selectionMade()"
         <option value="" selected>
         <option value=Norht ALIGN="left">North
         <option value=East ALIGN="left">East
              <option value=South ALIGN="left">South
         <option value ALIGN="left">North</select></TD></TR>
    <TR>
         <TD ALIGN=left>Business Unit ID:</TD>
         <TD><select name=buList onFocus="statusMsg('ListBU')"> // onChange = "selectionMade()"
         <option value="" selected>
         <option value=TBR ALIGN="left">TBR
         <option value=BAL ALIGN="left">BAL
         <option value ALIGN="left">ABH</select></TD></TR>
    </TR></TABLE>
    <TABLE>
    <tr>
    <TD><INPUT TYPE=submit Value=Submit></TD>
    <TD><INPUT TYPE=button NAME=btnClose VALUE=Cancel SIZE=20 ALIGN= center onClick="Closer()"></TD>
         <TD><input type=reset VALUE= Clear Query SIZE=20 ALIGN= right></TD></TR></TABLE>
    </FORM>
    </BODY>
    </html>

    What i've done in the past in this same situation is to use radio buttons alongside my dropdown lists. Whenever a radio button is selected, the corresponding dropdown list is enabled, and the other lists are all disabled. Not too hard to implement in Javascript either. Use an onClick() and set the other fields to disabled, using document.form.field.disabled = true. (and obviously, set the one you want to disabled = false). But obviously, you're still going to want to know which one to retrieve later, right? Use a hidden tag and in the same Javascript onClick, you can dynamically set the variable to whatever you want. Here's a pretty compact example using 2 fields
    function enable(field)
         if(field == "firstName")
              document.myForm.firstName.disabled = false;
              document.myForm.lastName.disabled = true;
              document.myForm.searchBy.value = "firstName"
         else
              document.myForm.firstName.disabled = true;
              document.myForm.lastName.disabled = false;
              document.myForm.searchBy.value = "lastName"
    }Or something like that. Yeah, I know it's not the greatest javascript in the world, but i was just simplifying things to give an example. Hope this helps somewhat :)
    Simon

  • How to design tree view in jsp

    Hi,
    New to jsp.How can i create a tree view in jsp.Just like mail.yahoo.com folders tree.Pls give me some code.
    Thanks

    you can try the following open source ,it supply an open source Treebean and some examples www.CoolServlets.com Check out "CSTreeBean"

  • Need flash player 8 and java script enabled to play videos on ipad, need help please.

    need flash player 8 and java script enabled on my ipad in order to view videos.  please help.

    iPads do not directly support Flash.
    You can look for Flash Browsers in the App store for some options to try. Support is not 100%, but maybe one may work for you.  Browsers like Puffin, Skyfire, Photon etc...
    IPads do fully support JavaScript.  Just make sure its turned on under Settings->Safari->Advanced->JavaScript.
    If you require Java, which is completely different to JavaScript, again there are some browsers in the App store that support it.  Search for "Java browsers" in the store.

  • How to Call a JSP from Java Script

    Hi,
    I want to call a jsp from Java Script.
    I am having IntelliJ IDEA 4.5 (IDE) and weblogic server.
    should i do anything on web.xml,weblogic.xml
    I have written one jsp, Java script.
    I want to call a jsp from Java script

    function submitf(){
    document.xyz.action ='ReportSave.jsp';
    document.xyz.method='POST';
    document.xyz.submit();
    <form name='xyz'>
    <input type='text' name='text1'>
    <input type='text' name='text2'>
    <input type='button' name='xx' value='submit' onclick= submitf()>
    </form>
    Is this what u want???
    Regards,
    RAHUL

  • Problem with JSP and Java Servlet Web Application....

    Hi every body....
    I av developed a web based application with java (jsp and Java Servlets)....
    that was working fine on Lane and Local Host....
    But when i upload on internet with unix package my servlets and Java Beans are not working .....
    also not access database which i developed on My Sql....
    M using cpanel support on web server
    Plz gave me solution...
    Thanx looking forward Adnan

    You need to elaborate "not working" in developer's perspective instead of in user's perspective.

  • I need to apply for a job but I'm told I need to enable cookies and java script, how do I do that?  I can't find it in system preferences

    I need to apply for a job but I'm told I need to enable cookies and java script, how do I do that?  I can't find it in system preferences
    I just updated to the new operating system which i'm starting to think was a bad idea, because it reset all my settings and I don't know how to fix them.

    so when I go to safari>preferences>security>uncheck box labled enable java script  links on webpages don't work and pictures and links son't want to appear on websites.  this made it so webpages don't want to work past loading the content in text format.  I have to check enable java script to go the webpages to work right so images and links work again but when I try to apply for this job the error message pops up saying I need to enable cookies and java script.
    SO I GUESS MY QUESTION IS IF JAVA SCRIPT IS ALREADY ENABLED HOW TO I ENABLE COOKIES?

  • Where can I download the last version that allows images and java script to be turned off?

    Due to my often slow connection I must have the option to turn off "automatically download images" and Java script. Firefox 23 does not have those options. Where can I download version 22 or whatever the latest version is that allowed these options?
    Thanks

    The Quickimage add-on doesn't work well at all, it gets stuck in the image off mode and will not switch back even after rebooting Firefox. Version 23.0 of Firefox is also very slow on my computer.
    I really need to find an older version of Firefox. Any idea where to download version 22 or earlier?

  • JSP and Java Servelets, What do I need to get started?

    What do I have to download in order to start using JSP and Java Servelets? How do I test the codes after I've written something? Anyone?

    Right and you can download tomcat server from http://jakarta.apache.org/
    and do not forget to set java home path in tomcat.See it's documentation formore help on site itself.
    To test your codes for jsp put all your jsp,html,image and other resource files in tomcat's webaps's root directory.
    Put all your java class files of beans if used and servlet's class files in root's webinf's class directory.
    It will make sense to try very easy programs if u r a begineer .After starting the server post setting the java home path .(you can start it in bin directory's startup.bat file)
    All the best
    Ashish

  • Need flash player 8  and java script

    why i try to open a videos from mac tube why is it showing i need a flash player 8+ and java script .

    iPads do not directly support Flash.
    You can look for Flash Browsers in the App store for some options to try. Support is not 100%, but maybe one may work for you.  Browsers like Puffin, Skyfire, Photon etc...
    IPads do fully support JavaScript.  Just make sure its turned on under Settings->Safari->Advanced->JavaScript.
    If you require Java, which is completely different to JavaScript, again there are some browsers in the App store that support it.  Search for "Java browsers" in the store.

  • Problem in the jsp, jstl and java script.

    Hi Friends,
    I am having one jsp which allows user(Could you please refer to code which is written in my jsp) to enter his username and password i want to get the password in the same jsp and want it to be passed to the custom tag without sending request to the server.Please give me an idea.Thanks in advance.
    This is the text field which allows a password.
    <INPUT type="password" name="password" size="10" maxlength="29" onblur="chkpwd()" onfocus="this.autocomplete=false" >
    and this is the anchor tag which refers as LOGIN BUTTON
    <IMG height=19 src="images/submit1.gif" width=106 border=0>
    when user clicks on LOGIN BUTTON i am calling one javascript function LOGIN(PASSWORD:) to check the validation if the validation is success then i want to get the password in the same function which is entered .
    This is ok i can get the password by "document.formName.password.value" then i need to pass this value to the jstl tag which is our own tag as shown below.
    <prefix:tagname value="PASSWORD which is having in the javascript variable".
    Please help me .
    Quick reply is thankfull.
    Edited by: bharathpolanki on Apr 20, 2008 1:55 AM
    Edited by: bharathpolanki on Apr 20, 2008 2:55 AM

    that's correct. You can use the below code for AJAX request.
    <script type="text/javascript">
    var httpObject = getHTTPObject();
    //create XMLHttpRequest object
    function getHTTPObject() {     
         var xmlhttp;
         if (window.XMLHttpRequest) // if Mozilla, Safari etc
              xmlhttp = new XMLHttpRequest();
         else if (window.ActiveXObject){ // if IE
              try {
                   xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
              catch ( e ){
                   try{
                        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
                   catch ( e ){}
         return xmlhttp;
    //define the function to send the request
    function sendRequest(){
        var currDesc = document.getElementById("description").value;
        var URL =  "manageMaintAction.do"; //action mapping in your struts-config
        var queryString = "currDesc="+escape(currDesc); //get the currDesc value in your action class like request.getParameter("currDesc")
        httpObject.open( "Post", URL, true );
        httpObject.onreadystatechange = cbFn;
        httpObject.setRequestHeader( "Content-Type", "application/x-www-form-urlencoded");
        httpObject.send(queryString);
    //callback fn
    function cbFn() {
        if (httpObject.readyState == 4)
             if (httpObject.status == 200)
              var result = httpObject.responseText;
              alert(result);
    </script>

  • JSF tree view GUI component and tree node actions

    Hi,
    I am new in using JSF and have a problem with my simple test application.
    The application contains a tree view control with one static tree node and a separate text area. Clicking on the tree node shall fill the text area with the string 'hello'. Seems to be very simple, but it doesn't work.
    What did I do?
    First of all I use the Sun Java Studio Creator 2.
    By double clicking on the tree node in the design window of the IDE a method called treeNode1_action() was created. I also added the String text to the session bean. treeNode1_Action() does not more than setting text='hello' ( getSessionBean().setText('hello'); ).
    The jsp file contains the line
    <ui:textArea binding="#{Page1.textArea}" id="textArea" style="height: 192px; left: 360px; top: 48px; position: absolute; width: 456px" text="#{SessionBean1.text}"/>, so the text of the text area is bound to the session property 'text'.
    Running the application and clicking on the tree node does nothing except reloading the page (no 'hello' inside the text area).
    Using the debugger showed me that the bean property text is set correctly to 'hello', also after reloading the page.
    What did I do wrong?
    What do I have to do to display 'hello' in the text area?
    I would be glad for some good advice to solve my problem and looking forward for an answer.
    Regards from germany
    Matthias

    want to remove the green patch from the jsf tree componentas u said ,, it is COMPONENET so this is a pre-made creator component that u cant chnage its attributes ,,
    instead u can extract Theam.jar file and change the icons ,, u i didnt do it before ,, but u may be find what u want there,
    hope this will help
    good luck
    Mohammed

  • How to use HTML and Java Script files in Portal

    Hi,
    I am trying to access a web application using iViews. My application contains JSP,HTML,Servlets,JS(java script), image files. I am using JSPDynPro to access the JSP files and I am putting servlets in the private/lib folder of the PORTAL-INF dir of Portal project. Now my problem is almost all the JSP files uses the HTML files, JS files and image files. Where can put these files in the portal project dir structure to give access to the JSP files when i am creating a iView for the JSPDynPro componenets in the irj.
    thanks,
    Ashok

    Hi,
    JSPDynpage is the controller, one JSPDynpage can call more than one jsp file according to the coding. Through the JSPDynpage's setJspName() function only you can display a jsp page.
    EX:
    public void doProcessBeforeOutput() throws PageException {
      this.setJspName("logon.jsp");
    if you put the JSPDynpage in the src.core then the JSPDynpage can be accessed only by this application.
    if you put the JSPDynpage in the src.api then other applications can access this component.
    You can put the jsp pages in the pagelet folder.
    xml file
    =========
    <?xml version="1.0" encoding="utf-8"?>
    <application>
      <application-config>
        <property name="SharingReference" value="com.sap.portal.htmlb"/>
      </application-config>
      <components>
        <component name="jspdynpage name">
          <component-config>
            <property name="ClassName" value="package name.jspdynpagename"/>
          </component-config>
          <component-profile>
            <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
          </component-profile>
        </component>
      </components>
      <services/>
    </application>
    REWARD USEFUL ANSWERS

  • Need Help Badly on Shopping Cart Using JSP And Java Servlet

    Hi All,
    This is the 1st time i am trying to create a shopping cart using JSP and Servlet.
    I have read through a few acticles but i still do not get the whole idea of how it works.
    Please guide me as i need help very badly.
    Thanks.
    This is one of the jsp page which displays the category of products user would like to buy : Products.jsp
    <html>
    <head>
    <title>Purchase Order</title>
    </head>
    <body topmargin="30">
    <table border="0" width="100%" id="table1" cellpadding="2">
         <tr>
              <td bgcolor="#990000" width="96">
              <p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">
              Code</font></b></td>
              <td bgcolor="#990000" width="260">
              <p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">
              Description </font></b></td>
              <td bgcolor="#990000" width="130">
              <p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">Brand
              </font></b></td>
              <td bgcolor="#990000" width="146">
              <p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">UOM
              </font></b></td>
              <td bgcolor="#990000" width="57">
              <p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">Unit<br>
              Price </font></b></td>
              <td bgcolor="#990000" width="62">
              <p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">
              Carton<br>
              Price </font></b></td>
              <td bgcolor="#990000" width="36">
              <p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">
              Qty</font></b></td>
              <td bgcolor="#990000" width="65">
              <p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">Add<br>
              To Cart</font></b></td>
         </tr>
    <tr>
    <td align="center" width="96" bgcolor="#CCCCCC">
    <font face="Verdana, Arial, Helvetica, sans-serif" size="2">123</font>
    </td>
    <td align="center" width="260" bgcolor="#CCCCCC">
    <font face="Verdana, Arial, Helvetica, sans-serif" size="2">Tom Yam</font>
    </td>
    <td align="center" width="130" bgcolor="#CCCCCC">
    <font face="Verdana, Arial, Helvetica, sans-serif" size="2">Nissin</font>
    </td>
    <td align="center" width="146" bgcolor="#CCCCCC">
    <font face="Verdana, Arial, Helvetica, sans-serif" size="2">12 x 10's</font>
    </td>
    <td align="center" width="57" bgcolor="#CCCCCC">
    <font face="Verdana, Arial, Helvetica, sans-serif" size="2">$3.85</font>
    </td>
    <td align="center" width="62" bgcolor="#CCCCCC">
    <font face="Verdana, Arial, Helvetica, sans-serif" size="2">$46.2</font>
    </td>
    <td align="center" width="36" bgcolor="#CCCCCC">
    <!--webbot bot="Validation" S-Data-Type="Integer" S-Number-Separators="x" -->
    <p align="center"><input type="Integer" name="Q10005" size="1"></p>
    </td>
    <td align="center" width="65" bgcolor="#CCCCCC">
    <p><input type="checkbox" name="checkbox" value="123"></p>
    </tr>
    <tr>
    </table>
    <table border="0" width="100%" id="table2">
         <tr>
              <td>
              <div align="right">          
                   <input type="hidden" name="hAction" value="AddToCart"/> 
              <input type=submit name="submit" value="Add To Cart"/>                     
    </div>
    </td>
         </tr>
    </table>
    </body>
    </html>
    After user has make his selection by entering the qty and ticking on the check box, he would click the "Add To Cart" button ... and this would call my servlet : AddToAddControlSerlvet.java
    import javax.servlet.http.*;
    import javax.servlet.*;
    import java.io.*;
    import java.util.*;
    import java.util.ArrayList;
    public class AddToCartControlServlet extends HttpServlet
         public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException,IOException
              String action = req.getParameter("hAction");
              if (action.equals("AddToCart"))
                   addToCart(req,res);
         public void addToCart(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
              try
                   String url = "";
                   String[] addList = req.getParameterValues("checkbox");
                   HttpSession sess = req.getSession(true);
                   //String sessionID = sess.getId();
                   DBClass dbClass = new DBClass();
                   ArrayList cartList = new ArrayList();
                   for (int i = 0; i < addList.length; i++)
                        String productCode = (String)addList;
                        int qty = Integer.parseInt(req.getParameter("Q"+productCode));
                        Products product = dbClass.getProductDetail(productCode);
                        double totalUnitAmt = qty * product.getUnitPrice();
                        double totalCartonAmt = qty * product.getCartonPrice();
                        Order order = new Order(product.getProductCode(),product.getProductDesc(),product.getBrandName(),product.getUom(),qty,product.getUnitPrice(),product.getCartonPrice(),totalUnitAmt,totalCartonAmt);
                        cartList.add(order);
                   sess.setAttribute("cartList", cartList);
                   url = "/Cart/CartDetails.jsp";
                   ServletContext sc = getServletContext();
                   RequestDispatcher rd = sc.getRequestDispatcher(url);
                   rd.forward(req, res);
              catch (Exception e)
                   System.out.println(e);
    From here, i would get the list of items which user has selected and add to the cartList, then i would direct the user to CartDetails.jsp which displayed the items user has selected.
    From there, user would be able to remove or to continue shopping by selecting other category.
    How i do store all the items user has selected ... everytime he would wan to view his cart ...
    As i would be calling from jsp to servlet .. or jsp to servlet ... and i do not know how i should go about in creating the shopping cart.

    Hi !
    Yon can use a data structure as vector and store the items selected by the user into the vector . Keep the vector in session using session object , so the user can access the entire shopping cart from anywhere in the application .
    Then , you can change the cart accordingly .
    Hope this works.
    Cheers ,
    Pranav

Maybe you are looking for