How to automatically open browser window for getting user id & password

i have created a jsp page, that page cannot be open by anyone anyway, it should be only visible to me only.
how do i achieve this.
my requirement is that whenever any one request for that jsp page, browser should automatically open one window and ask for user id & password, if it is right then the page should be displayed else error should be shown.

Adding the following to web.xml will define security constraints for all resources under the /admin directory, also only a user in the manager role will have access to these resources.
For tomcat you can look at the conf/tomcat-users.xml file for setting up users and roles
     <security-constraint>
          <web-resource-collection>
               <web-resource-name>Secure Pages</web-resource-name>
               <description></description>
               <url-pattern>/admin/*</url-pattern>
               <http-method>GET</http-method>
               <http-method>POST</http-method>
          </web-resource-collection>
          <auth-constraint>
               <description></description>
               <role-name>manager</role-name>
          </auth-constraint>
     </security-constraint>
     <security-role>
          <description></description>
          <role-name>manager</role-name>
     </security-role>

Similar Messages

  • Open Browser Window for QT movie

    I am not good with code yet so I work in the design mode. I
    am using DMX for mac and I am wanting to link text to a QuickTime
    movie. I use the Open Browser Window method and choose my window
    height and width. In the Properties window I place
    "javascript:%void(0)" in the Link box to give the link a Null link.
    I have no problems with Safari, Netscape, Firefox opening up the
    media file and playing it fine. IE on both Mac and PC will not open
    up a .mov file. The fixed window sits there and the thinking
    indicator just spins. IE will open up a .jpg file though with no
    problems.
    I assume a lot of my viewers will be using IE so I want to
    get it working.
    Any thoughts. Remember, code does not little good. Sorry.
    David

    Let's make it a 100%. It isn't possible - the way you imagine
    at least it isn't.
    You could try to work around with css-layers and flash
    javascript communication, but this wont be very reliable. Cotting
    up you flash and using an i-frame would be more reliable, but also
    not really fun to do.

  • How to open IE window for .html user manual?

    how to open an IE window for a .html user manual?
    I'm creating a user manual in .html format, and I want to open that file in an IE window when a user click on the "Help" menu (JMenuItem - using ActionPerformed event).
    Is it possible to do that in java?
    What class shall I use?

    Call the following class from ur ActionPerformed();
         import java.io.IOException;
    public class BrowserControl {
       private static final String WIN_ID = "Windows";
       private static final String WIN_PATH = "rundll32";
       private static final String WIN_FLAG = "url.dll,FileProtocolHandler";
       private static final String UNIX_PATH = "netscape";
       private static final String UNIX_FLAG = "-remote openURL";
      public static void displayURL(String url) {
        boolean windows = isWindowsPlatform();
        String cmd = null;
        try {
          if (windows) {
            cmd = WIN_PATH + " " + WIN_FLAG + " " + url;
            Process p = Runtime.getRuntime().exec(cmd);
          else {
            cmd = UNIX_PATH + " " + UNIX_FLAG + "(" + url + ")";
            Process p = Runtime.getRuntime().exec(cmd);
            try {
              int exitCode = p.waitFor();
              if (exitCode != 0)  {
                cmd = UNIX_PATH + " " + url;
                p = Runtime.getRuntime().exec(cmd);
            catch(InterruptedException x)  {
              System.err.println("Error bringing up browser, cmd='"+cmd+"'");
              System.err.println("Caught: " + x);
        catch(IOException x) {
          // couldn't exec browser
          System.err.println("Could not invoke browser, command=" + cmd);
          System.err.println("Caught: " + x);
      public static boolean isWindowsPlatform()  {
        String os = System.getProperty("os.name");
        if ( os != null && os.startsWith(WIN_ID))
          return true;
        else
          return false;
    }

  • In EP7 Ess, how to remove "open new window" for ESS areapage

    Hi all:
       In ESS areapage, there is some tabs for click. When I click it, it open a new window. But I want the content display inside the same content page. These are all standard areapage and worksets.
       How can I reset the "open new window" ?
       My EP version is EP 7 sp9

    You can set the workprotect mode on a global level so its used for every user.
    Systemadministration -> Systemconfiguration -> Service Configuration -> Applications -> com.sap.portal.epcf.loader -> Services -> epcfloader. Set the "workprotect.mode.default". After you have saved the entry. ricght click on com.sap.portal.epcf.loader in the tree menu and choose "administrate". Click on "restart".
    Markus

  • How to automatically/programmatically "publish" reports for local users of Crystal Reports 2011?

    Hi,
      I'm not sure if I'm using the correct Crystal Reports terminology here, so apologies in advance.
      We've got Crystal Reports 2011 and are developing an application which comes with a number of report files (.rpt) as part of its installation. These reports are used to provide a view onto the database that our application writes to.
      Is it possible to automatically manage the collection of reports that are available to users of the Crystal Reports application? Ideally this would be done as part of our application's installation/upgrade procedure. In the case of upgrades, it is possible that some report files may be modified, some removed and others added. (i.e. as the application database's underlying schema is modified or new features added/deprecated).
      I believe this could be achieved manually by starting up Crystal Reports and adding and removing reports to/from the Workbench, but we'd like this list of reports to be available to all users on the PC (Crystal Reports is installed on the same PC as our application), and for the update procedure to be something that was automatically scriptable or programmable in something like .NET.
      I've read about the Repository (which sounds like a solution to making reports available for all users), but suspect that this is only usable after some other product(s) has been installed? I'm not entirely sure what products they would be.
      Could you please let us know whether this can be achieved with the version of Crystal Reports we've got, and if so, how?
      The version of Crystal we have is: SAP BusinessObjects, CR Developer, Version 14.0.4.738 RTM, Product Type: Full
      Many thanks in advance,
        -Nige

    CR 2011 does not install any SDK... You can however download SAP Crystal Reports, developer version for Microsoft Visual Studio, which is an SDK that will let you work with VS 2010 and 2012.
    You will then have to decide if you want to use the Crystal Reports SDK or the InProc RAS SDK.
    Samples are here:
    Crystal Reports for .NET SDK Samples - Business Intelligence (BusinessObjects) - SCN Wiki
    NET RAS SDK Samples - Business Intelligence (BusinessObjects) - SCN Wiki
    Dev Help files:
    SAP Crystal Reports .NET SDK Developer Guide
    SAP Crystal Reports .NET API Guide
    Report Application Server .NET SDK Developer Guide
    Report Application Server .NET API Guide
    Discussing your requirements with sales may not be a bad idea either: 866-681-3435
    http://www.sap.com/contactsap/directory/index.epx
    Or, create a phone support incident here:
    Crystal Single Case Technical Support - SAP Business Objects US Online Store | SAP Online Store
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • Open Browser Window Location

    I use "open browser window" for dynanic display of pictures and it normally opens a window at the top/left side of the screen.
    I know there are tools where you can specify the location of such a window, but I don't use them: top/left is OK for me.
    Strangely enough, the same window opens at the center of the screen on my wife's notebook. It doesn't seem to be a Dreamweaver option, but most probably a windows (IE) option.
    We both use Windows 7 with same version of Internet Explorer (8.0.7600). Can anybody explain this behaviour?
    Ray

    quote:
    Originally posted by:
    Newsgroup User
    "Alan" <[email protected]> wrote in
    message
    news:C596B4D8.31C779%[email protected]..
    >
    >
    >> The problem I am having is that the new
    >> browser opens up bringing the main page back to the
    top with the new
    >> window at
    >> the top. How can I get is to open in the exact
    location where the photo
    >> is
    >> shown without bringing the main browser window to
    the top?
    >
    > If the page with the link is jumping to the top, a guess
    would be you have
    > used # as the null link? Which the browser sees as an
    empty anchor link.
    >
    > change the # to
    > javascript:;
    It would be better to use an arbitrary string after the "#",
    making sure
    that that fragment identifier does *not* match a named anchor
    on the page.
    That way the document won't jump *and* won't freeze either;
    which can happen
    in IE6 when users click on links that have "javascript;" for
    href values.
    An even better approach of course would be to use a "real"
    href (what's
    loaded in the popup) with a "return false" statement...
    Thierry | Adobe Community Expert | Articles and Tutorials ::
    http://www.TJKDesign.com/go/?0
    Spry Widgets |
    http://labs.adobe.com/technologies/spry/samples/
    [click on
    "Widgets"]
    Spry Menu Bar samples |
    http://labs.adobe.com/technologies/spry/samples/menubar/MenuBarSample.html
    Thanks for the responses. The java script command worked
    well. To avoid IE issues, I made the link like this: #!. That makes
    it pop up right there. The open browser command was done on the a
    tag for the image (the original # place holder). How would you use
    a "real" href with the return false command? Can you give me an
    example?
    Here is the html code:
    <a href="#!"
    onclick="MM_openBrWindow('assets/images/portfolio/halfup_48.jpg','halfup48','width=480,he ight=640')"><img
    src="assets/images/portfolio/halfup_48.jpg" alt="halfup48"
    width="135" height="203" /></a>
    M

  • How can i delete keychain data for all users on my Mac Server?

    We have 2 Mac servers on our windows network and user passwords change every 30 days to keep up with security. How can i stop keychain asking for the users old passwords or get it to update with the change of password?

    Hello,
    First you have to create a new folder or 2/3, om My Mac... Mail>Mailbox>New Mailbox...> Loacation>On My Mac.
    Highlight the eMails  & drag to the new box(es), if IMAP Mail will try downlodaing them again.
    If POP & Remove fron Server when downloaded it won't.
    Quit Mail after the move, log into gMail Webmail via a browser & delete what you wish.
    PS. Even though you delete everything in gMail, google keeps copies for themselves & the NSA, just you cannot see them.

  • Open popup window and redirect user to home page in sandboxed solution

    i've created a sandboxed solution visual webpart and it has submit button so when user fills the information in the text boxes availble in webpart and clicks submit button so I want to open popup button containg success message and ok button so when user
    clicks ok button in popup window i want user to be redirected to the home page of the site.
    i tried to open popup and showed success message by below code
     string gotohomepage = "http://sp2013:1111/Pages/home.aspx";
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('Your Record has been submitted successfully,you will be redirected to home Page shortly');location.href =
    '" + gotohomepage + "';", true);
    but it's not opening popup window can anyone help how do i open popup window and redirect user to home page in sandboxed solution

    Page class and script manager are not supported in sandbox solution
    You can create model popup to achieve this
    below are the reference links
    http://blogs.msdn.com/b/chaks/archive/2011/09/14/modal-dialog-box-in-sharepoint-sandbox.aspx
    http://social.msdn.microsoft.com/Forums/en-US/9427db4d-60f2-4b2a-8db6-b50d01ac4f23/how-to-create-modal-popup-using-sandboxed-solution

  • IPad running iOS 5 has on the menu bar only have 4 icons, being: back, forward, bookmarks, and the "add to bookmarks", but is missing an icon after the "add to bookmarks" arrow, that is a "show all open browser windows" icon. How do I get it in my safari?

    iPad running iOS 5 has on the menu bar only have 4 icons, being: back, forward, bookmarks, and the "add to bookmarks", but is missing an icon after the "add to bookmarks" arrow, that is a "show all open browser windows" icon. How do I get it in my safari?

    What you are seeing is how Safari works now in iOS 5. There is no way to get that icon in Safari now. There other much better browsers available in the App Store. Look at iCab Mobile, Mercury, Atomic, ....
    I have been running iOS 5x for so long now, that I don't even remember if that icon did appear in earlier iOS versions

  • Whenever I open a file in Lion, other files of the same sort that I opened previously automatically open up. For example, if I open a .jpg file, numerous other .jpg files that I opened previously in the day open up. How do I prevent this from happening?

    Whenever I open a file in Lion, other files of the same sort that I opened previously automatically open up. For example, if I open a .jpg file, numerous other .jpg files that I opened previously in the day open up. How do I close these files to prevent them from showing up again, like in previous versions?

    Dealing With The Resume Feature of Lion
    Managing Mac OS X Lion's application resume feature.
    If you shutdown your computer you should get a dialog asking if you want applications to resume on the next startup. Simply uncheck the box to prevent that from occurring. Open General preferences and uncheck the option to Restore windows when quitting and re-opening apps. You can also install a third-party utility to control resume features on individual applications: RestoreMeNot or Application State Cleaner.
    It is possible to completely stop the Resume feature although I'm unconvinced that it is that annoying. Nevertheless see the following:
    If you have not yet done so you must first make your /Home/Library/ folder visible. Open the Terminal application in the Utilities folder. At the prompt paste the following command line:
    chflags nohidden ~/Library
    Press RETURN. Quit the Terminal application.
    In the Finder navigate to the /Home/Library/Saved Application State/ folder. Delete the contents of the folder. Back up to the /Home/Library/ folder. Select the Saved Application State folder. Press COMMAND-I to open the Get Info window. In the Sharing and Permissions panel at the bottom click on the lock icon and authenticate. Set each of the listed entries to Read Only. Close the Get Info window.
    Quit all open programs except the Finder (this is very important.) Next, navigate to the /Home/Library/Preferences/ByHost/ folder. Look for a .plist file with "com.apple.loginwindow." in the file name followed by some numbers in hexadecimal. Select the file. Press COMMAND-I to open the Get Info window and in the Sharing and Permissions panel click on the lock icon and authenticate. Set each of the listed entries to Read Only. Close the Get Info window. If you also find a file with the same filename but with a last extension of ".lockfile," then you should delete it.
    The above should eliminate the Resume feature system-wide. Note that any future system updates or upgrades will likely undo these changes. You will then need to repeat this procedure assuming there are no major changes in OS X related to it.

  • How to open the browser window of the user to the size of the webpage ?

    Hello,
    My webpages are 1000 x 600 pixels, and I would like the browser window of any user opens in that size for he can see the website as I want to. Is it possible ? I guess it is because the pop-up windows of a "photo page" open to the size of the pictures (when you click on the miniature pictures), so iWeb should have this possibility.
    Can you help ?
    Thank you very much.
    Julien

    Here are some basic instructions for making html changes after publishing in iWeb:
    1. Publish your site via iWeb
    2. Find your html files.
    Go to iDisk/Web/Sites/iWeb/Sitename/Pagename.html
    (If you publish to a folder, look in the folder you selected or try looking in your Sites folder of your home folder. )
    There are two ways to handle accessing your iDisk.
    Method 1:
    Turn on local copy of your iDisk in System Prefs, with or without automatic syncing.
    If you publish your site via iWeb, now the updated pages exist online but the old pages are on your local iDisk. You need to sync (automatically or manually) to get the new pages on your local iDisk (on your computer).
    Then you can open the updated files, make your html changes in Text Edit or whatever program, and SYNC AGAIN (automatically or manually) to update the online version of the site to match what you have just changed on your local iDisk
    Method 2:
    Mount the iDisk when needed via the "Go" menu in Finder. This is the ONLINE VERSION of your iDisk, not a local copy. When you publish your site via iWeb, the changes INSTANTLY appear on the iDisk on your desktop. If you make html edits or other changes, they appear INSTANTLY online.
    I recommend Method 2 - much easier!!!
    3. Make the html changes.
    You can open the html files generated by iWeb in any text or html editor. In TextEdit, to view the code in an HTML file, choose File > Open and select "Ignore rich text commands." Then locate the .html file (as described in step 2) and click Open.
    Make your changes (i.e. follow the directions on the link provided by James - it worked for me when I entered that page, so the 2000 suggestion still works!) and don't forget to save your changes (not Save As, just Save)!!!
    4. Remember, if you make a change to a page like this post-publishing, and later re-publish, you have to make the html changes again! Set up a Find/Replace command in MassReplaceIt and you can do this very quickly. You can save your queries so you can make all of your changes with one click the next time you save.
    Download here:
    http://www.hexmonkeysoftware.com

  • Why is Firefox opening a separate browser window for each link instead of a new tab in the current browser window?

    Suddenly firefox has started opening a new, separate browser window for every link and thing I open. It used to just open a new tab in the current browser. I must have closed down 15 browsers when trying to get back to a previous web page - the back button doesn't work when each click leads to a new window opening! I went into options and my settings have not changed, they still say "open new tab" for links. This just started happening out of the blue today. What's up?

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    * Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")

  • Is it possible to have Multiple Browser Windows for a Faces App

    I have just read from another thread
    http://forum.java.sun.com/thread.jsp?forum=427&thread=308725
    that states:
    ..the RI only keeps state for one URL at a time (in the words of the spec: "if the JSF implementation has saved state information for a tree identifier /foo in the user�s session, but receives a request with URI /faces/bar, the saved state information will be thrown away.").
    That means that if you hit the /faces/ servlet with anything (e.g. /faces/css/mainX.css) after it has rendered your .jsp page, all the state necessary to process your form will be lost.
    This must mean that I cant have more than one browser window with a faces
    app at a time, I think that it is necessary to provide the funcionality.
    My application is showing database tables and allows the user to edit them, but to restrict the user to one window doesnt seem feasable.
    If you cant have more than 1 window then command_hyperlinks have serious drawbacks in that the user could be tempted to right click and open another window, then the application would not
    work when changing from one window to another.
    I have an idea but I cant see how to get it to work.
    a hidden page-thread id that identifies which browser window/tab the user is on and that identifies a page-thread map that stores values such as the component tree and other things like list iterators, the problem is that if the user "clones" the window you would need to clone the map and change the hidden page id.
    Does javascript know a window id that it could send?
    Any bright ideas.
    How do uSoft manage this?
    Is http the right protocol????
    As I understand faces apps should be run in a browser window with no back/forward buttons and without any command-hyperlinks to /faces/... so that the user can never break the program, is this correct?
    Andy

    I have just read from another thread
    http://forum.java.sun.com/thread.jsp?forum=427&thread=3
    8725
    that states:
    ..the RI only keeps state for one URL at a time (in
    the words of the spec: "if the JSF implementation has
    saved state information for a tree identifier /foo in
    the user�s session, but receives a request with URI
    /faces/bar, the saved state information will be
    thrown away.").
    This used to be the case until EA4 because it has been fixed. Future release will also support necessary API that gives you control over what to save or what not to.
    -Jayashri

  • JS, Open Browser Window

    I have rewritten my site in Dreamweaver because I thought
    this was a problem with the export from Go Live.
    When I tell a link to open in a new browser window it works
    but the older window also update to the linked page. This pretty
    much defeats the purpose of it opening another browser window.
    The link that is the problem is the link to "
    http://www.yourmaclifeshow.com"
    It's the only one I have put in so far since it doesn't seem to
    work properly.

    You might also mention the need to apply this behavior to the
    <a> tag
    surrounding the <img>. It's a common mistake, and it
    leads to other
    undesirable effects.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "E Michael Brandt" <[email protected]> wrote
    in message
    news:[email protected]...
    >> I just don't understand why that Open Browser Window
    extension in DW
    >> writes the code the way it does. Seems like it
    pretty much broken.
    >
    > Yes.it was created in the time before people considered
    making sites more
    > accessible to a variety of users.
    >
    > When created, Macromedia expected the href attribute to
    be either "#" or
    > "javscript:;". With either of those, the
    MM_openBrowserWindow function
    > works just fine in that it will NOT tell the main window
    to update itself
    > with the new page at the same time it opens the popup
    window. However, if
    > the user has javascript turned OFF, then NOTHING will
    happen, there will
    > be no way to get to the linked page at all. Bad.
    >
    > So, with this accessibility issue in mind, and with the
    notion of
    > "progressive enhancement" coming to the fore, the newer
    way to code this
    > is to have the new page's url in the href attribute
    rather than simply "#"
    > or "javscript:;". Now if javascript is disabled, the
    javscript function
    > will not fire, but the main browser window will refresh
    with the new page
    > so the user will get to see it.
    >
    > HOWEVER the consequence of this is that with javscript
    ON,
    > MM_openBrowserWindow will fire, opening the popup, AND
    the main window
    > will refresh with the new page also. To prevent this
    unintended result,
    > you can add ";return false" after MM_openBrowserWIndow()
    to tell the
    > browser NOT to refresh the main window with value in the
    href.
    >
    > Hope that makes sense.
    >
    > Thierry also mentioned divaPOP. It has many advantages,
    among them that
    > opening new windows is simply easy as pie. For just $9
    you save yourself
    > lots of time and coding. You don't use the
    MM_openBrowserWindow function.
    > Simply have the links on your page, and divaPOP will add
    its openWindow
    > behavior for you. For links to external websites or to
    pdf files, you need
    > add no "hooks" to your links at all: divaPOP will
    automatically detect
    > them. For other sorts of links, like to html pages,
    images, flash, word
    > docs, or whatever, you merely add a special CSS class to
    the link to tell
    > divaPOP to do its thing. divaPOP also handles Templates
    and Child pages
    > with no special steps required at all. Take a look at
    >
    >
    http://divahtml.com/products/divaPOP/open_popup_windows.php
    >
    >
    > --
    >
    >
    > E. Michael Brandt
    >
    > www.divaHTML.com
    > divaPOP : standards-compliant popup windows
    > divaGPS : you-are-here menu highlighting
    > divaFAQ : FAQ pages with pizazz
    >
    > www.valleywebdesigns.com/vwd_Vdw.asp
    > JustSo PictureWindow
    > JustSo PhotoAlbum, et alia
    >
    > --

  • Open Browser Window behavior not working

    Just getting started with DW from GL - have successfully imported a few sites into DW from GL and am having trouble getting the Open Browser Window behavior to work. Worked fine in GL, code is similar but different. Have tried different things and am out of ideas. I'm not too code-savy.
    Here's where the non-working behaviors/actions are: http://www.philasecurities.com/data/luncheon.html
    When a user clicks on the red "more..." links they should open a new browser window like they do in the "Click
    here for previous years..." section.
    Any help would be appreciated!

    bregent, thanks for your input but unfortunately most of that's greek to me. Could you either supply me with sample code for one of these links or explain what I'm doing wrong in the design mode? I've followed DW instructions and as far as I can tell I'm doing what I'm supposed to in the behaviors tag inspector. Not sure about some of the settings I should have when browsing for the linked file to open in the new browser window. What should the parameters be set to? What should the relative link be set to, document or site root? How about some of the other options like Select file name from: data sources, server, site root? I've messed with them and tried different combinations but nothings working for me.

Maybe you are looking for

  • Need help in understanding the result logged in gateway log file

    I have installed unixODBC.x86_64 (2.2.14) and mysql-connector-odbc-5.3.4-linux-el6-x85-64 on Oracle Linux Server 6.5 64 bit with Oracle 12c and MySQL Community Server 5..6.14.  Oracle database character set is AL32UTF8 and MySQL database character se

  • Data Execution Prevention preventing iTunes from working

    I have iTunes 8.0.2.20 running on Windows Server 2008 SP1. Whenever I plug in my iPod Nano, Data Execution Prevention (DEP) shuts down iTunes. I can't create an exception for iTunes in DEP since it gives the following error message: +"This program mu

  • How can I add F15 to send a PGUP to program running in the BG?

    New to Lion, finally made the jump.  I was wondering if I can use Automator to create a service that runs in the BG while MS word has focus.  What I am trying to do is cue an audio recording back 10 Seconds (the PGUP key) while I am transcribing the

  • I'm looking For Mac Version intel Base Internet Explorer Browser

    I need to Download the Internet Explorer browser so that I can use it to open a web Page from Staples to fill out a Job application Form, Safari and FireFox doesn't support that web page from staples. I am having a Hard time finding the right web sit

  • PreparedStatement with wildcard

    Hi all I am sure this is simple but it's not obvious to me at the moment. With a preparedStatement I have I the first time I call it it needs 3 parameters, if I don't get a result from this then I need to do the same call again with only the first 2