Question about context in which Facelets runs

I am converting my application from JSF-over-JSP to Facelets and it is going really well so far. The Netbeans template set up a Facelet's template for me with a starter-set CSS reference that looks like this:
<link href="./css/default.css" rel="stylesheet" type="text/css" />
<link href="./css/tableLayout.css" rel="stylesheet" type="text/css" />This works the way you would expect. However, when I create client facelets in a subdirectory and use the template in the root directory, the hrefs are broken because they are evaluated relative to the subdirectory, not where the template is located. Changing the references to this:
<link href="/css/default.css" rel="stylesheet" type="text/css" />
<link href="/css/tableLayout.css" rel="stylesheet" type="text/css" />Doesn't work. What does work is this:
<link href="/MyApp/css/default.css" rel="stylesheet" type="text/css" />
<link href="/MyApp/css/tableLayout.css" rel="stylesheet" type="text/css" />Although this works it strikes me as poor practice because if this application is deployed in a container as something other than "MyApp" the references will be broken again. Is that correct and if so, is there a better way of handling this?

>
Why not simply use this :
<link href="css/default.css" rel="stylesheet" type="text/css" />
That's pretty much what I started with; isn't "./css" pretty much the same as "css"?
What I was trying to avoid was replicating the css subdirectory in all the subdirectories that use it. My structure is:
/template.xhtml (has CSS references in it)
/home.xhtml (refers to /template.xhtml)
/css/default.css
/user/somepage.xhtml (also refers to /template.xhtml).I don't want to add
/user/css/default.cssbecause the file is redundant. (in my app uses one stylesheet set for all pages).

Similar Messages

  • Question about context.close in 6.0

    Hi,
    In the document of WebLogic 6.0 JNDI mention that client should close the
    context in order to release resources.
    This is not required at 5.1.
    So my question is if one does not do close the context what will happened ?
    will run of resource eventually ?
    Also when should one close the Context ?
    If the context close prematurely, does the object reference obtained from
    the context no longer valid ?
    It is kind of interesting that the JNDI context implemented in this way !
    Thanks for any answer in advance.
    Evan

    Hi Chris,
    Thanks for your reply.
    What would be the "default" access right for user
    "all" (i.e. all authenticated users)? Only "write" &
    "delete" ?
    No, it's equivalent to (read, list, execute, info,
    write, delete).
    Is it (read, list, execute,info) of user "anyone" + allow (write, delete) for user "all" = (read, list, execute, info, write, delete) for user "all"?
    Then what will be the access right of user "all" if I remove the line 'allow (write, delete) user = "all";'? Only the access right (read, list, execute,info) or even no access right at all?
    Thanks and regards,
    David

  • Question about hwmon; knowing which Temp correspond to CPU or Mobo??

    Hi all, well my problem is this:
    I want to monitor my CPU temp
    I have a Athlon X2
    So reading here in the forums, i read how to use conky and hwmon to display the temps. So far so good, BUT in: /sys/bus/pci/drivers/k8temp/
    i get 2 readings, temp1_input and temp3_input, so since im a noob, i realized that temp1_input was always hotter than temp3, so i said: ok, thats the CPU temp and the other its the motherboard, BUT when i start to do demanding things on my PC, the supossed MB temp get olmost as hot as the supossed CPU temp
    So now i dont know if each reading correspond to a core, and temp1 + temp3 equals to my total CPU temps, but the readings of the temps in the BIOS shows that the temp is actually like temp1_input (like 32 ºC),  so that make me wonder that maybe my MB gets hot as the CPU which i find it weird (right now temp3_input shows 26ºC
    So my question is, how can i know for sure to which component those temps correspond??
    Anyway that i can provide more info please tell me how
    And thanks in advance for any help :]
    using Ksensors, it shows that temp1 correspond to core0 and temp3 to core1,  so that means my CPU is at olmost 60ºC :S??
    its a brand new X2 5600+ whit artic silver and a good cooler (nothing fancy but still)
    Last edited by AlmaMater (2007-12-05 06:44:29)

    I wouldn't care about it If each core stays below 45-50°C.
    And you'll never get exactly the same readings for both cores as it's very unlikely with today's software that both will be used uniformly.

  • Question about RAC 10g on server running AIX and domain name changes

    We have several 10g clusters running on IBM p-Series AIX servers, and our company is changing the domain name for our network. I am concerned that if we do not change the domain names in the TNSNAMES.ora file and also the /etc/hosts file on each server, the cluster will no longer function. We are using CRS (version 10.2.0.3) and ASM within each cluster.
    Does anyone know where I can find information about changing the domain name that was set up as part of the CRS and database installs for RAC? Does anyone have experience doing this, and would be willing to share a few insights? Thanks in advance for any advice you can give!

    You may be able to use the VIPCA utility for RAC to change or modify the public and private settings for your domain names on AIX. Also, the Oracle 10g DBCA "Database Configuration Assistant" should be of use to change your settings for your RAC environment.
    Also, see here for a good IBM Redbook that covers Oracle 10g RAC on AIX platforms:
    http://www.redbooks.ibm.com/redbooks/pdfs/sg247541.pdf
    Regards,
    Ben Prusinski
    http://oracle-magician.blogspot.com/
    Regards,
    Ben Prusinski
    http://oracle-magician.blogspot.com/

  • Question about DME file in payment run (transaction F110)

    Hi expert,
    I have made a payment run in transaction F110.
    The payment was made and the bank file (DME file) was created. We are using DME format /BE_BEPDTA.
    The bank number in the file is the bank account number from transaction FBZP (table V_T012K, field BANKN).
    However, we would like to use the "alternative account number "in the DME file. This is table T012K, field BNKN2.
    How can this field be used in the DME file for a specific bank ?
    Thank you for your support.
    Kind regards,
    Linda

    Hello,
    Copy /BE_BEPDTA in DMEE transaction code to ZBE_BEPDTA and modify according to your needs.
    Then use this format in FBZP settings. (payment method in country)
    Regards,
    Ravi

  • I have a question regarding a small blue question mark instead of photo, I asked about this and was directed to a question about text edit, which, by the way, a neighbour helped with.

    Email photographs not seen, photograph are replaced with a small blue question mark.....what do I need to do to see the pictures ?

    Hello tomfromridgetown,
    Welcome to the Apple Support Communities! 
    I understand that sometimes when you receive an email it contains a small box with a question mark for the attachment. It sounds like what you may be seeing is a windmill.dat attachment. Please review the attached article for information on what these attachments are and how to avoid them in the future. 
    Mac OS X Mail: What is a winmail.dat attachment? - Apple Support
    Have a great day,
    Joe 

  • Question about context node filling

    Hi all gurus; I'm struggling over a simple task, hope that someone could help .
    Shortly: I defined a data structure as follows:
    DATA: BEGIN OF ls_struct,
         vendor   TYPE bbp_bp_orga,
         cptable  TYPE zebp_contpers_t, "this is a Table Type!
             END OF ls_struct,
             lt_struct LIKE TABLE OF ls_struct.
    So, there's a table lt_struct with a line that is build up by:
    - a "flat" field;
    - an internal table (made up by some fields).
    I need to TRANSPORT these information from one view to another using a common Context Node shared via ComponentController.
    I then tried to create such a node in the Context but there's something I must have done wrong:
    Here's my sketch:
    CP_FOR_BIDDERS has no Dictionary structure; here's the subnode CPTABLE:
    I tried then to store the values in these nodes in my methods:
    IF lt_struct IS NOT INITIAL.
         DATA lo_nd_cp_for_bidders TYPE REF TO if_wd_context_node..
         lo_nd_cp_for_bidders = wd_context->get_child_node( name = wd_this->wdctx_cp_for_bidders ).
         CALL METHOD lo_nd_cp_for_bidders->bind_table
           EXPORTING
             new_items            = lt_struct
    *        set_initial_elements = ABAP_TRUE
    *        index                =
    However, if I try then to GET the values from the node, I can see only VENDOR values, while the associated internal table is always blank.
    What am I missing?
    Thanks in advance

    Hi Matteo,
    You also want to bind the CPTABLE node for each CP_FOR_BIDDERS element. One example is below; you can also loop through the table of elements for node CP_FOR_BIDDERS, fetch each element's CPTABLE node and bind the CPTABLE data to each CPTABLE node.
        lo_nd_cptable = wd_context->path_get_node( path = `CP_FOR_BIDDERS.CPTABLE` ).
        CALL METHOD lo_nd_cptable>bind_table(
            new_items               = lt_cptable_data
            set_initial_elements = abap_true
    Cheers,
    Amy

  • [solved] question about two soundcards which use the same module

    Hi
    I have two external soundcards, an Edirol UA-25 and a MAudio Transit. Both use the snd_usb_audio kernel driver. When I only had the MAudio, I configured it to be soundcard number 2 with the following in /etc/modprobe/modprobe.conf
    options snd-usb-audio index=2
    Now I'd like to have one be soundcard number 2 and the other one soundcard number 3. The internal soundcard is number 0, my tv card is number 1, I don't want to change that.
    How can I do this?
    Last edited by Army (2011-08-26 16:31:10)

    Ok, works. For documention, here's what I did:
    If you have two (or more) soundcards, which use the same kernel module, this is what you need in your modprobe.conf (or call this file just like you want, it only has to be in /etc/modprobe.d and has to be called *.conf)
    options snd-usb-audio index=2,3 vid=0x0582,0x0763 pid=0x0074,0x2006
    This is what I have now. Index is the number of the card, e.g. you see those numbers in alsamixer when you press F6. The vids and pids you can get with
    lsusb -v|grep idVendor # this is for the idv
    lsusb -v|grep idProduct # this is for the idp
    Just pick the line which stands for the soundcard, put these ids into the *.conf file and you're done. Now it doesn't matter in which order you plugin the soundcards, they get the right index.
    Quite easy after all

  • Question about a bug which should be fixed in the 10.2.0.4 patchset

    Hi,
    We have a 10.2.0.4 single instance database on Sun Solaris SPARC (64-bit) and have the same symptoms as described in Bug 4643723 (error codes and the stack trace are the same). That bug should be already fixed in 10.2.0.4 patchset.
    Does anyone have experience on how to proceed in such cases - I mean, is making a SR on metalink an obvious action?
    Is it possible that the patchset wasn't applied correctly although "opatch lsinventory" outputs that the "10g Release 2 Patchset 3 (10.2.0.4)" is installed and SYS.REGISTRY$HISTORY also contains a record of the upgrade. The upgrade from 10.2.0.1 to 10.2.0.4 was performed 6 months ago and the database was continuously up and runing till then.
    Thanks for any answers

    many bugs can have the same errors. Raise an SR.
    Oracle Support will ask for an opatch lsinventory, and may ask you verify library versions, or relink.

  • Question about TravelSound 400.

    Hi, I'm new here and i have a question about TravelSound 400 which i bought several days ago. Can someone tell me why the speakers activate the bas boost or sth like that while connected to the phone and while running on batteries, when i turn it too loud the start to distort bas tones. On the other hand, when i use them with the same phone and I'm playing back same track but now it's plugged to a power adapter the don't distort and i can turn it even louder. Can someone please explain it to me ? Thank you for furthr repliyng.
    If there are any mistakes, sorry I'm not native english speaker.

    That's faulty logic. Once the alkalines diminish to that point, there isn't much life left in them. You're far better off using the NiMH batteries. The added benefit is that the voltage level is almost flat during most of their usage cycle, so you should have fairly consistent performance. If you have concerns about having to frequently charge batteries or not having replacements around when you need them, consider some of the low self-discharge NiMH batteries that are often sold as "pre-charged" as those batteries will hold an 80% charge for 6 months to a year depending on the brand. If you need a brand suggestion, try the Sanyo Eneloops.
    buddy101 wrote:
    I use 4 Ni-MH batteries 650mAh each. All four have a voltage of 4.8 Volts, each 1.2V. So it should only distort when they are fresh after loading when the batteries have about 1,5V each. Maybe i should use them now for a while and maybe the performance will be better.

  • Questions about Access Manager tutorials available in netbeans site

    Hi
    Thank you for reading my post
    I have some questions about two tutoral which i find in :
    http://www.netbeans.org/kb/55/amsecurity.html and
    http://www.netbeans.org/kb/55/amsecurity-liberty.html
    here is my problem :
    we have some web services, now we want to have authentication applied for consumer who try to access our web services.
    we need to have most possible flexibility because we may deploy the server for a customer with an already established Identity database ( Database Table with user details)
    Also we need to have Transport level security using SSL.
    I read and studied both of them and now i have some questions :
    -I think Securing Web Services Using the SAML or UserNameToken is what we need for authentication and autorization of web service consumers?
    is that right?
    -Does Sun Java System Access Manager provide flexibility to authenticate user/password with a database table content?
    -How we can apply roles in Sun Java System Access Manager when we authenticate users ?
    Thanks

    Imagine that we want to have an end to end security for our web services
    we thought that we could use message level encryption to protect the soap message and also we should protect our web services from un-authenticated acess,
    we will use userName token for this.
    Our customer has large database which contains many user/password and role of those users.
    some of web services should be available to higher role (manager) and not for all users.
    so we should check a user role before we allows him/her to access a web service.
    my question is whether Sun Access manager can help us with this? or there are other configuration or packages that we should apply to have this feature.
    to explain more :
    our client side is a swing application, users enter username/password to login into system. after they loged in, we send user/pass every time user want to request some data from some services. (is it good to send user/pass every time?)
    We want Sun Access Manager to handle users authentication .
    We also need to handle role related authorization, can Sun access manager handle this?
    Thanks

  • Ask question about asp mvc5

    hi
    i've some question about mvc5 /asp which is the right forum?
    thanks 

    Here you go: http://forums.asp.net/1146.aspx/1?MVC

  • Question about Compaq Presario CQ43

    Hello, I have a question about my notebook which is a Compaq CQ43-172LA. The thing is, I was wondering if I could change my processor. My processor is a AMD-Single Core E-240 (1.5 Ghz). And if it can be changed, what model do you recomend that would fit my notebook?

    Yes, please aim so interested in this!
    Somebody, maybe an expert cand tell us?
    We know that you know, !

  • HT5262 Hi, I have a question about iCloud. I have an ipod 4th generation and im getting a 5th generation. i have lots of games such as subway surfers and temple run 2. I worked and played really hard on earning stuff and have also made in app purchases. D

    Hi, I have a question about iCloud. I have an ipod 4th generation and im getting a 5th generation. i have lots of games such as subway surfers and temple run 2. I worked and played really hard on earning stuff and have also made in app purchases. Does iCloud save that kind of stuff?

    See:
    iOS: Transferring information from your current iPhone, iPad, or iPod touch to a new device
    However, not all in-app purchases will transfer to another device. For which ones ill not see:
    iTunes Store: About In-App Purchases

  • Some basic questions about rmi registry  context  "bind" and "lookup"

    We have more processing to do than can be accomplished with a single computer. To solve the problem I've implemented a distributed computing solution using RMI. (The first time I saw RMI was about 2 weeks ago, so please bear with me!)
    The implementation is a proof of concept not a fully fleshed out system. I have one "Workunit Distributor" computer and any number of "Data Processor" computers all on the same lan segment. "Workunit Distributor" and "Data Processor" computers are both RMI client and server to each other. The "Data Processor" computers are given the ip address and name of the "Data Distributor" on the commandline when they start. They communicate their willingness to receive and process a workunit to the ""Workunit Distributor" via a RMI call. Work units are sent to available "DataProcessors" and results are eventually returned to the "WorkunitDistributor" (minutes or hours later). The model program works quite well, and appears to be capable of doing the processing we need to get done.
    But now that it seems viable, I've been asked to make it a little more scalable, flexible and self configuring. In particular, instead of one "Workunit Distributor", any number of "Workunit Distributors" should be allowed to show up or disappear from the lan at any time and the system should continue to function. I've worked out a good scheme for how this can be done, but I have a couple of questions about the RMI registry (registries?). I'm trying to keep from implementing some functionality that may already be available as a library or subsystem.
    With my current model design, each computer binds to its own registry with a unique name. For instance:
    CRDataProcessorImpl crdpi = new CRDataProcessorImpl(svr);
    Context crDataProcessingContext = new InitialContext();
    crDataProcessingContext.bind("rmi:"+hostName, crdpi);
    Currently the "Data Processors" get the info they need for a Context lookup() of the one and only "Workunit Distributor" from the commandline. And the info the "Workunit Distributor" needs to do a Context lookup() of a "DataProcessor" is passed to it from each "DataProcessor" via a RMI call.
    But in the newer (yet to be implemented) scheme where any and all "Workunit Distributors" show up and disappear whenever they feel like, the naming bootstrapping scheme described above won't work.
    I can imagine a few ways of solving this problem. For instance, having "Workunit Distributors" multicast their contact information on the lan and have a worker thread on each "Data Processor" keep track of the naming information that was multicast. Another alternative (more organized, but more complex) might be to have a dedicated host with a "well known" address and port that "Workunit Distributors" and "Data Processors" could all go to, to register or look up at an application level. Sort of a "domain name service" for RMI. But both these schemes look like a lot of work to implement , debug and maintain.
    The BEST thing would be if there was one plain vanilla RMI registry that was usable by all RMI enabled computers instead of having each computer have its own local name registry. In volume 2 of the Core Java2 book it says that every registry must be local. I'm only hoping there's been progress since the book was published and now a central rmi registry is available.
    If you have any ideas about this I'd like to hear what you know.
    Thanks in advance for any advice.
    Lenny Wintfeld
    ps - I don't believe web services, as full featured as it is, is a useful alternative. I'm moving 100's (in the future possibly 1000's) of megabytes back an forth for processing.

    The local bind/rebind/unbind restriction is still there and it will always be there.
    I would look at
    (a) RMI/IIOP, where you use COSNaming as a registry, which doesn't have that registriction, and which also has location-independent object identifiers
    (b) Jini.

Maybe you are looking for

  • In_array jsp code

    Hi, can you tell me please, how can i know if some value exists in an array? For example, in PHP i can use the function in_array(), what can i use programming JSP?

  • Error installing certificate - help

    Hi I am trying to install a webauth certificate on a WLC (5508 6.0.188). I followed the "Generate CSR for Third-Party Certificates and  Download Unchained Certificates to the WLC" document. But when I try to upload the .pem file i get "the" "error in

  • Reg Custom GR message type

    This is regarding GR Message Type WE03 As part of Global template GR form for message we03 is already exists .. we need to develop new form for current roll-out , initially we decided to have a our own GR custon message for this purpose But when i se

  • Some trouble IN  PROC

    When I make oracle sample PROC program, display as fllow: [oracle@linux8 demo]$ make -f demo_plsql.mk make: `/oracle/product/9.2.0/lib/libclntsh.so' is up to date. My enviroment is Redhat 8.0 with oracle 920 Who can help me!

  • Hello! please change the time setting for Russia in the hour ahead. Unas in the country while now and there is one year, or winter.

    Hello! please change the time setting for Russia in the hour ahead. Unas in the country while now and there is one year, or winter.