Roger Yates

Ranch Hand
+ Follow
since Aug 31, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Roger Yates

Hi Josh,

I’m a great fan of your 2nd edition book. What would you say are the compelling differences from 2nd to 3rd editions?
1 month ago
Thanks Ilja.

So, as a summary for anyone else interested in copying/moving whole lines:

  • Ctrl+Alt+down: copies current line or selected lines to below
  • Ctrl+Alt+up: copies current line or selected lines to above
  • Alt+up: moves current line or selected lines to above
  • Alt+down: moves current line or selected lines to below
  • Ctrl+Shift+L: brings up a List of shortcut keys & pressing twice gets...
  • Window/Preferences - General/Keys: allows you to modify the lot


  • As an example, to copy a whole line somewhere else:
    1. Press Ctrl+Alt+up (or down)
    2. Press Alt+up (or down) as many times until you reach desired location.
    ... and for a shortcut to editing the shortcuts...

    When you've pressed Ctrl+Shift+L for the list of shortcuts, you can then press Ctrl+Shift+L again to get taken straight to the 'General/Keys' section of Windows/Preferences.

    i.e. Press Ctrl+Shift+L twice and you're there!

    I like Eclipse more and more.

    Now to find a shortcut to cut a whole line ready to be dropped somewhere else of my choosing...
    Tim,

    Thanks, but...
    I have a tablet-pc and if I dare to use ctl-alt-down, my screen rotates upside-down.
    and I couldn't see Windows/Preferences - Keys

    however...
    However, I've now disabled that little-used feature of my graphics driver in favour of the more useful copy line in Eclipse.

    and you did lead me to find Windows/Preferences - General/Keys.

    Thanks very much - an extremely useful page that one.

    I'd found Ctl-Shift-L to get a list of key combinations and hadn't found anything, though now I see Ctl-Alt-down is there - I think the sheer number of shortcuts must have frazzled my brain.

    Also Ctl-Alt-Up will duplicate lines.

    So, as a summary for anyone interested:
  • Ctl-Alt-down: copies current line or selected lines to below
  • Ctl-Alt-up: copies current line or selected lines to above
  • Ctl-Shift-L: brings up a List of shortcut keys
  • Window/Preferences - General/Keys: allows you to modify the lot


  • Is there a keyboard shortcut to duplicate a line of code?
    E.g. Ctrl+D deletes current line.

    I know I can: move to start of line, select to end of line, copy, paste
    ...but that's a bit long-winded.

    There must be a combination to copy a whole line at once, just like that good old dos editor Brief, but I haven't found it yet. Anyone know if such a shortcut exists?
    Can't help about the re-adding it, but if you are running on Windows, did you try restoring them from the Recycle bin?!
    I don't believe it!

    Yes, it was a basic error, but lead me to erroneously believing I'd been infected with some netster spyware that had somehow gotten into Tomcat!

    This: should have been this:

    Somehow, I managed to type an extra 'u' into sourceforge :roll: .
    The domain 'sourcefourge.net' has been taken by netster and the request gets redirected to the netster site, causing my XML to be invalid!

    I'd have wasted a lot less time if I'd got an invalid URL message rather than finding netster in my output! Thanks a bunch netster - NOT!

    Not amused, but happy to be back in action again.

    I considered deleting my former post, but have left it here for the unlikely event that someone else hits the same problem. (And I thought I'd checked that XML soooo carefully!)

    For the record, removing that extra 'u' results in a lovely set of creation messages beginning with a 'Mapping Class' message.

    [ March 14, 2006: Message edited by: Roger Yates ]
    I'm trying to get to grips with Spring/Hibernate/Struts using a cut-down variant of AppFuse. When starting Tomcat (5.5) having deployed my first hibernate definition, I get "Error parsing XML..." as shown in the extract of output below.


    I also notice that the output mentions lb1.netster.com. What is 'netster' doing here? Is it causing me a problem? If so, how do I stop the webserver from looking there?

    The xml that should be evaluated is as follows:



    Any ideas what could be going wrong?
    Assume nothing - I could have made some very basic error!

    [ March 14, 2006: Message edited by: Roger Yates ]
    'listIdx' with quotes round it is just the string 'listIdx'.
    We can assume that list is of type List and so can be accessed using [] with numbers only. So list[1] is fine, and list[someAttributeThatCanConvertToANumber] is also fine. But list["someAttributeThatCanConvertToANumberButWontAsItIsInQuotes"] will not work.

    Actually as it stands F also does not work (exception gets thrown for same reason as E).
    Here's the error you get for F as it is now:

    The EL expression ${list[list['listIdx']]} throws a ServletException
    (The "[]" operator was supplied with an index value of type "java.lang.String" to be
    applied to a List or array, but that value cannot be converted to an integer.)



    I've logged 'F' as an errata, and it's currently in the 'unconfirmed' bucket here:
    http://www.oreilly.com/catalog/headservletsjsp/errata/
    Nicely done Satguru!

    Here's to 94%
    Wahay! WINNER


    Cheers guys
    If you have more than one .jsp page with v2.3 specified, you could add this to your DD:

    [ October 24, 2004: Message edited by: Roger Yates ]
    You'll get EL if either:
    - You add JSTL 1.0 support, or
    - You use a container that supports JSP 2.0 (EL was deemed so handy, it was added to the JSP2.0 spec), irrespective of JSTL.