2 JSPDyn Pages

Hi @ all!
I'm trying to create a small portal application consisting of more than one JSPDyn Page.
At the moment I have:
-    2 JSPDynPages
-    2 .jsp files
-    1 Bean for communication
Under certain conditions (successful login) I want to call another (second) JSPDynPage. But I don't know how...
with:
this.setJspName("CFR_logon.jsp");
I get to the next .jsp file. But this file wants to use
EventHandlerMethods of the first JSPDynPage. It does not
search the method in the second JSPDynPage...
Thank you! Regards, Christian

Yes, You are right.
SAP implemented a special Session, Request, Application/Context Object Model.
If You store Your bean in a (so called) SAP component... Object. It is only valid for the actuall iView.
So You have to store Your bean in the (normal) "J2EE" Session, Request, Application/Context Object. this can be read from all iViews.
JSPDynPage;
componentRequest = (IPortalComponentRequest) getRequest();          
componentSession = componentRequest.getComponentSession();
request = componentRequest.getServletRequest();
session = componentSession.getHttpSession();
session.setAttribute("myBean", myBean); // Storing the Bean in the J2EE Session
TAKE CARE!!
If You use the J2EE Session... You can't use the JSP Taglib for getting the Bean out of the Session. You have to initialize the objects like this:
<%
request = componentRequest.getServletRequest();
%>
Try it
Walter

Similar Messages

  • Difference between Abstract portal Component and JSPDyn page.

    Hi Experts,
    What is the difference between Abstract portal Component and JSPDyn page.
    Thanks,
    Jay.

    Hi,
    The PDK provides two methods for creating a portal component:
    Abstract Portal Component
    The Abstract Portal Component class offers a lean method for writing HTML commands to the Web client as well as for basic event handling. It is an implementation of the IPortalComponent, which is the central abstraction of the Portal Component API.
    DynPage
    The Page Processor Component, which extends the Abstract Portal Component, returns a DynPage. It provides more sophisticated event handling. Controls that produce events (such as buttons and checkboxes) have an event attribute that contains the name of the event handling method. This event handling method is invoked by the DynPage when it occurs.
    The JSPDynPage is an implementation of the DynPage and allows the use of the DynPage in combination with JSP (Java Server Pages).
    The PDK documentation and examples focus on the DynPage. Easier event handling and the separatation of content development (JSP) from application development (Java) make the DynPage a better choice for components with interaction and changing content.
    For more details, Refer thes thread,
    https://fortress.wa.gov/dop/portal/irj/portalapps/com.sap.portal.pdk.basic.portalcomponentimplementation/docs/jspdynpage.html
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0b3e9d5-b2af-2a10-20ba-9f6ce6b1a27f
    Hop it helps..
    GS
    Edited by: Sathishkumar GS on Apr 14, 2008 2:07 PM

  • JSPDyn page using a bean

    Trying to create a pretty simple JSPDyn page with a single bean.  I am using NWDS to generate the code.  I am trying to set some initial data in bean to be used on the page later, but it always comes back as NULL.  It's like the creation the generation of the page creates a new instance of bean and loses the reference I create in the controller.
    Here is the code for the dynpage controller:
    package com.my.test;
    import com.my.test.bean;
    import com.sapportals.htmlb.*;
    import com.sapportals.htmlb.enum.*;
    import com.sapportals.htmlb.event.*;
    import com.sapportals.htmlb.page.*;
    import com.sapportals.portal.htmlb.page.*;
    import com.sapportals.portal.prt.component.*;
    public class myTest extends PageProcessorComponent {
      public DynPage getPage(){
        return new myTestDynPage();
      public static class myTestDynPage extends JSPDynPage{
        private bean myBean = null;
        public void doInitialization(){
          IPortalComponentProfile profile = ((IPortalComponentRequest)getRequest()).getComponentContext().getProfile();
          Object o = profile.getValue("myBean");
          if(o==null || !(o instanceof bean)){
            myBean = new bean();
            profile.putValue("myBean",myBean);
          } else {
              myBean = (bean) o;
          // fill your bean with data here...
          myBean.setOutput("test message");
        public void doProcessAfterInput() throws PageException {
        public void doProcessBeforeOutput() throws PageException {
          this.setJspName("myTest.jsp");
    Notice I am setting the data up after the comment "//fill your bean data here".  SAP code generator inserted this comment.
    and here is the bean code
    package com.my.test;
    import java.io.Serializable;
    public class bean implements Serializable {
         private String output;
         public String getOutput( ){
              return output;
         public void setOutput( String value ){
              output = value;
    and finally the jsp page
    <jsp:useBean id="myBean" scope="application" class="com.my.test.bean" />
    <hbj:content id="myContext" >
      <hbj:page title="PageTitle">
       <hbj:form id="myFormId" >
         The value of Output is <%= myBean.getOutput( ) %>
       </hbj:form>
      </hbj:page>
    </hbj:content>
    the output is:
    The value of Output is null
    Anyone have any idea what I am doing wrong here.
    Thanks in advance.
    Clark

    Hi Clark,
    Open the portalapp.xml and delete these two lines
            <property name="ComponentType" value="jspnative"/>
            <property name="JSP" value="pagelet/myTest.jsp"/>
    Rebuild and deploy and it should work.
    Thanks
    Prashant

  • How to use a webservice in  JSPDyn page

    hai,
       I have created one webservices but i donot how to use that webservices in JSPDyn page.
      can anyone give solution for this problem
    Rds
    Shanthakumar

    Check out the Axis user's guide at: http://ws.apache.org/axis/java/user-guide.html

  • While Consuming a WebService in JSP Dyn Page - There is an Error

    Hi Friends,
    I have a web service created in ASP.NET web Service.
    And I have Consumed the Web Service using WSDL URL.
    I need to write a code to refer that class in the JSP DynPage
    I have created like this in DoIntialization
    MyServiceName obj=(MyServiceName) PortalRuntime.getRuntimeResources().getService(MyServiceName.KEY);
    int a = 10;
    int b = 20;
    obj.Add1(a,b);
    but it shows an error
    "The method Add1 Method(Add1 Method) is the type. MySErviceName is not Applicable for the arguements(int,int)"
    Please Help me in this regard.
    Thanks in Advance
    Thanks & Regards,
    Palani

    Hi Andy,
    I will let u know the sequence which i followed to consume the Webservice.
    NWDS --> File --> New --> Project --> Portal Application --> Create New Portal App Project.
    The Project is created.....
    After that i want to consume the Webservice for the same project...
    for that...
    NWDS --> File --> New --> Other --> Portal Application --> Create New Portal Application Object --> Selecting My Project?(intended prjct) --> Portal Webservice --> Portal Service from WSDL file - Client Side --> My WSDL URL --> Selecting the methods which i need to expose from the Webservice --> I gave unique name for my 1) Service 2) Alias 3) Package....and that was done....(other way is to add from portalapp.xml ??)
    After that i created a new JSPDyn page for my application in DoInitialization() method i tried to access the method from that webservice using the following code...
    MyServiceName obj=(MyServiceName) PortalRuntime.getRuntimeResources().getService(MyServiceName.KEY);
    I am successfully able to access the method from the webservice using the object which i have created but i am not able to pass arguments to that method...???
    I tried consuming same webservice created in .NET in .NET itself and i am able to pass arguments successfully.
    I tried to consume webservice created in ABAP in .NET and able to implement successfully...
    but the same ABAP webservice when  i tried to consume its not working with this NWDS.
    Is there any thing else i need to follow while consuming a webservice in the EP Perspectice of NWDS ???
    Deployable Proxy is required for that ?? if required how to create and use that ??
    Thanks in Advance,
    Palani

  • Pass parameters from JSP Dyn Page to WDJ Application

    Hi,
    I am trying to pass parameters from my JSPDyn Page to WDJ Application.
    I am using NWDS 7.1 EHP1
    My code is :
    function to_WEBDYNHK()
          EPCM.relaxDocumentDomain();
          EPCM.doNavigate
        ('ROLES://pcd:portal_content/Himanshu.Himanshu/TestDynUIApp?DynamicParameter="hkparam%3Dqwertyuio"');
    This method is being called on click of a button.
    hkparam is the parameter in question.
    The JSPDyn page is an iView and the WDJ application is a page and both have been assigned to a role.
    In the properties of the WDJ Page, I have removed DymanicParameter from "Do not Forward These Parameters To Web Dynpro" property.
    However I am getting null as the value of hkparam in my WDJ application.
    The code used is :
    IWDRequest request = WDProtocolAdapter.getProtocolAdapter().getRequestObject();
           String param1= request.getParameter("hkparam");
    What seems to be missing here.
    Please help.
    I went through the documentation on SDN but it does not seem to help.
    TIA,
    Himanshu

    Hi Himanshu,
    Try this code.
    EPCM.doNavigate("ROLES:portal_content/Himanshu.Himanshu/TestDynUIApp?hkparam=Dmypass1123")
    if the parameter is hkparam and the value to be passed is Dmypass1123. You need not change any design time property of the WD page, and WDProtocolAdapter should retrive the parameter.
    Regards,
    Vishweshwara P.K.M.

  • What is page processor component

    Hi friends,
      Can anyone tell me whats the page processor component and what is abstract portal component , jspdyn page, dynpage and difference among each?
    Thanks in advance.
    Regards
    Sireesha.

    Hi,
    This give a good overview:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/68/ff3c41325fa831e10000000a1550b0/frameset.htm
    AbstractPortalComponent is a Standard portal application.
    DynPage/JSPDynPage(PageProcessorComponent) are HTMLB portal application
    Also check this:
    Abstract Portal Component VS Dynpage
    Greetings,
    Praveen Gudapati
    [Points are welcome for helpful answers]

  • Create Page that programmatically displays an iview

    I'm trying to design a page that will contain to iViews.  One would have an announcement text at the top of the page and the other would be a related iView.  I would like the announcement header to only display if there's content to be loaded.  I've thought of two methods of this.
    One would be to create a JSPDyn page that loads both iviews and partner that with some Javascript that hides the top if there's no relevant content.  However, I can't seem to find any examples of JSPDyn pages loading other iViews.  Where would I look for examples on this?
    The other method would be using a property of the iView API called
    pageSupport.ivuRemove that appears to do what I want, but again, I haven't found any example code on how to use this.
    If anyone has any ideas, example code, or even a better method for optionally displaying an iView, please let me know.  I'll be sure to award points for answers that lead me on the right track.
    Thank you.
    - Craig

    Hi Praveen,
    My requirement is somewhat similar. I have a JSPDynpage application which gets data from the KM.
    If no data is available the iView should be hidden. The iView should be visible again only when there is relevant data available in the KM for the iView.
    I tried using the above code that you provided. However i am not able to figure out why the doOnNodeReady() is not getting called.
    Here is an example code that i am trying to get it work :
    package com.test;
    import com.sapportals.portal.prt.component.AbstractPortalComponent;
    import com.sapportals.portal.prt.component.IPortalComponentProfile;
    import com.sapportals.portal.prt.component.IPortalComponentRequest;
    import com.sapportals.portal.prt.component.IPortalComponentResponse;
    import com.sapportals.portal.prt.pom.IEvent;
    import com.sapportals.portal.prt.pom.NodeMode;
    public class JSPPortalComp extends AbstractPortalComponent
        String text = null;
        public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
              IPortalComponentProfile  profile = request.getComponentContext().getProfile();
              text = profile.getProperty("TextValue");
              response.write("Hello" + text);
         protected void doOnNodeReady(IPortalComponentRequest request, IEvent event){
           if(text != "X") {
                   request.getNode().setNodeMode(NodeMode.DEFAULT_MODE);
              } else {
                   request.getNode().setNodeMode(new NodeMode("HideMode"));
                   return;
    If i set the TextValue iView property value to X then the iView should be hidden else shown.
    If i place a response .write() statement in the doOnNodeReady(), the response doesn't print.
    Can you please provide some insights into this.
    I have posted a thread for the same kind of requirement : https://forums.sdn.sap.com/thread.jspa?forumID=41&threadID=1130403
    Regards,
    Melwyn.

  • Getting error while consuming google webservice in jspDynpage

    Hi All,
    I am consuming google webservices in my JspDyn page
    i am getting following error
    An exception occurred while processing a request for :
    iView : GoogleSer.google
    Component Name : GoogleSer.google
    Could not find portal application <b>com.company.global.enterprise.portal.wsdl.webservices.service.</b>
    Please help me to resolve this issue
    code ::
    MyGoogle googleService =
    (MyGoogle) PortalRuntime.getRuntimeResources().getService("com.company.global.enterprise.portal.wsdl.webservices.service.MyGoogle");
    GoogleSearchResult result = googleService.doGoogleSearch("google", "SAP", 0, 10, false, "", false, "", "", "");
    Thanks & Regards
    Rudra

    Hi,
    I am still having the same problem, however the scenario in which I am getting varies.
    I am getting this exception:
    "com.sap.engine.services.webservices.jaxm.soap.accessor.NestedSOAPException: IOError while working with the message."
    Some users when trying to login into the portal are getting blank screen and for some the portal launcher page is loading fine and could go to the Home Page.
    When I view the logs I am seeing the Nested Soap Exception.
    Any Ideas??? Starting the J2EE engine also did'nt help.
    Thanks in advance.
    Madhavi

  • Htmlb:get the values from bean n display it in textView

    Hi,
    I am doing one PDK application using jspdyn page. In jsp page I am using htmlb to display the table. In that I am using one text view element. There I need to get the values from bean class.And display it in a table.
    Can anyone help me how can use the textView inside htmlb to retrieve the values from bean.
    Thanks & Regards
    Vineela

    hi vineela,
    For the textView, in the text value write the code  <%=myBean.getStr()%>
    where myBean will be your bean class and getStr() is the method in the bean class whcih returns value which needs to be displayed on the screen.
    Thanks
    Harsimran

  • Htmlb:Retrive values from bean n display it in textView

    Hi,
    I am doing one PDK application using jspdyn page. In jsp page I am using htmlb to display the table. In that I am using one text view element. There I need to get the values from bean class.And display it in a table.
    Can anyone help me how can use the textView inside htmlb to retrieve the values from bean.
    Thanks & Regards
    Vineela

    hi vineela,
    check this
    https://www.avispublics.com/irj/portalapps/com.sap.portal.pdk.htmlb.htmlbmanuals/docs/dynpage-01.html
    https://ww2.avispublicsduparisien.com/irj/portalapps/com.sap.portal.pdk.htmlb.htmlbmanuals/docs/tableview-01.html
    bvr
    Edited by: bvr on Mar 4, 2009 12:06 PM

  • Problem in gui components methods  in jsp dynpage

    Hi all,
    i have created an application by using jspdyn page. in that apllication  i have created a button and label . i am not geting any methods for that label and button in jsp file. i am not gettin label_id. set text, button_id setWidth etc..  methods are not getting .please help me regaurding in this issue.
    from..
    RatnaKumar

    Hi ratna,
    write this code
    <hbj:content id="myContext" >
    <hbj:page title="PageTitle">
    <hbj:form id="myFormId" >
    222
    <hbj:radioButton id="RBGenderFemale" text="female" key="rb_fem" tooltip="I am female" disabled="false" />
    <hbj:radioButton id="RBGenderMale" text="male" key="rb_male" tooltip="I am male" disabled="false" />
    111
    </hbj:form>
    </hbj:page>
    </hbj:content>

  • SAP connector and JSPDynPage

    hi everybody, I am trying to display some data from RFC on a JspDyn Page, I have prepared the project but the data from RFc is not displaying.... the code is
    MyJspPage.java:-
    package com.ust.jca;
    import javax.resource.cci.MappedRecord;
    import javax.resource.cci.RecordFactory;
    import com.sapportals.connector.connection.IConnection;
    import com.sapportals.connector.execution.functions.IInteraction;
    import com.sapportals.connector.execution.functions.IInteractionSpec;
    import com.sapportals.htmlb.page.DynPage;
    import com.sapportals.htmlb.page.PageException;
    import com.sapportals.portal.htmlb.page.JSPDynPage;
    import com.sapportals.portal.htmlb.page.PageProcessorComponent;
    import com.sapportals.portal.ivs.cg.ConnectionProperties;
    import com.sapportals.portal.ivs.cg.IConnectorGatewayService;
    import com.sapportals.portal.ivs.cg.IConnectorService;
    import com.sapportals.portal.prt.component.IPortalComponentRequest;
    import com.sapportals.portal.prt.runtime.PortalRuntime;
    import com.sapportals.connector.execution.objects.language.IFunction;
    import com.sapportals.connector.execution.structures.IRecordSet;
    import com.sapportals.connector.execution.structures.IRecordMetaData;
    import com.sapportals.connector.execution.structures.IStructureFactory;
    import com.sapportals.connector.metadata.functions.IFunctionsMetaData;
    import java.util.Vector;
    public class MyJspPage extends PageProcessorComponent {
         public DynPage getPage() {
              return new MyJspPageDynPage();
         public static class MyJspPageDynPage extends JSPDynPage {
              private RfcBean myBean;
              public void doInitialization() {
              public void doProcessAfterInput() throws PageException {
              public void doProcessBeforeOutput() throws PageException {
                   myBean = new RfcBean();
                   ((IPortalComponentRequest) getRequest())
                        .getServletRequest().setAttribute("myBean",myBean);
                   IPortalComponentRequest request =
                        (IPortalComponentRequest) this.getRequest();
                   // fill your bean with data here...
                   try {
                        //Alias is the name of the alias you defined in portal for SAP system
                        getSAPdata(getConnection(request, "P35"));
                   } catch (Exception e) {
                        e.printStackTrace();
                   this.setJspName("MyJspPage.jsp");
              private IConnection getConnection (IPortalComponentRequest request,String alias)
              throws Exception
                   IConnectorGatewayService cgService = (IConnectorGatewayService) PortalRuntime
                             .getRuntimeResources().getService(IConnectorService.KEY);
                   ConnectionProperties cp =     new ConnectionProperties(
                             request.getLocale(),request.getUser());
                   return cgService.getConnection(alias, cp);                              
              private void getSAPdata(IConnection client) throws Exception {
    try
              /* Start Interaction * */
              IInteraction interaction = client.createInteractionEx();
              // call the BAPI_MDDATASET_CREATE_OBJECT
              IInteractionSpec interactionSpec = interaction.getInteractionSpec();
              interactionSpec.setPropertyValue("Name", "ZHRESS_FIRSTDAY_SERVICE");                
              RecordFactory recordFactory = interaction.getRecordFactory();
              MappedRecord input = recordFactory.createMappedRecord("input");
             com.sapportals.connector.metadata.functions.IFunction function = client.getFunctionsMetaData().getFunction("T_ZHRESS_FIRSTDAY");
              IPortalComponentRequest request = (IPortalComponentRequest)this.getRequest();
              //input.put("P35", request.getUser().getUniqueName());
              input.put("SERVICEID","7");     
              input.put("YYUSER" , "EMP");     
              input.put("YYMOD","DIS");               
             MappedRecord importParams = recordFactory.createMappedRecord("input");        
             IStructureFactory structureFactory = interaction.retrieveStructureFactory();
             IRecordSet table = (IRecordSet) structureFactory.getStructure(
             function.getParameter("T_ZHRESS_FIRSTDAY").getStructure());     
              MappedRecord exportParams = (MappedRecord) interaction.execute(interactionSpec, input);
              //myBean.setCW1((String) exportParams.get("CW1"));
              //myBean.setCW1(((Integer) exportParams.get("T_ZHRESS_FIRSTDAY")).toString());                  
             //myBean.setCW1((String) exportParams.get("T_ZHRESS_FIRSTDAY"));
             IRecordSet exportTable = (IRecordSet) exportParams.get("T_ZHRESS_FIRSTDAY");
             exportTable.beforeFirst(); // Moves the cursor before the first row.
             while (exportTable.next()) {
              String column_1  = exportTable.getString("PERNR");
              String column_2  = exportTable.getString("ZDOJ");
              myBean.setCW1((String)exportParams.get(column_1));
              myBean.setCW2((String)exportParams.get(column_2));
             //System.out.println(" COMPANYCODE_LIST-COMP_CODE = " + column_1);
             //System.out.println(" COMPANYCODE_LIST-COMP_NAME = " + column_2);
             myBean.createData(exportTable);
             client.close();
           catch(Exception e){}      
    @param ex
    @param string
              private void printException(Exception ex, String string) {
                   // TODO Auto-generated method stub               
    @param string
              private void logMsg(String string) {
                   // TODO Auto-generated method stub
    RfcBean.java:-
    package com.ust.jca;
    import java.io.Serializable;
    import com.sapportals.connector.execution.structures.IRecordSet;
    public class RfcBean implements Serializable {
         private String CW1;
         private String CW2;
    @return
         public String getCW1() {
              return CW1;
    @return
         public String getCW2() {
              return CW2;
    @param string
         public void setCW1(String string) {
              CW1 = string;
    @param string
         public void setCW2(String string) {
              CW2 = string;
    @param exportTable
         public void createData(IRecordSet exportTable) {
              // TODO Auto-generated method stub
    MyJspPage.jsp:-
    <%@ taglib uri="tagLib" prefix="hbj" %>
    <jsp:useBean id="myBean" scope="request" class="com.ust.jca.RfcBean" />
    Hello World
    <hbj:content id="myContext" >
      <hbj:page title="PageTitle">
       <hbj:form id="myFormId" >
          <hbj:textView
                        text="<%=myBean.getCW1()%>"
                        id="tv1" 
                        design="HEADER2"
                        encode="false">
            </hbj:textView>
            <br>     
            <hbj:textView
                        text="<%=myBean.getCW2()%>"
                        id="tv1" 
                        design="HEADER2"
                        encode="false">
            </hbj:textView>
       </hbj:form>
      </hbj:page>
    </hbj:content>

    Hi Sanjyoti:
    JCo is one of the connectors for SAP backend through any Java/JSP/Servlet based applications. You need to have the SAP JCo libraries (Jar files) with you to connect to the SAP R/3 system, ofcourse along with the connection parameters.
    Here is the sample scenario where you are connecting SAP RFCs/BAPIs with JSPs:
    1: first you need to manage required JCo jar files and import it into your project lib folder. this is to have the JCo api at runtime to your application
    2: import the library path into your JSP page
    3: write a custom method to connect to SAP with connection parameter
    4: you should have an idea of which Remote_Func_Module you are connecting and the input and output attributes
    5: Execute the functional module and display the results and close the connection parameters.
    Its almost like connecting to a RDBMS in a general scenario.
    For more information about SAPJCo:
    http://help.sap.com/saphelp_nw04/helpdata/en/6f/1bd5c6a85b11d6b28500508b5d5211/content.htm
    For example program1 to connect:
    http://help.sap.com/saphelp_nw04/helpdata/en/6a/14e13d8ee4535ee10000000a114084/content.htm
    For example program2 to connect:
    http://help.sap.com/saphelp_nw04/helpdata/en/9d/14e13d8ee4535ee10000000a114084/content.htm
    For example program a BAPI:
    http://help.sap.com/saphelp_nw04/helpdata/en/de/e6c9255044b241a9401a3a1b7009a9/content.htm
    For Tools & Services of SAPJCo:
    https://websmp101.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000463649
    If you still want already working program, I can mail it your email id.
    Thanks,
    MS

  • How to pass a internal table into Java Bean

    Hi Experts,
    I created a JSPDyn page to display Sales orders form R/3 using bapi_sales_order_getlist.
    I used JCO to establish connectivity between JSP Dynpage and R/3. I executed the bapi successfully, i want to move the sales orders retrieved from the Bapi to a Java Bean. So that i can use the bean to populate the value as a table.
    with regards,
    James.
    Valuable answers will be rewarded.....

    Hi Bala,
    If you want to pass this internal table between different methods of the same view then write the contents of this internal table to a context node of your view using BIND_TABLE. You can then read the contents of this internal table from the other method using the reference of that node & the GET_STATIC_ATTRIBUTES_TABLE method.
    However if you want to pass the internal table between methods of different views then create a context node at the COMPONENTCONTROLLER level & then do a context mapping of this node to your local views context in both your views. You can follow the same BIND_TABLE & GET_STATIC_ATTRIBUTES_TABLE methods approach.
    Regards,
    Uday

  • Passing value from JSP to JSPDynPage onclick of link

    Hi,
    I have extracted a value in the JSP page and i want to send this value back to the JSPDynPage on click of a link(the link is dependent on the value).
    How can i do that?

    hi Sujoy,
    you can pass values by using beans and display the passed data in a new jsp page.
    firstly create a jsp page,that accepts user data,say for example i am placing a text box and a button,
    next,create a jspdyn page---
    private final static int INITIAL_STATE = 0;
        private final static int FINAL_STATE = 1;
        private int state = INITIAL_STATE;
        private final static String BEAN_KEY="nameBean";
        public void doInitialization(){
          IPortalComponentRequest request=(IPortalComponentRequest) this.getRequest();
          IPortalComponentContext ctxt=request.getComponentContext();
          displayNameBean mybean = new displayNameBean();
          ctxt.putValue(BEAN_KEY,mybean);
    public void doProcessAfterInput() throws PageException {
             InputField myInputField = (InputField) getComponentByName("user_name");
    if (myInputField != null) {
    IPortalComponentRequest request=(IPortalComponentRequest) this.getRequest();
    IPortalComponentContext ctxt = request.getComponentContext();
                 displayNameBean mybean1=(displayNameBean)ctxt.getValue(BEAN_KEY);
                   mybean1.setName(myInputField.getValueAsDataType().toString());
        public void doProcessBeforeOutput() throws PageException {
          switch (state){
               case INITIAL_STATE:
               this.setJspName("loginPage.jsp");
               break;
               case FINAL_STATE:
               this.setJspName("successloginPage.jsp");
               break;
        public void onButtonClick(Event event) throws PageException {
             state=FINAL_STATE;       
    finally display this value in a new jsp page as follows--
    <jsp:useBean id="nameBean" scope="application" class="NewProject.bean.displayNameBean" />
    <%@ taglib uri= "tagLib" prefix= "hbj"%>
    <hbj:content id="myContext" >
      <hbj:page title="PageTitle">
       <hbj:form id="myFormId" >
    <hbj:textView
         id="welcome_note"
         design="HEADER2">
         <% 
         welcome_note.setText
         (nameBean.getName());
         %>
    as simple as that!!
    regards
    SwarnaDeepika
    P.S:Please reward points for helpful answers.

Maybe you are looking for

  • Multiclip - mutliple audio tracks

    This question has been asked before, but I'll reiterate it. If the support doesn't exist, hopefully apple dev will take it into consideration. I shoot a lot of weddings and events. FCP's 5.0.x multiclip feature has been a lifesaver. I know the short

  • Hard disk drive doesn't appear on home screen

    I have a external hard disk drive in NTFS. I have there a lot of data I need to transfer to my new Mac, so I can't erase nothing from there. I installed MacFUSE and Paragon 9 to correct the issue, but after that, the drive just didn't appear anymore

  • Not able to import business system in Integration Directory

    Dear all, Currently i involved in XI system copy. As per the standard documetn i have finsihed the initial activites like EXPORT and import of abap and java files is succedded. Now in the post instalaltion activites. I have changed the exchange profi

  • EDI configuration responsibilities

    Hi, When a team is configuring EDI interface, what tasks are done by 1. functional people 2. technical people 3. basis people Basically I would like to know the roles of the functional, technical, and the basis teams regarding EDI configuration Thank

  • Persistence.getPersistenceUtil().isLoaded method throws java.lang.NullPointerException

    Why the java.lang.NullPointerException exception occurs when J call Persistence.getPersistenceUtil().isLoaded(entityA, "list") method for multitenant entities? @Entity @Table(name = "entity_a") @Multitenant(MultitenantType.TABLE_PER_TENANT) @TenantTa