Can't figure out URL's

I am having difficulty understanding something...
I set up a small application using Spring MVC.
Here is what's in web.xml:
      <servlet>
            <servlet-name>MySpringServlet</servlet-name>
            <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
     </servlet>
     <servlet-mapping>
          <servlet-name>MySpringServlet</servlet-name>
          <url-pattern>/*.php</url-pattern>
     </servlet-mapping>I am using the Resin server and mapped the application URL to localhost:8080/MyApp
I have a welcome file: index.jsp and all it does is redirect the request to a new URL, because I am serving the rest of my JSP's from under WEB-INF.
By the way, is there value in having the JSP under WEB-INF?
Back to my issue, in index.jsp I redirect like this:
     <body>
          <c:redirect url="/HomePage.php" />
     </body>The Spring controller grabs the "*HomePage.php*" part of the redirect even though when I print the requestURI it comes out as MyApp/HomePage.php
It then takes me to HomePage.jsp, and this page has a form, but for some reason, in the action attribute of the form, I can't put */processForm.php* - then the container cannot find it.
Instead, I have to say action="/MyApp/processForm.php".
Why is it possible to just say /HomePage.php in the redirect from index.jsp, but in the form I must put the MyApp in front?
Thanks.

Why is it possible to just say /HomePage.php in the redirect from index.jsp, but in the form I must put the MyApp in front?The tricky bit to get your head around is that "/" can mean different things at the server end and client end.
At the server end (for RequestDispatcher purposes) "/" refers to your context root - ie: http://localhost:8080/MyApp/
At the client end, / refers to http://localhost:8080/. The client knows nothing about the "context root" at all.
So any urls that you generate to your page that use absolute references have to take the context path into account.
This affects links, redirects, form actions etc - anything that will be executed by the client.
To answer your question, the difference is the tags you are using.
The <c:redirect> tag will automagically ADD the application name onto the front of a url.
So <c:redirect url="/HomePage.php"> will ACTUALLY generate a redirect to /MyApp/HomePage.php. Its part of the tags functionality to do this.
I am presuming you have
<form action="/processForm.php">
Because this is just template text, it won't take the context root into account. So possible solutions to the issue are:
// hard code it
<form action="/MyApp/processForm.php">
// add it onto every url dynamically:
<form action="<%= request.getContextPath() %>/processForm.php">
or
<form action="${pageContext.request.contextPath}/processForm.php">
// use a tag library to do it for you
<form action="<c:url value='/processForm.php'/>">
// use a framework to generate a form tag
<stripes:form .... >Hopefully that helps you understand the issue a bit more
cheers,
evnafets

Similar Messages

  • My podcast isn't updating and I can't figure out why, please help?

    Hi everyone,
    I'm at my wits end and I can't figure out what's wrong with my podcast in regards to iTunes.
    We have a website we update that originally iTunes was pointed at (http://www.whydaddydrinks.net/?feed=rss2) and then iTunes started having issues with not updating. Recently we tried changing the feed of the podcast to the RSS feed for our podcast hosting account at Podbean (http://whydaddydrinks.podbean.com/feed/) and it's running into the same issue.
    I've checked FeedValidator for both feeds and they're fine (http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fwww.whydaddydrinks.net%2F%3F feed%3Drss2 and http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fwhydaddydrinks.podbean.com%2 Ffeed%2F). I've clicked the links to the .mp3 files and they play off the web, so, in theory, there shouldn't be any issue as far as I know; Episode 13 shows up in iTunes but dosn't appear to be connected to the file and Season 2 Episode 1 doesn't show up at all.
    Can any of you offer any suggestions as to what the heck is going on?

    Your Store page is at https://itunes.apple.com/gb/podcast/your-book-is-why-daddy-drinks/id515363310?mt =2
    This is using the feed at http://www.whydaddydrinks.net/?feed=rss2 so the other feed URL you posted is irrelevant.
    This feed has episodes up to 13 which contain playable media, and these all show in the Store and when subscribing. However the URL for the media file for episode 13 is
    http://media40.podbean.com/pb/89ea6f327345e33833ff09885e48b8a1/50e904db/data2/bl ogs48/462271/uploads/YBIWDD_Episode13.mp3
    and there is no file at this address. The previous episode downloads OK.
    This feed contains two later episodes but neither has an 'enclosure' tag containing the URL of a media file and so the episodes don't show in iTunes. You are using WordPress to make your feed, and this problem arises a lot - it presumably means that you have failed to do something you need to do in WordPress to get the media file into the feed, but I can't advise on specifics of WordPress.
    The other feed has one of these two episodes, and there the latest episode does have an 'enclosure' tag and the episode appears when subscribing manually; however as I say this feed is not in use by the Store.
    So you need to do with the original feed whatever it was you did with the new feed to get the episode into the Store, and you need to chase the missing media file for episode 13.
    If you want to move the Store to using the Podbean feed you need to follow the procedure outlined here:
    http://www.wilmut.webspace.virginmedia.com/notes/podcast.html#move
    Note that the title in the Podbean feed is 'whydaddydrinks' which many not be what you want.

  • Can't figure out how to make "sub-tabs" / Too many "top-tabs" / Other ?

    First of all, the website that I am webmaster for is: www.cindydennis.org .
    I am having some problems:
    1) There are TOO MANY tabs at the top. I can't figure out how to make sub-headings on one page...
    For example, I'd like on the "About CDM" page, tabs that can be clicked on to go to other information tabs, but that don't end up appearing on the top (e.g.: having "Remarks" and "What We Believe" tabs go there, but not appear at the top).
    Another example, if you look at the home screen, I'd like to have the link to the "Privacy Policy" and Terms of Service" pages on the bottom, but not have them appear as tabs in the top, too.
    How do I do this, please? I've searched, and can't figure out/___sbsstatic___/migration-images/migration-img-not-avail.png
    2) How do I add "Copyright 2011" automatically? I saw in the Rapidweaver trial version, it automatically adds it when you publish... is there a way to tell this program to do this? Or do I need to type that in on each page? (I don't want to purchase RW... I'm not ready for that yet.)
    Thank you in advance
    Cindee

    Cindee ~ One way to do the copyright notice is to use a Text Clipping — Select (highlight) the copyright text you want to use and drag it to the Desktop. If necessary, change the name of the Clipping icon so that it's more easily identifiable on the Desktop. Then, when you need it in iWeb, simply drag the Clipping icon from the Desktop to iWeb's main canvas.
    By the way, rather than posting your URL here like this:
    www.cindydennis.org
    ...include the prefix to make it conveniently clickable:
    http://www.cindydennis.org

  • Can't figure out where NullPointerException is coming from

    I will attach the code I have below. It is almost entirely done but i am getting a NullPointerException that is driving me nuts, and I can't figure out were it is coming from.
    Help is greatly appreciated.
    First code:
    import java.util.Scanner;
    import java.io.*;
    import java.util.Random;
    import java.util.Collection;
    public class DistributionPlagiarist
         public static void main(String[] args) throws IOException
              Scanner keyboard = new Scanner(System.in);
              int keyLength=0, phraseLength=0, numberOfPhrases=0;
              String inputFileName="", keepReadingFromFile="", theFile="";
              FrequencyLibrary text = new DenseFrequencyLibrary();
              if(args.length != 4)
                   System.out.println("The command line arguments you entered do not match what is needed.  Please try again.");
                   System.exit(0);
              for(int count=0; count<args.length; count++)
                   keyLength = Integer.parseInt(args[0]);
                   phraseLength = Integer.parseInt(args[1]);
                   numberOfPhrases = Integer.parseInt(args[2]);
                   inputFileName = args[3];
              if(keyLength < 0)
                   while(keyLength < 0)
                        System.out.print("The length of the key (" + keyLength + ")" + " you entered is less than zero.\nPlease enter another key length: ");
                        keyLength = keyboard.nextInt();
                        System.out.println();
              if(phraseLength < 0)
                   while(phraseLength < 0)
                        System.out.print("The desired length of the phrase (" + phraseLength + ")" + " you entered is less than zero.\nPlease enter another phrase length: ");
                        keyLength = keyboard.nextInt();
                        System.out.println();
              if(numberOfPhrases <= 0)
                   while(numberOfPhrases <= 0)
                        System.out.print("The desired number of phrases (" + keyLength + ")" + " you entered is not applicable.\nPlease choose another number: ");
                        keyLength = keyboard.nextInt();
                        System.out.println();
              File file=new File(inputFileName);
              boolean exists = file.exists();
              if (exists == false)
                   while(exists == false)
                        System.out.println("The file you are searching for does not exist.  Please place it in this programs directory.");
                        System.out.print("Please re-enter the file name: ");
                        inputFileName = keyboard.nextLine();
                        file=new File(inputFileName);
                        exists = file.exists();
              int count=keyLength, start=0, stop=0;
              FileReader freader = new FileReader(inputFileName);
              BufferedReader inputFile = new BufferedReader(freader);
              while(keepReadingFromFile != null)
                   keepReadingFromFile = inputFile.readLine();
                   if(keepReadingFromFile == null)
                        break;
                   else
                        theFile = theFile + keepReadingFromFile;
              while(count < theFile.length())
                   String name = theFile.substring(start, keyLength+stop);
                   char singleCharacter = theFile.charAt(count);
                   text.add(name, singleCharacter);
                   start++;
                   stop++;
                   count++;
              int countNumberOfPhrases=0;
              while(numberOfPhrases > 0)
                   countNumberOfPhrases++;
                   String phrase = randomphrase(text, phraseLength, keyLength);
                   System.out.println("Phrase " + countNumberOfPhrases + ":\n" + phrase);
                   numberOfPhrases--;
         private static String randomphrase(FrequencyLibrary textLibrary, int phraseLengthToMake, int startLength)
              String startString="";
              char characterToAdd=' ';
              startLength++;
              Random generator = new Random();
              int sizeOfLibrary=textLibrary.size()/2, randomInt = generator.nextInt(sizeOfLibrary+1), value=0;
              Collection<String> stringNames = textLibrary.makeStringCollection();
              for(String stringFromCollection : stringNames)
                   if(randomInt == value)
                        startString = stringFromCollection;
                   value++;
              String thePhrase = new String(startString);
              System.out.println("INITIAL START:" + startString + "TTTT");
              int substringStart=1;
              while(startLength < phraseLengthToMake)
                   characterToAdd = textLibrary.randomUniformChoose(startString);
                   thePhrase = thePhrase + characterToAdd;
                   System.out.println("CHARACTER:" + characterToAdd + "TTTT");
                   System.out.println("PHRASE:" + thePhrase + "TTTT");
                   startString = thePhrase.substring(substringStart, thePhrase.length());
                   boolean answer = textLibrary.contains(startString);
                   System.out.println(answer);
                   System.out.println("NEW STRING:" + startString + "TTTT");
                   startLength++;
                   substringStart++;
              return thePhrase;
    }Second code:
    import java.util.Collection;
    import java.util.HashMap;
    public class DenseFrequencyLibrary implements FrequencyLibrary
         private HashMap<String, MultiSetOfChar> bookTitleAndCharacterAndIntegerHashMap = new HashMap<String, MultiSetOfChar>();
         private MultiSetOfChar keyAndValuePairs = new DenseMultiSetOfChar();
          * Creates a new DenseFrequencyLibrary with all the essential things clear;
         DenseFrequencyLibrary()
              bookTitleAndCharacterAndIntegerHashMap.clear();
          * Input the value from the creation of the DensneMultiSetOfChar into a HashMap.  If the key
          * already exists then the value associated with it is updated by one.
          * @param character a char to be used in forming the HashMap
          * @return characterMap
         private HashMap<String, MultiSetOfChar> inputIntoMap(String name, char character)
              if(!bookTitleAndCharacterAndIntegerHashMap.containsKey(name))
                   keyAndValuePairs = new DenseMultiSetOfChar(character);
              else
                   keyAndValuePairs.add(character);
              this.bookTitleAndCharacterAndIntegerHashMap.put(name, keyAndValuePairs); //input character and value
              return bookTitleAndCharacterAndIntegerHashMap; //return the new HashMap
          * Returns the number of books in the library.
          * @return |b|, ie the number of books in b
        public int size()
             int numberOfBooks=bookTitleAndCharacterAndIntegerHashMap.size();
             return numberOfBooks;
         * Searches the library for an occurrence of a given book
         * @param target the name of a book to be searched for in the library
         * @return true if and only if the argument is already a book title in the library.
        public boolean contains(String target)
             boolean bookIsInLibrary=false;
             if(bookTitleAndCharacterAndIntegerHashMap.containsKey(target))
                  bookIsInLibrary = true;
             return bookIsInLibrary;
         * Returns the MultiSetOfChar that represents the occurrences of the individual characters
         * in the text of the book indicated by the argument.
         * @param target
         * @return MultiSetOfChar
        public MultiSetOfChar getFrequencies(String target)
             MultiSetOfChar frequencyMultiSetOfChar = bookTitleAndCharacterAndIntegerHashMap.get(target);
             return frequencyMultiSetOfChar;
         * Modifies the character occurrences associated with name to include one more occurrence of element.
         * @param name string of the name of the book
         * @param element character to add to the specified book
        public void add(String name, char element)
             bookTitleAndCharacterAndIntegerHashMap = inputIntoMap(name, element);
         * Modifies the character occurrences associated with name to include one less occurrence of element.
         * @param name string of the name of the book
         * @param element character to be removed from the specified book
         * @return true if and only if the book is modified.
        public boolean remove(String name, char element)
             boolean characterWasRemovedFromBook=false;
             //if the target character is in the map then remove it
              if(bookTitleAndCharacterAndIntegerHashMap.containsKey(name))
                   MultiSetOfChar keyAndValuePairs = bookTitleAndCharacterAndIntegerHashMap.get(name);
                   keyAndValuePairs.remove(element);
                   characterWasRemovedFromBook = true; //set answer to true because the HashMap was changed
              else //target does not exist in the HashMap
                   characterWasRemovedFromBook = false; //set answer to false because the HashMap was not changed
             return characterWasRemovedFromBook;
         * Returns a random character, chosen from the same distribution as the characters appear in the book.
         * For example, if 5% of the characters in "Alice in Wonderland" are an 'A', then this method should
         * return an 'A' about 5% of the time.
         * @param name string of the name of the book to search through and remove a character
         * @return true if and only if the argument is already a book title in the library.
         public char randomUniformChoose(String name)
            MultiSetOfChar keyAndValuePairs = bookTitleAndCharacterAndIntegerHashMap.get(name);
            char randomCharacter = keyAndValuePairs.randomUniformChoose();
              return randomCharacter; //return the random character pulled out
         public Collection<String> makeStringCollection()
              Collection<String> stringCollection = bookTitleAndCharacterAndIntegerHashMap.keySet();
              return stringCollection;
    }Third code:
    import java.util.HashMap;
    import java.util.Set;
    import java.util.Collection;
    import java.util.Random;
    * DenseMultiSetOfChar implements MultiSetOfChar.
    * @mathmodel b is a finite multiset
    * @mathdef
    *  |b| is the cardinality of b
    *  ||c,b|| is the number of occurrences of element c in b
    * @author Kyle Hiltner
    public class DenseMultiSetOfChar implements MultiSetOfChar
         private char characterInput=' ';
         private HashMap<Character, Integer> characterMap = new HashMap<Character, Integer>();
          * Create a new DenseMultiSetOfChar with zero argument
         DenseMultiSetOfChar()
              characterMap.clear(); //clear static HashMap
          * Create a new DenseMultiSetOfChar with the passed in value.
          * @param newChar character input to be added to the HashMap
         DenseMultiSetOfChar(char newChar)
              this.characterInput = newChar; //set characterInput to the value passed in
              characterMap = inputIntoMap(this.characterInput); //call private procedure to add characterInput to HashMap
          * Input the value from the creation of the DensneMultiSetOfChar into a HashMap.  If the key
          * already exists then the value associated with it is updated by one.
          * @param character a char to be used in forming the HashMap
          * @return characterMap
         private HashMap<Character, Integer> inputIntoMap(char character)
              //if the character is not in the HashMap then add it with the starting value of 1
              if(!characterMap.containsKey(character))
                   characterMap.put(character, 1); //input character and value
              else //character does exist
                   int value = characterMap.get(character); //get the value for the specified key
                   value++; //increase the value so as to show that another character was added
                   characterMap.put(character, value); //place the character and new value in the HashMap
              return characterMap; //return the new HashMap
          * Returns the number of elements in this multiset (ie its cardinality).
          * Note that since multisets can include duplicates, the cardinality may be
          * larger than the number of distinct elements. Also, the total number of
          * items in the multiset is bounded above by Integer.MAX_VALUE.
          * @return |b|, ie the cardinality of b
         public int getCardinality()
              int totalElementsInMap=0;
              Collection<Integer> integerCollection = characterMap.values(); //create a collection for easy iteration
              //iterate through each value in the HashMap and compute the total number of elements in the HashMap
              for(Integer valueFromCollection : integerCollection)
                   totalElementsInMap = totalElementsInMap + valueFromCollection; //compute new value of total values
              return totalElementsInMap; //return the final total value
          * Returns the number of occurrences of a given element in the multiset. A
          * simple identity relating getElementCount and getCardinality is that the
          * sum of getElementCount for each char is equal to the cardinality of the
          * set.
          * @param target
          *            char to be counted in the multiset
          * @return ||target,b||, ie the number of occurrences of target in b
         public int getElementCount(char target)
              int numberOfGivenCharacters=0; //set initial value
              //if the HashMap contains the target character then numberOfGivenCharacters is set to the value
              if(characterMap.containsKey(target))
                   numberOfGivenCharacters = characterMap.get(target); //set numberOfGivenCharacters to the value assigned to the target character
              return numberOfGivenCharacters; //return the value for the target character
          * Returns a set such that every element in the multiset is in the set (but
          * no duplicates). The cardinality of the returned set must be less than or
          * equal to |b|. The cardinality of the two are equal if and only if b
          * contains no duplicate elements.
          * @return a set of Character, s, such that: <br />
          *         (for all (Character)i in s : (char)i in b) and <br />
          *         (for all (char)i in b : (Character)i in s)
         public Set<Character> getElementSet()
              Set<Character> characterSet = characterMap.keySet(); //create a Set from the keys of characters in the HashMap     
              return characterSet; //return the character Set
          * Adds a single element to the multiset. This operation always increases
          * the cardinality of the multiset by 1, assuming that the maximum capacity
          * of Integer.MAX_VALUE has not been reached.
          * @param item
          *            the char to be added to b
          * @requires |b| < Integer.MAX_VALUE
          * @alters b
          * @ensures b = #b union {item}
         public void add(char item)
              characterMap = inputIntoMap(item); //call the private method to add new character (item) to the HashMap
          * Removes the target, if it is present in the multiset. The method returns
          * true if and only if it changes the multiset.
          * @param target
          *            the char to be removed
          * @alters b
          * @ensures (target not in #b) ==> (b = #b) <br />
          *          (target in #b) ==> (b union {target} = #b)
          * @return target in #b
         public boolean remove(char target)
              boolean answer=false; //set initial value to false
              //if the target character is in the map then remove it
              if(characterMap.containsKey(target))
                   int value = characterMap.get(target); //find the value associated with the target character
                   //if the value is 1 call remove from the HashMap and remove key and value
                   if(value == 1)
                        characterMap.remove(target); //remove key and value from the HashMap
                   else //value is greater than 1
                        value--; //decrease value to show removal
                        characterMap.put(target, value); //replace target character with new value back into the HashMap
                   answer = true; //set answer to true because the HashMap was changed
              else //target does not exist in the HashMap
                   answer = false; //set answer to false because the HashMap was not changed
              return answer; //return answer
          * Returns a char chosen randomly based on the contents of the multiset.
          * This operation does not remove the char from the multiset or change the
          * multiset in any way. In particular, the cardinality of the multiset is
          * the same before and after this method.
          * <p>
          * Characters should be returned with a random distribution equal to the
          * distribution of characters in the multiset. That is, for a character that
          * appears N times in a multiset of cardinality M, the probability of that
          * character being returned is N / M. For example, a multiset that contains
          * only the character 'a', possibly many times, would always result in an
          * 'a' being generated. On the other hand, a multiset with an equal number
          * of 'a' and 'b' elements would return an 'a' approximately half the time
          * and a 'b' the other half.
          * @requires |b| >= 1
          * @return char c with probability p, where: <br />
          *         p = ||c,b|| / |b|
         public char randomUniformChoose()
              char randomCharacter=' ';
              Random generator = new Random();
              int totalElementsInMap=0;
              Collection<Integer> integerCollection = characterMap.values(); //create a collection for easy iteration
              //iterate through each value in the HashMap and compute the total number of elements in the HashMap. 
              //Do this in case a remove call was made
              for(Integer valueFromCollection : integerCollection)
                   totalElementsInMap = totalElementsInMap + valueFromCollection; //compute new value of total values
              int randomInt = generator.nextInt(totalElementsInMap+1), lowerValue=0, upperValue=0;
              Collection<Character> keyCollection = characterMap.keySet();
              //iterate through each value in the HashMap and compute the total number of elements in the HashMap
              for(Character keyFromCollection : keyCollection)
                 upperValue = upperValue + characterMap.get(keyFromCollection);
                 if(randomInt == upperValue)
                      randomCharacter = keyFromCollection;
                 if(randomInt >= lowerValue && randomInt <= upperValue)
                      randomCharacter = keyFromCollection;
                 lowerValue = upperValue + 1;
              return randomCharacter; //return the random character pulled out
    }The Error:
    Exception in thread "main" java.lang.NullPointerException
         at DenseFrequencyLibrary.randomUniformChoose(DenseFrequencyLibrary.java:137)
         at DistributionPlagiarist.randomphrase(DistributionPlagiarist.java:146)
         at DistributionPlagiarist.main(DistributionPlagiarist.java:112)I will attempt to explain what this does in as few words as possible. For a breakdown of the lab go urlhttp://www.cse.ohio-state.edu/~paolo/teaching/494MJ/labs/lab8.shtml{url}. If you don't feel like reading that: THe program reads in some command line arguments. From there it reads from the file provided in the command line and creates "keys" from the specified length. From there I need to create a phrase of the specified length. If i am supposed to create more then one then i do. That is pretty much it. I can't figure out where (really why) the NullPointerException error is coming from.
    Help is appreciated!!

    Post the actual error text (copy and paste, don't "interpret" it) here.
    It should include a stack trace which references a line number of the program -
    unless you suppressed the trace, in which case change your error handling
    so that the trace is produced.
    Identify which program line in your post the error is pointing to so that we can match
    the error with your program, since your post doesn't have line numbers..
    Edited by: ChuckBing on Nov 16, 2007 7:19 PM
    Also - posting large amounts of code (as you did) will reduce the chance of anyone helping

  • Can't figure out how to create an update form in a cfwindow tag

    I finally was able to figure out how to do an add form inside
    of a cfwindow tag yesterday. But I want this form to be
    multipurpose, and allow edits as well. But for the life of me, I
    can't figure out how to pass a row of data to the form inside a
    cfwindow. Normally, I'd pass the primary key via the URL but if I
    try to do that here, it basically reloads the page and closes out
    the cfwindow since I have the window set to not show by default.
    My page has a list of departments. My page is called
    departments.cfm. For each row in the department list, there is a
    link called edit. When the user clicks this link, I want the
    cfwindow to open with the cfform populated with the data from the
    department list for the row selected. Sounds simple enough, except
    how do I pass the department_id to the form? If my link is <a
    href="departments.cfm?id=#department_id#>Edit</a>, the
    cfwindow tag displays and I can see the data in it, but then closes
    right away. I finally figured out that it was calling the page
    again and the cfwindow is closing because I have it set to not
    display by default. I'm about ready to drop this cfwindow and just
    do real popup windows via javascript. And I'm normally not in favor
    of doing popup windows, but the application I'm working on doesn't
    have enough real estate on the screen to do a hidden form, so a
    separate window containing the form is my best solution.
    Anyone have any suggestions?

    Well, this is kind of a tough one for me, but it sounds like
    the best way will be to launch a JavaScript function everytime the
    user clicks the link, like this:
    <cfoutput query="getDepartments">
    <a href="javascript:showWin(#yourID#)">show
    window</a>
    <br>
    </cfoutput>
    the showWin function will both create the window and launch
    it, passing in the user chosen var:
    function showWin(id) {
    var URL = 'editDeptPage.cfm?dept_id=' + id;
    var winName = 'deptWin' + id;
    ColdFusion.Window.create(winName, 'Edit the Department',
    URL,
    {x:100,y:100,height:300,width:400,modal:false,closable:true,
    draggable:true,resizable:true,center:true,initshow:true,
    minheight:200,minwidth:200 })
    The following line of code is supposedly to make sure that
    the window refreshes each time it is launched, by naming it
    something new each time:
    var winName = 'deptWin' + id;
    However, if it doesn't work, I think there's a Window refresh
    function in the Ext library but I'm not sure.
    Also, in the showWin function, after the Window is created,
    you might need this but I'm not sure:
    ColdFusion.Window.show(winName)
    Talk to you later,
    Peter

  • I can't figure out why this page splits in live preview... but not in the browser?

    I've finally got my site up and it all runs great... except I can't figure out why this one page behaves like it's too wide.
    http://www.johnnez.com/mainbooks.html
    It comes apart in the Live Preview.... but not in the browser preview.
    Thanks for any tips...
    jn

    john nez wrote:
    HTML is a total incrutable mystery to me... a mystery inside a mystery inside a mystery!
    Sounds to me like you've almost cracked it!
    You have one error that could cause problems and that's the stray </blockquote> tag.  Just delete it.
    The alt="" text will show as an error on the validator but that's easy to fix and worth doing.
    Here's an easy article on that: http://www.456bereastreet.com/archive/200412/the_alt_and_title_attributes/
    In one of your CSS files (JonzheaderindexCSS.css) you have this:
    body {
    margin-top: 20px;
    padding: 0;
    color: #666;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 14px;
    line-height: normal;
    background-attachment: fixed;
    background-color: #E1B852;
    background-image: url(../images/orange%20plaid.jpg);
    background-repeat: repeat;
    html { overflow-y: scroll; }
    It should be like this:
    html {
    overflow-y: scroll;
    body {
    margin-top: 20px;
    padding: 0;
    color: #666;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 14px;
    line-height: normal;
    background-attachment: fixed;
    background-color: #E1B852;
    background-image: url(../images/orange%20plaid.jpg);
    background-repeat: repeat;
    It looks like you have that rule repeated further down the page like this:
    html { overflow-y: scroll; }
    There's an extra curly brace there (}) anyway, so it is badly formed but the whole rule and extra curly brace can go.
    You can fix those errors but I have a sneaky suspicion that it isn't gong to solve the issue you describe.
    Fix those issues anyway and post back.  Maybe if you can show a screen shot of what you are seeing in DW it might help?
    Martin
    PS: It's never a good idea to have file names on the web that have spaces in.  Your background rule has this:
    background-image: url(../images/orange%20plaid.jpg);
    That .jpg should be orangeplaid.jpg or orangePlaid.jpg or orange_plaid.jpg and the change should be reflected in the reference to the image so, orangePlaid.jpg should be:
    background-image: url(../images/orangePlaid.jpg);

  • Searching in address bar takes me to yahoo instead of google now, can't figure out how to reset it.

    I used to be able to just type in my searches in the address bar, or if I mis-typed a URL, it would google search it. Now, it does that with Yahoo, and I can't figure out how to reset it. I did the about:config thing, and it didn't work. Suggestions?

    Hi,
    Thanks for the reply.
    I would contact Apple ID Support and see they can do anything from their end or give more detailed instructions.
    Also, see Apple ID Support.
    They do respond and hope it get's resolved.
    Let me know what they say.

  • Can't figure out directory/path

    I can't figure out what "directory/path" to use on my FTP Server Settings.
    I know my website address. This is my first time using iWeb.
    Whenever I test the connection I get the message "Testing failed. The directory/path couldn't be found. Verify your settings and try again."
    Can anyone help? Is there a standard format based on the website address?
    John

    I found a workaround.
    I had the same problem. My website URL is called:
    http://www.softtenebraslux.com
    In my FTP site, all files are contained within the www/ directory.
    If I give a name to my website inside iWeb, there is no way I can publish to www/. No way. Whatever I put in Directory/Path, with or without /. It always create a directory with the site name and put everything inside it. I often ended up with my site being published in:
    http://www.softtenebraslux.com/SoftTenebrasLux
    where "SoftTenebrasLux" is the content of the field "site name" with blank spaces replaced by underscores.
    On the other hand, you can't leave the field "site name" blank. So, I simply put "www" in the site name field, and iWeb will indeed publish to my correct directory (that is, www/). Of course, in iWeb, the site entry name is "www" which is stupid. But at least, I can publish with FTP, which works now fine.
    Waiting for a fix for this stupid bug.

  • I can't figure out how to attach  a picture to a post.

    Some times it would just be easier to answer a question with a screenshot. I've noticed some pictures in posts but can't figure out how to do it.
    Thank you.

    Raidrunner,
    To post an image in  Discussions, create a Screen Shot of the image you wish to post.
    Upload the image to an online storage facility, like one of these linked to below.
    Flickr
    ImageShack
    PhotoBucket
    PICVAULT
    Twango
    Then use HTML formatting, to insert the URL of the location.
    Use this format <img src="Insert URL Here">
    Post the resulting line of text.
    Keep the images small, and unobtrusive, when possible.
    You can also just post a Link/URL, to the image location, using either of these formats:
    <a href="Insert URL Here">Type Title Here</a>
    <img src="Insert URL Here">
    Or use Skitch.
    Quoted from the Sktch website:
    "Skitch.com is a webservice that works hand in hand with our application Skitch to give you 1-click uploading of images for fast and fun image sharing.
    ali b

  • Can't figure out how to use home sharing

    Since the latest couple iTunes updates, my family and I can not figure out how to use home sharing. Everyone in our household has their own iTunes, and for a long time we would just share our music through home sharing. But with the updates, so much has changed that we can no longer figure out how to use it.
    I have a lot of purchased albums on another laptop in the house, that im trying to move it all over to my own iTunes, and I have spent a long time searching the internet, and everything. And I just can't figure out how to do it. So.... how does it work now? I would really like to get these albums from my moms iTunes, onto mine. I would hate to have to buy them all over again.
    If anyone is able to help me out here, that would be great! Thanks!

    The problem im having is that after I am in another library through home sharing, I can't figure out how to select an album and import it to my library. They used to have it set up so that you just highlight all of the songs you want, and then all you had to do was click import. Now I don't even see an import button, or anything else like it. So im lost... I don't know if it's something im doing wrong, or if our home sharing system just isn't working properly.
    Thanks for the help.

  • Something was hidden in a download and now these double green underlined hyperlinks show up everywhere, and pop ups too whenever I click on ANYTHING. I can't figure out how to find it and get rid of it.

    Something was hidden in a download and now these double green underlined hyperlinks show up everywhere, and pop ups too whenever I click on ANYTHING. I can't figure out how to find it and get rid of it.

    You installed the "DownLite" trojan, perhaps under a different name. Remove it as follows.
    Malware is constantly changing to get around the defenses against it. The instructions in this comment are valid as of now, as far as I know. They won't necessarily be valid in the future. Anyone finding this comment a few days or more after it was posted should look for more recent discussions or start a new one.
    Back up all data.
    Triple-click anywhere in the line below on this page to select it:
    /Library/LaunchAgents/com.vsearch.agent.plist
    Right-click or control-click the line and select
    Services ▹ Reveal in Finder (or just Reveal)
    from the contextual menu.* A folder should open with an item named "VSearch" selected. Drag the selected item to the Trash. You may be prompted for your administrator login password.
    Repeat with each of these lines:
    /Library/LaunchDaemons/com.vsearch.daemon.plist
    /Library/LaunchDaemons/com.vsearch.helper.plist
    /Library/LaunchDaemons/Jack.plist
    Restart the computer and empty the Trash. Then delete the following items in the same way:
    /Library/Application Support/VSearch
    /Library/PrivilegedHelperTools/Jack
    /System/Library/Frameworks/VSearch.framework
    Some of these items may be absent, in which case you'll get a message that the file can't be found. Skip that item and go on to the next one.
    From the Safari menu bar, select
    Safari ▹ Preferences... ▹ Extensions
    Uninstall any extensions you don't know you need, including any that have the word "Spigot" in the description. If in doubt, uninstall all extensions. Do the equivalent for the Firefox and Chrome browsers, if you use either of those.
    This trojan is distributed on illegal websites that traffic in pirated movies. If you, or anyone else who uses the computer, visit such sites and follow prompts to install software, you can expect much worse to happen in the future.
    You may be wondering why you didn't get a warning from Gatekeeper about installing software from an unknown developer, as you should have. The reason is that the DownLite developer has a codesigning certificate issued by Apple, which causes Gatekeeper to give the installer a pass. Apple could revoke the certificate, but as of this writing, has not done so, even though it's aware of the problem. This failure of oversight is inexcusable and has compromised the value of Gatekeeper and the Developer ID program. You can't rely on Gatekeeper alone to protect you from harmful software.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination  command-C. In the Finder, select
    Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.

  • Can't figure out what is the code

    Hi
    I got following macro that will help me to run certain transaction.
    I just can't figure out where comments ends and where code starts so I was unable to run it for like 3 hours now.
    In other words
    I am trying to use Excel Macro that will get to active transaction in SAP and do waht I have recorded.
    'SAPGUI Macro for updating SAP from Excel data 'Prerequisites: '1. Script Recording and Playback from the SAPGui must be enabled by admin '2. The Excel list must be set up from top left corner of a worksheet '3. The worksheet with data must be the active sheet '4. There is no error handling. Build it yourself! '5. The script will update the active (current) SAP transaction'Instructions for use 'Record a macro of your update actions. 'Paste the session.findById stuff between the <== and ==> markers'Edit the literal values and replace with Trim(CStr(objSheet.Cells(x, y).Value)) 'where x and y are the row and column counters'Open up your Excel sheet with data (row 1 is ignored here) 'Fire the macro! '===========BEGIN BOILERPLATE=================== REMSet up connection to the SAP screen: If Not IsObject(application) Then Set SapGuiAuto = GetObject("SAPGUI") Set application = SapGuiAuto.GetScriptingEngine End If If Not IsObject(connection) Then Set connection = application.Children(0) End If If Not IsObject(session) Then Setsession = connection.Children(0) End If If IsObject(WScript) Then WScript.ConnectObject session, "on" WScript.ConnectObject application, "on" End If REMSet up connection to the Excel data to be keyed into SAP: Dim objExcel Dim objSheet, intRow, i Set objExcel = GetObject(,"Excel.Application") Set objSheet = objExcel.ActiveWorkbook.ActiveSheet session.findById("wnd[0]").maximize
    '===========END BOILERPLATE=====================
    'REM Example: Mark material for deletion in Plant using MM06 For i = 2 to objSheet.UsedRange.Rows.Count     'Assuming there is a header rowREM Find a cell and put its value in: REM Note: The section of the Script shown below can be recorded ' and edited to pick data from the Excel sheetstrCN = Trim(CStr(objSheet.Cells(i, 1).Value)) strWerks = Trim(CStr(objSheet.Cells(i, 2).Value)) '<== session.findById("wnd[0]/usr/ctxtRM03G-MATNR").text = strCN session.findById("wnd[0]/usr/ctxtRM03G-WERKS").text = strWerks session.findById("wnd[0]/tbar[0]/btn[0]").press session.findById("wnd[0]/usr/chkRM03G-LVOMA").selected = false session.findById("wnd[0]/usr/chkRM03G-LVOWK").selected = truesession.findById("wnd[0]/tbar[0]/btn[11]").press 'session.findById("wnd[0]/tbar[0]/btn[0]").press '==> Next

    Ok macro works and triggers actions from recorder. I was doing it with hope I will select data in SAP and paste in Excel AND/OR export file from SAP with data.
    If I record select column and then copy it. Script is recorded until selection . It ignores copy (i tried use mouse right click and copy AND manual alt+F12 and then copy from context menu)
    When I export recorder does open export window but does not writes the line relevant to clicking save.
    I found such bits
      'Choose the export format
      session.findById("wnd[1]/usr/subSUBSCREEN_STEPLOOP:SAPLSPO5:0150/sub:SAPLSPO5:0150/radSPOPLI-SELFLAG[1,0]").select
      session.findById("wnd[1]/tbar[0]/btn[0]").press
    'Choose the export filename
      session.findById("wnd[1]/usr/ctxtDY_FILENAME").text = "test.txt"
      session.findById("wnd[1]/usr/ctxtDY_PATH").text = "C:\Temp\"
    'Export the file
      session.findById("wnd[1]/tbar[0]/btn[0]").press
    But they dont seem to be relevant to my previous macro.
    Any quick fix to get data out of Excel

  • If I open a photo in "preview", multiple photos open. I just want to open one, but can't figure out how to do it.

    I keep multiple photos in a desktop folder to be quickly accessed by using Preview. But when I try to open ONE photo, it opens multiple photos. Can't figure out how to display just the single one that I select.  OS 10.7.2

    This is the resume feature of Lion. The last state of the application is saved when quitting (i.e last pictures viewed in Preview, last videos viewed in Quicktime etc).
    You can switch it off for Preview by copy and pasting the following in to the terminal application
    defaults write com.apple.Preview NSQuitAlwaysKeepsWindows -bool false

  • How do I use my iPhone to connect to the Internet. I down loaded safari v5.1.7 for my PC. I have added my iPhone to my computer but I can't figure out how to setup a hotspot or configure a network so my PC can access my phones data plan. Please help.

    And how am I supposed to answer my own question?

    I can't figure out how to respond so ill go this route. I can't seem to find the button/place to which I can choose, to turn on a hot spot. I have been through every option and searched to no avail. Could it be that my iPhone 4 is not hotspot capable as I was led to believe by the apple sales associate? Is there an app I can find to make my phone a wifi hotspot? So I can get on the Internet to view the pages I want that require adobe which this piece of **** software monger won't even support?

  • How do I use GarageBand as a amp/speaker to listen to my Electronic Drum set? I have a MIDI-USB cord already but I can't figure out how to listen to my set through the software using my computer speakers?

    How do I use GarageBand as a amp/speaker to listen to my Electronic Drum set? I have a MIDI-USB cord already but I can't figure out how to listen to my set through the software using my computer speakers?

    If you want to listen to the sounds of your drum set, you should use an audio cable and connect it to the computer's line-in, then create a real instrument track.
    If you use a Midi/USB interface, you'll have to create a software instrument track and select one of GB's drumsets as the instrument. Hopefully your drumset's midi notes are mapped to the right sounds in GB.

Maybe you are looking for

  • I've tried everything and still my Firefox says it's still running.

    I've tried restarting my computer, deleting Firefox and re installing, deleting the parent lock file, and it still wont open. I would love to have my Firefox back :(

  • Which Os x is better for a MacBook 1.1?

    Hi. Which Os x is better for a MacBook White 1.1.For Networking,movies and music. 10.5.8 or 10.6.8 ? spec: 1.83 Ghz Intel Core Duo          1 Gb ddr2 Thanks

  • Printing special character from report

    I was reading thru the other discussion on the same subject as I hv a similar problem. I am trying to print the character ' in a report. Note that it is not coming from the database. It is a hard typed character in the text of the report. It works fi

  • Screen Exit for Customer Master

    Hi All, How to create screen exits for Customer Master ( XD01 Tcode). Please give step by step procedure. For useful answers points willbe rewarded.

  • Loop through user text fields on a page

    I am new to APEX and I have searched for an answer to this problem, but was not able to find one. I have a page which has about 40 text boxes for user input. I would like to find a way to loop through all of the text boxes on the page when the user s