New session creation in struts Application

I succeed to access my J2EE struts application from the Portal (using the intigrator)
The problem is that I create a new HttpSession in the first action called by the portal url by:
session = pRequest.getSession(true);
I set attributes into this session.
When I navigate to the next page (using struts actions)
and try to get this same session -
pRequest.getSession(false)
I see that the ID of the session has changed from the first one and it containes none of the attributes I set.
Does this have to do with IViews in any way ?

Hi Gidi,
I am not sure about your qn. but try this link it will give u some idea about getting J2EE application in a portal component.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/ep/g-i/how to access an ejb from a portal component.mht
Regards
gEorgE

Similar Messages

  • SSLException: New session creation is disabled

    Hi All,
    I am writting a javaclient to talk to my back-end SSL IBMHTTP server.
    With my codeing, I can successfully go through the handshake part, and also get the inputStream, outputStream, and even try to print sth out through the outputstrem without any exception.
    However, when I tried to read from the inputStrem with command in.readLine, it gaves the following exception (at the bottom)
    Does anyone have any idea??
    (My big devil boss is grabbing my neck now... )
    javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: New session creation is disabled
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.d(DashoA12275)
    at com.sun.net.ssl.internal.ssl.AppInputStream.read(DashoA12275)
    at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:408)
    at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:450)
    at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:182)
    at java.io.InputStreamReader.read(InputStreamReader.java:167)
    at java.io.BufferedReader.fill(BufferedReader.java:136)
    at java.io.BufferedReader.readLine(BufferedReader.java:299)
    at java.io.BufferedReader.readLine(BufferedReader.java:362)

    i happened to call createSocket twice... fixed now, thanks

  • New session creation

    I have a servlet filter that checks the session for every incoming request.
    The session validation is done for every request except the login request. If a request with a new session, which is not a login request is sent, then unauthorised user is sent in the response.
    If the http request for login is sent in the form of : http://ipaddress:portnumber/myApp/login.do, and after successful login, if the subsequent requests are sent in the form of
    http://mymachinename.domain.com/myApp/processotherrequests.do (since Apache server is configured on my machine), then these requests are treated as new sessions and hence unauthorised user response is sent back.
    what could be the problem?

    The session is maintained as a cookie on the browser with the name JSESSIONID. The browser only sends cookies back to the domain that set the cookie. The browser does not know that the ipaddress and the domain name are the same so does not send the cookie.
    As an example the ip address 127.0.0.1 is equivalent to the domain name 'localhost' but the browser does not know this so a cookie created for 127.0.0.1 will not be send to in a call to 'localhost'

  • Create a new session bean in a Composite Application DC.

    Hi,
    I need to create a new Stateless Session Bean in our Composite Application DC which already has some Application services and we need to use these services in the new session bean.
    Another requirement is that we need to provide a custom JNDI Name for this Session Bean.
    The problem here is that I am not able to see the new session bean in the JNDI browser.
    I have tried to provide a JNDI name for the new EJB by adding the <jndi-name> to the ejb-j2ee-engine.xml file in the ejbmodule dc.
    Can anyone please provide a resolution for this problem ASAP as I am now stuck up and not able to proceed with my development.
    I am working on CE 7.1 SP6 and NWDS 7.1 CE SP 6.
    Regards,
    Manish

    Hi Snehal.
    Thanks for your reply!
    I need to use this EJB in a seperate Composite DC at runtime and that s why I need a custom JNDI name as there can be any no of implementations for the interface implemented by these EJB's but at runtime we need to pick up a specific implementation for which a Custom JNDI name is alloted.
    Can you please provide the steps for including the JNDI name in "ejb-j2ee-engine.xml" as whenever I try to create an entry in the file and deploy the same, its not visible in the JNDI browser.
    Please reply ASAP.
    Regards,
    Manish

  • Asynchronous SUBMIT or CALL WITH creation of NEW SESSION

    I'm doing monotonous comparisons between systems, but I do need to see the SAP standard comparison for each. So I have an ALV list that I'd like to double click a line entry that will spawn 3 NEW SESSIONS and I'll automatically populate the parameters.
    So, has anyone been able to SUBMIT or CALL WITH THE KEY BEING THAT IT MUST CREATE 3 NEW ASYNCHRONOUS SESSIONS. I'd be grateful if you'd share your experience in this regard. Thank you, Adrian

    Hi,
    You can try in this way.
    Create a new FM and place your code there. Call this FM using addition STARTING NEW TASK. It should work fine.
    Check out F1 help on CALL FUNCTION for more details and additions.
    Thanks,
    Vinod.

  • Struts application using wsad 5.0 - unable to Run on server

    Hi,
    I m developing a small struts application using WSAD 5.0.
    Here is the code
    index.jsp
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <HTML>
    <HEAD>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ page
    language="java"
    contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"
    %>
    <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <META name="GENERATOR" content="IBM WebSphere Studio">
    <META http-equiv="Content-Style-Type" content="text/css">
    <LINK href="theme/Master.css" rel="stylesheet" type="text/css">
    <TITLE>ABC, Inc. Human Resources Portal</TITLE>
    </HEAD>
    <BODY background="F1_100.gif">
    <font size="+1">ABC, Inc. Human Resources Portal </font>
    </br>
    <hr width="100%" noshade="true">
    &#149;Add an Employee
    <br>
    &#149;
    <html:link forward="search">Search for Employees</html:link>
    <br>
    </BODY>
    </HTML>
    search.jsp
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <html>
    <head>
    <title> ABC, Inc. Human Resources Portal - Employee Search</title>
    </head>
    <body>
    <font size="+1">
    ABC, Inc. Human Resources Portal - Employee Search
    </font><br>
    <hr width="100%" noshade="true">
    <html:errors/>
    <html:form action="/search">
    <table>
    <tr>
    <td align="right"><bean:message key="label.search.name"/></td>
    <td><html:text property="name"/></td>
    </tr>
    <tr>
    <td></td>
    <td>-- or --</td>
    </tr>
    <tr>
    <td align="right"><bean:message key="label.search.ssnum"/></td>
    <td><html:text property="ssnum"/>(xxx-xx-xxxx)</td>
    </tr>
    <tr>
    <td></td>
    <td><html:submit/></td>
    </tr>
    </table>
    </html:form>
    <logic:present name="searchForm" property="results">
    <hr width="100%" size="1" noshade="true">
    <bean:size id="size" name="searchForm" property="results"/>
    <logic:equal name="size" value="0">
    <center><font color="red"><b>No Employees Found</b></font></center>
    </logic:equal>
    <logic:greaterThan name="size" value="0">
    <table border="1">
    <tr>
    <th>Name</th>
    <th>Social Security Number</th>
    </tr>
    <logic:iterate id="result" name="searchForm" property="results">
    <tr>
    <td><bean:write name="result" property="name"/></td>
    <td><bean:write name="result" property="ssNum"/></td>
    </tr>
    </logic:iterate>
    </table>
    </logic:greaterThan>
    </logic:present>
    </body>
    </html>
    searchForm.java
    package minihr.forms;
    import java.util.List;
    import javax.servlet.http.HttpServletRequest;
    import org.apache.struts.action.ActionError;
    import org.apache.struts.action.ActionErrors;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionMapping;
    * Form bean for a Struts application.
    * Users may access 3 fields on this form:
    * <ul>
    * <li>name - [your comment here]
    * <li>ssNum - [your comment here]
    * </ul>
    * @version      1.0
    * @author
    public class SearchForm extends ActionForm {
         private String name = null;
         private String ssNum = null;
        private List results = null;
          * Get Name
          * @return String
         public String getName() {
              return name;
          * Set Name
          * @param <code>String</code>
         public void setName(String name) {
              this.name = name;
          * Get SsNum
          * @return String
         public String getSsNum() {
              return ssNum;
          * Set SsNum
          * @param <code>String</code>
         public void setSsNum(String ssNum) {
              this.ssNum = ssNum;
          * Set Results
         public void setResults(List results){
              this.results=results;
          * get Results
         public List getResults(){
              return results;
         * Constructor
         public SearchForm() {}
         public void reset(ActionMapping mapping, HttpServletRequest request) {
              // Reset values are provided as samples only. Change as appropriate.
              name = null;
              ssNum = null;
              results = null;
         //validate form data.
         public ActionErrors validate(
              ActionMapping mapping,
              HttpServletRequest request) {
              ActionErrors errors = new ActionErrors();
              // Validate the fields in your form, adding
              // adding each error to this.errors as found, e.g.
              // if ((field == null) || (field.length() == 0)) {
              //   errors.add("field", new ActionError("error.field.required"));
              boolean nameEntered = false;
              boolean ssNumEntered = false;
              //Determine if name has been entered.
              if(name != null && name.length() > 0){
                   nameEntered = true;
              //Determine if social security number has been entered
              if(ssNum != null && ssNum.length() > 0){
                   ssNumEntered = true;
              /* validate that either name or ssnum has
               * been entered */
               if(!nameEntered && !ssNumEntered){
                    errors.add(null,new ActionError("error.search.criteria.missing"));
               /* validate format of ssnum if it has been entered */
               if(ssNumEntered && !isValidSsNum(ssNum.trim())){
                    errors.add("ssNum",
                       new ActionError("error.search.ssNum.invalid"));
              return errors;
         //validate format of social security number
         private static boolean isValidSsNum(String ssNum){
              if(ssNum.length() < 11){
                   return false;
              for(int i=0;i<11;i++){
                   if(i==3 || i==6){
                        if(ssNum.charAt(i) != '-'){
                             return false;
                   }else if("0123456789".indexOf(ssNum.charAt(i)) == -1){
                        return false;
              return true;
    searchAction.java
    package minihr.actions;
    import java.util.ArrayList;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import minihr.forms.SearchForm;
    import common.EmployeeSearchService;
    * @version      1.0
    * @author
    public class SearchAction extends Action {
         * Constructor
         public SearchAction() {}
         public ActionForward perform(
              ActionMapping mapping,
              ActionForm form,
              HttpServletRequest request,
              HttpServletResponse response)
              throws Exception {
              EmployeeSearchService service = new EmployeeSearchService();
              ArrayList results;
              SearchForm searchForm = (SearchForm) form;
              //perform employee search based on what criteria was entered
              String name = searchForm.getName();
              if(name != null && name.trim().length() > 0)
                results = service.searchByName(name);
              else
                   results = service.searchBySsNum(searchForm.getSsNum().trim());
              //place search results in searchform for access by JSP.
              searchForm.setResults(results);
              //forward control to this actions input page
              return mapping.getInputForward();
    EmployeeSearchService.java
    package common;
    import java.util.ArrayList;
    import common.Employee;
    * @author Niharika
    * To change this generated comment edit the template variable "typecomment":
    * Window>Preferences>Java>Templates.
    * To enable and disable the creation of type comments go to
    * Window>Preferences>Java>Code Generation.
    public class EmployeeSearchService {
         private static Employee[] employees =
              new Employee("samuel","123-45-6789"),
              new Employee("Robert","234-56-7890"),
              new Employee("smith","345-67-8901"),
              new Employee("Frank","456-78-9012")
         // search for employees by name
         public ArrayList searchByName(String name){
              ArrayList resultList = new ArrayList();
              for(int i=0; i<employees.length; i++)
                   if(employees.getName().toUpperCase().indexOf(name.toUpperCase()) != -1)
                        resultList.add(employees[i]);
              return resultList;
    // search for employee by social security number
    public ArrayList searchBySsNum(String ssNum){
         ArrayList resultList = new ArrayList();
         for(int i=0;     i<employees.length; i++)
              if(int i=0; i<employees.length; i++)
                   if(employee[i].getSsNum().equals(ssNum))
                        resultList.add(employees[i]);
              return resultList;
    Employee.java
    package common;
    * @author Niharika
    * To change this generated comment edit the template variable "typecomment":
    * Window>Preferences>Java>Templates.
    * To enable and disable the creation of type comments go to
    * Window>Preferences>Java>Code Generation.
    public class Employee {
    private String name;
    private String ssNum;
    public Employee(String name,String ssNum)
         this.name=name;
         this.ssNum=ssNum;
    public void setName(String name)
         this.name=name;
    public String getName()
         return name;
    ApplicationResources.properties
    # Label Resources
    label.search.name=Name
    label.search.ssNum=Social Security Number
    # Error Resources
    error.search.criteria.missing=<li>Search Criteria Missing</li>
    error.search.ssNum.invalid=<li>Invalid Social Security Number</li>
    errors.header=<font color="red"><b>Validation Errors </b></font><ul>
    errors.footer=</ul><hr width="100%" size="1" noshade="true">
    In searchAction.java
    it is showing 2 errors
    public ActionForward perform(
              ActionMapping mapping,
              ActionForm form,
              HttpServletRequest request,
              HttpServletResponse response)
              throws Exception {
    error is: Exception Exception is not compatible with throws clause in
    org.apache.struts.action.Action.Perform()
    Another error is shown at :
    return mapping.getInputForward();
    error is:
    method is undefined for typt org.apache.struts.action.ActionMapping
    please give me a solution for this watching the code
    i have opened the server perspective and started the server.
    next i am clicking run on server. There i am getting an error like this:
    Error Received while starting the server
    Reason:
    Launching the server failed:
    server port 9080 is in use.
    ORB bootstrap port 2809 is in use.
    SOAP connector port 8880 is in use.
    change each used port number to another unused port on the ports page of the server configuration editor. In case u have another websphere server running , you can try to increase each used port number by one and try again.please solve this problem

    Nothing at all to do with struts.
    Some of the ports that WSAD wants to use are already in use.
    Maybe you have a copy of websphere running already?
    If so stop that one, and try running again.

  • Each request gets a new session problem

    I have a standalone oc4j and I have deployed an application that uses Dynamic JDBC Credentials as described in ½How To Support Dynamic JDBC Credentials½. The application works fine when oc4j runs on every computer except one (the one it should be on). Every time an action is supposed to execute (after the user has logged in) the method createSessionCookie in MySessionCookieFactory gets executed. Although it is the same user and it should be the same session. My guess is that a new application module or a new session is started for some reason. What could the reason be?

    Hi,
    What version of JDeveloper are you using? If you have used 10g to develop an ADF/Struts application then you will need to reference the updated dynamic JDBC credentials HOWTO for this type of application.
    Please note that the new version of the HOWTO only applies to ADF applications developed in 10g -- the older version will still work for 9.x applications that have been migrated to 10g.
    The issue with the 9.x version is that it does not get in front of the ADFm/BC4J bootstrap that is now being performed by an ADF servlet filter.
    The new version is expected on OTN in the next week or so.
    I do not know why a new session is required for each request. Have you disabled session tracking for this servlet container?
    Hope this helps,
    JR

  • Httprequest.getSession(false) creating a NEW Session

    I am working on a web application which uses STRUTS. All the client requests are directed to loginaction class.
    Any resource in the application, is accessed thru the action class.
    Overview: In the action class, i am checking if there is any session associated with the new user using
    session = request.getSession(false);
                      if (session != null) {
          if (session.isNew()) {
          logger.info("New Session Created [" + session.getId() + "]");
          } else {
          logger.info("Session EXIST'S ["+ session.getId()
         + "], Retreiving user from session");
                       }According to the Servlets 2.2 API:
    public HttpSession getSession(boolean create) Returns the current HttpSession associated with this request or, if if there is no current session and create is true, returns a new session.
    If create is false and the request has no valid HttpSession, this method returns null.
    if (session.isNew()) ,
    this if statement should return false and be skipped, as session = request.getSession(false);wont create a new session. When i parse the logs, I see the log statement, "New Session Created ". Which makes me wonder, that a new session is being created
    Problem: When i debug, i see that container is creating a new session if the session doesnt exist. According to API mentioned above, it should not create a new session. It should return null.
    Did anyone had a similar issue? While researching i found this article that using struts, the container creates a default session.
    I found this article: http://www.theserverside.com/discussions/thread.tss?thread_id=21643
    Environment: IDE:WSAD5.1, Appserver:Websphere, Browser:IE 6.0, Struts, JSP, JSTL

    Hi,
    We have two appliactions. Our application say B is uses authentication mechanism provided by say A.
    So the user, is presented a login page by application A. Once they are authenticated, without the knowledge of user, its being forwarded to our application say B.
    Once he is in our application, he can navigate in our application, say,
    he goes from page1 to page2. page1 is the main page. Now browser caching is enabled. When he hits the back button to access page1, browser is sending a new request to our applicaiton insted of furnising form local cache( this is another issue). Even though a new request is sent, all the requests are routed thru a struts controller action class. Now in the action class, we check if its a new session or not.
    request.getSession(false). Since the user is an old user, it shouldnt create any new session.
    As per your suggestion, where should i put the directive in the jsp to not to create a default session?. In page1 which is the main page?.
    How should i implemnt the session listener interface. Do u have any templates or code snippets?.
    Any suggestions?

  • New session in JSP?

    I'm currently working in a project that's basically a search-engine. The
              application is running on BEA's WebLogic server and the logic is placed in
              JavaBeans and EnterpriseJavaBeans. The JavaBeans that I access from my
              JSP-pages has the scope set to 'session'.
              As long as every user runs the application in different webbrowsers
              everything is fine, but if I open a second window (pressing Ctrl+N in IE) it
              seems like I'm stuck in the same session which means that I've got two
              references to the same object of my JavaBean.
              The outcome is that I either get the same result from two different querys,
              or that my application crashes. The server executes the querys in different
              threads, but since the EJB that holds the result is a stateful sessionbean
              the result is dependet on the last query.
              Are there any way of detecting that a request is made from a new window in
              the same browser (http-headers?), and creating a new session? Are there any
              way at all to force a client into a new session?
              /Johan
              

              "Johan Kindgren" <[email protected]> wrote in message
              news:[email protected]...
              > The database that we searching in contains about one million rows in
              several
              > tables, and the design-specification we've got demands that 90% of the
              > querys should return a result within three seconds, from anywhere in the
              > world.
              > Our idea to solve this is to divide the application into three layers,
              where
              > the first one is the JSP and JavaBeans. The middle layer is our stateful
              > sessionbean and the last is an stateless entitybean that executes the
              > querys to the database. When a query is made, the entitybean returns an
              > array of id's to the stateful sessionbean that match the query, and
              > sessionbean then retreives details from the database in batches of 15
              > records.
              > With this design it takes less than half a second to retreive the next
              batch
              > by making a query from id's, instead of making a query from a name (which
              in
              > worst case can take up to a minute right now, we have not optimized the
              > database yet).
              >
              > The JavaBean that I use in the JSP-pages creates a connection to the
              > sessionbean, and this connection is kept throughout the session.
              To fix your initial problem, you should assoicate your stateful session
              beans with a HTTP request rather than a HTTP session. This will get around
              your current problems (crashes & synchronisation). Or a more complex
              approach could be to remove the EJB from the HTTP session before you use it
              (so that no other request can use it at the same time).
              Browsers can and will make multiple concurrent requests with what appears to
              be (from the Servlet engines perspective) the same HTTP session - so don't
              associate a stateful session bean with a HTTP session. Associate it with a
              request instead. (In fact this is true of any EJB).
              >
              > If I understand your suggestion correct, we would have to skip the middle
              > layer. I suspect that we would have significant loss of performance in
              that
              > case. Are there any way to work around this? Any ideas in another design
              > that would eliminate this problem?
              Layering is often useful. The trick is to layer things correctly. I don't
              really have the bandwidth to understand your use cases correctly to
              formulate the correct architecture to follow. I'll give you a brief 30,000
              foot view of how I tend to do things...
              Briefly, I've never been terribly convinced of the value of entity beans at
              all. I personally think they are a bit of a mistake because they are remote.
              I far prefer the JDO idea which will hopefully replace entity beans one
              day.(http://access1.sun.com/jdo/) Generally the current thinking is that
              whether you use JDBC, JDO or Entity Beans - they should be wrapped inside
              session beans anyway. So from your layering perspective, entity beans are
              implementation detail inside the session beans layer.
              Mostly the client side wants go get 'data objects' back from queries which
              can then be used to do other navigations / queries / operations. It also
              helps to have client side helper beans to abstract the complications of
              using session beans (handling lookups, pooling, timeouts etc.).
              So the layers I prefer to focus on are
              Server side: Session beans - implementation I don't care - maybe internally
              using entity beans or JDBC or JDO. These should be stateless wherever
              possible. Should return Java beans to clients.
              Client side: Java beans - wrap use of session beans
              (timeout/pooling/creation stuff and sesion bean API). These client side Java
              beans often pass client side state (e.g. user id) into sesssion bean methods
              to allow the session beans to be stateless. Usually the client side will
              include Servlets, JSP, custom JSP tags here too.
              The Session beans on the server side may be split into the main stateless
              session beans that do most of the work with some small stateful session
              beans for doing things like query paging etc - though I've often found its
              easy to do this in stateless beans with a clever caching model.
              > The application will serve about 30 concurrent users, but there are a tota
              l
              > of 400 users.
              Though the same user may use multiple web browser windows on a desktop, so 1
              real user can become several concurrent users.
              J.
              James Strachan
              =============
              email: [email protected]
              web: http://www.metastuff.com
              

  • How to do Pagination in struts application????

    My struts application lists the records from database using iterator.
    I use ArrayList in Action class and i access the list in JSP through by setting request variable in action class.But if i have 10 fields which are multi line format such as address.I need to restrict records 4 per page.how to do that??
    I am stuck in pagination of struts.

    Use dispatch action.Here i am displaying only 2 records per page because my appln required 10 fields you can extend it to any count.You can use this..
    public class FeedListAction extends DispatchAction {
         public ActionForward list(ActionMapping mapping,
                                    ActionForm form,
                                    HttpServletRequest request,
                                    HttpServletResponse response)
                 throws IOException {
              //List method is called first when we want to list our records.
                                      FeedForm frm = (FeedForm)form;
                                      ArrayList feedlist = new ArrayList();
              //session is used to know where are we..
                                      HttpSession ses = request.getSession(true);
              // two parameters which will be used to limit the records for perticular page.
                                      String s = "0";
                                      String e ="2";
              //call the method which will be used to display the records..
                                      feedlist = frm.getEmployees(Integer.parseInt(s),Integer.parseInt(e));
              //set the list so that jsp page will use to display it.
                                      request.setAttribute("list", feedlist);
              // set the attributes so that they are used while navigation and
              // these attributes wiil be used by the  other methods of Dispatch action.
                                      ses.setAttribute("s", s);
                                      ses.setAttribute("e", e);
              //Find the success page.
                                      return mapping.findForward(success);
              //end of List method
         public ActionForward next(ActionMapping mapping,
                                    ActionForm form,
                                    HttpServletRequest request,
                                    HttpServletResponse response)
                  throws IOException {
                                      //here add code for session.          
                                    int en =0;
                                    int st=0;
                                    st = Integer.valueOf( s ).intValue();
                                      en = Integer.valueOf( e ).intValue();
    // to know whether next has exceeded the recordset limit we need to take number of rows
    // which can accessed through nrows function.
                                      int nrows = frm.rows();
                                      if(st==(nrows-2)){
                                           st = nrows-2;
                                      }else{
                           st=st+2;en=2;                                      
      //go for setting values in your module (which will interact with dadtabase to fetch records).                                           ses.setAttribute("s",Integer.toString(st));
    //then set session attribute.                                  
                                      return mapping.findForward(success);
           //end of next method.     
         }

  • Error in Struts Application, Form Submit

    I've developed a simple struts application which allows user to key in inputs thru a form(registration.jsp), submit n display e inputs keyed in in another page(details.jsp).
    i'd succesfully integrate e pdk-struts application to portal, but wen i click on 'Submit', my action r not performed, not directed to my details.jsp, neither do it shows any error.
    However, one thing i realised is tat wen integrated to portal, e codes for my action r changed:
    registration.jsp
    <html:form action="/register" focus="name">
    after integrated wit Portal, it was translated to:
    <form name="registerForm" method="post" action="http://smeagel:7778/portal/page">
    <INPUT TYPE="hidden" name="_pageid" value="6,3,6_22" />
    <INPUT TYPE="hidden" name="_dad" value="portal" />
    <INPUT TYPE="hidden" name="_schema" value="PORTAL" />
    <INPUT TYPE="hidden" name="_piref6_108279_6_3_22.strutsAction" value="register.do" />
    After Submit button was clicked, i was directed to a new URL, http://smeagel:7778/portal/page
    Any solutions??

    provider.xml
    <?xml version = '1.0' encoding = 'UTF-8' standalone='yes'?>
    <?providerDefinition version="3.1"?>
    <provider class="oracle.portal.provider.v2.DefaultProviderDefinition">
    <session>true</session>
    <passAllUrlParams>true</passAllUrlParams>
    <portlet class="oracle.portal.provider.v2.DefaultPortletDefinition">
    <id>1</id>
    <name>MyPortlet</name>
    <title>- Registration Form -</title>
    <description>My Portlet Description</description>
    <timeout>40</timeout>
    <showEditToPublic>false</showEditToPublic>
    <hasAbout>false</hasAbout>
    <showEdit>false</showEdit>
    <hasHelp>false</hasHelp>
    <showEditDefault>false</showEditDefault>
    <showDetails>false</showDetails>
    <inputParameter class="oracle.portal.provider.v2.DefaultParameterDefinition">
    <name>MyParam</name>
    <displayName>My Portlet Parameter</displayName>
    </inputParameter>
    <renderer class="oracle.portal.provider.v2.render.RenderManager">
    <renderContainer>true</renderContainer>
    <renderCustomize>true</renderCustomize>
    <autoRedirect>true</autoRedirect>
    <contentType>text/html</contentType>
    <showPage>/registration.jsp</showPage>
    <showPage class="oracle.portal.provider.v2.render.http.StrutsRenderer">/register.do</showPage>
    </renderer>
    </portlet>
    </provider>
    I'd saw some example, which using <defaultAction>, however, wen i put in <defaultAction>/register.do</defaultAction>
    i'll have error in my Provider Test Page. Validation Unsuccessful.
    Error: Class oracle.portal.provider.v2.render.http.StrutsRenderer has no set or add method for tag "defaultAction"
    Is <defaultAction> a necessary tag? Is tat e reason y my application isnt running?

  • NEW SESSION - Firefox, IE and GLASSFISH

    Hi all,
    Here is my issue:
    I have One application on Glassfish using EJB3,JPA and JSF.
    Users can log to this application and have severals sessions opened simultanoulsy as each session is having a connection to its own database
    How do I force a new session (particularly in Firefox as IE<=8 has no issue) and have the user using the same application but different databases in different tabs or windows of Firefox.
    I tried almost all and get blocked
    Many thanks in advance for your answers
    Nicog

    Hi BalusC
    Great Blog by the way...
    Let me explain.
    My architecture is as follows: using JSF, Glassfish and ...SQL Server!! (! i know but this is mandatory requirement as our application is full web version of an existing ERP application already sold and installed by more than 1000 of our customers...
    I am using
    JSF-->JSF Managed Bean (Session for some and Request for almost all when logged )-->EJB Interface-->EJB Impl-->Entity-->Database
    I have a persistence Unit (using JTA and CMP) per database , each using a connection pool managed by Glassfish.
    At the begining of my application, the user (when logging), choose a database, ...enter logging info and connect.
    All databases have the schema but not the same data
    You have to see in our case, a database as a company with particular configuration, customers, orders, invoices, contacts....
    Our application is ERP that our customers uses to managed several companies simultanously .
    Also, I need Session Scope as there is configuration data that I need to keep over all pages.
    This configuration data is depending on the database connected to.
    When selecting the database (company) for combo in logging form, The only way I found is fisrt to check is database(company) exists and can be connect to using at first begining Persistence.CreateEntityMangerFactory.. (i know that this is not J2EE and CMP but merly used in Java SE environments..).
    This step is only used for checking database
    Then, if creation did not generate a Persistence Exception , I can the use CMP and an EnityManger in EJB by JNDI lookup (as DI is not possible because you need constant in unitName)
    ex :
    @PersistenceContexts({
       @PersistenceContext(name="pu/SOCIETE1", unitName="SOCIETE1"),
       @PersistenceContext(name="pu/SOCIETE2", unitName="SOCIETE2"),
       @PersistenceContext(name="pu/SOCIETE3", unitName="SOCIETE3"),
       @PersistenceContext(name="pu/SOCIETE4", unitName="SOCIETE4"),
       @PersistenceContext(name="pu/SOCIETE5", unitName="SOCIETE5"),
       @PersistenceContext(name="pu/GENESYS_EXEMPLE", unitName="GENESYS_EXEMPLE")
    @Stateless
    public class SomeEJB extends CommonEjbImpl implements SomeEJBLocal  {
        private EntityManager em;
        @PostConstruct
        public void init() {
             String puName = (String) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("database"));
             em = (EntityManager) new InitialContext().lookup("java:comp/env/pu/"+puName);
        @PreDestroy
        public void cleanup() {
            if (em != null && em.isOpen()) {
                em.close();
    }All works perfectly under IE6,IE7 and IE8 (forcing some parameter at launch of IE8).
    But due to session management of Firefox (sharing session cookie among all exe or tabs)...session data is kept when opening a new tab.
    What I did to avoid confilcts, is to clear FacesContext SessionMap when redirecting to Login page ...but i still can NOT log to multiple PU simultanously....
    I do not see where DAO pattern could help me ...
    Am I missing something here?
    Many thanks in advance for your quick answer
    Regards,
    Nicog

  • PDK portlet. New session being created.

    Hi,
    I have an existing struts/BC4J based application which runs fine
    local as webapplication. After portletizing it with PDK and deploying
    it to portal for some strange reason a new http session is created a few
    steps into the application resulting in losing the existing session data.
    I thought of switching to using portlet provider session but this is just
    stored in the http session object.
    Anybody experienced this problem as well ?.
    Thanks,
    Kenneth

    Hi Natalie,
    I'm more maintaining/finishing an existing application. So I didn't develop it initially.
    The version or oracle portal we're using is 9.0.4.1.0. As for portletizing a struts application, oracle pdk has been used. Instructions for portletizing a web app can be found in "Oracle Application Server Portal Handbook". Further you have to replace struts-html:form tags in your JSPs with pdk-struts-html:form tags.
    Some tips can be found here.
    http://www.it-eye.nl/weblog/2005/07/13/easy-publishing-of-a-struts-application-as-a-portlet-in-oracle-portal/
    As for losing session I post to a servlet from struts/jsp page which writes pdf to the output stream Running in local container it works fine. However when running in portal I lose the session before hitting the servlet. I notice at various other times that session is lost for no apparant reason.
    HTH
    Kenneth

  • ADFDi Excel upload failed in a new session

    ADFDi Excel upload failed when a change was made in a locally saved ADFDi Excel file.  This should be a very common disconnected scenario.  I must miss something.  Here are high-level steps that I have done.
    1. Open a ADFDi Excel from a ADF page.
    2. Download data to Excel
    3. Modify a row in ADF table component in the Excel, then save the Excel file locally.  (If I clicked the 'Save' button instead of saving the file locally, the change was uploaded to the server correctly).
    4. Open the locally saved Excel, and accept the option to connect to the server and login.  A new session should be created in the ADF web application.
    5. Click 'No' in the popup window of "Do you want to discard the pending change?"
    6. The 'changed' indicator is shown on the changed row in the Excel.  Click 'Save' button, which has two actions - Upsync and ADFTable.upload
    7. On the server, a 'Row not found' exception is thrown from DCJboDataControl.setCurrentRowInRSI().  In this method, it tries to find the row in the ViewObject instance using the uploaded row's key.  The code is rsi.findByKey(key, 1).  I checked the value of key.  It looks correct. But no row is return from findByKey() call.  Then 'No row found' exception is thrown.
    My JDev version 11.1.1.7
    Greatly appreciate any suggestion on what could be wrong?

    HI
    I am facing the same issue. Are you able to resolve this issue or any solution around ?
    Thanks

  • New session rejected due to memory bottleneck in testing proxy2proxy

    Hi all!
    i am testing abap proxy2proxy on the client 105 in help varient 5 of simple use cases docu.
    even though i got sending successful from SXIPATT1 on the client 105, i got the following error.
    my server has RAM 2GB and have four client(100,105,106,107), and only i use for testing, NOT another person, so i do not think memory bottleneck issue.
    checked list.
    1. SXMB_MONI,  i could see inbound message(SENDER) <b>only.</b>
       from 105 to XI, no problem I thought, but very strange there, becasue there is only inbound message(sender).
    2. status flag on sxmb_moni
       Message Recorded (Commit follows) (TO BE DELIVERED)
    does anyone experience such issue?
    do i have to up physical memory?
    Error when processing your request
    What has happened?
    The URL http://sapxi.hh.net:8000/sap/bc/gui/sap/its/webgui/! was not called due to an error.
    Note
    The following error text was processed in the system XID : <b>New session rejected due to memory bottleneck</b>
    The error occurred on the application server SAPXI_XID_00 and in the work process 0 .
    The termination type was: ABORT_MESSAGE_STATE
    The ABAP call stack was:
    Function: ICF_ATTACH_ITS_PLUGIN of program SAPLHTTP_RUNTIME
    Form: EXECUTE_REQUEST of program CL_HTTP_SERVER================CP
    Function: HTTP_DISPATCH_REQUEST of program SAPLHTTP_RUNTIME
    Module: %_HTTP_START of program SAPMHTTP
    What can I do?
    If the termination type was RABAX_STATE, then you can find more information on the cause of the termination in the system XID in transaction ST22.
    If the termination type was ABORT_MESSAGE_STATE, then you can find more information on the cause of the termination on the application server SAPXI_XID_00 in transaction SM21.
    If the termination type was ERROR_MESSAGE_STATE, then you can search for more information in the trace file for the work process 0 in transaction ST11 on the application server SAPXI_XID_00 . In some situations, you may also need to analyze the trace files of other work processes.
    If you do not yet have a user ID, contact your system administrator.
    Error code: ICF-IE-http-c:105-u:XISUPER -l:E-s:XID-i:SAPXI_XID_00 -w:0-d:20060410-t:195211-v: ABORT_MESSAGE_STATE-e:
    HTTP 500 - Internal Server Error
    Your SAP Internet Communication Framework Team

    did you have  this entries in SXMB_ADM of XI server
    catgory:RUNTIME     parameter:ENGINE_TYPE     value:     HUB
    catgory:RUNTIME     parameter:IS_URL     value:http://server:port/sap/xi/engine?type=entry

Maybe you are looking for