HttpServletRequest, RenderRequest and ActionRequest...

Hi All,
I want some inputs regarding HttpServletRequest, RenderRequest and ActionRequest objects and what is their heirarchy in JSR168 portlet context. And what is their dependancy in processAction and render method.
It would be great if you could provide some inputs on HttpServletResponse, RenderResponse and ActionResponse object also.
Thanks in advance...
Regards,
Sai
Edited by: user8831269 on Dec 1, 2010 8:41 PM

Welcome to the forums !
You will get a better/faster response if you post your question in an appropriate forum - this forum is meant for issues related to Oracle Discoverer.
Srini

Similar Messages

  • Passing beans across JSR Portlet Requests

    I'm new to portlet development and having trouble getting my head around the following...
    All I wan't to do is display a simple form, process the data and display some results.
    I would expect to do this through a combination of processAction method and a doView method, however it seems incredibly difficult to get the data created in processAction method into my JSP.
    If I was writing a servlet I'd simply create a bean and store it as an attribute in the request scope, but this doesn't seem posible within portlets.
    The sun examples use setRenderParameter(), but this only takes strings.
    I'd could add the bean to the PortletScope but would rather not as
    1. The bean will hang around for the lifetime of the portlet rather than the lifetime of the request
    2. The Portlet Specification stes that "Attributes stored in the PORTLET_SCOPE are not protected from other web components of the portlet application.
    Surely it can't be this hard to create a bean in the processAction method and access it from the JSP. Please tell me I'm missing something!

    I have the same problem with WebLogic Portal, so I
    think there's a problem of clarification with the spec, and I
    hope this will be clarified once theres a new version of
    the portlet API.
    If attributes set in ActionRequest cannot be seen in
    the render() methods, I simply see no point in defining
    setAttribute() and getAttribute() methods on the base
    PortletRequest interface ( from which both
    RenderRequest and ActionRequest inherit ).
    I've checked JSR 168 and PLT3.1 states that
    "Attributes set in the portlet request are
    available in the included servlet request", but
    from the above it seems that this is only true of
    renderRequests. Is this a bug in my Portal server
    (Vignette 7 Trial Edition)?

  • How to retrieve multiple data from table and represent it in jsp page

    Hi
    The below JavaScript code is used to add row in the table when I want to add multiple row data into table for single entry no field.
      <html>  function addRow()
                i++;
                var newRow = document.all("tblGrid").insertRow();
                var oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='srno"+i+"' type='text' id='srno"+i+"' size=10>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='itmcd"+i+"' type='text' id='itmcd"+i+"' size='10'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='itmnm"+i+"' type='text' id='itmnm"+i+"' size='15'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='indentqty"+i+"' type='text' id='indentqty"+i+"' size='10'>";
                oCell = newRow.insertCell();
                    oCell.innerHTML = "<input name='uom"+i+"' type='text' id='uom"+i+"' size='10'><input type='hidden' name='mcode"+i+"'id='mcode"+i+"'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='packqty"+i+"' type='text' id='packqty"+i+"' size='10'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='packuom"+i+"' type='text' id='packuom"+i+"' size='10'><input type='hidden' name='pack"+i+"' id='pack"+i+"'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='rate"+i+"' type='text' id='rate"+i+"' size='10'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='dor"+i+"' type='text' id='dor"+i+"' size='0' onClick='"+putdate(this.name)+"'>";           
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='bccode"+i+"' type='text' id='bccode"+i+"' size='10'></td><input type='hidden' name='bcc"+i+"' id='bcc"+i+"'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='cccode"+i+"' type='text' id='cccode"+i+"' size='10'></td><input type='hidden' name='ccc"+i+"' id='ccc"+i+"'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='remark2"+i+"' type='text' id='remark2"+i+"' size='20'>";           
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input type='button' value='Delete' onclick='removeRow(this);' />";
               // oCell = newRow.insertCell();
               // oCell.innerHTML = "<input type='button' value='Clear' onclick='clearRow(this);' />";
            }<html>  Then this data are send to the next Servlet for adding into two table.
    My header portion data are added into one table which added only one row in table. while footer section data are added into the no of rows in another table dependent on No. of
    Rows added into jsp page.
    Here is an code for that logic.
    <html>
    ArrayList<String> mucode = new ArrayList<String>();
                                ArrayList<Integer> serials = new ArrayList<Integer>();
                                ArrayList<Integer> apxrate = new ArrayList<Integer>();
                                ArrayList<Integer> srname = new ArrayList<Integer>();
                                ArrayList<String> itcode = new ArrayList<String>();
                                ArrayList<String> itname = new ArrayList<String>();
                                ArrayList<Integer> iqnty = new ArrayList<Integer>();
                                ArrayList<String> iuom = new ArrayList<String>();
                                ArrayList<Integer> pqnty = new ArrayList<Integer>();
                                ArrayList<String> puom1 = new ArrayList<String>();
                               ArrayList<Integer> arate = new ArrayList<Integer>();
                                ArrayList<String> rdate = new ArrayList<String>();
                                ArrayList<String> bcs = new ArrayList<String>();
                                ArrayList<String> ccs = new ArrayList<String>();
                                ArrayList<String> remarkss = new ArrayList<String>();
                                //ArrayList<Integer> qtyrecs = new ArrayList<Integer>();
                                //ArrayList<String> dors = new ArrayList<String>();
                                //ArrayList<String> remarks = new ArrayList<String>();
                     String entryn = request.getParameter("entryno");       
                        String rows = request.getParameter("rows");
                        out.println(rows);  
                        //String Entryno = request.getParameter("entryno");
                       // out.println(Entryno);
                      int entryno = 0,reqqty = 0,srno = 0,deprequest = 0,rowcount = 0;
                                if(!Entryno.equals("")){
                                        entryno = Integer.valueOf(Entryno);
                                if(!rows.equals("")){
                                        rowcount = Integer.valueOf(rows);
                               for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("srno"+i)!=null){
                                                serials.add(Integer.valueOf(request.getParameter("srno"+i).trim()));
                                                out.println(serials.size());
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("srno"+i)!=null){
                                                srname.add(Integer.valueOf(request.getParameter("srno"+i).trim()));
                                out.println(srname.get(0));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("itmcd"+i)!=null){
                                                itcode.add(request.getParameter("itmcd"+i).trim());
                                        } //out.println(itcode.get(i));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("itmnm"+i)!=null){
                                                itname.add(request.getParameter("itmnm"+i).trim());
                                        }//out.println(itname.get(i));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("indentqty"+i)!=null){
                                                iqnty.add(Integer.valueOf(request.getParameter("indentqty"+i).trim()));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("uom"+i)!=null){
                                                iuom.add(request.getParameter("uom"+i).trim());
                                        }//out.println(iuom.get(i));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("mcode"+i)!=null){
                                                mucode.add(request.getParameter("mcode"+i).trim());
                               for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("packqty"+i).equals("")){
                                          pqnty.add(0);
                                        }else
                                            pqnty.add(Integer.valueOf(request.getParameter("packqty"+i).trim()));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("pack"+i)!=null){
                                                puom1.add(request.getParameter("pack"+i).trim());
                                       }else
                                        puom1.add("");
                               for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("rate"+i).equals("")){                                     
                                            arate.add(0);
                                        }else
                                        arate.add(Integer.valueOf(request.getParameter("rate"+i).trim()));   
                     /* for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("rate"+i)!=null){
                                                arate.add(Integer.valueOf(request.getParameter("rate"+i).trim()));
                              for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("dor"+i)!=null){
                                                try{
                                                        rdate.add(dashdate.format(slashdate.parse(request.getParameter("dor"+i).trim())));
                                                }catch(ParseException p){p.printStackTrace();}
                                        }else
                                           { rdate.add("");}
                                   for(int i=1;i<=rowcount;i++){
                                 if(request.getParameter("bcc"+i)!=null){
                                                bcs.add(request.getParameter("bcc"+i).trim());
                                        }out.println(bcs.get(0));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("ccc"+i)!=null){
                                                ccs.add(request.getParameter("ccc"+i).trim());
                                        }out.println(ccs.get(0));
                                for(int i=1;i<=rowcount;i++){
                                    out.println("remark2");
                                        if(request.getParameter("remark2"+i)!=null){
                                                remarkss.add(request.getParameter("remark2"+i).trim());
                                        }out.println(remarkss.get(0));
                        ArrayList<String> Idate = new ArrayList<String>();
                        for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("dateindent"+i)!=null){
                                                try{
                                                        Idate.add(dashdate.format(dashdate.parse(request.getParameter("dateindent"+i).trim())));
                                                }catch(ParseException p){p.printStackTrace();}
                    String Rdate = dashdate.format(new java.util.Date());
                     String tdate = dashdate.format(new java.util.Date());    
                     // String Indentdate = dashdate.format(new java.util.Date());
                   //  String ApprovedT1 = dashdate.format(new java.util.Date());
                   //  String ApprovedT2 = dashdate.format(new java.util.Date());
                       // String ApprovedT1=" ";
                        //String ApprovedT2="";*/
                    String ApprovedT1= dashdate.format(new java.util.Date());
                   out.println (ApprovedT1);
                      String ApprovedT2=dashdate.format(new java.util.Date());
                       out.println(ApprovedT2);
                    String Indentdate=(dashdate.format(slashdate.parse(request.getParameter("dateindent").trim())));
                       out.println(Indentdate);
                        String Cocode ="BML001";  
                        out.println(Cocode);
                        String Deptcode = request.getParameter("dept1");
                        out.println(Deptcode);
                        String Empcode = request.getParameter("emp");
                        out.println(Empcode);
                        String Refno =request.getParameter("rtype"); 
                         out.println(Refno);
                        String Divcode = request.getParameter("todiv1");
                        out.println(Divcode);
                        String Usercode = "CIRIUS";    
                         String Whcode = request.getParameter("stor");
                        out.println(Whcode);
                        // String Itemgroupcode = request.getParameter("");
                         String Itemgroupcode ="120000";
                         out.println(Itemgroupcode);
                        String Supplytypecode = request.getParameter("stype");
                        out.println(Supplytypecode);
                        String Delcode = request.getParameter("deliverycode");
                        out.println(Delcode);
                        String Itemclass="WS";
                        out.println(Itemclass);
                        // String Itemclass = request.getParameter("iclass");
                       // out.println(Itemclass);
                        String unitcode = request.getParameter("uni");
                        out.println(unitcode);
                         String Todivcode = request.getParameter("todiv1");
                        out.println(Todivcode);
                        String Appxrate = request.getParameter("rate");
                        out.println(Appxrate);
                        String Srno = request.getParameter("srno");
                        out.println(Srno);                
                    /*    String Indqty = request.getParameter("indentqty");
                      out.println(Indqty);*/
                  String Itemcode = request.getParameter("itmcd");
                       out.println(Itemcode);
                       String Othersp = request.getParameter("remark1");
                        out.println(Othersp);
                        String Reqdt = request.getParameter("dor");
                        out.println(Reqdt);
                        String Munitcode = request.getParameter("mcode");
                        out.println(Munitcode);
                        String Packqty = request.getParameter("packqty");
                        out.println(Packqty);               
                        String Packuom = request.getParameter("pack");
                        out.println(Packuom);
                        String Remark2 = request.getParameter("remark2");
                        out.println(Remark2);
                        String BC = request.getParameter("bcc");
                        out.println(BC);
                        String CC = request.getParameter("ccc");
                        out.println(CC);
                        try{
                            st=connection.createStatement();
                            connection.setAutoCommit(false);
                            String sql="INSERT INTO PTXNINDHDR(COCODE,DEPTCODE,EMPCODE,APPROVEDT1,APPROVEDT2,INDDT,ENTRYNO,REFNO,REMARKS,DIVCODE,USERCODE,WHCODE,ITEMGROUPCODE,SUPTYPECODE,DELCODE,UNITCODE,TODIVCODE,ITEMCLASS)VALUES('"+Cocode+"','"+Deptcode+"','"+Empcode+"','"+ApprovedT1+"','"+ApprovedT2+"','"+Indentdate+"',"+Entryno+",'"+Refno+"','"+Othersp+"','"+Divcode+"','"+Usercode+"','"+Whcode+"','"+Itemgroupcode+"','"+Supplytypecode+"','"+Delcode+"','"+unitcode+"','"+Todivcode+"','"+Itemclass+"')";
                            out.println(sql);
                            st.addBatch(sql);
                            for(int i=0;i<serials.size();i++){
                                out.println("Inside the Statement");
                                String query3="test query for u";
                                out.println(query3);
                               String queryx="Insert into PTXNINDDTL(APXRATE,ENTRYNO,BRKNO,INDQTY,ITEMCODE,OTHERSPFCS,MUNITCODE,PACKQTY,PACKUOM,REMARKS,DIMSUBGRPCODE,DIMCODE,REQDT)VALUES("+arate.get(i)+","+entryno+","+srname.get(i)+","+iqnty.get(i)+","+itcode.get(i)+",'"+Othersp+"','"+mucode.get(i)+"',"+pqnty.get(i)+",'"+puom1.get(i)+"','"+remarkss.get(i)+"','"+bcs.get(i)+"','"+ccs.get(i)+"','"+rdate.get(i)+"')";
                               out.println(queryx);
                                st.addBatch(queryx);
                           int[] result=st.executeBatch();
                           connection.commit();
                           for(int k=0;k<result.length;k++)
                           out.println("rows updated by "+(k+1)+"insert sta:"+result[k]+"");
                        catch(BatchUpdateException bue)
                        out.println("error1;"+bue+"");
                        catch(SQLException sql)
                        out.println("error2;"+sql+"");
                        catch(Exception l)
                        out.println("error3;"+l+"");
    </html>
       Now I looking for to retrieve this footer section data available in multiple rows from footer table and present it in jsp page .
    I am finding difficulties in how to show this multiple row data for dynamic no of rows .i.e. variable no. of rows.
    I have able to show the data in Header portions of page in this ways
    here i am adding the part of code which shows the data from header part of table i.e from Header table
      <html>
    <h2 align="center"><b>Indent Preparation</b></h2>
        <div align="left">
            <table width="849" border="0" cellspacing="3" cellpadding="3" align="center">
                <tr>
                    <td ><div align="left"><b>Indent No.</b></div></td>
                    <td ><label>
                            <input name="indentno" type="text" id="indentno" size="15" value="" /><input type="hidden" name="no" id="no">
                    </label></td>
                    <td ><div align="center"><strong>Indent Date</strong></div></td>
                    <td ><label>
                            <div align="center">
                                <input name="dateindent" type="text" id="dateindent"value="<%=date1%>"/><input type="hidden" name="no" id="no">
                            </div>
                    </label></td>
                    <td> </td>
                    <td><div align="right"><strong>Entry No.</strong></div></td>
                     <%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
            <td><input type="text" value="<%=hdrcode.get(3)%>" size="10"></td>
    <%}else{%>
                   <td><input type="text" name="entryno" id="entryno" value="<%=entryNo%>"/></td>
                             <%}%>
                            <div align="right"></div>
                </tr>
                <tr>
                    <td><b>Division</b></td>
                    <%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
    <td><input type="text" value="<%=hdrdetails.get(9)%>" size="20"</td>
    <td><input type="hidden" name="div1" id="div1" value='<%=hdrcode.get(10)%>'></td>
    <%}else{%>
                   <td><input type="text" name="div" id="div" /></td>
                   <td><input type="hidden" name="div1" id="div1" /> </td>
              <%}%>
                    <td> </td>
                    <td> </td>
                    <td><div align="right"><strong>Unit</strong></div></td>
                   <%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
    <td><input type="text" value="<%=hdrdetails.get(14)%>" size="20"</td>
    <td><input type="hidden" name="uni" id="uni" value='<%=hdrcode.get(12)%>'></td>
    <%}else{%>
                   <td><input type="text" name="unit" id="unit" /></td>
                   <td><input type="hidden" name="uni" id="uni" /> </td>
              <%}%>
                </tr>
                <tr>
    </html>
      Any suggestion on any above works is highly appreciated.
    Thanks and regards
    harshal

    Too much code. It's also not well intented nor formatted. I don't see a question either or it got lost in that heap of unformatted code.
    I will only answer the question in the thread's subject:
    How to retrieve multiple data from table and represent it in jsp pageTo retrieve, make use of HttpServletRequest#getParameterValues() and/or #getParameter().
    To display, make use of JSTL's c:forEach.

  • How to get a HttpServletRequest instance from ApplicationModule ?

    All methods that I use as data actions are located in ApplModuleImpl.java. I need to get an IP address of an user using one of those methods. The problem is that I have to get an instance of HttpServletRequest (which have a getRemoteAddr() method) but I don't know how to do it from Application Module.
    Any ideas ?

    I approached a similar problem by extending the PageController and the ApplicationModule classes for the application (in the ViewController and Model projects respectively). Rather than tie the AppModule directly to the HTTP request object, I extended the PageController subclass to process the request object for specific information needed from it and communicate to the ApplicationModule as needed.
    In the extended PageController subclass, you'll have to import javax.servlet.http.HttpServletRequest and use
    HttpServletRequest request = (HttpServletRequest) context.getEnvironment().getRequest(); to get reference to the request object.
    I extended the ApplicationModule with setter methods to pass information into it from the specific PageController subclasses; the approach keeps the model layer more independent of the web-browser layer (it's not dependent on an HttpServletRequest object), and still allows the AppModule to be used with different UI technologies.
    We also needed to get the custom PageController methods invoked at the right points.
    Edited by: rpalazola on Sep 16, 2008 11:37 AM
    Edited by: rpalazola on Sep 16, 2008 11:44 AM

  • ActionRequest Problem.

    Hi All Folks,
    I have got a problem with ActionRequest. I used to use Liferay portal and now I am porting something to Oracel Portal. I use JDeveloper and write JSR 168 portlets. So there aren't too many things to change.
    In somewhere in my code, I put something into ActionRequest like this:
    actionRequest.setAttribute(Constants.SOME_BEAN_NAME , someBean);
    You know what SOME_BEAN_NAME and someBean means, just examples.
    It works straightforward on Liferay portal but it doesn't on Oracle. As a portlet container, I use preconfigured OC4J which comes with JDev.
    I looked portlet spec and ActionRequest is standart as a part of spec, so where did I mistake? Or is there something special with ActionRequest.
    If I had to put just primitives into the request or wanted to send browser, I could use ActionResponse's setRenderParameter, but I want to send whole beans, List, Map, etc. and in JSPs I use JSTL to handle them.
    By the way, is this information is necessary to find out what happens, I don't know, but I want to say that I use WSRP registration for portlet consuming.
    Anyway, any help really make me appreciated in this deadline closing situation.
    Cheers,
    Mehmet.

    Hello mark1971,
    is this for information only, or do you still have a problem to solve?
    Regardless whether this is a bug or not:
    in the processAction method, I already know that the portlet is in Edit mode;
    I'm not asking for the mode.
    Before I would leave processAction, I set the mode explicitly - for example,
    based on evaluation of user's input - to decide whether the portlet should stay
    in edit mode, or return to view mode.
    Maybe, I could have misunderstood the problem - I never extended the portlet
    class directly, but rather extended GenericPortlet.
    In this case, be free to ignore this message. ;-)
    Regards,
    Juergen

  • How to create a new object of HttpServletRequest class manually?

    Dear all,
    I don't know how silly my question is, however I have no way except asking.
    I know that when I send a request from the client to the server, server authomatically creates an object of
    HttpServletRequest and assigns all the request information to that object, so that you can extract these information by the available methods in the HttpServletRequest class like getHeader, getMethod and so on. What I need to do in my project is doing all above process manually. My question is how I can do it?
    In other words, I have the header and body part of a http request and I want to create a HttpServletRequest
    object and assign the header and body data to the object so that I'll be able to extract those data by using the getHeader, getMethod and other methods available in the HttpServletRequest class.
    Please Help me, I really need your help?
    Your help is appreciated.
    Thanks.

    Hi shadgar ,
    as rightly mentioned by Sudha and GrayMan, you can provide the implementation for the HttpServletRequest interface in your own way for the requirement, but it leads to a new Servlet Container development as you need to handle many things than the HttpServletRequest.
    I think the current interface and the Servlet Container will be able to handle if your request is over HTTP protocol and it don't deviate from the prtocol's request/response model.
    Check out the javax.servlet.http.HttpServletRequestWrapper class, which is the implementation of the javax.servlet.http.HttpServletRequest and javax.servlet.ServletRequest interfaces.
    Hope it will give some idea about the actual problem and rethink about the solution proposed.
    Thanks,
    Sanath Kumar

  • Cache javascript functions and images

    Hi,
    Web based J2EE application [STRUTS FRAMEWORK]
    None of my images, javscript and media functions/files are getting cached by browsers. I printed the HttpServletRequest headers and it shows
    request.getHeader("cache-control") = "no-cache"
    I want all my images and other stuff to get cached. I am not setting anything anywhere not to cache. I dont know how cache-control has become no-cache
    I tried many things like
    SETTING META tag "cache-control" to "Public" in all my jsps
    In all my java action classes I have putreposnse.setheader("cache-control","Public");
    But no luck. Any ideas?
    Thanks
    Sunil

    i dont think you can control that.
    If your browser is setup to reload page every visit then i guess he reloads, nothing you can do about that.

  • Get ip address of client machine and server

    Respected experts,
    I want to get ip address of the client machin and server machine.
    Which method should i use for getting this.

    drvijayy2k2 wrote:
    hi
    i am not sure
    but try request / servletrequest -> getRemoteHost() and getLocalHost()There isn't any getLocalHost() method for HTTPServletRequest. And in anycase, the getXXXHost() methods would return the hostname. You'll only get an IP address if the name cannot be resolved.
    @OP:
    [getRemoteAddr()|http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html#getRemoteAddr()] - be warned that this may be the IP address of the last proxy in the chain
    [getLocalAddr()|http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html#getLocalAddr()] - this is the address of the interface that the request came in on, so for a server with multiple NICs, you will only be getting one possible IP address.

  • RenderRequest always NULL

    Hello,
    I have added the following into the weblogic.xml
    <jsp-descriptor>
    <jsp-param>
    <param-name>superclass</param-name>
    <param-value>com.bea.portlet.jsp.PortletJspBase</param-value>
    </jsp-param>
    </jsp-descriptor>
    But when I reference the "renderRequest" in the JSP, it always be "null".

    If the JSP is included during a portlet's render/doView/doEdit/doHelp
    methods, the renderRequest and renderResponse parameters should not be
    null. Could you check if this is the case?
    Subbu
    Eric Chow wrote:
    Hello,
    I have added the following into the weblogic.xml
    <jsp-descriptor>
    <jsp-param>
    <param-name>superclass</param-name>
    <param-value>com.bea.portlet.jsp.PortletJspBase</param-value>
    </jsp-param>
    </jsp-descriptor>
    But when I reference the "renderRequest" in the JSP, it always be "null".

  • How to set the output in a Portlet?

    Hi,
    I'm creating a JSR-168 JSF Portlet application using Java Sun Studio Creator 2 Update 1. In my simple portlet, I want to be able to click a button and then see a page with a static text saying 'Button Clicked'. In my application:
    1) I create a JSP page with one button
    2) I modify that button's action method
    3) In the action method, I can access the ActionRequest and ActionResponse
    I want to be able to access the RenderRequest and RenderResponse so that I can modify the Portlet's output stream and thus modify the resulting page.
    1) In the portlet created by Java Sun Studio Creator, how can I access the RenderRequest and RenderResponse?
    2) More generally, how can I modify the output of a portlet page if I use the Java Sun Studio Creator portlet project? Is there a tutorial I can follow?
    Thanks,
    Marc

    Hi,
    I'm creating a JSR-168 JSF Portlet application using Java Sun Studio Creator 2 Update 1. In my simple portlet, I want to be able to click a button and then see a page with a static text saying 'Button Clicked'. In my application:
    1) I create a JSP page with one button
    2) I modify that button's action method
    3) In the action method, I can access the ActionRequest and ActionResponse
    I want to be able to access the RenderRequest and RenderResponse so that I can modify the Portlet's output stream and thus modify the resulting page.
    1) In the portlet created by Java Sun Studio Creator, how can I access the RenderRequest and RenderResponse?
    2) More generally, how can I modify the output of a portlet page if I use the Java Sun Studio Creator portlet project? Is there a tutorial I can follow?
    Thanks,
    Marc

  • How to find out the path of current jsp

    Hi all.
    I was wondering if someone could help me figure this out: how can I programmatically find out what path a given jsp is in from within the jsp?
    if I use currentPath = new File("./"), it defaults to the /config folder (Iplanet WS).
    Any advice is appreciated.

    Try using a combination of javax.servlet.http.HttpServletRequest.getServletPath() and javax.servlet.ServletContext.getRealPath() in your JSP. Like...
    appplication.getRealPath(request.getServletPath());I haven't tested it though.

  • "for each..." statement

    I just wonder if java support "for each" statement? such as, I don't know how many items and names in a array, so I like to list out all. then how to do it?
    for example, in asp:
    '----------codes start-----------
    for each item in session.contents
    response.write item &"="& session(item)
    next
    '-----------codes----------------
    how can I change this code to Java, so I can get each session name?
    thank you

    hi, i don't know if you have had answer to your problem allready, so i provide you with some manual pagess that wil be helpful.
    ...i don't know if you have found your way to J2EE APi allready...
    HTTPSession:
    http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpSession.html
    and there you will find method getAttributeNames(), from there you may work with while(attribNamesEnumeration.hasNext()) { ... }
    but as you ask something that might as well be from PHP, then i suspect that you're dealing with JSPs, and therefore you could be wanting help not about session, but HttpServletRequest:
    http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletRequest.html
    and there you see methods (not directly in this class, but in its superclass -- sorry if that's confusing, important thing is taht you may use those methods) like:
    getParameter(String name)
    getParameterMap()
    getParameterNames()
    getParameterValues(String name)
    there's no point in copying that api here.... so go check it out yourself...
    put basicaly you may use getParameterNames() to get all names of parameters that are sent with this request, and in case any of parameters has many values (like.in.this/request.html?param=value1&param=value2&param=value3) you could use getParameterValues() method to get all values of that parameter
    HTH

  • Adding Parameters in a Filter

    On a scale of one to "Dear God, what is that *thing*!?", how bad is
    it to add parameters to an HttpServletRequest in a Filter?
    I'm not entirely sure why there isn't an addParameter method in
    the request class, so it's hard for me to judge. Is it an optimization,
    or part of the contract?
    Also, does anybody have a good name for such
    a class? :)

    I'm not entirely sure why there isn't an addParameter
    method in
    the request class, so it's hard for me to judge. Is
    it an optimization,
    or part of the contract?There are two types of values that can exist in HttpServletRequest: parameters and attributes. The parameters are the values that are sent from the client side (in submit) and these values can't be modified. Also no other parameters can be added on server side in the request object. Their scope is request.
    The attributes are the values that can be added to the HttpServletRequest on the server side. They can be removed. They exist in the request only during the first forward (Attributes are reset between requests).
    So, it sound like a contract.
    If you need in the request an attribute (that behave as previously described), it is not uncommon to set it in a filter class.
    >
    Also, does anybody have a good name for such
    a class? :)The name of the class generally depends on the functionality the class encapsulates. Fiters names generally ends with 'Filter': "SessionFilter".

  • Sun JSC2 - How to download files to client

    Hi, imagine a document management site.
    I want to have a list of files with links that users can click to download them.
    Users can upload files (with handy File Upload component), and they get saved as byte streams to a file or database or whatever.
    Now, I have a page with a list of files the user can download. The file name, a link to save the file, and a link to download the file.
    File1.pdf . . . DOWNLOAD IT! . . . SAVE IT!
    The DOWNLOAD IT! link tries to use mime stuff to get the browser to open the file.
    The SAVE IT! link tells the browser to not process the file and always bring up the save as dialog. In both cases, I don't want the browser to open a new page.
    Starting with a byte[], what's the best way to do this? I searched the web, and these forums, but couldn't come up with anything that gave me a place to start from inside JSC2.
    Any ideas on where to start? Thanks in advance!
    Mike

    Hey Winston, here is what I came up with... Very similar, but a little different.
    Java Server Faces File Download Tutorial by Michael Cole
    Java Server Faces, abstracts much of the monotonous detail of web programming, letting application developers develop applications, instead of programming servers.
    This tutorial explains how to dip just a little under the covers to serve files to a browser. The browser can then interpret this binary data using MIME types. Some common MIME types are �text/plain�, �text/html�, or �application/pdf� or �application/x-unknown�.
    How the browser behaves when interacting with these MIME types is based on the client browser's configuration. Because this configuration is different for every browser, let's create two different behaviors:
    * First Behavior: When a link is clicked, the browser downloads and �opens� the file, either displaying the file itself, or choosing an appropriate program: zip file program, pdf program, etc.
    * Second Behavior: The browser always offers to save the file, no matter what.
    At the most basic level, we want to cause this chain of events:
    1. Cause browser to send a request to the server.
    2. Have the server create a response that sends the file to the client.
    For my purposes, the browser should not navigate to a new page for this behavior.
    A mockup might look like this:
    Files you can download:
    Secrets of the Universe.txt
    Open it!
    Save it!
    Perfect love and happiness.pdf
    Open it!
    Save it!
    Make a million dollars now.swf
    Open it!
    Save it!
    To accomplish this, we will execute this code on the server:
    // Find the HttpServletResponse object for this request.
    // With this object, we can create a response that sends the file.
    FacesContext faces = FacesContext.getCurrentInstance();
    HttpServletResponse response = (HttpServletResponse) faces.getExternalContext().getResponse();
    // We can also get information about what the browser requested.
    // This could tell us what data to send
    HttpServletRequest request = (HttpServletRequest) faces.getExternalContext().getRequest();
    // Your data can be stored in a database, generated at runtime, or whatever you choose.
    // We getSomeData() from an arbitrary location. This depends on your application.
    byte[] data = getSomeData(request);
    // In the response, we will specify a file name to present to the user.
    String filename = "myFile.txt";
    // Now we have the data to send, and the response object to send it with.
    // Next we give the browser some hints on what to do with the file.
    // Note that different browsers will behave differently and you have no control over this.
    // We'll use different mime types to implement the different "Open" and "Save" behaviors.
    // "application/x-unknown" will be the MIME type used for the "Save" behavior.
    response.setContentType(mimeType);
    // We tell the browser how much data to expect.
    response.setContentLength(data.length);
    // Cross-browser hack for Firefox 1.0.7 and IE 6 compatibility.
    // IE 6 ignores the MIME type and decides based on the "attachment" or "inline"
    if (mimeType.equals("application/x-unknown")) {
    // Show the "Save As..." dialog
    response.setHeader( "Content-disposition", "attachment; filename=\"" + filename + "\"");
    } else {
    // attempt to "open" the file
    response.setHeader( "Content-disposition", "inline; filename=\"" + filename + "\"");
    // Now we start sending data with the response object.
    // You might consider using a buffer if your data comes from a large file
    // or a database.
    try {
    ServletOutputStream out;
    out = response.getOutputStream();
    out.write(data);
    } catch (IOException e) {
    e.printStackTrace();
    // Lastly and very importantly, we tell Java Server Faces that
    // the request has been handled and not to process it any more.
    faces.responseComplete();
    Now all we have to do is put this code somewhere.
    Step 1: Build the page UI.
    * Create a new page in Java Studio Creator. Let's call it �download.jsp�
    * Make it the start page (right-click)
    * Add a hyperlink component and call it �Open!�
    * If you like, add a static text that describes your file.
    Step 2: Tell Java Server Faces what to do when the hyperlink is clicked.
    * Doubleclick the hyperlink and add this code to it's action:
    public String hyperlink1_action() {
    // TODO: Replace with your code
    DownloadBean d = new DownloadBean();
    d.sendFile("text/plain");
    return null;
    * Compile the download.java and get a �cannot find symbol for class DownloadBean�. Now we have a place to put our code to send the file!
    Step 3: Build the DownloadBean that will serve the file.
    * Go to your "Source Packages" folder and create a new Java class in the project's package. Call this class �DownloadBean�.
    * Copy this code into the class:
    public void sendFile(String mimeType) {
    FacesContext faces = FacesContext.getCurrentInstance();
    HttpServletResponse response = (HttpServletResponse) faces.getExternalContext().getResponse();
    HttpServletRequest request = (HttpServletRequest) faces.getExternalContext().getRequest();
    byte[] data = getSomeData(request);
    String filename = "myFile.txt";
    // Note that different browsers will behave differently and you have no control over this.
    // We'll use different mime types to implement the different "Open" and "Save" behaviors.
    // "application/x-unknown" will be the MIME type used for the "Save" behavior.
    response.setContentType(mimeType);
    response.setContentLength(data.length);
    // Cross-browser hack for Firefox 1.0.7 and IE 6 compatibility.
    // IE 6 ignores the MIME type and decides based on the "attachment" or "inline"
    if (mimeType.equals("application/x-unknown")) {
    // Show the "Save As..." dialog
    response.setHeader( "Content-disposition", "attachment; filename=\"" + filename + "\"");
    } else {
    // attempt to "open" the file
    response.setHeader( "Content-disposition", "inline; filename=\"" + filename + "\"");
    // Now we start sending data with the response object.
    try {
    ServletOutputStream out;
    out = response.getOutputStream();
    out.write(data);
    } catch (IOException e) {
    e.printStackTrace();
    faces.responseComplete();
    * Hit Ctrl-Shift-F to make the code pretty.
    * Try and compile DownloadBean.java. Build->Compile
    * As expected, you will get a variety of �cannot find symbol� errors.
    * Hit Ctrl-Alt-F to clean these up, by automatically adding the proper imports.
    * Try and compile again and you will get a �cannot find symbol� error for the getSomeData() function. That's ok cause we didn't write it yet.
    * Copy this code into the DownloadBean class:
    public byte[] getSomeData(Object o) {
    // ignore the HttpServletRequest object and return some data.
    return "Hello World!".getBytes();
    * Compile the file one last time to get a clean compile.
    Why didn't we put this code directly in the hyperlink1_action() function? Because we are separating the �model� from the "view" and "controller". DownloadBean can be reused in any page of your application now.
    Step 4: Test
    1. Run the project and open the page in the Firefox web browser.
    2. Click the �Open It!� hyperlink
    3. A text file should appear in Firefox that says �Hello World!�
    Great! We sent the file, Firefox interpreted the �text/plain� MIME type, and presented the text as a browser page. This covers our �Open It!� functionality.
    To serve other kinds of files, pass a different MIME type in the sendFile() function.
    For a list of MIME types, check out http://www.webmaster-toolkit.com/mime-types.shtml
    Step 5: Save It! Functionality.
    What if we always want the file to be saved, no matter what foolishness the browser wants to do with the file?
    * Go back to the Design of download.jsp.
    * Add another hyperlink to the page, label it �Save It!�
    * Double click the hyperlink and JSC2 will take you to its action function.
    * Add this code to the function
    public String hyperlink2_action() {
    // TODO: Replace with your code
    DownloadBean d = new DownloadBean();
    d.sendFile("application/x-unknown");
    return null;
    Notice the difference in the MIME type? We changed �text/plain� to �application/x-unknown�. Notice also in the sendFile() function the cross-browser hack to get IE 6.0 to save or open the file.
    * Run the project one last time.
    * Test with Firefox
    * Test with Internet Explorer
    Done!

  • Question on EJB 2.1 using Netbeans 5.5 Beta 2. Cant understand error msg

    "IOP00100006: (BAD_PARAM) Class com.sun.ejb.containers.EJBLocalObjectInvocationHandler is not Serializable"
    org.omg.CORBA.BAD_PARAM:   vmcid: OMG  minor code: 6 completed: Maybe
            at com.sun.corba.ee.impl.logging.OMGSystemException.notSerializable(OMGSystemException.java:996)
            at com.sun.corba.ee.impl.logging.OMGSystemException.notSerializable(OMGSystemException.java:1011)
            at com.sun.corba.ee.impl.orbutil.ORBUtility.throwNotSerializableForCorba(ORBUtility.java:730)
            at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_abstract_interface(CDROutputStream_1_0.java:636)
            at com.sun.corba.ee.impl.encoding.CDROutputStream.write_abstract_interface(CDROutputStream.java:260)
            at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAbstractObject(Util.java:489)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:721)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:787)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:201)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:570)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:156)
            at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:224)
            at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:206)
            at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:146)
            at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:787)
            at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:836)
            at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:850)
            at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_abstract_interface(CDROutputStream_1_0.java:631)
            at com.sun.corba.ee.impl.encoding.CDROutputStream.write_abstract_interface(CDROutputStream.java:260)
            at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAbstractObject(Util.java:489)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectOverride(IIOPOutputStream.java:135)
            at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
            at java.util.ArrayList.writeObject(ArrayList.java:569)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.invokeObjectWriter(IIOPOutputStream.java:602)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:568)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:156)
            at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:224)
            at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:206)
            at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:146)
            at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:787)
            at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:836)
            at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:850)
            at com.sun.corba.ee.impl.encoding.CDROutputStream.write_value(CDROutputStream.java:243)
            at com.sun.corba.ee.impl.copyobject.ORBStreamObjectCopierImpl.copy(ORBStreamObjectCopierImpl.java:43)
            at com.sun.corba.ee.impl.copyobject.ORBStreamObjectCopierImpl.copy(ORBStreamObjectCopierImpl.java:32)
            at com.sun.corba.ee.impl.copyobject.FallbackObjectCopierImpl.copy(FallbackObjectCopierImpl.java:39)
            at com.sun.corba.ee.impl.copyobject.FallbackObjectCopierImpl.copy(FallbackObjectCopierImpl.java:30)
            at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.copyObject(Util.java:745)
            at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.copyResult(DynamicMethodMarshallerImpl.java:414)
            at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:202)
            at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:119)
            at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:197)
            at ejb._CustomerFacadeRemote_DynamicStub.getAllCustomers(_CustomerFacadeRemote_DynamicStub.java)
            at web.customerList.processRequest(customerList.java:39)
            at web.customerList.doGet(customerList.java:72)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
            at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
            at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
            at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
            at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
            at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    |#]
    java.rmi.MarshalException: CORBA BAD_PARAM 1330446342 Maybe; nested exception is:
            java.io.NotSerializableException:
            at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:257)
            at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.wrapException(Util.java:678)
            at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:218)
            at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:119)
            at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:197)
            at ejb._CustomerFacadeRemote_DynamicStub.getAllCustomers(_CustomerFacadeRemote_DynamicStub.java)
            at web.customerList.processRequest(customerList.java:39)
            at web.customerList.doGet(customerList.java:72)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
            at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
            at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
            at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
            at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
            at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    Caused by: java.io.NotSerializableException:
            at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:250)
            ... 33 more
    Caused by: org.omg.CORBA.BAD_PARAM:   vmcid: OMG  minor code: 6 completed: Maybe
            at com.sun.corba.ee.impl.logging.OMGSystemException.notSerializable(OMGSystemException.java:996)
            at com.sun.corba.ee.impl.logging.OMGSystemException.notSerializable(OMGSystemException.java:1011)
            at com.sun.corba.ee.impl.orbutil.ORBUtility.throwNotSerializableForCorba(ORBUtility.java:730)
            at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_abstract_interface(CDROutputStream_1_0.java:636)
            at com.sun.corba.ee.impl.encoding.CDROutputStream.write_abstract_interface(CDROutputStream.java:260)
            at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAbstractObject(Util.java:489)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:721)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:787)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:201)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:570)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:156)
            at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:224)
            at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:206)
            at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:146)
            at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:787)
            at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:836)
            at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:850)
            at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_abstract_interface(CDROutputStream_1_0.java:631)
            at com.sun.corba.ee.impl.encoding.CDROutputStream.write_abstract_interface(CDROutputStream.java:260)
            at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAbstractObject(Util.java:489)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectOverride(IIOPOutputStream.java:135)
            at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
            at java.util.ArrayList.writeObject(ArrayList.java:569)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.invokeObjectWriter(IIOPOutputStream.java:602)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:568)
            at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:156)
            at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:224)
            at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:206)
            at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:146)
            at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:787)
            at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:836)
            at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:850)
            at com.sun.corba.ee.impl.encoding.CDROutputStream.write_value(CDROutputStream.java:243)
            at com.sun.corba.ee.impl.copyobject.ORBStreamObjectCopierImpl.copy(ORBStreamObjectCopierImpl.java:43)
            at com.sun.corba.ee.impl.copyobject.ORBStreamObjectCopierImpl.copy(ORBStreamObjectCopierImpl.java:32)
            at com.sun.corba.ee.impl.copyobject.FallbackObjectCopierImpl.copy(FallbackObjectCopierImpl.java:39)
            at com.sun.corba.ee.impl.copyobject.FallbackObjectCopierImpl.copy(FallbackObjectCopierImpl.java:30)
            at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.copyObject(Util.java:745)
            at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.copyResult(DynamicMethodMarshallerImpl.java:414)
            at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:202)
            ... 31 moreTo start off, that is my error. I am following this http://www.netbeans.org/kb/50/quickstart-j2ee.html article and so far I can get the entire code working. Netbeans truly makes it easy!
    Now I decided to expand on the example and so I used a caching service locator and added one more finder method to the Customer entity bean (CMP). It is a findAllCustomers method that returns a collection and the EJB QL I entered was as follows:
    SELECT OBJECT(o) FROM Customer oI correspondingly added another business method to the session facade bean and I wrote a servlet that calls upon the caching service locator class and gets a reference to the session facade bean and calls the findAllCustomer method and gets back a List of all Customers. Then it takes the List, sticks it into the HttpServletRequest object and calls sendredirect to a JSP that is the view.
    The JSP is straightforward in that I have a foreach jstl tag that is going to display the customers in a table format. So when I run the code the way it is, what happens when I access that servlet is that the it gets rerouted to the jsp page, but the table does not get displayed...but the above error gets posted in the Netbeans SJSAS console. I have never encountered that kind of error before so i am a bit stumped and don't know how to go about decoding that stacktrace.
    Any pointers or suggestions or solutions (much prefer this one) would be great!
    Thanks a lot. Sorry for the rather long post. If needed I can package up the entire project and send it to you.
    Cheers,
    Surya

    It sounds like you're attempting to pass Local EJB objects over a Remote interface, which is not permitted. EJBLocalObjects can not be passed outside the ejb tier. You'll need to either pull their data out into data access object classes (basically structs) or return EJBObjects.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for

  • Java file not included .

    I have: import org.eclipse.swt.widgets.Shell;in my program. But this is showing a 'cannot resolve' error. I found that this file was actually in a winzip extractor,so I extracted it in the workspace folder .But it is still not accessible. I cannot fi

  • High CPU usage and continuously running fan

    I recently sent off a logicboard to be repaired for a non-charging issue.  Everything worked fine with the exception of the battery would not charge.  I received the board back today and noticed immediately that the fan starts running at high speed w

  • Identify the Source System in CRM BADI

    Hi, I need to write the code in ORDER_SAVE BADI in CRM based on the source system. For example, When i create the quotation in PCUI i need to validate few fields. Suppose i have created quotaton in R/3 and it gets transfer to CRM and i need validate

  • What order are Nodes Syncronized in within the same NodeCollection?

    Basically is there a guarantee of synchronization order within a NodeCollection? I assume that there is and that it is based off the order in which the nodes were created. For instance in the SimpleChatModel the Node creation order is: HISTORY_NODE_E

  • Total in 3i Viewer

    Hi!, In My workbook i have defined totals on columns. They appear properly in the workbooks when viewed from the user edition, but when viewed from Viewer 3i, totals are not appearing. In preferences the attributes of total are set as default. Can an