Request coming from the new window............... ?

Hi All,
Anybody please tell me how to check the request is coming from the new window.
like if I copy the following url
http://forum.java.sun.com/post!default.jspa?forumID=33
and open it in a new window then I have to check that this url is coming from the new window not from the link.
please reply soon.
Thanks

You would have to make the link use javascript to use a Form with a method of POST to add a parameter to the request and submit the form.
You would have to use POST to hide the fact that you are using a parameter, otherwise the user could just copy the address with the parameter into a new window.
So this would work in two ways:
1) You could have a request.getParameter. If it is NULL then the user copy and pasted the link. If it is non-null then the link was clicked on.
2) This will also force the clicked link to go to your servlet's doPost method and direct navigation to go to the servlet's doGet method.

Similar Messages

  • When opening a new window, any clicks within the new window click through to the original window so you can't scroll or save from the new window.

    Anytime that a new window is opened (such as when sending an email message or opening a pdf) I am unable to click on the new window. I can't click send or click on the scroll bars of the new window. If I attempt to click on the window it clicks on whatever is behind the window instead. If the new window opens with a cursor within it then I am able to type or scroll through with keyboard arrows, but cannot click or use the mouse scroll buttons. I also cannot choose items from drop down menus with the mouse (even in the original window). I must use the keyboard arrows to select any menu options.

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • I'M coming from the terrible windows world and I feel concerned about sending emails with attachementes like " pages or numbers" to my contacts since most of them use windowds " Word or Excell". What should I do ?

    In my new iPad2 I have no problem with my incoming mail because Ipad2 can read Windows attachements like "word or excell" . The problem I confront is if I want to send a message with an attachement from itunes apps like "pages or numbers" , Will my contacts (using most of them Windows based docs.) be able to open and read them? As I can not use any non Apple  docs for a new doc.,What can I do?Thanks in advance

    Have you taken a look at iWork.com? It is a convenient place for sharing documents and the nice thing is the user you share the document with can download it as a word file. Formatting issues are a possibility with with text only docs that isn't so much an issue. Also consider QuickOffice or Docs2Go which are both Office compatible apps.

  • Viewing passed variables in an alert from the new window

    If I am passing a param, SD and ED to another window, how can I view it using an alert when an applet is created.  I have the FirstUpdateEvent established and I place the alert in the function.
    How should the alert look?
    I have tried
    alert([Param.1]); and alert({Param.1});
    alert([SD]);and alert();
    None of these work.  I get errors for each of them.

    You have at least two options for this.  As Sascha mentioned in another post, you can use a JS library to parse the URL string and find the Params that way.
    Or you can put an applet on the page that has <param name="param.1" value="{Param.1}"> and then use JS to reference the applet param.
    But, there isn't a way, that I know of to put an URL param directly in JS.

  • Problem with gettin text from a new window

    Hi
    I have been trying to for sometime to work out why i cant get this to work...I open a main window which opens a new window when a button is pressed. This window has a text field where data can be typed, it has a button called "Send" which then allows the data to be send. However, when "Send" is pressed, a NullPointerException is throwen in the ActionListener because it is unable to get the text from the text field.
    Anyone got any idea why, have done a small mock up just to give an example :
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import javax.swing.event.*;
    public class TwoWindows implements ActionListener{
         private JTextField chatLine;
         public volatile boolean start = false;
         //******************************GUI Production******************************
         public TwoWindows() {
              JFrame frame = new JFrame("Multicast Discovery");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              JPanel connectpanel = new JPanel();
              JButton button3 = new JButton("Open New Window");
              button3.setActionCommand("connect");
              button3.addActionListener(this);
              connectpanel.add(button3);
              frame.getContentPane().add(connectpanel, BorderLayout.PAGE_END);
              frame.pack();
              frame.setLocationRelativeTo(null);
              frame.setVisible(true);
         //*****************************action listener******************************
         public void actionPerformed(ActionEvent ae)
              //get what button was pressed
              String button = ae.getActionCommand();
              if (button.equals("search"))
                   System.out.println("\n Do Something!");     
              else if (button.equals("cancel"))
                   System.out.println("\n Do Something else!");     
              //start new window here
              else if (button.equals("connect"))
                   setupChat();
              if (button.equals("send"))
                    if (start)
                              //try to get the data from the new window
                              String s = chatLine.getText();
                              System.out.println("This has been inputted : " + s);
         //*****************************setup new window*****************************
         public void setupChat()
              JFrame frame01 = new JFrame("TCP Chat Window");
              frame01.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              // Set up the chat pane
                 JPanel chatPane = new JPanel(new BorderLayout());
                JTextArea chatText = new JTextArea(10, 20);
            chatText.setLineWrap(true);
            chatText.setEditable(false);
            chatText.setForeground(Color.blue);
            JScrollPane chatTextPane = new JScrollPane(chatText,
            JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
            JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
            JTextField chatLine = new JTextField("Type Here!");
            JButton button4 = new JButton("Send");
              button4.setActionCommand("send");
              button4.addActionListener(this);
              chatPane.add(chatLine, BorderLayout.CENTER);
              chatPane.add(button4, BorderLayout.SOUTH);
             chatPane.add(chatTextPane, BorderLayout.NORTH);
              chatPane.setPreferredSize(new Dimension(200, 215));
              frame01.getContentPane().add(chatPane);
              frame01.pack();
              frame01.setLocationRelativeTo(null);
              frame01.setVisible(true);          
              start = true;
         public static void main(String[] args)
         new TwoWindows();
    }

    public class TwoWindows implements ActionListener{
         private JTextField chatLine;
         public volatile boolean start = false;
         public void setupChat()
    JTextField chatLine = new JTextField("Type
    ld("Type Here!");
    You have two variables called chatLine. One is a class field the other is a local object in setupChat.
    Change
    JTextField chatLine = new ...
    to
    chatLine = new ...

  • I have moved my iTunes library to a new Windows 7 PC and cannot transfer music from the new iTunes PC to my iPhone. The iPhone only accepts transfers from the original iTunes PC.

    I have moved my iTunes library to a new Windows 7 PC and cannot transfer music from the new iTunes PC to my iPhone 4S. The iPhone will only accept music transfers from the original iTunes PC. I have come to understand that an iPhone can have only one "daddy" iTunes PC, but have not been able to find out how to change the "daddy". I have done a backup of the iPhone, and a "Restore to Original Settings". Then I restored the content using the new iTunes PC. My Apps and contacts, etc. are back on the iPhone, but it still won't accept music from the new iTunes PC.

    What happens when you try to sync the iphone to the new computer?

  • How can I get a query in the search field to open in a new tab or new window from the current window?

    How can I get a query in the search field to open in a new tab or new window from the current window?

    If you are searching via the Search Bar on the Navigation Toolbar, this preference can be changed to have searches there open in a Tab.
    Type '''about:config''' in the Address Bar and hit Enter. Then answer "I'll be careful". Type this pref in the Search at the top.
    '''browser.search.openintab''' = double-click to toggle to '''true'''

  • Moving tabs from one window to another makes the new window vanish. I have hot corners enabled so when I move up to the right corner of my display I can see all my open windows but when I click on the tab that I moved to make it its own window it vanishes

    Moving tabs from one window to another makes the new window vanish. I have hot corners enabled so when I move up to the right corner of my display I can see all my open windows but when I click on the tab that I moved to make it its own window it vanishes

    I came up with an alternative solution.
    Instead of actually trying to move the JInternalFrame from one JDesktopPane to another, I added a single, maximized JInternalFrame to the left side. When one of the right side frames is to be docked, I merely copy its ContentPane to the single JInternalFrame on the left, set the original to be non-visible, and adjust the properties of the JSplitPane to make the "docked" frame appear.
    When the "close" button on the docked frame is pressed, I simply undo this procedure to "undock" the frame and redisplay it on the right-hand side (with its content intact from the docked frame, but in its original position).

  • HT1551 My remote for my Apple TV just stopped working and I have tried putting in a new battery, re-pairing the remote, resetting the device by unplugging it, and I checked the infared coming from the remote is working. The light just blinks at me 3 times

    My remote for my Apple TV just stopped working and I have tried putting in a new battery, re-pairing the remote, resetting the device by unplugging it, and I checked the infared coming from the remote is working. The light just blinks at me 3 times what else can I try to fix it?

    Have you tried unpairing the remote? You do this by pointing your remote at the Apple TV and holding the MENU and Left buttons down together for 6 seconds.

  • After migrating a windows 7 machine using ADMT Group policy shows the the computer is from the new domain but user is from old domain

    We have migrated machines using ADMT tool but we have found some window 7 machines Group policy issues.  We see that the computer GP is getting from the new domain but the users profile still has the old domain GP information.  Any help on
    removing the old GP objects and forcing the new domain User policy would be great.  We have tried the basic troubleshooting gpupdate /force reboot etc.
    Thanks

    Hi,
    Sorry for the delayed response.
    First, please verify whether these domain users you mentioned belong to old domain or new domain.
    If they belong to old domain the GP is right with no problem. If they belong to new, try following suggestions.
    Please test these steps in one of the problematic computer. If it worked, then go on for others.
    To avoid unexpected problems, please backup your register keys before following steps:
    Open regedit.exe, and delete following keys:
    HKLM\Software\Policies\Microsoft Key (looks like a folder).
    HKCU\Software\Policies\Microsoft Key.
    HKCU\Software\Microsoft\Windows\CurrentVersion\Group Policy Objects Key.
    HKCU\Software\Microsoft\Windows\CurrentVersion\Policies key
    Exit the registry and restart.
    Note: HKLM = HKEY_LOCAL_MACHINE & HKCU = HKEY_CURRENT_USER
    If you have any feedback on our support, please click
    here
    Keep post.
    Kate Li
    TechNet Community Support

  • When I turned on my computer this morning it had a new noise coming from the top of the screen at the back.  Not loud but almost whirring.  What might this be ?

    When I turned on my computer this morning it had a new noise coming from the top of the screen at the back. 
    Not loud but almost whirring. 
    What might this be ?

    21.5 Mid 2010
    Processor  3.2 GHz Intel Core i3
    Memory  4 GB 1333 MHz DDR3
    Software  OS X 10.8.5 (12F37)
    I just found an answer ! 
    I had moved my computer into another room and had to turn up the brightness, as I have always had it on the lowest setting.  In doing so it created the noise, I turned it right down and it stopped.  I have now set it about level 3 so it's not so distracting.
    thanks

  • Can I set up a new window to open without all the tabs from the current window opwning?

    I have a new computer at work with what must be a new version of firefox. I use multiple windows to do my job. When I open a new window, all the tabs from the current window open in the new one. I am wondering how to configure a new window to open with either a blank page or just my homepage?

    I restarted Firefox and changed the homepage settings a to a different choice and back to the desired page then restarted Firefox again. This eliminated all the initial tabs from opening from opening in the new window. I am not sure how all the pages were cached or what I should have done but I no longer have this issue.

  • TS3297 iTunes puts up a message "The item you've requested is not currently available in the Hong Kong Store." I had not requested anything from the HK store at that point, and I have never used any store other than the HK one. How I can clear that messag

    I've been running iTunes on WinXP for years with few problems.  I have all my iTunes files on an external USB drive. I just bought a new PC running Win7, 64-bit.
    I connected the external USB drive to the new PC and installed 64-bit iTunes on it. When iTunes started up, I pointed it at the iTunes directory in the external drive, using Edit > Preferences > Advanced > iTunes Media Folder Location. It showed a progress bar that it was updating the iTunes Library. I signed in and authorized the new machine. I have one spare authorization.
    Then iTunes put up a message "The item you've requested is not currently available in the Hong Kong Store." I had not requested anything from the HK store at that point, and I have never used any store other than the HK one.
    When I click OK, the iTunes Store page remains blank, apart from saying "iTunes Store" in the middle of the page.
    I went to "View My Account" and pressed the Reset button to "Reset all warnings for buying and downloading items", but that doesn’t fix this particular warning. I also tried Edit > Preferences > Advanced > Reset Warnings and Rest Cache.
    But still, every time I click the “App Store” button in the iTunes Store window, the message appears. If I click the Books, Podcasts or iTunesU buttons, these display normally.  So I’m stuck with being unable to purchase apps, other than through my iPad and iPhone.
    If I move the external drive back to the XP machine, the same thing happens.  If I go to another PC - a notebook running Vista - everything is normal.
    Any idea how I can clear that message?
    Thanks for any help you can offer.

    Further info on my question above.
    I have tried re-validating my credit card, which apparently fixed it for some. 
    I have also tried uninstalling, re-downloading and installing again.
    Neither of these steps fixed the problem.

  • How stop FF31 from opening new window? I want to open all links in new tab at top of page.

    I think the following, quote below, from the help page is my problem.
    I have this one website I use that when I click on a link within the website it is opening a new window with the tab at the bottom. Also, when this happens, I am losing the orange FireFox rectangle, bookmarks and navigation options. How can I set FF31 so that the link opens in a new tab and I keep all my options? I am using Classic Theme Restorer 1.2.3. I also notice that in the new window I lose the ability to use some of the addons.
    I have two laptops and both are running FF31 and W7. One of them is working perfectly and the other is having this problem. As far as I can tell they are both set up the same. The only difference is that when I upgraded to FF31 they both had difference older versions of FireFox. I also read in the help forum that maybe I need to go back to FireFox 28 to accomplish what I am trying to accomplish.
    I noticed that when I go under about:config that the version of FF that is not working has fewer available options versus the version that is working. An example would be that the working version has "browser.tabs.onTop" where on the other laptop this is missing.
    >>>Open new windows in a new tab instead: This option controls whether links from other applications or from web pages which request to open them in new windows are opened in a new window or a new tab in the most recent window.
    Note: If you have chosen to open pages in new tabs, Firefox will ignore this option and will open a new window from a link if the page author specified that the new window should have a specific size, because some pages can only be displayed correctly at a specific size.<<<
    Thank you in advance for any help,
    yeto

    You can override how links are opened via the browser.link.open_newwindow.override pref.
    *http://kb.mozillazine.org/browser.link.open_newwindow
    *1: current tab; 2:new window; 3:new tab;
    Use this for links opened via JavaScript.
    *http://kb.mozillazine.org/browser.link.open_newwindow.restriction
    See also:
    *http://kb.mozillazine.org/Prevent_websites_from_disabling_new_window_features

  • My sound coming from the internet on my MacBook Air is not working!

    I bought this MacBook Air a month ago is the new one, everything was working well but suddenly the sound coming from the internet stop working.
    My computer sound is working perfectly is just when I want to watch a video or listed a song from youtube talk on skype isnt working at all.
    When I press the volume button i can hear it.
    Can someone tell me what can it be?

    Hopefully one of these steps should solve the problem.
    1. System Preference > Sound > Output > Internal Speakers
        Highlight  Internal Speakers / Headphones
        Make sure Mute is not enabled.
    2. Remove the headphone.
        If you see red light in the headphone port, plug the headphone
        in and out of the port 5 or 6 times to flip the microswitch inside.
        Sound output may be stuck in the digital mode.
    3. Reset SMC.     http://support.apple.com/kb/HT3964
        Choose the method for:
        "Resetting SMC on portables with a battery you should not remove on your own".
    4. Applications > Utilities > Audio MIDI Setup
        Audio Devices window
        Side Bar
        Click the Built-in Output.
        Under Mute any of the boxes checked? If so, uncheck it.

Maybe you are looking for