Unified Expression language framework in another context than JSP/JSF

Hi
+(I hope this is the right place for such question)+
We are building some RCP apps and we are in need, for our frameworks, of a expression language that allows to get and set values, and other things, and it seems that the Unified Expression Language Framework meets our need.
However, as I said, this is a RCP app, not a web app. So my question is
Is this framework designed to be used outside of the web app context (jsp, jsf, etc) ? Or is there any dependencies that would prevent or make it difficult to use it in a GUI RCP application?
Thanks for your help
cd

BalusC wrote:
It's so cool that you can change the way to read your sentence. I never read it any other way. I probably shouldn't have posted a double meaning statement but saying that I'm changing the way I read it is incorrect. I'm not doing that.
BalusC wrote:
It's also a great coincidence that you mention exactly the references which are implicitly available in the scriptlet world.Not sure what that's intended to mean. I was exposing to the OP the part of EL that deals with objects that require/assume a j2ee container.

Similar Messages

  • Enable Expression Language JSP2.0

    how do you enable Expression language (eg. ${1 + 1}) in JSP pages using Tomcat5 alpha? The examples that come with Tomcat have it enabled, but when I create my own application context it isn't enabled.
    Thanks for any help.
    duke

    I am having the same problem: I'm running Tomcat 5.0.4. All the shipped JSP and JSP2 samples work nicely. When I try the same, the EL expressions are not evaluated (the compiled JSP shows that it simply literally outputs any EL expression). I have compared the web.xml files but I cannot make it work. I suppose I am missing some switch to enable the evaluation of EL expressions.
    Any help is greatly appreciated.
    Heiko

  • How to check arraylist size greater than 1 using expression language in jsp

    I want to remove the scripplet in jsp, so i am using jstl tags with expression language in it.
    My scripplet is
    <% if (arraylist.size() > 1) {
    ---do something ----
    %>
    i wanted to change this to
    <c:if test="${ somecondition }">
    ---do something ----
    </c:if>
    here "somecondition" is exactly i need to check whether my arraylist size is greater than 1.
    so please can anyone help me how can i do that.

    If you do not mind, you can create a function and package it into a tag library of your own. Then you can use the function just as the existing expressions language construct. You may take a look at the article use functions in jsp expression language.

  • 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

  • BUG:  Expression Language not supported (JDeveloper 10.1.3.0.4(SU1))

    Hi!
    I have the following code in a jspx page:
    <c:if test="${!empty bean.genericErrorMessages}">
    <h:outputText styleClass="texto_red"
    value="#{bean.genericErrorMessages}"
    id="applicationErrorMessages" escape="false"/>
    </c:if>
    All code compile well, but when i run the jspx page the following exception occur.
    The problem is that in JDeveloper Early Access 3 the problem doesn't occur.
    But in the Jdeveloper version 10.1.3.0.4(SU1) the exception occur.
    I'm running JDeveloper in a Windows XP SP2, JSF 1.1_01 and JSTL 1.0
    Does anyone know a solution to this problem? Tanks.
    The Exception:
    Error: Expression Language not supported in compile time attribute test
         at oracle.jsp.parse.JspUtils.hasELWithCreation(JspUtils.java:1248)
         at oracle.jsp.parse.JspUtils.processELAttribute(JspUtils.java:1274)
         at oracle.jsp.parse.OpenJspTagHandler.processAttributeValue(OpenJspTagHandler.java:331)
         at oracle.jsp.parse.JspParseTag.parseXMLSrc(JspParseTag.java:1368)
         at oracle.jsp.parse.JspParseTag.parse(JspParseTag.java:1413)
         at oracle.jsp.parse.OpenJspTagHandler.parse(OpenJspTagHandler.java:802)
         at oracle.jsp.parse.JspParseTag.genXMLSrcTag(JspParseTag.java:867)
         at oracle.jsp.parse.JspParseTag.parseXMLSrcNextTag(JspParseTag.java:745)
         at oracle.jsp.parse.JspParseTag.parseXMLSrcBody(JspParseTag.java:1121)
         at oracle.jsp.parse.OpenJspTagHandler.parseXMLSrcBody(OpenJspTagHandler.java:739)
         at oracle.jsp.parse.JspParseTag.parseXMLSrc(JspParseTag.java:1375)
         at oracle.jsp.parse.JspParseTag.parse(JspParseTag.java:1413)
         at oracle.jsp.parse.OpenJspTagHandler.parse(OpenJspTagHandler.java:802)
         at oracle.jsp.parse.JspParseTag.genXMLSrcTag(JspParseTag.java:867)
         at oracle.jsp.parse.JspParseTag.parseXMLSrcNextTag(JspParseTag.java:745)
         at oracle.jsp.parse.JspParseTag.parseXMLSrcBody(JspParseTag.java:1121)
         at oracle.jsp.parse.OpenJspTagHandler.parseXMLSrcBody(OpenJspTagHandler.java:739)
         at oracle.jsp.parse.JspParseTag.parseXMLSrc(JspParseTag.java:1375)
         at oracle.jsp.parse.JspParseTag.parse(JspParseTag.java:1413)
         at oracle.jsp.parse.OpenJspTagHandler.parse(OpenJspTagHandler.java:802)
         at oracle.jsp.parse.JspParseTag.genXMLSrcTag(JspParseTag.java:867)
         at oracle.jsp.parse.JspParseTag.parseXMLSrcNextTag(JspParseTag.java:745)
         at oracle.jsp.parse.JspParseTag.parseXMLSrcBody(JspParseTag.java:1121)
         at oracle.jsp.parse.OpenJspTagHandler.parseXMLSrcBody(OpenJspTagHandler.java:739)
         at oracle.jsp.parse.JspParseTag.parseXMLSrc(JspParseTag.java:1375)
         at oracle.jsp.parse.JspParseTag.parse(JspParseTag.java:1413)
         at oracle.jsp.parse.OpenJspTagHandler.parse(OpenJspTagHandler.java:802)
         at oracle.jsp.parse.JspParseTag.genXMLSrcTag(JspParseTag.java:867)
         at oracle.jsp.parse.JspParseTag.parseXMLSrcNextTag(JspParseTag.java:745)
         at oracle.jsp.parse.JspParseTag.parseXMLSrcBody(JspParseTag.java:1121)
         at oracle.jsp.parse.OpenJspTagHandler.parseXMLSrcBody(OpenJspTagHandler.java:739)
         at oracle.jsp.parse.JspParseTag.parseXMLSrc(JspParseTag.java:1375)
         at oracle.jsp.parse.JspParseTag.parse(JspParseTag.java:1413)
         at oracle.jsp.parse.OpenJspTagHandler.parse(OpenJspTagHandler.java:802)
         at oracle.jsp.parse.JspParseTag.genXMLSrcTag(JspParseTag.java:867)
         at oracle.jsp.parse.JspParseTag.parseXMLSrcNextTag(JspParseTag.java:745)
         at oracle.jsp.parse.JspParseTag.parseXMLSrcBody(JspParseTag.java:1121)
         at oracle.jsp.parse.OpenJspTagHandler.parseXMLSrcBody(OpenJspTagHandler.java:739)
         at oracle.jsp.parse.JspParseTag.parseXMLSrc(JspParseTag.java:1375)
         at oracle.jsp.parse.JspParseTag.parse(JspParseTag.java:1413)
         at oracle.jsp.parse.OpenJspTagHandler.parse(OpenJspTagHandler.java:802)
         at oracle.jsp.parse.JspParseTag.genXMLSrcTag(JspParseTag.java:867)
         at oracle.jsp.parse.JspParseTag.parseXMLSrcNextTag(JspParseTag.java:745)
         at oracle.jsp.parse.JspParseTag.parseXMLSrcBody(JspParseTag.java:1121)
         at oracle.jsp.parse.JspParseTag.parseXMLSrc(JspParseTag.java:1375)
         at oracle.jsp.parse.JspParseTagFile.parseXMLSrc(JspParseTagFile.java:296)
         at oracle.jsp.parse.JspParseTagFile.parse(JspParseTagFile.java:211)
         at oracle.jsp.parse.OracleJsp2Java.transform(OracleJsp2Java.java:403)
         at oracle.jsp.runtimev2.JspPageCompiler.attemptCompilePage(JspPageCompiler.java:558)
         at oracle.jsp.runtimev2.JspPageCompiler.compilePage(JspPageCompiler.java:348)
         at oracle.jsp.runtimev2.JspPageInfo.compileAndLoad(JspPageInfo.java:610)
         at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:634)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:370)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
         at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:298)
         at com.evermind.server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:42)
         at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:205)
         at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283)
         at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
         at org.apache.shale.faces.ShaleViewHandler.renderView(ShaleViewHandler.java:143)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at pt.ivv.commonbusiness.presentation.servlets.filter.HibernateFilter.doFilter(HibernateFilter.java:68)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:627)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:534)

    Hello,
    You should not try to mix JSP and JSF EL prior to JSF 1.2 and JSP 2.1, the result is inconsistent most of the time.
    To fix your current issue though, I suggest you use the rendered attribute instead of a <c:if>, so would be:
    <h:outputText styleClass="texto_red"
    value="#{bean.genericErrorMessages}"
    id="applicationErrorMessages" escape="false" rendered="#{!empty bean.genericErrorMessages}"/>Regards,
    Simon Lessard

  • Navigation List and Expression Language

    Hi,
    I have a navigation list with 3 attributes: id, name, telephone.
    I display the name and i want using expression language, based on the selected name value in the navigation list to get the id.
    Please note that i have a form that i edit a record and i want to include another view as a navigation list. The id from the navigation list i will pass it using a custom method (dropped as a command button) in my application module to proceed from there on.
    How can i do this?
    Thanks
    Antonis
    Message was edited by:
    Antonis Antoniou

    Sorted out.

  • Expression Language - Beyond binding (mini-tutorial)

    Expression Language - Beyond binding (mini-tutorial)
    Creator has a binding logic that is very easy to use. You right click on a component and choose which properties to bind onto your backing beans. Then you manipulate the backing bean property to change the bound property of your component. Or users input information into your app and the component writes through that input to your backing bean. It's cool.
    But sometimes you find yourself binding things to other things and you wonder if this is the simplest way to do things. A classic example is the old "how do I highlight a row of this table based on some datafield?" question. This has been answered by Tor Norbyte and the method works but to me it looks a little disjointed and clumsy.
    The classic solution involves binding your tableColumn's style property to a String type bean. Then inside the bean you write the logic that selectively returns a "background-color:'yellow'" string or something similar (Tor used css). The problem is that within the bean you still need to figure out what is the current row of your table. To do this you need to invoke and EL expression from the Java code which, if you were trying to avoid EL, is circular logic. Worse still, imagine you want to color columns separately.
    Here's an alternative solution using only Expression Language. It's self contained, easy to debug and maintain and once you've taken a look at it is pretty simple.
    Here's the JSP tag that does this:
    <ui:tableColumn binding="#{myHomePage.tableColumn7}"
    headerText="Expired" id="tableColumn7" 
    style="#{currentRow.value['expired']>0?'background-color: red':''}">To make it work I had to manually type the expression in the JSP file. The property editor will work with some EL statements but not all. Sometimes it mangles your EL expression and this can take a bit of debugging. <tip>Use the JSP editor...</tip>
    The bit I had to manually type is this:
    style="#{currentRow.value['expired']>0?'background-color: red':''}"All it does is check if some field in my TableRowGroup called 'expired' is greater than zero and if so highlight the cell. The construction is #{[condition]?[true value]:[false value]}
    You can also mix text and expressions in an EL expression:
    <ui:staticText ....  text="#{SessionBean1.userName}'s Home Page"/>If "Milo" is logged in he'll see "Milo's Home Page" where I placed this static text component.
    Here's an example I've got that's part of a Button tag in my JSP:
    visible="#{currentRow.value['d2.ReplacedBy']!=null}"In this case I don't want users pressing the button if the field is null, so I hide it for rows where the field is null.
    Bean or EL?
    Well strictly speaking it's not either or! In order for a Bean to be bound to a component you need an EL expression! So the question is do you implement you logic in a bean or an EL? Well that's pretty easy -- if the logic is simple and can be expressed in one line then use an EL only. Advantages: less dependencies and Bean properties floating around. If the logic is more complex use a backing bean and simple binding.
    More to explore
    Tor's blog entry:
    http://blogs.sun.com/roller/page/tor/20050113#creator_how_to_highlight_specific
    Winston's Blog entry
    http://blogs.sun.com/roller/page/winston?entry=setting_table_column_style
    [How do I add row numbers to a table?]
    http://forum.sun.com/jive/thread.jspa?threadID=112916&tstart=0
    [How do I use EL to bind to an Object's public property or field?]
    http://forum.sun.com/jive/thread.jspa?threadID=112434&tstart=0
    Addendum 1-Dec-06 Highlighting every 2nd row in a table
    The above thread on how to add row numbers to a table also exposes a pretty simple method to highlight every nth row in a table (a fairly common request)
    Something like this should work:
    <ui:tableColumn ...... style="#{currentRow.tableRow.rowId%2==1?'background-color: yellow':''}">Message was edited by:
    yossarian

    Hi Yossarian,
    Thanks for posting the simple but elegant solution. I liked the solution.
    To make it work I had to manually type the expression in the JSP file.
    The property editor will work with some EL statements but not all.
    Sometimes it mangles your EL expression and this can take a bit of
    debugging.Please file a bug against this at
    http://www.netbeans.org./community/issues.html
    Use visualweb as the sub category.
    Thanks
    - Winston
    http://blogs.sun.com/winston

  • Expression language Calling Map

    Hi Expert,
    I am trying out the following in the expression language.
    #{pageFlowScope.manageSecurityMB.dataMap[ 5]}"
    where the dataMap is a map in the backing mean. It is working fine. However i would like to change the key (in this case the 5 ) with another expression. How can i code that in expression language.
    looking forward ur suggestions.
    - t

    Hi,
    If you pass in an expression then the only way to get this working is to resolve the passed in EL string in the HashMap bean as part of the get(key) method
    Frank

  • Expression Language not getting evaluated

    I am trying a sample on tomcat 5.03. The expression Language construct is not getting evaluated.
    for eg
    <c:out value="${customer.age}" />
    simply prints the text ${customer.age} .
    Whats wrong ?
    Thanks
    Ashwani

    You probably have an old doctype for your web.xml file.
    Your web.xml needs to start like this:
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">It should NOT have this
    <!DOCTYPE web-app
        PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
        "http://java.sun.com/dtd/web-app_2_3.dtd">Basically if it sees anything less than version 2.4 in the web.xml file, it will disable EL expression language for your JSP pages. This is for backwards compatibility with existing web apps.
    To fix - remove the doctype definition, and use the new one.
    alternative: put this on your jsp page:
    <%@ page isELIgnored="false" %>That will fix it for this page. Fixing the web.xml should fix it for all pages.
    Cheers,
    evnafets

  • Help needed in JSP Expression Language

    Hi all,
    I have been working for JSP Expression Language Sample execution since past 5 days. I am using the application server as "Jboss Server" and web server as "Tomcat".
    I have been included the jsp-api.jar file in my lib directory of application server as well as source folder's lib directory.
    When i am trying to build the source code, i am getting this build error.
    [javac] D:\eclipse\workspace\esolvProject\development\src\com\esolv\taglibs\
    web\classes\SetSupport.java:186: cannot resolve symbol
    [javac] symbol : method getExpressionEvaluator ()
    [javac] location: class javax.servlet.jsp.PageContext
    [javac] ExpressionEvaluator evaluator = pageContext.getExpressionEvaluator();
    In my jsp-api.jar , there are two classes called,
    PageContext and JspContext, Both are abstract classes.
    PageContext inherits JspContext class. JspContext class have the method getExpressionEvaluator() , returns ExpressionEvaluator.
    PageContextImpl - class . it has been called internally when we are trying to call PageContext class. In PageContextImpl class, there is one comment before, the method's definition. that is
    " Since JSP 2.0 "
    But we have the JSP 2.0 version. But it won't work.
    Please help me ont this.
    Thanks in Advance,
    Natraj

    >
    If the pblm was due to setting the classpath.
    The error should be showed for all files in the jar
    file.
    why i am getting the error for particular method ?
    it is accessing the other methods of same class
    'JspContext' . but it is not accessing that method.
    Thats my question.
    Just check that your .jar file is 2.0 compliant and that you do not have any other jars(for servlet or jsp api) in the classpath.
    Probably you have an older version of .jar file in your path. So the errors will appear only for those methods that have been added since 2.0, all other methods would compile fine.
    Please tell me the jar files to work out the
    expression language. so that i can cross check my
    list of jars.Hmmm...I dont use jboss. In tomcat the jar file name is jsp-api.jar. But it would have been the same even for jsp1.1, going by jar file names wouldnt help. Just look at your cp as if with a microscope to identify redundant jars.
    cheers,
    ram.

  • Access attribute of a context node in another context node of the same view

    Hi all,
    I want to acess value of an attribute PERNR of context node CUSTOMERS in another context node AUTHENTICATION of the same view. A sample syntax would be helpful .
    Thanks,

    You didn't specify your version of Oracle so here are two options. If 10.2 or greater, use XMLTable, else use the ExtractValue option.
    -- The WITH simply simulates your existing table that I do not have.
    WITH fake_tab AS
    (SELECT XMLTYPE('<?xml version="1.0" encoding="ISO-8859-1"?>
    <Settings>
      <Setting Name="A1" Value="N"/>
      <Setting Name="A2" Value="N"/>
      <Setting Name="A3" Value="SOMEVALUE"/>
      <Setting Name="A4" Value="N"/>
      <Setting Name="A5" Value="Y"/>
      <Setting Name="A6" Value="N"/>
    </Settings>
    ') tab_col
      FROM dual)
    -- For 10.2 and higher use this SELECT
    SELECT a5
      FROM fake_tab,
           XMLTABLE('/Settings'
                    PASSING fake_tab.tab_col
                    COLUMNS
                    a5   VARCHAR2(10)  PATH 'Setting[@Name="A5"]/@Value');
    -- For 10.1 and before
    SELECT ExtractValue(tab_col, '/Settings/Setting[@Name="A5"]/@Value')
      FROM fake_tab;

  • Importing a class from another context?

    Hi JSP techies,
    Im using RESIN and having a simple problem of figuring out how to import classes from another context, if Im using the right word.
    ie.
    My .jsp files are under $home/resin/doc/test dir. And in the jsp file, I would like to import a servlet class or a plain java class. But the servlet classes and all other classes are located under $home/resin/webapps/project/WEB-INF/classes/a/b/c
    Hence when I say
    <% page import="a.b.c.*" %>
    I get an error saying "a" not found.
    1. When I say "servlet classes are in a different CONTEXT", is that right? or is it just another directory?
    2. How can I make the jsp file import the classes from the servlets class path?
    Note: Ofcourse, when I copy the package to the
    $home/resin/doc/WEB-INF/classes dir, everything works fine. But thats simply not an efficient way to get around. Could anyone clear my doubts on this regd.?
    Thanks in advance.
    Arun

    Oh... I get it now. I'm sorry, I had you poorly misunderstood. You are trying to import servlets from another web app or servlet context. I would suggest you put servlets that are common to all web apps in the system classpath and not tie them to any particular web app. In other words create a package directory structure from the system's root directory or any where outside of any web apps and point the system classpath to the beginning of that directory structure. I have a similar thing going with Tomcat. I have a folder in my root called Java_Class which is in my classpath. I build all common utilities in this directory. So I have a com/craig/web structure that holds my AppServlet which is in package com.craig.web. This servlet is visible to all web apps via the Windows classpath. Servlets particular to an application like say an MusicOrderProcess servlet would reside in a package under the webserverhome/webapps/MusicStore/WEB-INF/classes directory where webserver home is the home directory of the webserver you are using. I've tested this across webservers as well (orionserver and Tomcat) and it works.
    From the prompt you include in your posts I am guessing that you are running on UNIX. Move your common servlets out of their respective web apps and into a common directory structure. Configure the UNIX $CLASSPATH (or is it $classpath?) environment variable to point to this sturcture and you'll be on your way!
    Post again if you have more questions!

  • {Expression Language} not working tomcat5 j2se 1.5_beta

    I m new to JSP technology. I m trying to use expression language in my application and it's not letting me do the job.
    simple program
    <head> <body>
    Hi there! 3 + 3 is ${3+3}
    </body></head>
    It just shows " Hi there! 3 + 3 is ${3+3} " as the output. I tried google search. it seems the problem is across many networks like in bea weblogic etc.,
    when i used <%@page isELEnabled="true" > i get an error saying attribute isELEnabled not recognised or something like that. My web.xml hasn't got any setting for jsp so I don't know where the "*.jsp" section is available, just in case that needs any touchup.
    I have installed JSTL under /common/lib dir. but i think this library is not required for using basic EL.
    So, can anyone help me configure my JSP page so that i can use EL tags in them.
    OS: Windows 2000
    Tomcat ver: 5
    J2Se: 1.5 beta

    Hmmm. Looks like I didn't make myself clear enough.
    You still have the declaration DTD for servlet 2.3 at the top of your web.xml.
    To enable EL using Tomcat 5 you only need to do ONE of the following:
    1 - update your web.xml file to have the header for the 2.4 version (note its not a DTD anymore)
    2 - if your web.xml uses the DTD from version 2.3, include the page directive <%@ page isELIgnored="false" %> on any pages
    Basically the rules for executing EL are as follows:
    1 - Is there a directive on the page? If yes, then enable/disable according to the directive.
    2 - Is there an entry in web.xml for handling EL? If yes then enable/disable according to the setting
    3 - Is the web.xml file for the Servlet 2.4 spec? (ie does it start have the version 2.4 header) Yes = enable EL No = disable EL
    The easiest way of enabling EL is updating your web.xml to be compliant with the latest servlet spec.
    Cheers,
    evnafets

  • JDeveloper ADF Faces Problem: Expression language

    Error(): Expression Language not supported in compile time attribute test
    I have followed an ADF Faces example from the Oracle Website. Concerning a database + ADF Faces
    http://www.oracle.com/technology/pub/articles/cioroianu_jsfadf_v4.html
    I followed the tutorial correct but everytime i try to run it. I get following error:
    Error(): Expression Language not supported in compile time attribute test
    It has something to do with following line of code
    <c:if test="${subscriber == null || !subscriber.loggedIn}">
    The error appears on every page where "<c:" appears.
    I have imported the right class library
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    Does anybody have any idea what i can do?

    Dear Tim,
    What a chance!!! I've got the same problem as you?!
    I've tried almost everything, but still haven't succeeded to solve it!
    Hopefully someone can help us.
    Greetings

  • Expression language

    Hi,
    I need some help on clarifying the expression language. I have this code
    <h:outputText value="variable"/>I want to replace the variable with a value from the database. How can I do this using the expression language? Or do I need to use the JSP scriplet and call a bean function?
    clarenceloh

    Basically:<h:outputText value="#{myBean.variable}" />MyBeanprivate String variable; // + getter + setter
        loadVariable(); // Can also use constructor or static block for this.
    private void loadVariable() {
        variable = getVariableFromDatabaseSomehow();
    }

Maybe you are looking for