How do I add an included jsp to my project and not get a compile error?

Hi,
I have a project with some included jsp's however if I add them to the project, when I build I get a compile error as the jsp uses variables from the calling jsp.
Any ideas on how to get round this.
Thanks
DM

There are two main ways that I deal with this problem (yeah, it sucks, but it sort of makes sense that it happens...) (I presume you're talking static include here...)
#1 - name the included file with an extension that JDev will not try to compile (.jspf - for JSP Fragment - is common) Then it will be compiled in with the including page, but won't gag the project compilation. Advantage - it works, and you find out at compile time if you hosed up the variable reference. Disadvantage: JDev tries really, really, really hard to keep you from naming a JSP file with an extension of .jspf I normally create the .jsp file in JDev, remove it from the project, rename the file outside of JDeveloper, then add it back to the project - pain in the butt, but it works (and you probably aren't building scads of these included files...)
#2 - add the variable to be referenced to the pageContext implicit object as an attribute in your including page (ex, <% pageContext.setAttribute("myVar", myVar); %>), then reference that attribute in your included JSP (ex, <%= pageContext.getAttribute("myVar") %>) . It will compile fine (as the compiler has no way of knowing if the pageContext attribute actually exists, it just sees that the syntax is good and motors along merrily. Advantage: don't have to have differently named JSP files (which isn't actually a big deal). Disadvantage: You hvae to add the variable to the pageContext (and you have to always add Object derivatives, as primitives won't go into a hash) and you don't find out if you screwed the variable up until runtime (when it tries the getAttribute, which could return null if you didn't properly set it to start with) vs at compile-time w/ the direct reference.
HTH!
Jim

Similar Messages

  • How do I add a NAS as a registered user and not a guest?

    I have just bought a lenovoez media and backup center.
    I have a time capsule which it is plugged into, it shows up and I am writting all my files to it now. However it is on the shared network as a guest and not as a registered user like the time capsule.
    I am being asked my password but it wont accept it.
    Any help or ideas?
    Philip

    I presume you are on Mavericks?
    Is the firmware of the NAS rated for 10.9 ?? When I checked it was only up to 10.8 and there have been changes.
    Changing permissions on network drives is not that easy.. it is by nature a Guest device unless you create a folder with a proper use name and password.
    Asking for username is just Mavericks being stupid, if that is what you use.
    Simply mount the disk manually.
    As SMB2 is often broken.. the recommendation I have seen is to mount it CIFS  so in Finder, Go, Connect to Server.
    CIFS://NASname or you can use its IP address.
    You will then be asked the password. I have no idea what a guest account password for this device is. Often just type in admin will keep things happy.. or actually set a password.
    Good luck.

  • HT5527 how do I add cloud to my computer?  I can not get a direct Cloud icon on my computer without the online login?

    HAving an issue getting the icon to my desktop or even on my computer.  I want to download the cloud app so I have it on my computer.  I have an imac. 

    You must be running 10.7.2 or later in order to have the full iCloud function on your iMac.
    OT

  • How do I share my library with a family member and not get their music?

    I have an itunes music library. My husband has it on an ipod. He would like to add music that I don't want. I would like him to open his own account to purchase his music but he would still like my music as well. How do we do this?

    Welcome to the Apple Community.
    Once he has created his own account, he can share your library on his computer from yours using homesharing, he can then import anything from your library to his own.

  • How do I add an already built Shopping Cart  (PHP and MYSQL) application to a page in a Muse site?

    How do I add an already built Shopping Cart  (PHP and MYSQL) (Cartweaver 4) application to a page in a Muse site? Do I have to export the Muse site as Html to dreamweaver and them use the extension to bring the shooping cart in or can I do it directly in Muse?
    Message was edited by: mgv2048

    We have experimented with doing this with some good success. We have been working on adding Cartweaver to a Facebook page by essentially adding a Cartweaver store to Facebook in an iframe.  The "store" would be pages with just your basic product display, cart, and checkout functionality, with none of the "window dressing" - just use CSS to match the color and general look of the design it's being added to.
    The one problem with this for Facebook is when it comes time to check out toy have to leave Facebook and go to your server where an SSL is in place.  Fortunately in this situation this would not be the case, you can have an SSL installed to the root of your site and you'll be okay.
    This is an interesting project.  Give this a try and let me know how it goes and if you run into any snags, please make a post on the Cartweaver forums: http://forums.cartweaver.com - I'm really confident that this can work, and not only work, but work well.
    Looking forward to hearing how this goes, and being of what help we can.
    Lawrence Cramer - *Adobe Community Professional*
    http://www.Cartweaver.com
    PHP & ColdFusion Shopping Cart for Adobe Dreamweaver
    Stay updated:
    http://www.facebook.com/cartweaver
    http://www.twitter.com/cartweaver
    http://blog.cartweaver.com

  • How do I add an existing file to a project?

    To add an existing files to a project in JDeveloper 9.0.5.2 I use File/Import and select "Existing Sources". In Jdeveloper 10.1.3.0.2 the "Existing Sources" option was substituted by "Create Project from Existing Source". The documentation topic in 10.1.3 “Adding Existing Files to an Existing Project Using the Add Files or Directories Dialog” indicates File/Open and use a “Add Files or Directories dialog” that I can not find.
    How do I add an existing file to a project?

    To add an existing files to a project in JDeveloper
    9.0.5.2 I use File/Import and select "Existing
    Sources". In Jdeveloper 10.1.3.0.2 the "Existing
    Sources" option was substituted by "Create Project
    from Existing Source". The documentation topic in
    10.1.3 “Adding Existing Files to an Existing
    Project Using the Add Files or Directories Dialog”
    indicates File/Open and use a “Add Files or
    Directories dialog” that I can not find.
    How do I add an existing file to a project?Right now you just need to copy the file into the sourcepath of your project, going forward we're going to provide some easier way to do this.
    i.e. you can use the windows explorer to copy C:\src\com\acme\MyClass.java to C:\jdev\mywork\Application1\Project1\src\com\acme\MyClass.java
    Hope this helps,
    Rob
    Team JDev

  • I have a friend who was going to sync her phone with my computer to get the new update..  how do i add her phone with out her losing everything on her phone and not getting all my info on her phone..

    i have a friend who was going to sync her phone with my computer to get the new update..  how do i add her phone with out her losing everything on her phone and not getting all my info on her phone..

    First, create a separate login on your computer for your friend. Do this BEFORE you do anything else. Next, make sure iTunes is up to date. Then:
    1. Disable auto sync when an iPod/iPhone is connected under Preferences>Devices in iTunes.
    2. Make sure you have one contact & one event in the supported applications(Address Book, iCal) on your computer. These entries can be fake, doesn't matter, the important point is that these programs not be empty.
    3. Connect her phone, iTunes running, do not sync at this point.
    4. Store>Authorize this computer.
    5. File>Transfer Purchases(To make sure all purchased content on her phone will be in her itunes library).
    6. Right click in the device pane & select reset warnings.
    7. Right click again and select backup.
    8. Right click again & select restore from backup, select the backup you just made. When prompted to create another backup, decline.
    9. This MUST be followed by a sync to restore her itunes content, which you select from the various tabs, You'll get a popup regarding her contacts & calendars asking to merge or replace, select merge.
    You should be good to go.

  • How do I add photos to the camera roll that were not taken on my iPad? I imported photos to my iPad from my camera, and now I want to add them to my camera roll which is sync'ed with Dropbox as a back up mechanism.

    How do I add photos to my camera roll that were not taken one my iPad? I have iMported photos from my camera to my iPad. Theses photos are in the imported photo album. I want to move these photos to my camera roll but can't figure out how to this. I want them in my camera roll because that is the album that syncs with Dropbox where I want to backup my photos. Thank you for your help.

    Consider using sshfs to mount your Pi from your Linux boxes.  It's much easier to configure and manage than samba.  It sounds like you already have your Windows machines mounting your Pi so Samba is doing its job in that respect.
    More info on sshfs in the Wiki: https://wiki.archlinux.org/index.php/Sshfs
    To help get you off the dime, here's a modified line from my fstab that I use to mount my Pi with:
    gav@PI:/mnt/backup /mnt/rpi/backup fuse.sshfs rw,relatime,user_id=0,group_id=0,allow_other 0 0
    Subsitute my mount points with yours.
    For a password-less mount:
         ssh-copy-id gav@PI
    after you've set up ssh and generated some keys on your client box.
    Here are some relevant lines from the smb.conf file on my Pi that I use for my one Windows box in the house that might help you with your write permissions:
       security = user
      hosts allow = 192.168.1.0/255.255.255.0
      guest account = gav
    ; And my share setup:
    [rpi]
       comment = Public Stuff
       path = /mnt
       writable = yes
    ;   printable = no
    ;   write list = @krb
    [torrent_dl]
       path = /mnt/video/torrent_dl
       writable = yes
       create mask = 0770
       directory mask = 0770
       guest ok = Yes
       case sensitive = No
       read only = No
    Hope this helps.

  • I am trying to load iTunes and keep getting a error 126 and reinstall program.  I have uninstalled and reinstalled twice and keep getting the same error message.  How can this be resolved.

    I am trying to load iTunes and keep getting a error 126 and reinstall program.  I have uninstalled and reinstalled twice and keep getting the same error message.  How can this be resolved?

    Go to Control Panel > Add or Remove Programs (Win XP) or Programs and Features (later)
    Remove all of these items in the following order:
    iTunes
    Apple Software Update
    Apple Mobile Device Support (if this won't uninstall move on to the next item)
    Bonjour
    Apple Application Support
    Reboot, download iTunes, then reinstall, either using an account with administrative rights, or right-clicking the downloaded installer and selecting Run as Administrator.
    The uninstall and reinstall process will preserve your iTunes library and settings, but ideally you would back up the library and your other important personal documents and data on a regular basis. See this user tip for a suggested technique.
    Please note:
    Some users may need to follow all the steps in whichever of the following support documents applies to their system. These include some additional manual file and folder deletions not mentioned above.
    HT1925: Removing and Reinstalling iTunes for Windows XP
    HT1923: Removing and reinstalling iTunes for Windows Vista, Windows 7, or Windows 8
    tt2

  • How do I travel to other countries and have my phone still work and not get any surprises in the bill?

    How do I travel to other countries and have my phone still work and not get any surprises in the bill?

    Depends on what you mean by "surprises" in the bill. Verizon's rates for using your phone internationally are pretty expensive, ~$0.99/minute. I would certainly think a 10 minute call for $10 would be surprising!
    Well it would certainly depend on your phone, but if it is a 4G LTE phone, you can simply purchase a prepaid SIM card from the location you are going, switch that with the SIM card currently in your phone and you would be using your phone locally in that location. Of course you would need to notify people needing to contact you of your "temporary" new international phone number. Make sure you keep your Verizon SIM card safe as you would want to switch back to it when returning to the states.
    You can see Verizon's global services information HERE. It includes a trip planner and would be more specific on the prices you would expect to pay if you chose to use Verizon's service rather than a local SIM card from where you are visiting.

  • How can I print just a part of the page and not the full page with Adobe Reader v 10.1.2?

    how can I print just a part of the page and not the full page with Adobe Reader v 10.1.2? I need to print a engineering print with lot of information but information is too small in letter size and I don't have a plotter.

    Two ways to print a portion of a page: zooming or using the Snapshot Tool.
    ZOOMING:
    Zoom into the area you want to print.
    Click the Print icon.
    Under "Pages to Print", make sure "Current view" is selected under "More options" (you may need to click "More options" to open it).
    If you aren't satisfied with the preview, try clicking "Fit" under the Size button.
    SNAPSHOT
    Choose Edit > Take A Snapshot.
    Drag a rectangle around the area you want to print. 
    Click the Print icon.
    Under "Pages to Print", make sure that "Selected Graphic" is selected under "More options".
    To enlarge the snapshot to fit the sheet of paper, choose "Fit" under the Size button.
    Hope this helps!

  • How do I save my itunes libabry on my computer and not on an exteernal hard drive, how do I save my itunes libabry on my computer and not on an exteernal hard drive

    how do I save my itunes libabry on my computer and not on an exteernal hard drive, how do I save my itunes libabry on my computer and not on an exteernal hard drive

    It is on the internal boot drive by default.
    How/why did you change it?
    It is on the internal boot drive by default.
    How/why did you change it?

  • Every time I try to download a free or paid app or in iTunes   it asks me for a credit card. (Which i don't have one)  How can i download free apps without a credit card and not reset my apple ID? I already put in 20$!!!!!

    Every time I try to download a free or paid app or in iTunes 
    it asks me for a credit card. (Which i don't have one)
    How can i download free apps without a credit card and not reset my apple ID?
    I already put in 20$!!!!!

    How to Get Apps From the App Store Without a Credit Card
    http://ipadhelp.com/ipad-help/how-to-get-free-apps-from-the-app-store-without-a- credit-card/
    Creating an iTunes Store, App Store, iBookstore, and Mac App Store account without a credit card
    http://support.apple.com/kb/ht2534
    If None is not available - On your computer launch iTunes and click "iTunes Store" in the left navigation pane. Click the "down arrow" next to your name at the top right side of the page and click "Account." Enter your username and password and click "View Account" to log into your account information. Next to your Payment Type, click "Edit." Select the "None" button and click "Done." Confirm that your card has been removed by returning to the Apple account information screen. Under Payment Type, it should say that there is no credit card on file.
     Cheers, Tom

  • I have updated my iphone 5s to iOS8 but it has my old icloud account, how can i change the icloud email address as i can not get passed this page?? please help :-(

    i have updated my iphone 5s to iOS8 but it has my old icloud account, how can i change the icloud email address as i can not get passed this page??
    I do not know the log in details and no longer have that icloud email address !!
    please help :-(

    That's Activation Lock. You will need to remember the Apple ID and password you used to set up the phone.
    If you can't remember them, you can go to iforgot.apple.com to try to recover the information.
    If you are the original owner of the phone & have proof of purchase, you can try calling Apple to see if they can assist also.
    ~Lyssa

  • I am in Saudi and trying to download navigon middle east. Every time I try to buy the app it will show up, says waiting and disappears. How can I get around it and not get lost on these crazy roads?

    I am in Saudi and trying to download navigon middle east. Every time I try to buy the app it will show up, says waiting and disappears. How can I get around it and not get lost on these crazy roads?

    I recently purchased a second hand new macbook air, although it was second hand to me the previous owner had never actually turned it on.
    Something doesn't make sense here, though I'm not saying the previous owner is lying....
    Time to send your serial # to iTS and let them see what's happening here.
    iTunes Store Support
    http://www.apple.com/emea/support/itunes/contact.html

Maybe you are looking for

  • No dictation option on keyboard screen

    I want to dictate to my iPad3 and am connected to the Internet. I followed the advice of going to SETTINGS>GENERAL>KEYBOARD. Once there I found no DICTATION option. Using iOS 6.

  • How do I get to the restore screen in itunes

    I am trying to restore an ipad and when I go into itunes all I get is the store, how do I get to the screen to restore the ipad

  • How to set ACLs on Remote MAC server Volumes..

    Hi, I have Mac OS X server v 10.5 Leopard. Initially I have enabled the ACLs using fsaclctl on the MAC server volume. When this volume gets mounted(through afp) on some other MAC client(MAC OS X 10.4 Tiger), the ACL status is shown as disabled. And i

  • Newly installed CS2 will not recognize raw images

    I have installed my Photoshop CS2 on my new computer.  It will not recognize my raw images.  I get a message that says "could not complete your request because it is not the right kind of document".  I uninstalled the program and reinstalled it again

  • Troubleshooting Maximum No. of Order Proposals Exceeded

    Hi PP Gurus, Can any of you tell me the best way to troubleshoot the above problem after an MRP run?  When I run MRP in the background - MDBT I occasionally get an error in the log saying "Maximum no. of order proposals per deadline exceeded" for one