Newbie EL help needed

I've done quite a bit of JSP work and am now trying to grok JSP 2.0 with Tomcat 5.0.28.
Why does example A work yet B doesn't?
A) ${33}
B)
<% int x = 33; %>
${x}

In EL, there are only four scopes, represented by four scope objects:
page scope -- the pageContext object
request scope -- the request object
session scope -- the session object
application -- the servletContext object
EL will find a value stored in any one of these four scopes. However, when you are using scriptlets,
<% x = 33 %>
You are inserting that java code directly into the JSP's service method (remember, JSPs are translated into Servlets, and then compiled into .class files before they are displayed...). The value is local to the service method and not stored in any of the four scope objects.
In order to access a value from a scriptlet, you could do:
<%
  Integer x = 33; //I don't think you can use int here, I think it needs to be an Object
  pageContext.setAttribute("x", x); //put the value of the variable x into the pageContext with a name of x
%>
  ${x} //Will give the first value named x when searching page, request, session, application scopes

Similar Messages

  • Newbie Layout Help Needed

    I am normally an After Effects and Premiere Pro user but have been forced to volunteer for help on a Dreamweaver project. 
    The site is built on the template: HTML, 1 column fixed, centered, header and footer.  I want to be able to insert a photo the width of the main column, 960 px I think.  Then, under that photo, I want to insert 4 photos with different widths, between 150 and 200 pixels wide.  I will need to update this from time to time and the quantity and sizes of the photos will be different each time.  If "Draw AP Div" worked like I expected it to, it would be simple: draw boxes and insert images.  However, as you know, it's not going to be that easy.  I have read the formatting101 page and searched the forum but I guess I don't know enough to know what to search for.
    Is there a way to place images in the way I want to?  Do I need a plug-in?   I need to where to start. 

    You don't need APDivs for this.  If you want the secondary images to be evenly spaced on the page, use CSS floats & margins.
    http://alt-web.com/DEMOS/3-CSS-boxes.shtml
    If you don't need them evenly spaced, simply insert optimized images into your layout.  Be sure to resize images beforehand in your graphics editor so that their combined widths will fit inside the layout.
    <p style="text-align"center">
    <img src="top-image.jpg" width="xx" height="xx" alt="description">
    </p>
    <p style="text-align:center">
    <img src="image1.jpg" width="xx" height="xx" alt="description">  
    <img src="image2.jpg" width="xx" height="xx" alt="description">  
    <img src="image3.jpg" width="xx" height="xx" alt="description">  
    <img src="image4.jpg" width="xx" height="xx" alt="description">
    </p>
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/

  • Newbie extract help needed

    Hi all,
    I have a full Photoshop webpage layout file with several layers – and I need to extract parts of it to use on the website.
    I do know a little bit about slices – but I would prefer to not use that now. Rather I was thinking of saving a tiff file master with no layers – and simply copying pieces of this off as needed.
    I do have one background layer that is wider than the rest – and I would prefer to delete that entire background layer and then save the tiff without that.
    Q: Can you tell me how best to accomplish this?

    Revdave,
    You could follow the video below easily to extract background from Photoshop.
    Remove Background from Photo - Photoshop CS6 - YouTube
    Let me know if you need more help on this!
    Cheers
    -Mandhir

  • Newbie questions, help needed, please

    I am pretty new to Oracle Application Express. I have two problems when I try to create Page with type of "Report and Form". I hope you guys could help me out:
    (1) When I create Pages with the type of "Report and Form", the first column, primary key does not show up in the report page. Why?
    (2) When the table has two primary keys, I have problem when I click the button to go to form page from report page to update the record. It always show error said "Fetch returns more than one rows". How can I tell the application that I have two primary keys?
    Thanks,
    Lee

    Put in "HTML Expression [Insert column value]" part of field which will be a link:
    a href = f?p=&APP_ID.:&APP_PAGE_ID.:&APP_SESSION.::NO::PX_PK1,PX_PK2:'+'#PK1#'+','+'#PK2#')">Edit< /aput in previous sentence "<" in front and ">" on the end and remove blank before "/a" - otherwise you'll not see the content but real link!!!!!
    where :
    <li>"&APP_ID." is the page in which you want to open and start edit</li>
    <li>"PX_PK1,PX_PK2" are items on that page (probably hidden) tha will represent primary key</li>
    <li>"#PK1#" and "#PK2#" are primary key values on current page (from table grid represent with query "SELECT PK1,PK2,...from MyTable"</li>
    P.S.
    I read somewhere that life with Appex should be much easy when people should use PK base on one coulmn (sequence).
    To ensure PK on those fields create UNIQUE index on those two fields and in table define NOT NULL on those two columns.
    When you get expireienced you'll know the benefit of this advise

  • Newbie here help needed!

    Hi Guys,
    Ive hunted high and low to solve this problem but couldn't
    find anything.
    Heres my problem...
    Do you see the broswer bar where you type in the website you
    want to visit, to the left of that is a small image (like the adobe
    one thats there now) Can you do that via dreamweaver 8? if so how
    people.
    Thanks in advance!

    it's called a favicon, an image with the filename of
    favicon.ico
    You can create a square image in your image editor and use
    this free tool to create your favicon:
    Free Favicon Tool
    Place it in the root of your web directory and place the
    following line of code between your <head></head> tags:
    <link rel="shortcut icon" href="/favicon.ico" >
    Hope that helps!

  • Newbie VPN Help Needed

    Hi,
    This is my first post.  I just purchased a RV110W to get basic vpn access to my small office for me an employees when not onsite.  We have a Comcast business gateway and a static IP.
    So far I have configured the Comcast gateway and Cisco RV110W correctly to alllow internet to work in the office and VPN connections to be established with the RV110W while offsite.  The Comcast gateway is in a "bridge mode" just providing internet to the Cisco box.
    My trouble is nobody can see, ping, or connect to anything on the office LAN while a VPN connection is active offsite.  This is the case with PPTP and QuickVPN.  Again, the VPN connection works, says it is connected but I can't browse anything on the office LAN while offsite and on VPN.
    I am sure there is something obvious I am doing wrong, which is why I am turning here.
    Any help or advise would be greatly appreciated.
    Geoff

    got the same issue with 2 RV110W.
    We can stablish connection via QuickVPN and w8VPN client, acces to remote administration panel, but cant see anything nor ping to the rest of machines in the LAN.
    Any idea?

  • Newbie configuration help needed

    I bought a T-Mobile 8320 about a week ago and am repalcing my windows mobile phone.  I have my calendar, contacts, tasks and primary email all in MS Outlook on my laptop and want to wirelessly sync with my blackberry and my home PC.  I know about the hard wired solution but would like to stay away from that as I'm not at my PCs every day.  I do not have an exchange server.  I signed up for the $20 per month Blackberry program. 
    Can anyone tell me what the best desktop solution is for this?  Do you ue wireless manager or desktop manager, etc.
    Thanks
    Mike

    Without Exchange and BlackBerry Server you can only sync contacts, tasks and calendar via wired connection with Outlook.
    Click on KUDOS to appreciate our efforts and mark the thread RESOLVED if your issue is resolved.

  • Hi! I am newbie to Reports need help with check boxes

    Hi! I am newbie to Reports need help with check boxes. I am try-in to make a new check boxes that will validate in runtime. I have created two frames and one frame is dummy and other frame has big X line on it with conditions. Is this a right way to create check box! Please help thanks!

    and one frame is dummy and other frame has big X
    line on it with conditions. Is this a right way to
    create check box! Please help thanks!Instead of creating a frame for X, you can create Ractangle and place X in it. Rest is fine.

  • Help needed in writing a function.

    I am using Oracle 11g and SQL plus. I am a complete newbie, so I need some help here in writing a function. I guess my question is more about writing the trigonometric functions within the function.
    latA, longA latB, longB // these are the four input parameters,
    theta = longA - longB
    distX = sin( latA * PI / 180) * sin ( latB * PI /180) + cos ( latA * PI/180) * cos ( latB * PI/180) * cos ( theta * PI / 180)
    distY = acos(distX) // this is arc cosine
    distZ = distY * 180 / PI // PI refers to the mathematical PI
    distP = distZ * 60 * 1.1515; // this value should be returned. Of course the intermediate variable names don't matter.
    Please help. Thanks.

    CREATE OR REPLACE FUNCTION fucntion_name(latA IN NUMBER, longA IN NUMBER, latB IN NUMBER, longB IN NUMBER) RETURN NUMBER
    IS
    pi      CONSTANT NUMBER:=3.14159;
    theta NUMBER;
    distX  NUMBER;
    distY  NUMBER;
    distZ  NUMBER;
    distP  NUMBER;
    BEGIN
    theta :=longA - longB;
    distX :=sin( latA * PI /180) * sin ( latB * PI /180) + cos ( latA * PI/180) * cos ( latB * PI/180) * cos ( theta * PI / 180);
    distY :=acos(distX); --this is arc cosine
    distZ :=distY * 180/PI;  --PI refers to the mathematical PI
    distP :=distZ * 60 * 1.1515; --this value should be returned. Of course the intermediate variable names don't matter.
    RETURN distP;
    END;Edited by: Ora on May 3, 2011 11:46 PM

  • Greetings from a Photoshop Newbie. I need a computer, preferably a Mac laptop, with some serious processing power. I take photos with a Pentax 645Z; files are 50MB raw. I upload from Adobe Bridge and manipulate the photo, sometimes turning them into files

    Greetings from a Photoshop Newbie. I need a computer, preferably a Mac laptop, with some serious processing power. I take photos with a Pentax 645Z; files are 50MB raw. I upload from Adobe Bridge and manipulate the photo, sometimes turning them into files in excess of 250MB. I cannot resize as the large files are needed for enlargements. Have all sorts of problems trying to manipulate, add effects and saving most large files. I need some serious processing power. Can anyone suggest what Mac i should purchase? I thank you in advance for your help :-)

    It sounds as if you're having some system-related problems now, unrelated to processing power as such. In particular, a buggy video driver can cause everything to slow to a crawl.
    Medium format files are big, true, but not so big as to cause significant slowdowns on a normally functioning and reasonably current computer. A laptop will always be slower than a well-equipped desktop system, though. Mac vs PC plays no part in this, performance is unrelated to platform.
    Bottlenecks are different in ACR and Photoshop, so that should give you a clue. ACR is computing-intensive and mostly limited by CPU speed. Photoshop, however, is mostly bandwidth-intensive and mainly limited by memory and disk throughput. It's also sensitive to GPU issues.

  • Troubleshoting help needed:  My iMac keeps crashing and restarting with a report detail: "spinlock application timed out"  What can I do to fix this?timed out"

    Troubleshooting help needed:  My iMac keeps crashing and restarting with a notice: "Spinlock application timed out"  What can I do?

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the page that opens.
    Select the most recent panic log under System Diagnostic Reports. Post the contents — the text, please, not a screenshot. In the interest of privacy, I suggest you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header and body of the report, if it’s present (it may not be.) Please don't post shutdownStall, spin, or hang reports.

  • Help needed for writing query

    help needed for writing query
    i have the following tables(with data) as mentioned below
    FK*-foregin key (SUBJECTS)
    FK**-foregin key (COMBINATION)
    1)SUBJECTS(table name)     
    SUB_ID(NUMBER) SUB_CODE(VARCHAR2) SUB_NAME (VARCHAR2)
    2           02           Computer Science
    3           03           Physics
    4           04           Chemistry
    5           05           Mathematics
    7           07           Commerce
    8           08           Computer Applications
    9           09           Biology
    2)COMBINATION
    COMB_ID(NUMBER) COMB_NAME(VARCHAR2) SUB_ID1(NUMBER(FK*)) SUB_ID2(NUMBER(FK*)) SUB_ID3(NUMBER(FK*)) SUBJ_ID4(NUMBER(FK*))
    383           S1      9           4           2           3
    384           S2      4           2           5           3
    ---------I actually designed the ABOVE table also like this
    3) a)COMBINATION
    COMB_ID(NUMBER) COMB_NAME(VARCHAR2)
    383           S1
    384           S2
    b)COMBINATION_DET
    COMBDET_ID(NUMBER) COMB_ID(FK**) SUB_ID(FK*)
    1               383          9
    2               383          4
    3               383          2
    4               383          3
    5               384          4
    6               384          2          
    7               384          5
    8               384          3
    Business rule: a combination consists of a maximum of 4 subjects (must contain)
    and the user is less relevant to a COMB_NAME(name of combinations) but user need
    the subjects contained in combinations
    i need the following output
    COMB_ID COMB_NAME SUBJECT1 SUBJECT2      SUBJECT3      SUBJECT4
    383     S1     Biology Chemistry      Computer Science Physics
    384     S2     Chemistry Computer Science Mathematics Physics
    or even this is enough(what i actually needed)
    COMB_ID     subjects
    383           Biology,Chemistry,Computer Science,Physics
    384           Chemistry,Computer Science,Mathematics,Physics
    you can use any of the COMBINATION table(either (2) or (3))
    and i want to know
    1)which design is good in this case
    (i think SUB_ID1,SUB_ID2,SUB_ID3,SUB_ID4 is not a
    good method to link with same table but if 4 subjects only(and must) comes
    detail table is not neccessary )
    now i am achieving the result by program-coding in C# after getting the rows from oracle
    i am using oracle 9i (also ODP.NET)
    i want to know how can i get the result in the stored procedure itsef.
    2)how it could be designed in any other way.
    any help/suggestion is welcome
    thanks for your time --Pradeesh

    Well I forgot the table-alias, here now with:
    SELECT C.COMB_ID
    , C.COMB_NAME
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID1) AS SUBJECT_NAME1
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID2) AS SUBJECT_NAME2
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID3) AS SUBJECT_NAME3
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID4) AS SUBJECT_NAME4
    FROM COMBINATION C;
    As you need exactly 4 subjects, the columns-solution is just fine I would say.

  • Help needed I have a canon 40D. I am thinking of buying a canon 6D.But not sure that my len

    Hi all help needed I have a canon 40D. I am thinking of buying a canon 6D.
    But not sure that my lenses will work.
    I have a 170mm/ 500mm APO Sigma.
    A 10/20 ex  Sigma   HSM  IF.
    And a 180 APO Sigma Macro or do I have to scrap them and buy others.
    ALL Help will be greatly received. Yours  BRODIE

    In short, I love it. I was going to buy the 5DMark III. After playing with it for a while at my local Fry's store where they put 5DMII, 5DMIII and 6D next to each other, using the same 24-105L lens, I decided to get the 6D and pocket the different for lens later.
    I'm upgrading from the 30D. So I think you'll love it. It's a great camera. I have used 5DMII extensively before (borrowing from a close friend).
    Funny thing is at first I don't really care about the GPS and Wifi much. I thought they're just marketing-gimmick. But once you have it, it is actually really fun and helpful. For example, I can place the 6D on a long "monopod", then use the app on the phone to control the camera to get some unique perspective on some scenes. It's fun and great. GPS is also nice for travel guy like me.
    Weekend Travelers Blog | Eastern Sierra Fall Color Guide

  • Help needed! Raid degraded again!

    Hi!
    Help needed! I hava made bootable RAID with two S-ATAII 250Gb HDD and its not working! Every now and then at bootup I get a message RAID -> DEGRADED... Must be seventh time! Rebuild takes its own time!
    What am I doing wrong!
    T: Ekku
    K8N Neo4 Ultra
    AMD 64 4200+
    2 Gb RAM
    2 x 250 Gb HDD (Maxtor)
    nVidia RAID (in mb)
    P.S. I wery SORRY with my poor language!

    I'm going to blame the nVRAID because I've seen issues with it in the past. If your motherboard has another non-nVidia RAID solution, use that instead. Using the nVidia SATA ports as BASE or JBOD is fine and dandy but RAIDing always had issues. It's not even a driver issue I think it's just instability. Latest drivers and even boxed drivers never helped. Granted, some will report success with their rig. But on a professional level I've seen nForce issues on different motherboards and different hard drives that had RAID disaster stories.
    Good luck and if you don't have another RAID solution, my suggestion would be to buy a dedicated RAID controller card.
    LPB

  • HELP NEEDED WITH ADDAPTER-DVI TO VGA.

    PLEASE ...HELP NEEDED WITH WIRING CROSS OVER....CAN YOU HELP WITH BACK OF PLUG CONNECTIONS...I SORTA UNDERSTAND THE PINOUTS BUT CANT MAKE AN EXACT MACH...WOULD LIKE TO BE 100% SURE...
    ......THIS ENSURES NO SMOKE!!!                                                                                           
    THE CARD IS AN ATI RADEON RX9250-DUAL HEAD-.........ADDAPTER IS DVI(ANALOG)MALE TO VGA(ANALOG)FEMALE.
    ANY HELP VERY MUCH APPRECIATED........ SEEMS YOU NEED TO BE ROCKET SCI TO ATTACH A BLOODY PICTURE...SO THIS HAS BEEN BIG WASTE OF FING TIME!

    Quote from: BOBHIGH on 17-December-05, 09:21:31
    Get over it mate !
    I find it easy t read CAPS...and if you dont like it ...DONT READ IT!
    And why bother to reply...some people have nothing better to do.
    Yes there chep and easy to come by...Ive already got a new one.
    All I wanted was to make a diagram of whats inside the bloody thing...it was a simple question and required a simple answer.
    NO NEED TO A WANKA !!
    I feel a bann comming up.
    Have you tryed Google ? really.. your question is inrelevant. No need to reply indeed.
    Why do you come here asking this question anyway ? is it becouse you have a MSI gfx card ? and the adapter has nothing to do with this ?
    You think you can come in here yelling.. thinking we have to put up with it and accept your style of posting. This is not a MSI tech center.. it's a user to user center.. Your question has nothing to do with MSI relavant things anyway's.
    Google = your friend.
    Quote from: BOBHIGH on 17-December-05, 09:21:31
    it was a simple question and required a simple answer
    Simple for who ? you (buying a new one) ? me ? we ?   .really...........
    Quote from: Dynamike on 16-December-05, 04:11:48
    1: There are allot of diffrent types of those adapters.
    If any of the mods have a problem about my reply.. please pm me.

Maybe you are looking for

  • A search engine called DynaSearch has taken over fire fox without my permission

    I think My brother has attacked my computer, he found my note book and i now have 160 spam when I had only about ten before, and even an xxx dating service used my daughters name to make me click to their site, saying," Sheila has a message for you".

  • Apps crash very often. System reboots.

    Hello, Problem is that applications very often crash. The most: Safari, iBooks, GoodReader, Numbers, Pages. App closes and the system returns to the main screen, not saving the changes that took place during use of the application. Very often when pd

  • EDI Gateway Setup

    Hi All I need info regarding EDI Gateways(EDI Outbound Transaction setup) I am trying to generate the falt file for Outbound Purchase Order using standard Extract programs. But I am getting empty file. I have gone through some documents available on

  • HP D110 ePrinter - Changing Drive Letter for SD Card Slot

    How do I change the drive letter mapped for the SD card (z.  This is conflicting with my backup drive.

  • OAS with CRS, Private Interconnect

    Hi, When using CRS with OAS only, do you still need a private interconnect like you would with RAC databases? Thanks.