Mix Ascending and Descending in SQL

I am very new to Oracle and SQL, but I am very curious if one can sort by mixing both ascending and descending orders within a single SELECT statement.
I have been trying to figure out why this would even be needed, but I'm certain that there are unique circumstances where one would want this capability.

SQL> select rank() over (order by a1 asc) "ASC",
  2     rank() over (order by a1 desc) "DESC"
  3  from test_asc_desc
  4  order by a1 asc;
       ASC       DESC
         1          6
         2          5
         3          4
         4          3
         5          2
         6          1
6 rows selected.
SQL> select row_number() over (order by a1 asc) "ASC",
  2     row_number() over (order by a1 desc) "DESC"
  3  from test_asc_desc
  4  order by a1 asc;
       ASC       DESC
         1          6
         2          5
         3          4
         4          3
         5          2
         6          1
6 rows selected.

Similar Messages

  • Hide sort(ascending and descending) buttons in an alv report.

    Hi,
    I want to hide the  sort(ascending and descending) buttons in an alv report.
    can any one help me with the code?
    I am not able to use the parameter IT_TOOLBAR_EXCLUDING
    of SET_TABLE_FOR_FIRST_DISPLAY of class  CL_GUI_ALV_GRID.
    Regards,
    Himanshu.

    Hi,
    data it_exclude type ui_functions.
    Exclude Standard Functions
        PERFORM f_excludetoolbar USING obj_cust_grid
                              CHANGING it_exclude.
    FORM f_excludetoolbar  USING  u_obj_cust_grid  TYPE REF TO cl_gui_alv_grid
                        CHANGING  c_it_exclude     TYPE ui_functions.
    Exclude Standard Functions
      CLEAR: c_it_exclude.
      APPEND u_obj_cust_grid->mc_fc_check              TO  c_it_exclude.
      APPEND u_obj_cust_grid->mc_fc_refresh            TO  c_it_exclude.
      APPEND u_obj_cust_grid->mc_fc_loc_copy           TO  c_it_exclude.
      APPEND u_obj_cust_grid->mc_fc_loc_copy_row       TO  c_it_exclude.
      APPEND u_obj_cust_grid->mc_fc_loc_cut            TO  c_it_exclude.
      APPEND u_obj_cust_grid->mc_fc_loc_delete_row     TO  c_it_exclude.
      APPEND u_obj_cust_grid->mc_fc_loc_append_row     TO  c_it_exclude.
      APPEND u_obj_cust_grid->mc_fc_loc_insert_row     TO  c_it_exclude.
      APPEND u_obj_cust_grid->mc_fc_loc_move_row       TO  c_it_exclude.
    APPEND u_obj_cust_grid->MC_FC_SORT_DSC          TO  c_it_exclude.
      APPEND u_obj_cust_grid->MC_FC_SORT_ASC  TO  c_it_exclude.
      APPEND u_obj_cust_grid->MC_FC_SORT           TO  c_it_exclude.*
    ENDFORM.                    " f_excludetoolbar
    Hope it will helpful for you.
    Reward if found helpful.
    Regards,
    SB

  • I want to write a CAML query on Id based on Ascending and Descending.

    Hi,
    i want to write a CAML query on Id based on Ascending and Descending.
    Can i write CAML query using both Ascending and Descending?
    Actually my requirement is if i changed the id, Ascending and Descending will perform based on this id.

    Hi,
    Do you want to retrieve a set of items which are sorted based on the value of the ID column using CAML query statement?
    If this is the case, you can compose and test the CAML query statement with the help of
    CAML Designer which with a Graphic User Interface provided:
    http://karinebosch.wordpress.com/my-articles/caml-designer-for-sharepoint-2013/
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • The formula field is not sorting both ascending and descending

    Dear All,
                   I am designing scoreboard the net amount contains the formula field, i sorted with asceding order by using sort,but it is not sorted both ascending or descending ,
                  Suppose if i used to sort the database field it is sorted properly  so any one help me very urgent
    Regards
    Selva.D
    Edited by: Rui Pereira on Aug 8, 2008 11:32 AM

    Dear Suda,
                     The scoreboard i designed via query print layout. So i calculated  by using formula field ie totalsales- sales return for that i used formula and i follow the below steps
    Choose repetitive area -
    > Right mouse click---> sort
    in the sorting i choose the formula uinque id and i choose Ascending then summary, after i click ok
    Suggest me the solution
    Regards
    Selva.D
    Edited by: Rui Pereira on Jul 8, 2008 5:18 PM

  • Ascending and descending

    I'm a new convert from pc's to macs. In pages, is there a way to do ascending and/or descending without having to use tables? I just want to use a blank page and type things in and then alphabetize without having to use tables to do so.

    My guess is that Services like WordService are forced to drop some characters from the text which they treat as this short script does.
    set noteMark to ASCII character (14)
    tell application "Pages" to tell document 1
    set tb to (body text)
    if tb contains noteMark then my strip(tb, noteMark)
    set the body text to tb
    end tell
    on strip(t, d)
    local l
    set AppleScript's text item delimiters to d
    set l to text items of t
    set AppleScript's text item delimiters to ""
    return l as text
    end strip
    noteMark is what we get at a note ref location when we grab the body text.
    If we don't drop it, the
    set the body text to tb
    instruction will fail leaving Pages in an unstable status.
    You may test after disabling the instruction:
    if tb contains noteMark then my strip(tb, noteMark)
    Yvan KOENIG (from FRANCE vendredi 6 mars 2009 12:23:35)

  • Sorting by "x" then by "y" my table (multiple criterias ascending and descending)

    Hi,
    I converted some text to a table using this:
    function ConvertoTable(){
    var myStory = app.selection[0].parentStory;
    var myTexts = myStory.texts[0];
    //We now can convert that "texts" object to a table:
    //Both arguments are separated by a "comma"
    myTexts.convertToTable("\t","\r");}
    I will always have the same kind of data with 3 columns, one with a mark/value, then a name, then a description.
    I need to sort my table first by the first column in descending order (99 to 90) and then by name in ascending order(A to Z).
    I will then export this table once it's sorted again as a text but it's an another story .
    I know that you can do it through Indesign but I would want to automate it. My javascript is really rusted and I've just started to play with the greps and the scripts within Indesign...so I was hoping someone could help me to achieve that?
    Thanks guys,
    Michael A.

    @Feeltheday – sorting tables is not that funny ;-)
    Hm. Too lazy? Just a suggestion…
    As a starting point look into the following blog posts and scripts:
    Peter Kahrel
    InDesign: Sort tables | Peter Kahrel
    And when it comes to language specific sort:
    Language-aware paragraph/line sorter (light) | Peter Kahrel
    Here the heavy-lifting:
    Language-aware paragraph/line sorter | Peter Kahrel
    Marc Autret
    Indiscripts :: Alphabetical Sort in JavaScript (and InDesign)
    Forum discussion here:
    SortParagraphs Rules Do Not Follow Standards
    Uwe

  • Can I turn off grouping by date in Finder and also 'Arrange by' and 'Sort by' in ascending and descending order?

    I am trying to arrange my photostream saved search (which doesn't update automatically after I did the search for the first time which is very annoying) but finder won't let me arrange in ascending order of date (i.e.: oldest to newest). Is there a way I can do this or will my folder arrangements always be the one way without the option to change it to the opposite arrangement (same for alphabetical). Also, Finder automatically arranges my photos into groups of dates (e.g.: 'previous 30 days', 'September'). Is there any way I can turn this off?
    Also if anyone can fix this stupid photostream issue for me that would be great!
    thanks very much 

    Even in list view, the photos are grouped by previous seven days, previous 30 days, October, and so on.. there is no option i see that will let me change to order by date modified without these groupings or to just turn these groupings off altogether
    but thank you for your reply
    -Peelo2311

  • Change sorting in Finder from ascending to descending and keyboard shortcut

    Hallo,
    can someone point me in the right direction of how to change sorting in Finder from ascending to descending and what are the corresponding keyboard shortcuts?
    I am already using the ctrl-cmd+number key shortcuts to modify my sorting, and a Google search produced the answer that I can change from ascending to descending by hitting the key-combination again. But it does not work ...
    Any help ;-)  ?
    Thank you !

    Never heard of a keyboard command to toggle the sort sequence from ascending to descending and back.
    The usual way to change it is to click the highlighted column name in the Finder window.

  • How can I do sorting from ascending to descending then unsort?

    Hi all,
    Can anybody help on this issue?
    I have a bunch of numbers in a table, and I hope when I click the column header once, it will do ascending.
    Click again, do descending. Then click three times, become unsort (which is origially ordered in absolute value).
    I tried to add tree SortKeys in sorter, but it doesn't work:
    List<RowSorter.SortKey> sortKeys = new ArrayList<RowSorter.SortKey>();
    sortKeys.add(new RowSorter.SortKey(2, SortOrder.UNSORTED));      // 2 means it's the 3rd column I want to sort
    sortKeys.add(new RowSorter.SortKey(2, SortOrder.DESCENDING));
    sortKeys.add(new RowSorter.SortKey(2, SortOrder.ASCENDING));
    sorter.setSortKeys(sortKeys);Then I tried to implement my own Comparator, but will always get numbers ordered in absolute value.
            Comparator<Float> comparator = new Comparator<Float>() {
                public int compare(Float s1, Float s2) {
                    if (s1 < 0) s1 *= (-1);
                    if (s2 < 0) s2 *= (-1);
                    return s1.compareTo(s2);   
            sorter.setComparator(2, comparator);      // 2 means it's the 3rd column I want to sortThank you very much indeed in advance.
    Cheers,
    George

    Apologies for not saying it clearly.
    I can easily do ascending and decending by applying this:
            sorter = new TableRowSorter<TableModel>(table.getModel());
            table.setRowSorter(sorter);But I also need my data to be sorted by absolute value. That's why I tried to implement my own Comparator.
    However, it turned out that I will only have one sorting method, which is the absolute value as you have noticed.
    Hence I hope the result, if possible, would be if I first click the column header, ascending orders.
    Click the second time, decending orders. And then click the third time, absolute value orders.
    Cheers

  • What is difference between 32 bit and 64 bit sql server memory management

    What is difference between 32 bit and 64 bit sql server memory management
    Thanks
    Shashikala

    This is the basic difference...check if helps:
    A 32-bit CPU running 32-bit software (also known as the x86 platform) is so named because it is based on an architecture that can manipulate values that are up to 32 bits in length. This means that a 32-bit memory pointer can store a value between 0 and
    4,294,967,295 to reference a memory address. This equates to a maximum addressable space of 4GB on 32-bit platforms
    On the other hand 64-bit limit of 18,446,744,073,709,551,616, this number is so large that in memory/storage terminology it equates to 16 exabytes. You don’t come across that term very often, so to help understand the scale, here is the value converted to
    more commonly used measurements: 16 exabytes = 16,777,216 petabytes (16 million PB)➤ 17,179,869,184 terabytes (17 billion TB)➤ 17,592,186,044,416 gigabytes (17 trillion GB)➤
    As you can see, it is significantly larger than the 4GB virtual address space usable in 32-bit systems; it’s so large in fact that any hardware capable of using it all is sadly restricted to the realm of science fiction. Because of this, processor manufacturers
    decided to only implement a 44-bit address bus, which provides a virtual address space on 64-bit systems of 16TB. This was regarded as being more than enough address space for the foreseeable future and logically it’s split into an 8TB range for user mode
    and 8TB for kernel mode. Each 64-bit process running on an x64 platform will be able to address up to 8TB of VAS.
    Please click the Mark as answer button and vote as helpful if this reply solves your problem

  • DIFFERENCE BETWEEN SUM AND COUNT IN SQL

    DIFFERENCE BETWEEN SUM AND COUNT IN SQL
    WHAT IS THE DIFFERENCE VERIFY IN DETAIL/

    21031980, I suggest you upgrade your computer sothat you can access google.
    lol.
    wtfpwnd.Google is also helpful for understanding the strange
    acronyms that show up around here lately (yes, I did
    find and understand this one). :-)Haha, sorry!
    It's the inner-gamer in me rearing its ugly head...
    :-)

  • Mixing ECC and NECC (Non-ECC) RAM Modules

    Hi,
    I have a G5 Dual Core 2.0 with a pair of 512Mb Non-ECC (NECC) RAM installed and I want to upgrade to 3Gb. I'm thinking of getting 2Gb ECC modules and discarding the 1Mb NECC installed. But I came across a phrase in the Apple Manual of my G5 that states "DO NOT MIX ECC and NON-ECC Memory Modules WITHIN A PAIR." Does that mean I can mix ECC and NECC within Memory Banks and NOT within a PAIR? Because in that case I won't have to discard my NECC 1Gb and have a mixed 3Gb Memory!? I'm afraid to actually try it so I would appreciate your insights. Thanks much.
    G5 Dual Core 2.0   Mac OS X (10.4.7)  

    Yes. You can mix ECC and nonECC as long as you don't pair the ECC with the nonECC. The computer will just treat all RAM as nonECC.
    You can keep the original memory as long as the two 512MB DIMMs are always paired with each other.

  • Mixing XDCAM and HDV?? Outputting to SD DVD...

    Hi
    Earlier this year we shot a documentary on a Sony PDW-F350L HD XDCam (great camera, stunning footage - 35Mbps). Working in FCP has been fine.
    We're doing a follow up and budget and logistics dictate that we sadly can't use 350s again (where we're going, carrying 2 Z1s for example is going to be a lot easier). We're also on a fairly steep learning curve (being relatively new to FCP, Compressor etc).
    So I'm looking at options. We know that there are significant differences between say a Z1 and a 350 but from my research so far and from some relatively simple testing mixing Z1 footage (native) and 350 footage on FCP, at least editing on the timeline doesn't seem like it's going to present any problems (although thoughts on that welcome).
    The issue seems to be outputting. In the first instance we'll be outputting to SD DVD. Yes, that old gem...
    Searching round various forums, it seems this problem (HDV - SD) is fairly universal. Solutions seem to range from not working in Native HDV (suggestions vary on the format to ingest in - AIC etc); outputting to different formats first (eg DVCPro HD) and then to MPEG-2; outputting the timeline to tape (DV), re-importing; using some thing like a Matrox MXO to output and others...
    We're aware of the shortcoming of HDV and the compressed nature of the format and our expectations, given our kit are realistic. I've even tried putting some PD150 footage on the timeline but that's just not going to cut it.
    So, I've got to put a kit list together by next week and wondered if anyone had any thoughts on:
    1) Mixing XDCAM and HDV on the timeline and any gotchas we should watch out for.
    but more importantly
    2) Any suggested routes I can look at to get some reasonable output with these two formats on the timeline - particularly HDV (don't think we'll have time to look at the Matrox route right now).
    Many thanks in advance for any thoughts.
    Cheers

    Thanks Andy, Michael
    That's good input. From an editing point of view we seem to be ok. Although, Michael, I take your point and that's a good suggestion.
    The main problem is the workflow to create a decent SD DVD without the artefacts caused by compression/motion etc in HDV (and to some extent XDCAM).
    Have read the prores whitepaper at
    http://images.apple.com/finalcutstudio/resources/whitepapers/L342568A_ProResWP.pdf
    And looked a little more into understanding GOP structures and it seems that ProRes will help in terms of editing.
    The white paper seems to suggest that converting to ProRes, because it uses I frame–only encoding "Ensures consistent quality in every frame and no artifacts from complex motion. "
    We'll try some tests but, does anyone know if this is true?
    But it also seems that deinterlacing may solve some of the horrendous vertical edge rippling we're getting on the HDV footage when outputting to SD DVD - although if I'm honest I'm not sure how we achive that with our current setting.

  • Mixing static and dynamic content in a single outputText value causes NPEs

    Hi,
    I am having a problem and I'm wondering if it is a result of my error or if this is a bug.
    I am mixing dynamic and static content in the value attribute of tags (e.g., outputText). On initial page load, everything works fine. However, if the same view is reloaded (e.g., after a failed validation) I get an NPE from JSF:
    [#|2006-10-24T08:49:03.756-0500|SEVERE|sun-appserver-pe8.2|javax.enterprise.system.container.web|_ThreadID=12;|StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
    java.lang.NullPointerException
            at com.sun.faces.el.MixedELValueParser.getNextToken(MixedELValueParser.java:140)
            at com.sun.faces.el.MixedELValueParser.parse(MixedELValueParser.java:123)
            at com.sun.faces.el.MixedELValueBinding.getValue(MixedELValueBinding.java:60)
            at javax.faces.component.UIOutput.getValue(UIOutput.java:147)
            at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:82)
            at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:201)
            at com.sun.faces.renderkit.html_basic.LabelRenderer.encodeBegin(LabelRenderer.java:128)
            at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:683)
            at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:443)
            at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:233)
            at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
            at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:445)
            at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:130)
            at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
            at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:445)
            at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:233)
            at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
            at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:445)
            at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:130)
            at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
            at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:445)
            at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:233)
            at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
            at javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:609)
            at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:546)
            at com.sun.faces.taglib.html_basic.PanelGridTag.doEndTag(PanelGridTag.java:460)
            at org.apache.jsp.registration_jsp._jspx_meth_h_panelGrid_0(registration_jsp.java:324)
            at org.apache.jsp.registration_jsp._jspx_meth_h_form_0(registration_jsp.java:223)
            at org.apache.jsp.registration_jsp._jspx_meth_f_view_0(registration_jsp.java:157)
            at org.apache.jsp.registration_jsp._jspService(registration_jsp.java:118)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:297)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:247)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
            at sun.reflect.GeneratedMethodAccessor188.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
            at java.security.AccessController.doPrivileged(Native Method)
            at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
            at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
            at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
            at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
            at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
            at java.security.AccessController.doPrivileged(Native Method)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:723)
            at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:482)
            at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:417)
            at org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.java:80)
            at org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(ApplicationDispatcher.java:95)
            at java.security.AccessController.doPrivileged(Native Method)
            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:313)
            at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:326)
            at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:132)
            at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
            at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:194)
            at sun.reflect.GeneratedMethodAccessor202.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
            at java.security.AccessController.doPrivileged(Native Method)
            at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
            at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
            at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
            at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
            at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
            at java.security.AccessController.doPrivileged(Native Method)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:189)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:604)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:475)
            at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:371)
            at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:264)
            at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:281)
            at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:83)My code looks like this:
    <h:outputText escape="false"
              value='<link href="#{myBean.styleSheet}" rel="stylesheet" type="text/css"  />' />If I replace this with a much more convoluted set of tags, it works:
    <h:outputText escape="false"
              value='<link href="' /><h:outputText escape="false" value="#{myBean.styleSheet}"
              /><h:outputText escape="false" value='" rel="stylesheet" type="text/css" />' />So is the problem that I am mixing dynamic and static content with a single value? If so, why does it work on the first view, and not after?
    If it matters, I'm using the reference implementation version 1.1 (as included with NetBeans 5.5RC2) on SuSE 10.0 w/ JDK 1.5_09.
    Thanks,
    Bill

    Yes, that's how I originally had it, but then changed it to the outputText approach since a single tag could do what I wanted, as long as I was allowed to mix static and dynamic content within a single value.
    I think this is a bug in JSF 1.1, since if what I am doing is illegal, it should throw an exception on the first page view, not work on first view and throw an exception on subsequent views. I'm guessing that this has something to do with the fact that on first page view it only runs the restore view and render response JSF phases, while on subsequent requests all of the phases will be run, and it's in one of those other phases that the exception is thrown.
    For now, multiple tags is the work-around, I guess.
    Thanks,
    Bill

  • Adding a jar to the classpath of an executable jar (mixing -jar and -cp)

    Hello,
    frankly I hesitated over posting this to "New to Java"; my apologies (but also, eternal gratefulness) if there is an ultra-simple answer I have overlooked...
    I integrate a black-box app (I'm not supposed to have the source) that comes packaged as an executable jar (with a Manifest.MF that specifies the main class and a bunch of dependent jars), along with a few dependent jars and a startup script. Long story short, the application code supports adding jars in the classpath, but I can't find a painless way to add a jar in its "classpath".
    The app's "vendor" (another department of my customer company) has a slow turnaround on support requests, so while waiting for their suggestion as to how exactly to integrate custom jars, I'm trying to find a solution at the pure Java level.
    The startup script features a "just run the jar" launch line:
    java -jar startup.jarI tried tweaking this line to add a custom jar in the classpath
    java -cp mycustomclasses.jar -jar startup.jarBut that didn't seem to work ( NoClassDefFound at the point where the extension class is supposed to be loaded).
    I tried various combination of order, -cp/-classpath, using the CLASSPATH environment variable,... and eventually gave up and devised a manual launch line, which obviously worked:
    java -cp startup.jar;dependency1.jar;dependency2.jar;mycustomclasses.jar fully.qualified.name.of.StartupClassI resent this approach though, which not only makes me have to know the main class of the app, but also forces me to specify all the dependencies explicitly (the whole content of the Manifest's class-path entry).
    I'm surprised there isn't another approach: really, can't I mix -jar and -cp options?
    - [url http://download.oracle.com/javase/6/docs/technotes/tools/windows/classpath.html]This document (apparently a bible on the CLASSPATH), pointed out by a repited forum member recently, does not document the -jar option.
    - the [url http://download.oracle.com/javase/tutorial/deployment/jar/run.html]Java tutorial describes how to use the -jar option, but does not mention how it could play along with -cp
    Thanks in advance, and best regards,
    J.
    Edited by: jduprez on Dec 7, 2010 11:35 PM
    Ahem, the "Java application launcher" page bundled with the JDK doc (http://download.oracle.com/javase/6/docs/technotes/tools/windows/java.html) specifies that +When you use [the -jar] option, the JAR file is the source of all user classes, and other user class path settings are ignored+
    So this behavior is deliberate indeed... my chances diminish to find a way around other than specifying the full classpath and main class...

    I would have thought that the main-class attribute of the JAR you name in the -jar option is the one that is executed.Then I still have the burden of copying that from the initial startup.jar's manifest. Slightly less annoying than copying the whole Class-path entry, but it's an impediment to integrating it as a "black-box".
    The 'cascading' behavior is implicit in the specification
    I know at least one regular in addition to me that would issue some irony about putting those terms together :o)
    Anyway, thank you for confirming the original issue, and merci beaucoup for your handy "wrapper" trick.
    I'll revisit the post markers once I've actually tried it.
    Best regards,
    Jérôme

Maybe you are looking for

  • Can I separate 'music' and video folders?

    Hi, I want to put my videos on another drive (E:) while leaving my music on the standard install location in C: Is this possible or must I move the entire iTunes library to E: (I've read the posts on how to do that) I've tried 'Add file to library' f

  • Moving lightroom 5.4 from win 7 pc to imac

    Hi I have a new iMac and want to move lightroom 5.4 from an old win 7 laptop to the iMac. I can't find an option to reactive lightroom on the laptop. Can i just uninstall from laptop and re install on iMac then use the same serial number?

  • Help With Dynamically Linking Premiere With After Effects

    Recently, I edited some video footage in Adobe Premiere, dynamically linked it with After Effects, and added several effects and transitions within the latter application. However, after I thoroughly finished with my effects editing, I wished to plac

  • Configuring Portal launcher

    Hello all, Is there a way to configure the 'servlet/prt/portal/prtroot/com.sap.portal.navigation.portallauncher.anonymous' (http://help.sap.com/saphelp_nw70/helpdata/en/cd/1aad4abcb98c4597f9e395a6b62f43/frameset.htm) to access a diferent url alias th

  • NW2004s SP12, action not called when Save button pressed

    Hi Experts, I have a strange behaviour in my Interactive form SAVE functionality. If its a large form, the SAVE button does not call corresponding action method in the implementation. However it does when the form size is small eg 1.5Mb or so. Please