How do you guys work around this trivial situation?

Hi,
I'm using GlassFish v2 and JSF 1.2.
Since JSP can be run using the direct url of the JSP page and the JSF pages require some prefix like "/faces/" how do you guys deal with situations
when somebody accesses the direct link of the JSF (that means without typing "faces/") ? - I noticed that GlassFish throws an error in this case which must be addressed I think.
Any hint or constructive comment would be highly appreciated. Or is this an open problem when using JSF?

Well thank you a lot, I did more googling before finding your second reply and found some info about filters, I will check your links as well and
see if I can polish my solution based on your links.
For those who might look for solving the same issue:
I added to web.xml this (my faces are prefixed with "/fx" rather than "/faces", a matter of taste):
<filter>
          <filter-name>JsfFilter</filter-name>
          <filter-class>xlinuks.JsfFilter</filter-class>
          <init-param>
               <param-name>search_token</param-name>
               <param-value>.jsp</param-value>
          </init-param>
          <init-param>
               <param-name>add_token</param-name>
               <param-value>/fx</param-value>
          </init-param>
     </filter>
     <filter-mapping>
          <filter-name>JsfFilter</filter-name>
          <url-pattern>*.jsp</url-pattern>
     </filter-mapping>And the filter itself is this:
package xlinuks;
import java.io.IOException;
import javax.servlet.*;
import javax.servlet.http.*;
public class JsfFilter implements Filter {
     private FilterConfig filterConfig;
     private String sSearchToken, sAddToken;
     public void doFilter( ServletRequest request, ServletResponse response, FilterChain chain ) throws ServletException, IOException {
          HttpServletRequest httpReq = (HttpServletRequest) request;
          String sUri = httpReq.getRequestURI();
          if( (sAddToken == null) || (sSearchToken == null) ) {
               chain.doFilter( request, response );
               return;
          int iIndex = sUri.indexOf( sSearchToken );
          if( (iIndex > -1) && (sUri.indexOf( sAddToken ) < 0) ) {
               sUri = sAddToken + sUri.substring( sUri.lastIndexOf( "/" ) );
               filterConfig.getServletContext().getRequestDispatcher(sUri).forward(request, response);
               return;
          } else {
               chain.doFilter(request, response);
     public void init(FilterConfig filterConfig) throws ServletException {
          this.filterConfig = filterConfig;
          sSearchToken = filterConfig.getInitParameter( "search_token" );
          sAddToken = filterConfig.getInitParameter( "add_token" );
     public void destroy() {
          filterConfig = null;
}

Similar Messages

  • I no longer have access to my icloud email and don't know the answers to my security questions. Does anyone know how to work around this to reset my icloud ID without losing my info? I haven't backed up in a year because of this.

    I no longer have access to my icloud email and don't know the answers to my security questions. Does anyone know how to work around this to reset my icloud ID without losing my info? I haven't backed up in a year because of this.

    You need to ask Apple to reset your security questions. To do this, click here and pick a method; if that page doesn't list one for your country or you're unable to call, fill out and submit this form.
    (123381)

  • Itunes 11.1.5 will not sync new apps with iPhone 5 iOS 7.0.6 and gives grayed out "install" no message?  How does one work around this?

    Itunes 11.1.5 (MacBook Pro,OS 10.6.8) will not sync new apps with iPhone 5 iOS 7.0.6 and gives grayed out "install" no message?  How does one work around this?

    Just reboot your laptop... While its rebooting try to reboot your phone also by holding the home and power buttonn for 10-15 seconds...When your phone is turned off try to connect it to iTunes and it will recognize your phone in recovery mode.
    If you have the .ipsw file for iOS 7.0.6 saved in your desktop then in itunes press shift and click on Restore.
    Select the ipsw file and let it restore.
    If you dont have it downloaded then simply click on restore.
    I hope it works
    Cheers !

  • Home Sharing turns off as soon as my computer enters sleep mode.  How can I work around this issue?

    Home Sharing turns off as soon as my computer enters sleep mode.  How can I work around this issue?

    please start firefox in safemode (by pressing the shift-key while it is launching) & go to ''firefox > options > advanced > general'' & disable hardware acceleration.
    for some background on that issue you can also refer to [https://bugzilla.mozilla.org/show_bug.cgi?id=812683 bug #812683]

  • I upgraded my macbookpro hard drive to 1 TB then migrated my files from time machine. I'm now locked out of the computer because the password is not the same as my usual one and one that was years old and not retreivable. How do I work around this?

    I upgraded my macbookpro hard drive to 1 TB then migrated my files from time machine. I'm now locked out of the computer because the password is not the same as my usual one and one that was years old and not retreivable. How do I work around this?

    Whether or not you are able to recover the data off the drive yourself will depend on if the drive suffered any impact damage in the crash. You can buy USB SATA or IDE adapters (Intel and almost all G5 use SATA) that will let you connect your hard drive to a computer (like a flash drive) to see if you can recover the data. If the drive has suffered physical damage if may not mount.
    If you know someone who has one of these adapters you could try using theirs, otherwise you could buy one but you take the risk of the data on the drive being non recoverable. Regardless, both are much cheaper than $1699!
    (Alternatively, if you know of someone with a Mac Pro or PowerMac G5 they may be able to install the drive in their machine and try to boot from or mount it and copy the data off.)

  • Hi there how are you guys out there of this forum? I got a question for y'a

    Hi there how are you guys out there of this forum? I got a question for y’all
    I wanted to know how I could record different folders using iTunes
    Cause when recorded 2000 thongs on the DVD
    There were 2000 songs to go through
    So I really wanted to have had folders and then the music recorded inside them
    So I could get right to where I wanted real quickly
    Could anyone please teach me how to do that real quickly?
    Can we do it with iTunes?
    I know we can do it with Nero.

    1) Go to file, select new playlist. Creat the playlaist.
    2) Download your music into iTunes.
    NOTE: CHECK 'Recently Added' before you download your music.
    If the select boxes has a check in them, turn it off by
    holding down the 'ctrl' key and selecting one of the
    checked boxes. This shold turn off all the checks.
    It would be better to clear 'Resently Add' of all
    previous downloads, but I don't know how to do that
    yet.
    3) under 'PLAYLIST' on the right, select 'Recently Add'.
    all of your song should show there with a check in the selection
    box.
    4)Hold the shift key and select the frist (selete records name),
    then the last recorded tune. All of the recordings shouls light
    up blue.
    5) While holding the 'shift' key, drag one of the records to your new
    playlist. All of the blue highlighted song will transfer to the new
    playlist.

  • HT202919 I need to update my ARD admin from 3.6 to 3.7 but client is at 3.8 and it errors out. How do I work around this?

    I need to update my ARD admin from 3.6 to 3.7 but client is at 3.8 and it errors out. How do I work around this?

    This is a concern amoung many corporate users.  It's going to take somekind of policy change with apple.
    Enterprise support:
    Call enterprise support  (866) 752-7753  to create  a case ID number

  • I recently up dated my OS to 10.7.3 and I get a "can't open application because PowerPC applications are no longer supported.  Can this be restored?  If not do you know if Epson has drivers for my scanner that work around this?

    I recently up dated my OS to 10.7.3 and I get a "can't open application because PowerPC applications are no longer supported.  Can this be restored?  If not do you know if Epson has drivers for my scanner that work around this?

    You cannot run PPC software in Lion. Go to Epson's website to see if they have an updated scanner driver. If they don't then you can try using VueScan if it supports your scanner model.

  • Flex - Java Data transfer objects. How do you usually work ? (Brainstorming)

    Hi,
    I would like to explain you how I work and to know how you guys do.
    All this discussion is just an example of how I work. I really want to know how other coders usually work. This way, maybe I can improve my code.
    I would like to know how do you do when you want to retreive data into typed objects when these data contains reference to other typed objects.
    Here is how I always work :
    I want to retreive all my customers into a flex datagrid and to display all information.
    Here is my Customer table structure (just an example)
    id, name, refCompany, refLanguage, refCountry, refCustomerGroup
    refCompany, refLanguage, refCountry, refCustomerGroup are IDs that reference to other tables.
    To ensure to retreive all data into typed object, I make a Customer,Company, Language, Country, CustomerGroup, Flex and Java classes.
    I make a query that looks like : Select * from Customer
    My java code will looks like :
    List<Customer> customers = new ArrayList<Customer>;
    ResultSet rs = myConn.execSelect(query);
    while(rs.next)
         customers.add(new Customer(rs))
    return customers;
    In my Customer class, I have a constuctor that takes a resultSet
    My customer class contains variables (refCompany that is actually a Company object (not an id), refLanguage that is actually a Language object (not an id),... )
    Customer(ResultSet rs)
         this.name = rs.getString("name")
         this.refCompany = new Company.findById(rs.getInt("refCompany"))     //This function returns a Company object
         this.refLanguage = new Language.findById(rs.getInt("refLanguage"))     // This function returns a Language object
    Here is how I always do. I don't know if it is a good way because for each customer found in the database, I will make 4 queries (4 findById to find each object : company, language, country, customerGroup of the current customer).
    But this way is generic, I don't have to make a specific query that will retreive all objects in one time. I select all customers, and in the constructor I select all objects that I have the reference...
    The big problem with this way is when I retreive objects, I always retreive all referenced objects and I do not necessarily want it.
    What do you think about the way I work ? How you guys do ? what is the best practice ?

    up...

  • I am facing 'How do you want to use this disc' whenever I read/open any lightscribe discs having data.

    Hi,
    When I insert a lightscribe DVD/CD into a lightscribe optical drive, then when I click to open the DVD, I faced this error 'How  do you want to use this disc', although the DVD was full of data. When opening these 
    lightscribe DVD/CD via NON lightscribe optical drive, I noticed that the DVD/CD  opened well without any problems at all.
    Also, how can the System show to me 'How  do you want to use this disc' , in particular when  a DVD is non rewritable(DVD-R) and also contains data)?
    Bear in mind, not all DVDs/CDs were not detected. However, only full lightscribe discs' (having data)
    However, even blank lightscribe discs were detected without problems. When insert a lightscribe disc having data, then I faced that error. However, when inserting  blank lightscribe discs I found that the disc were opened.  Also,
    non lightscribe discs were opened well.
    When checking the device manager, I didn't see any issue with DVD/CD drive. If there were a problem unrecongnising, then I would have seen 'a remarkable mark' in front of it.
    Note: I have faced this problem after trying formating a rewritable CD inserted onto the drive. Althouthg the format failed, all data on the disc was deleted. Anyway, after that, then inserting full-lightscribe  discs are unregonised
    Do you think the problem wth my optical drive. IF so, I would be saying why it wasn't happened with all other non lightscribe discs. If my lightscrib discs were corrupted, then why would they have opened well on another laptop.
    I have done:
    Press the Windows logo key+R to open the Run dialog box.
    Type devmgmt.msc in the Run dialog box, then press Enter. If you are prompted for an administrator password or for a confirmation, type the password, or click Allow
    In Device Manager, expand DVD/CD-ROM drives, right-click the CD and DVD devices, and then clickUninstall.
    When you are prompted to confirm that you want to remove the device, click OK.
    Restart the computer.
    But the same prolbem is existing.
    yes there is a virtual CloneDrive program installed on my PC, however, there is no any CD mounted into it. Even if a CD was mounted into Virtual Clondrive, there would be no problem at all, because the virtual CloneDrive is used to only
      mount ISO disc images into it, and not physical discs.
    Any I have do what you have said, when inserting a light-scribe disc having data, then I open it, I found this
    NOTE: in the above screen shot there is a lightscribe DVD having data inserted. However, in the screen shot below, there  a ightsrbe DVD not having data inserted. In the first screen shot, the disc is not reconginsed by Windows, however, in
    the second is recognised. 
    Even when I have inserted a lightscribe disc not having data(empty), it opened well regardless of  what virutal CloneDrive is enabled or disabled.
    But when cliced on my problem didn't solve,
    A man should convert his anger and sadness into strength to continue living in this life.

    Hi,
    The product Name of my computer is: HP Pavilion dv6-6093ex Entertainment
    Notebook PC support
    The number of my computer is : LM610EA#A2N.
    Could anyone please at this splendid forum take some of their precious time
    out to really reply my questions and solve my problems?
    FIRST OF ALL:
    My HP Pavilion Laptop is about 3 years old.
    My
    sister's Dell Inspiron laptop is 3 years old.
    My HP lapotp is well-cared, as opposed to my sister's Inspiron Dell laptop,
    which is always thrown in dust without caring at all. Also, its battery is
    always inserted even when it is fully charged while the laptop is plugged in to
    the main power supply.
    However, my laptop is either used on only battery, or on plugin. Also, it is
    kept from the dust.
    But, I really found that the battery of the Dell laptop
    still lasts about three and half hours, and there is no problem cooling fan is
    not oproperly preporly.
    I only remember one thing differently done on my laptop battery which is I
    charged it fully, then I stored it without using it for about four months, then
    when I reused it, I found it got worse over time. I.e. first time of using it
    after storing,I found it empty, then I charged it again fully, however, then it
    lasted about 2 hours, then 1 and half hours, next an hour, now it is only
    lasting about 20 minutes without performance. If there is high performance, then
    the computer shuts down suddenly.
    My problem is follows:::
    First: Whenever I inserted any Containing Data OR Data
    CD/DVD-R LightScribe discs, I found that HP optical driver was
    unable to read them. When clicking on the optical disc drive
    'duble-click', then I find that disc opens as this way(NOT: With a CD/DVD player
    is grayed out)
    Blank Or Used CD, DVD±R,RW lightscirbe is unable to be
    read:(clicking on it let it Open like a USB FlashDrive or With a CD,DVD player:
    NOTE: with CD/DVD Player is grayed out)
    Used CD/DVD±R/RW Non-LightScribe disc opens normal:
    Blank CD,DVD±R,RW Non-LightScribe opens normal(Opens like a USB FlashDrive or
    With a CD,DVD)::
    My HP CD/DVD DVD±R/RW specis are::
    Optical Drives
    hp CDDVDW TS-L633R
    Media Type DVD Writer
    Name hp
    CDDVDW TS-L633R
    Availability Running/Full Power
    Capabilities Random
    Access, Supports Writing, Supports Removable Media
    Read capabilities CD-R,
    CD-RW, CD-ROM, DVD-RAM, DVD-ROM, DVD-R, DVD-RW, DVD+R, DVD+RW, DVD-R DL, DVD-RW
    DL, DVD+R DL
    Write capabilities CD-R, CD-RW, DVD-RAM, DVD-R, DVD-RW, DVD+R,
    DVD+RW, DVD-R DL, DVD+R DL
    Config Manager Error Code Device is working
    properly
    Config Manager User Config FALSE
    Drive E:
    Media Loaded
    FALSE
    SCSI Bus 0
    SCSI Logical Unit 0
    SCSI Port 0
    SCSI Target Id
    1
    Status OK
    Trying to solve the problem,
    I have done these steps in order::
    I tried checking with dignostic ulitiy:
    I have tried Advanced View , this is the file of output data
    diagnostic utility
    LightScribe System Software Settings:
    SOFTWARE\LightScribe\MessageDir
    C:\Program Files (x86)\Common
    Files\LightScribe\
    SOFTWARE\LightScribe\LSPrintDialog C:\Program Files
    (x86)\Common
    Files\LightScribe\LSPrintDialog.exe
    SOFTWARE\LightScribe\LSPrintingDialog
    C:\Program Files (x86)\Common
    Files\LightScribe\LSPrintingDialog.exe
    SOFTWARE\LightScribe\LsPrintLauncher
    C:\Program Files (x86)\Common
    Files\LightScribe\LSPrintLauncher.dll
    SOFTWARE\LightScribe\ResourceDir
    C:\Program Files (x86)\Common
    Files\LightScribe\res
    SOFTWARE\LightScribe\LSPrintAPI C:\Program Files
    (x86)\Common
    Files\LightScribe\LSPrintAPI.dll
    SOFTWARE\LightScribe\Update\UpdateShellCommand
    http://www.lightscribe.com/go/downloads/windows
    SOFTWARE\LightScribe\Update\PreviousVersion
    1.18.20.1
    SOFTWARE\LightScribe\Update\CurrentVersion
    1.18.27.10
    SOFTWARE\LightScribe\Update\TrailingVersion
    SYSTEM\CurrentControlSet\Services\LightScribeService\Type
    16
    SYSTEM\CurrentControlSet\Services\LightScribeService\Start
    2
    SYSTEM\CurrentControlSet\Services\LightScribeService\ErrorControl
    0
    SYSTEM\CurrentControlSet\Services\LightScribeService\
    SYSTEM\CurrentControlSet\Services\LightScribeService\DisplayName
    LightScribeService Direct Disc Labeling
    Service
    SYSTEM\CurrentControlSet\Services\LightScribeService\ObjectName
    LocalSystem
    SYSTEM\CurrentControlSet\Services\LightScribeService\Description
    Used by the LightScribe software components to support 3rd party disc labeling
    applications using the LightScribe COM Application Programming Interface
    (LSCAPI). This service needs to run for LightScribe direct disc labeling to
    work.
    SYSTEM\CurrentControlSet\Services\Eventlog\Application\LightScribeService\
    SYSTEM\CurrentControlSet\Services\Eventlog\Application\LightScribeService\
    SYSTEM\CurrentControlSet\Services\Eventlog\Application\LightScribeService\TypesSupported
    7
    SYSTEM\CurrentControlSet\Services\Cdrom\Enum\0
    IDE\CdRomhp_CDDVDW_TS-L633R______________________0300____\4&334f7860&0&0.1.0
    SYSTEM\CurrentControlSet\Services\Cdrom\Enum\Count
    2
    SYSTEM\CurrentControlSet\Services\Cdrom\Enum\NextInstance
    2
    SYSTEM\CurrentControlSet\Services\Cdrom\Enum\1
    SCSI\CdRom&Ven_ELBY&Prod_CLONEDRIVE&Rev_1.4\1&2afd7d61&0&000000
    SOFTWARE\Microsoft\Windows
    NT\CurrentVersion\Winlogon\allocatecdroms
    0
    SYSTEM\CurrentControlSet\Services\CDRom\autorun 1
    SOFTWARE\INTEL\Intel
    Application Accelerator Not detected
    Drives and Media:
    Drive 0 : hp CDDVDW TS-L633R 0300 219 (E, Media
    Imaging Parameter : 114
    I tried running the below command line to fix potential disk issue 'Chkdsk
    /r /f'
    I cleaned the drive, discs, and so on.
    I have uninstalled the all third-party data recording software.
    I have uninstalled the Cyber DVD suite, lightscribe system software which
    came pre-installed with my HP pavilion Notebook.
    I have recovered my system from the Factory Recovery discs.
    I have tried opening all those LightScibe discs not opening on my HP optical
    drive, on a Dell optical drive, and all of them were opened well, although Dell
    optical drive did not have a lightscribe feature at all., nor third party disc
    recording software
    However, the problem is still with opening the discs LIGHT-SCRIBE
    Thus, my questions are:
    How to determine if the drive is corrupted and needs to be replaced with
    another one.
    I think there something needed to be done on the BIOS Of my HP
    laptop[[[A similar problems happened on my Desktop computer's optical
    drive which is as follows:::(ALL discs are opened as empty by Optical Drive of
    My Desktop Computer) ---while my optical drive of my desktop was connected to
    the primary slave IDE, and the HDD was connected to the
    primary master IDE, the optical drive and hard disk are functioning
    well. However, I remember that while burning an image with Nero essential V: 5,
    something went wrong, and then the Optical Drive of My Desktop Computer
    (HL-DT-ST DVD-RAM GH22NP20) became NOT recognised/Installed on
    BIOS, although it was still shown on the device manager as a
    recognised device. Also, it was listed on my computer, however, when entering a
    disc(blank or with data) into the drive, I found it was not recognised, and it
    opened empty(no files at it), although it contains data. Thus, I decided to boot
    to BIOS, and clicked on 'Autodetection for IDE', then I found that only HDD was
    still shown as installed on BIOS. However, the optical drive was not. Th I tried
    clicking on it on BIOS and then clicking on 'enter' to try to let the device be
    re-recognized. However, that made no difference. I had to take part my computer
    ,and then reconnected the optical drive onto the secondary slave
    IDE , and let HDD connected to the same primary master IDE.
    Then, I found that the problem solved and all discs became being read
    normally. Aslo, optical drive became installed on BIOS]]]
    What is meant with with double Layer Support.
    How much does it cost?
    A man should convert his anger and sadness into strength to continue living in this life.

  • Firefox 4 Beta crashes everytime I open it. Then I'm forced to close the program and it won't let me restart it since it says it's already running. Which isn't true. I'm done trying it. Do you guys know about this problem?

    Everytime I start Firefox 4 beta it crashes. I usually can visit one site on the web (doesn't matter what site) and then it locks up. The only thing that works on the browser then is the close button. After clicking the close button I'll try to restart the browser and I'll get an error message saying it can't open Firefox because it's already open. Which is a bunch of BS. The only I can get Firefox started again is to restart my computer. This is so frustrating that I've given up trying. Hopefully you guys know about this bug and can do something about it. I wasn't trying to post a question here I just wanted to make sure you guys heard about this problem.

    yeah it is the gayest thing that happens :S what i do is turn off the internet, then open it, then turn on internet, then use it. :S OR make your homepage a tab.

  • How are you guys powering your laptops in your cars ???

    Hi guys,
      Although I have been using computers since the first pc appeared, I only recently decided to get a laptop.  I got a Lenovo B560 and have been absolutely delighted with it. 
     However, I am perplexed at the fact that there does not seem to be any easy options for using the laptop in the car on long trips etc ?  I do not see any type of 12 volt adapter listed in the accessories ??  A google search shows a few "generic" brand power converters but I have always been leary of using anything but oem type equipment.
     Anyway, how are you guys powering your machines while mobile ??
    Thanks,
    Bill

    http://support.lenovo.com/en_US/product-and-parts/detail.page?&LegacyDocID=MIGR-72900
    Your tip size is 2.5mm x 5.5mm,  19volts, and your current adapter is 90watts, right?
    Your tip size is the same as what is in the y450, y460, y550p, y550, y560, and the y730.
    The y730 is listed under the adapter listed above as taking the 4R 4319 tip, which is the same size as yours.
    The tip, Pt. # 46 4319 is listed as an optional tip for the ultraslim adapter, Pt. #4IN8460, that tip has to be ordered separately from the adapter, it doesn't come with it.
    Scroll to the bottom of the link for the adapter and you'll see the listing for the 19 volt tip, pt. #4R 4319. 
    All this is assuming that you have integrated graphics. 
    Dave
    T430u, x301, x200T, x61T, x61, x32, x41T, x40, U160, ThinkPad Tablet 1838-22R, Z500 touch, Yoga Tab 2 Windows 8.1, Yoga Tablet 3 Pro
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"!
    If someone helped you today, pay it forward. Help Someone Else!
    English Community   Deutsche Community   Comunidad en Español   Русскоязычное Сообщество

  • I forgot password to install programs. Can i work around this?

    I forgot password needed to install software. Can I work around this?

    Put your install DVD into the optical drive (CD/DVD drive) and reboot. Be sure to either use the disc that came with your Mac, or, if you installed a later Mac OS X version from disc, use the newer disc. As soon as you hear the boot chime, hold down the "c" key on your keyboard (or the Option Key until the Install Disk shows up) until the apple shows up. That will force your MacBook to boot from the install DVD in the optical drive.
    When it does start up, you'll see a panel asking you to choose your language. Choose your language and press the Return key on your keyboard once. It will then present you with an Installation window. Completely ignore this window and click on Utilities in the top menu and scroll down to Reset Password. After resetting the password use Startup Disk from the same menu to choose your hard drive for startup and restart.

  • How do you guys do remote access?

    Hi All,
    I have a customer with a MAC at both office and home.  When she is a home she would like to remote into her work computer (okay'ed by her boss) to work on various things (she is a graphics artist).
    How do you guys do remote access?  Do you have anything like Linux's XRDP?
    What ports and what protocol (TCP, UDP) do you use?
    Many thanks,
    -T

    So  something like Goodreader or Dropbox would work...if the files are *.doc's you could use Quick Office Pro HD to edit  them. An iPad probably isn't the place to do complicated edits, however...either of these apps will allow a file local to the iOS device to be stored, then sent to another app such as Quick Office Pro HD...or you could also have the files stored in an email folder in say, Outlook, and then have that folder sync to the iOS device OTA with the iOS Exchange client...

  • How would you guys block portable Apps like Skype,firefox,Kproxy and gtalk etc etc ?

    Hi,
    how would you guys block portable Apps like Skype,firefox,Kproxy and gtalk etc etc ?
    it just runs from USB / Local HDD .
     obviously I could just block all USB ports but is there a better way?

    Hi,
    Preventing users from running portable applications can be done through:
    Configuring specific User Account Control Settings
    Software Restriction Policies
    AppLocker
    More information, please check this similar thread:
    How to block portable application & prevent installation on Active Directory?
    http://social.technet.microsoft.com/Forums/en-US/winserverGP/thread/dfd21e22-b245-4d2b-b9c7-912fe357653e/
    Hope this helps!
    Regards.
    Vivian Wang
    TechNet Community Support

Maybe you are looking for