How to use constant in expression language

I have class Constant which contains
public static final (constant fields).
I want to use those constants in expression language in jsp
${requestScope.result eq with some constant}
<c:if test="${requestScope.result eq '<%= Constants.MODE %>'}">
               Hello World
          </c:if>     
It does not print Hello World
even though MODE is 'hello' and result is also set to 'hello'.
Message was edited by:
mihir_kapadia

Its not that simple. There is an article in [url http://www.javaranch.com/journal/200601/Journal200601.jsp#a3]javaranch  about the usage of constants in EL.
There is [url http://forum.java.sun.com/thread.jspa?forumID=45&threadID=508847]this  cool code snippet from forum user evnafets that would help you with your problem.
ram.

Similar Messages

  • How to use the Dynamic Expression in BRFplus

    Hi Experts
                   I am new to BRFplus. Can you give any document on BRFplus how to use the Dynamic Expression.
    Thankyou
    Venkat

    OK I tried it and worked but for one condition:
    WHERE DECODE (E.qualification_sid, 1104,
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.spe_per)+1),
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.mili_yea_per)+1))
         BETWEEN TO_DATE('01-07-2011', 'DD-MM-RR') AND TO_DATE('31-07-2011', 'DD-MM-RR')
    But how to put two conditions for the same Expression:
    WHERE DECODE ((E.qualification_sid, 1104) AND (E.RANK_SID, 8),
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.spe_per)+1),
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.mili_yea_per)+1))
         BETWEEN TO_DATE('01-07-2011', 'DD-MM-RR') AND TO_DATE('31-07-2011', 'DD-MM-RR')
    The previous code gives me this error: missing right parenthesis

  • How to use a regural expression to get all digit from a string.

    Hi All,
    Do you know how to use regural expression to get all digits from the following string via ABAP program?
    "'Log Attributes                 0 (  0 )     (   10 % Available  )"
    Thanks,
    Andrew

    Hi,
    Try the code mentioned below:
      DATA: STR_LEN  LIKE SY-FDPOS,
            RSTR_LEN LIKE SY-FDPOS,
            OFF      LIKE SY-FDPOS.
      DATA: IDX      LIKE SY-FDPOS,        "mn B20K054003
            CL       LIKE SY-FDPOS.        "mn B20K054003
      DATA: RSTRING(40).
      DATA: STRING(40).   " value 'A,N,I,L'.
      FIELD-SYMBOLS: <NLS_CHAR>.           "mn B20K054003
    MOVE I_REGUH-ZNME1 TO STRING.
      MOVE SPACE TO RSTRING.
      STR_LEN = STRLEN( STRING ).
      DESCRIBE FIELD RSTRING LENGTH RSTR_LEN.
      IF RSTR_LEN < STR_LEN. RAISE TOO_SMALL. ENDIF.
      WHILE IDX < STR_LEN.                 "mn B20K054003
        ASSIGN STRING+IDX(*) TO <NLS_CHAR>.   "mn B20K054003
        IF SY-LANGU EQ '2'.                "mn B20K054003
          CALL FUNCTION 'NLS_THAI_CHARLEN' "mn B20K054003
               EXPORTING                   "mn B20K054003
                    THAI_STRING  = <NLS_CHAR>       "mn B20K054003
               CHANGING                    "mn B20K054003
                    THAI_CHARLEN = CL.     "mn B20K054003
        ELSE.                              "mn B20K054003
          CL = CHARLEN( <NLS_CHAR> ).      "mn B20K054003
        ENDIF.                             "mn B20K054003
        IF IDX NE 0.                       "mn B20K054003
          SHIFT RSTRING RIGHT BY CL PLACES."mn B20K054003
        ENDIF.                             "mn B20K054003
        RSTRING+0(CL) = STRING+IDX(CL).    "mn B20K054003
        IDX = IDX + CL.                    "mn B20K054003
      ENDWHILE.                            "mn B20K054003
    Regds,
    Anil
    Edited by: Matt on Jul 1, 2009 9:36 AM -added code tags

  • How to use the CASE Expression in Where Cluase?

    Hi All,
    I'm trying to use the CASE Expression in the Where Clause at some trigger on the Form?
    I've tried this Code:
    Declare
    N Number;
    begin
    SELECT COUNT(E.EMP_SID)
         INTO N
         FROM EMPLOYEES E, RANKS R
         WHERE CASE WHEN R.qualification_sid = 1104 AND E.rank_sid = 8 THEN
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.spe_per)+1)
         ELSE
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.mili_yea_per)+1)
         END
         BETWEEN TO_DATE('01-07-2011', 'DD-MM-RR') AND TO_DATE('31-07-2011', 'DD-MM-RR');
    END;
    When I run this code as a normal query at any SQL editor it works successfully, But When I Compile it at some trigger on the Form it gives me this error:
    Encountered the symbol "CASE" when expecting one of the following:
    ( - + mod ......
    Heeey how to specify the previous code to be shown as code in the thread?
    Note: I'm using Forms 6i

    OK I tried it and worked but for one condition:
    WHERE DECODE (E.qualification_sid, 1104,
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.spe_per)+1),
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.mili_yea_per)+1))
         BETWEEN TO_DATE('01-07-2011', 'DD-MM-RR') AND TO_DATE('31-07-2011', 'DD-MM-RR')
    But how to put two conditions for the same Expression:
    WHERE DECODE ((E.qualification_sid, 1104) AND (E.RANK_SID, 8),
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.spe_per)+1),
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.mili_yea_per)+1))
         BETWEEN TO_DATE('01-07-2011', 'DD-MM-RR') AND TO_DATE('31-07-2011', 'DD-MM-RR')
    The previous code gives me this error: missing right parenthesis

  • How to use 2 Airport Express units?

    In my office upstairs I use an AirPort Express to tap into the wireless router downstairs wirelessly. Works great. In a bedroom also upstairs, I have a Blu Ray player I want to connect to the Internet. I thought if I got another AirPort Express unit in that Bedroom then it too could tap into the wireless router downstairs so I could then run an ethernet cable from the AirPort Express to the BluRay player. I tried that but when I look on my computer in the AirPort Utility screen, it only recognizes one of the AirPort Express units. That unit in the Bedroom continues to have a flashing yellow light and no internet connection. What do I need to do to get an internet connection in the Bedroom?

    Welcome to the discussions!
    +These past Holidays “Santa” delivered a new Mac Book Pro, along with a Time Machine which is built into an Airport Extreme.+
    You have a Time Capsule, correct?
    The Time Capsule can "extend a wireless network" as well as perform backup functions on the network.
    You could continue to use your AirPort Express in another part of the house to provide a stronger wireless signal in that area. (I've yet to meet the first person who felt that they had too much wireless coverage in their home).
    If you have a DVR or newer DVD player that requires an ethernet connection for advanced features from the internet, the ethernet port on the Express is "live" when it is set to "extend", so you might think about that option as well.
    Hotels don't use ethernet nearly as much as several years ago, but I always take my spare Express on the road to hook up to the hotel's ethernet jack and create a wireless network in the room for the laptop or iPhone. Works great.

  • How to use toplink "build expression"  with soundex function

    We are using toplink experssion builder to build the query. can any one help me on build a query with soundex using toplink..
    for example :
    SELECT last_name, first_name
    FROM hr.employees
    WHERE SOUNDEX(last_name)
    = SOUNDEX('SMYTHE');

    TopLink's ExpressionOperator does have an operator defined for soundex. I have an example that uses it that I customized to match you case.
    I would recommend defining these queries as named queries using an after-load method:
        public static void afterLoadEmployee(ClassDescriptor descriptor) {
            ReadAllQuery raq = new ReadAllQuery(Employee.class);
            ExpressionBuilder eb = raq.getExpressionBuilder();
            Expression fnExp =
                ExpressionOperator.soundex().expressionFor(eb.get("lastName"));
            Expression valExp =
                ExpressionOperator.soundex().expressionFor(eb.getParameter("L_NAME"));
            raq.setSelectionCriteria(fnExp.equal(valExp));
            raq.addArgument("L_NAME", String.class);
            descriptor.getDescriptorQueryManager().addQuery("Employee.findBySoundexLastName",
                                                            raq);
        }Now you can execute the query anywhere in your application using:
            List<Employee> emps =
                (List<Employee>)session.executeQuery("Employee.findBySoundexLastName",
                                                     Employee.class, "SMYTHE");The SQL generated is a little different due to the multiple tables used in the employee example model but here is what I got:
    SELECT t0.EMP_ID, t1.EMP_ID, t0.F_NAME, t1.SALARY, t0.L_NAME, t0.GENDER, t0.VERSION, t0.ADDR_ID,
    t0.MANAGER_ID, t0.END_DATE, t0.START_DATE FROM EMPLOYEE t0, SALARY t1
    WHERE ((SOUNDEX(t0.L_NAME) = SOUNDEX('SMYTHE')) AND (t1.EMP_ID = t0.EMP_ID))Doug

  • How shall i do it ? Complex question about how to use the airport express or time capsule ?

    Hello All,
    Right now i have an access point:
    1/ A mercury router (cheap and old)
    2/ Airport Express
    Do you advice me to use it to replace my cheap old router (mercury) or to pair it with this main old router ? (however i tried to without any success)
    3/ Time Capsule
    Can i use it to relay the signal from the Airport Express to extend the range  of the wifi?
    Can i use it to stream music to my B/W M1 speakers directly ? (I will connect by USB the BW M1 to the time capsule) and would like to be able to play music this way. Is this in anyway possible ?
    Many thanks for your reply !

    ok, i might be wrong but here goes:
    you should attach your modem to your time capsule: your time capsule will act as not only your time machine but also your main wireless transmitter.
    you set it up using "Airport Utility" which is inside the "utilites" folder, which is inside your applications folder.
    this connects your mac wirelessly to the internet.
    to stream music to your speakers you then set up the airport plug to (a) join the existing network (which you set up on the time capsule) and then (b) set it up to stream music to your speakers. again, this is done using "airport utility". do it AFTER you have set up the time capsule.
    you will then be able to use itunes to stream music to your speakers. from itunes on your computer you will be able to chose from the bottom right hand side of the window whether you play the music on your computer or wirelessly into your B+W speakers...
    some notes:
    1. you won't be able to connect the airport plug by USB to your speakers as the airport plug doesn't have a USB output. It has only analogue and optical.
    2. although your time capsule has USB you cannot stream music into it or through it. there's some basic guidance here:
    http://www.apple.com/wifi/
    3. you may find that the sound quality [if you are playing apple lossless files or wav files) isn't as good as if the speakers were connected directly to your mac via USB.  this should be especially noticable because your speakers are so good!
    if the music you play is only mp3 or the stuff purchased from itunes then it shouldn't make too much of a difference.
    4. keep an eye out on the B+W website: there may come a time when you won't even have to use the airport plug, and you will be able to stream music straight to the speakers. i know that B+W have just done that with the new Zepellin speaker that they make.
    hope this helps...

  • How to use the airport express to extend the range of an existing airport extreme wireless network?

    The instruction manual says nothing on the topic, so maybe it is not possible. The only reason I think it is possible is that two different Apple reps told my girlfriend it was possible. Now we have one, and no clue how to proceed.
    We have an Airport Extreme, but its range is maximum 30 feet. We would like to double that. What do we do with the Airport Express? (We cannot move the modem nor the Airport Extreme. What we are trying to do has nothing to do with speakers, iTunes, or printers.)
    thanks
    Paul

    Are both the Extreme and Express 802.11n models? If so, check out this AirPort Support article; if one or both are 802.11g models, check out this article instead.

  • How can use my Airport Express 802.11n with IOS X 10.9.4?

    I have two Airport Express unit (802.11n) used to connect my upstairs and downstairs HiFi amps to my music collection (On a Mac mini and on my MacBook).  I keep my software up to date and my Airport Express units have now lost connectivity with my updated computers.  They do not even appear in UTILITIES/AIRPORT UTILITY - so I cannot reconfigure.  I have tried pressing the reset button and have tried "Googling" it but have had no success.  Any suggestions would be gratefully received.

    Both say A1254 (I think)
    A1254 is not a model number for an AirPort Express, but if you meant to say A1264, that is an 802.11n model that is compatible with AirPort Utility on an iOS device and also the Mac running Mavericks (10.9.4).
    If you have pressed the reset button as you say above (held it in for 5-6 seconds or more), then the AirPort Express devices are reset back to factory default settings.
    When you open AirPort Utility on the Mac and click on Other Wi-Fi Devices, you should see the AirPort Express. Click on AirPort Express to start the setup process and follow the prompts.

  • How to use selectBooleanCheckbox in expression builder

    Hi
    I have a selectBooleanCheckbox on my UI as below.
    <af:selectBooleanCheckbox id="sbtFlg"
          label="Enable/Disable SUBMIT button"
           binding="#{pageFlowScope.invoiceTableManagedBean.submitBtnActive}"/>I am setting the value of this component in the listener 'SubmitButtonListener' as below
        RichSelectBooleanCheckbox submitFlag = (RichSelectBooleanCheckbox)context.getViewRoot().findComponent("sbtFlg");
        String id = actionEvent.getComponent().getId();
        log.info("+++++ Component id ++++ "+ id);
    //Here is some logic to get the     allRows object
        if( allRows.length == 0) {
            log.info(">> length ==0");
            //submitFlag.setSelected(false);
            submitFlag.setValue("false");
        }else{
         //submitFlag.setSelected(true);
          submitFlag.setValue("true");
        }Now I want to use the boolean value of the checkbox on disable property of commandButton.
    <af:commandToolbarButton actionListener="#{invokeActionBean.setOperation}"
                                                   text="#{wf:getResourceValue('SUBMIT', 'bindings.customActions')}"
                                                   disabled="#{!pageFlowScope.attachmentListManagedBean.areAllRequiredDocumentsAttached or !pageFlowScope.invoiceTableManagedBean.submitBtnActive}"
                                                   action="#{invokeActionBean.invokeOperation}"
                                                   partialSubmit="false"
                                                   immediate="true"
                                                   rendered="#{lOVManagedBean.initiator}"
                                                   visible="#{wf:isCustomActionAvailable('SUBMIT', 'bindings.customActions')}"
                                                   id="submitButton">
                            <f:actionListener type="com.bmc.crms.listener.SubmitButtonListener"/>Is this a right way to call this property?
    pageFlowScope.invoiceTableManagedBean.submitBtnActive"
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    I tried the following with your suggestion.
    Submit button code
    <af:commandToolbarButton actionListener="#{invokeActionBean.setOperation}"
                                                   text="#{wf:getResourceValue('SUBMIT', 'bindings.customActions')}"
                                                   disabled="#{!pageFlowScope.attachmentListManagedBean.areAllRequiredDocumentsAttached or !pageFlowScope.invoiceTableManagedBean.submitBtnActive}"
                                                   action="#{invokeActionBean.invokeOperation}"
                                                   partialSubmit="false"
                                                   immediate="true"
                                                   rendered="#{lOVManagedBean.initiator}"
                                                   visible="#{wf:isCustomActionAvailable('SUBMIT', 'bindings.customActions')}"
                                                   id="submitButton">
                            <!-- <f:actionListener type="com.bmc.crms.listener.SubmitButtonListener"/> -->
                            <f:actionListener type="com.bmc.crms.listener.RoleChangeListener"/>Button on which I want to call he listener wherein I am setting the boolean value
    <af:commandButton text="Add Invoice" id="addInvoiceButton"
                                            rendered="#{lOVManagedBean.initiator}"
                                            action="#{pageFlowScope.invoiceTableManagedBean.addInvoice}"
                                            actionListener="#{bindings.execute.execute}">
                            <f:actionListener type="com.bmc.crms.listener.SubmitButtonListener"/>
                             <f:actionListener type="com.bmc.crms.listener.MRFlagListener"/>   
                         </af:commandButton>Checkbox component
    <af:selectBooleanCheckbox id="sbtFlg"
                                                    label="Enable/Disable SUBMIT button"
                                                    value="#{pageFlowScope.invoiceTableManagedBean.submitBtnActive}"/>  Listner
      public void processAction(ActionEvent actionEvent){
        log.info("+++++ SubmitButtonListener.processAction() start++++ ");
        Map pageFlowScope = RequestContext.getCurrentInstance().getPageFlowScope();
        InvoiceTableManagedBean invoiceTblBean = (InvoiceTableManagedBean)pageFlowScope.get("invoiceTableManagedBean");
        // or InvoiceTableManagedBean invoiceTblBean = (InvoiceTableManagedBean)pageFlowScope.get("InvoiceTableManagedBean");
        invoiceTblBean.setSubmitBtnActive(true);
        FacesContext facesCtx = FacesContext.getCurrentInstance();
        UIComponent uiComponent = facesCtx.getViewRoot().findComponent("submitButton");
        AdfFacesContext.getCurrentInstance().addPartialTarget(uiComponent);
        log.info("+++++ SubmitButtonListener.processAction() end ++++ ");
    }However, on execution I get the following errorfor the SubmitButtonListner.
    ]] Root cause of ServletException.
    javax.servlet.jsp.JspException: com.bmc.crms.listener.SubmitButtonListener
         at com.sun.faces.taglib.jsf_core.ActionListenerTag.doStartTag(ActionListenerTag.java:179)
         at oracle.jsp.runtime.tree.OracleJspIterationTagNode.executeHandler(OracleJspIterationTagNode.java:43)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:58)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:58)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:58)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:58)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:58)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:58)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)Am I doing anything wrong here?

  • How to use VML(Vector Markup Language) in swing Components

    hi .
    i have an xml file that contain VML .
    how can i load VML into jEditorPane .
    Or
    does swing Component such as jEditorPane supports VML .
    thanks

    hi,
    wondering if you got your answer to VML support in SWING?
    thanks

  • How to use Constants in Switch statements?

    Hello all,
    The following code snippet gives error, please give me guidance.
    ========
    static Object tokenize(StreamTokenizer st)
    throws NumberFormatException, IOException {
    Object token = null;
    try {
    if (st.nextToken() == st.TT_EOF) {
    throw new EOFException();
    } catch (IOException e) {
    throw e;
    switch(st.ttype) {
    case st.TT_NUMBER:
    token = new Double(st.nval);
    break;
    case st.TT_WORD:
    token = st.sval;
    break;
    case st.TT_EOL:
    throw new NumberFormatException();
    default:
    throw new NumberFormatException();
    return token;
    =================
    regards.

    Perhaps it wants you to do "StreamTokenizer.TT_WORD" rather than "st.TT_WORD".
    Why catch IOException, just to throw it again?

  • Text/expression-language-based paradigma continues?

    i've been working with jsp and struts for a while. the most significant drawback of jsp, custom tags/jstl and struts is its "runtime" binding caused by the heavy use of string-attributes and interpreted expressions.
    it makes the coding itself harder (loss of compiler support and strong typing), it increases the amount of testing (automated tests, regression tests) extremely, it makes jsp-apps very hard to mantain, it is error-prone when changed or refactored, it is slower in execution and last but not james requires extra developement tools (such as struts-editors) to effectively maintain the applications.
    but i like the paradigma of a web application that keeps a view state, handles "events" etc.
    the only thing i can't understand is why jsf builds on the error-prone jsp/custom tag paradigma instead of compiled server side ui components. it obviuosly still tries to follow the myth, that web-designers and application developers can share their source (i.e. js-pages) by using tags. imo this is a degeneration of the good idea to leverage html by some custom tags. these tags empower designers to make their pages dynamic. (enterprise) software developement ist very different: complex use cases, business logic and often ui-"logic", integration issues etc...
    the life cycle of a jsp with custom tags is weird (even more in struts):
    - objects (variables in scriptlets) already existing in the scope of the jsp-execute-method are wrapped into attributes of page, request or application scope.
    - tags are defined using string-based attributs, such as <html:write name="pinky" property="brain" />
    - the implementation of the tag tries to look up the object in any of the scopes, starting with page scope
    - if the object exists, it tries to read/set its property via reflection
    so you lose strong typing, compile time checks and performance.
    there are several frameworks that do not build upon jsp and tags but put in an extra layer. this layer is similar to a rich client "form" and renders the output into html or any other format.
    so i'm not preferring any framework, just looking around and curious why this architecture has been chosen for jsf.
    thanks
    tom

    the most significant drawback of jsp, custom tags/jstl and struts is its "runtime" binding
    caused by the heavy use of string-attributes and interpreted expressions.I second this heartily.
    but i like the paradigma of a web application that keeps a view state, handles "events" etc.
    the only thing i can't understand is why jsf builds on the error-prone jsp/custom tag
    paradigma instead of compiled server side ui components. The JSF - JSP connection is a major problem. More and more developers are starting to express reservations about it, because the two technologies don't play well together. But I think you've hit on an even deeper fundamental flaw in the equation -- the evils of runtime binding. The heavy JSF/JSP reliance on runtime evaluation is a reliability nightmare. Developers choose Java, in part, because of the robustness provided by compile-time checking. We give that up when it comes to JSF/JSP or Struts web applications, and that's an unacceptable state of affairs.
    Winer says that "JSF has taken a major step in the right direction with the <managed-bean> and <referenced-bean> configuration elements. These give some hope for development tools to finally provide real code insight (and even error reporting) for EL expressions, because they define both what keys are used in the expression language and what types of objects may be at those keys." However, this will help with only the simplest EL expressions. As soon as an EL expression reaches into nested properties and maps that aren't defined in the config file, we're back to runtime binding and error reporting. The addition of generics to the language with 1.5 might have made it possible to introduce strong EL type checking at page compile time, but Sun's short-sighted type-erasure implementation of generics rules this out permanently.
    Look at what Microsoft is doing with ASP.NET. It's not perfect, but the fundamental technology is based on compiled server side ui components. There are places in that framework where you can write expressions aren't evaluated until runtime, but it's certainly not the fundamental basis of the model as it is with JSF/JSP. And the .NET implementation of generics may make it possible to have these dynamic expressions type-checked at page compile time in a future implementation of .NET.
    I keep reading comments from the JSF proponents who say things to the effect of "yes, we know JSP doesn't play well with JSF, but JSF allows you to plug in a different rendering technology." Well, we need one, and we need it urgently. ASP.NET has been out for two years now, and was far more polished and useable at its release than JSF is now after a very long development cycle.
    Rightly or wrongly, people will judge JSF on the merits of the reference implementation. And I fear that a lot of developers are going to throw up their hands after a taste of the JSF/JSP world and move to .NET.
    Stephen Schaub

  • Question about using constant variables in Forms

    As I am still very new to Forms, please forgive my ignorance if the answer to my question is very simple. I am trying to figure out how to use constant variables within my Forms application. For example, if I want to setup return code constants for the application (mind me, these are examples):
    RC_SUCCESS CONSTANT PLS_INTEGER := 1;
    RC_FAILURE CONSTANT PLS_INTEGER := 0;
    RC_YEAR_DATA_NOT_FOUND := 50;
    Then in a module I created, if I wanted to check the return code against one of the constants I would do:
    DECLARE
    rc PLS_INTEGER;
    BEGIN
    GET_YEAR_DATA('2000', rc);
    IF rc = RC_YEAR_DATA_NOT_FOUND THEN
    -- Do some error handling
    END IF;
    END;
    I know that you can declare constants within individual procedures or packages but I can't see to find information on how to do this globally for the application. I've read about using global variables within Forms but the CHAR data type only and the fact the value can be changed doesn't really fit for this purpose. Am I missing something? Is there a config file or something for the webserver that can be used to set these up??
    Any help would be appreciated.
    Thanks

    To declare constants create a Package-Specification in a pll and deifne all your constants there, something like:
    PACKAGE PK_CONSTANTS IS
      RC_SUCCESS CONSTANT PLS_INTEGER := 1;
      RC_FAILURE CONSTANT PLS_INTEGER := 0;
      RC_YEAR_DATA_NOT_FOUND := 50;
    END;Then attach that pll to all your forms-modules, and use it like
    IF rc = PK_CONSTANTS.RC_YEAR_DATA_NOT_FOUND THEN
    END IF;A word about exceptions or errors: In my eyes its clearer (and in case of exceptions even better) to raise an exception than to hide it behind return-codes.

  • JSP/Expression Language in Web AS 6.40

    Hello
    We are trying to port a Servlet/JSP Application from Tomcat to SAP Web AS. It's based on Spring/Hibernate and we are heavily using JSP with Expression Language and JSTL.
    The first problem i had with the "c:forEach" tag, was solved by using the "core" taglib instead of the "core_el" taglib (which means JSTL without Expression Language seems to work)
    As i found out SAP Web AS 6.40 complies to the J2EE 1.3 Standard. Therefore it supports JSP 1.2 and not JSP 2.0 with Expression Language EL.
    Despite not supporting the current JSP Standard, is there any possibility to get JSP Pages with Expression Language running on Web AS 6.40?
    If no, is it planned to support JSP 2.0 in future versions of Web AS and when is it scheduled?
    Thanks for answers
    Sigmar

    Sigmar,
    there is already released light version of J2EE engine including J2EE1.4...You can have a look at the begin page of the SDN, or directly download it by link :
    https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/webcontent/uuid/64919927-0b01-0010-e9bf-d1570518023d [original link is broken]
    As bonus it includes Java EE 5 preview
    Regards
    Bojidar

Maybe you are looking for

  • It's Official - No AT&T for Me

    I'm happy to report that my month-long battle with Verizon is over, thanks to the efforts of the good folks at the Federal Trade Commission's antitrust division.  Verizon has officially informed me that, due to the extenuating circumstances of the si

  • How to know whether a method is thread-safe through the java-doc?

    In some book, it says that SAXParserFactory.newSAXParser() is thread-safe,but in the java-doc,it doesn't say that. newSAXParser public abstract SAXParser newSAXParser() throws ParserConfigurationException, SAXExceptionCreates a new instance of a SAXP

  • Link of table EKKO,EKPO,EKET,KONV

    Hi Experts, Now , i am writing a program to print purhchase order, and i met 2 problems. 1.why it is different price between 'net price' and 'condition price'? sometimes, they are different. 2.the net price always is wrong. so i need to get the price

  • To fit a normal-banal MOVIE or smth. on a ipod, you must resize it - HOW??

    Well, I got that, that a movie/video in a size of my apple comp. display sure won't import into ipod.. Well, I would like make that happen by resizing the movie into smaller resoulution and so on, but don't know how, and i know i how to resize it.. I

  • How do I know if the Adobe Flash Installer worked & I'm on 4.0 now

    I am VERY non-tech savvy. I installed the Adobe Installer & clicked to execute the download. In 1 second it said 'done'. Does that mean version 4.0 is now working on my laptop. Sorry to be so ignorant. I'm afraid of exe. files but took a leap of fait