Continued : How are PHP pages created like this ...

First off - thanks to every who had replied earlier, you guys
solved my
_initial_ question. I've come across another ...
I'm going to be inserting code that I wanted echo'ed
(printed) like so -
if ($var == 10) {
echo ....
However, when I insert the code there - any apostrophes or
quotes inside the
code throws it in the crapper and chops up everything. I also
tried passing
it as a string and still the same thing.
Inside the code I wanted printed I use a <?php .... ?>
section also, which
shouldn't matter if I'm printing this stuff correctly. What's
the work
around for this?
Examples of errors:
echo "<p style="example"> This is an example
</p>"
---------------^^^^^^
$test = '<p style="font-size: 10px">This apostrophe in
can't breaks the
string</p>';
Thanks for your time, guys.
Shane H
[email protected]
http://www.avenuedesigners.com

Here is the PHP code that is inside the string I'm creating
and echo'ing
that is supposed to print errors when the form has been
submitted, which is
obvsiouly printing stuff too soon on that example page:
<?php
if(isset($Errors) && is_array($Errors) &&
count($Errors)) {
echo \'<p class="required" style="font-style: italic;
font-weight:
bold">The following required fields are missing:
</p>\'."\n";
echo \'<p class="required">\'."\n";
foreach($Errors as $Error) echo \'*
\'.$Error.\'<br>\'."\n";
echo \'</p>\'."\n";
if(isset($MailSuccess)) {
if(!$MailSuccess) {
echo \'<p class="required">There was an unexpected
error. Please try
later</p>\'."\n";
?>
Shane H
[email protected]
http://www.avenuedesigners.com
"Shane H" <[email protected]> wrote in
message
news:[email protected]...
> Seb - great I really like that way. The only thing that
is throwing me
> trouble now is that I'm using <?php ... ?> inside
of the string I'm
> creating then echo'ing - here is an example page:
>
>
http://www.avenuedesigners.com/about2.php?id=10
>
> Inside those forms, the values are getting PHP
statements, example like:
> value="<?php ... ?>".
>
> Also, before the form, I'm using a PHP statement to
check for errors,
> again like: <?php ... ?>.
>
> Help?
>
> --
> Shane H
> [email protected]
>
http://www.avenuedesigners.com
>
>
> "(_seb_)" <[email protected]> wrote in message
> news:[email protected]...
>> Murray *ACE* wrote:
>>>>echo "<p style="example"> This is an
example </p>"
>>>
>>>
>>> echo "<p style=".'"example">This is an
example</p>';
>>>
>>>
>>>>$test = '<p style="font-size:
10px">This apostrophe in can't breaks the
>>>>string</p>';
>>>
>>>
>>> $test = '<p style="font-size: 10px">This
apostrophe in can'."'t breaks
>>> the
>>> string</p>";
>>>
>>
>> a less confusing solution IMHO, use single quotes
for your PHP strings,
>> so all the html double quotes will be safe, and you
only need to escape
>> the single quotes in your html/text:
>>
>> echo '<p style="example">it\'s way
easier</p>';
>>
>> depending on the situation, you can also use the
addslashes() and
>> stripslashes() PHP functions:
>>
>>
http://us3.php.net/manual/en/function.addslashes.php
>>
http://us3.php.net/manual/en/function.stripslashes.php
>>
>>
>>
>> --
>> seb ( [email protected])
>>
http://webtrans1.com | high-end web
design
>> Downloads: Slide Show, Directory Browser, Mailing
List
>
>

Similar Messages

  • How are PHP pages created like this ...

    http://www.foo.com/fooing.php?id=10
    OR
    http://www.foo.com/fooing.php?id=20
    etc.
    Shane H
    [email protected]
    http://www.avenuedesigners.com

    <a href="detailpage.php?id="10">Article 10</a>
    <a href="detailpage.php?id="20">Article 20</a>
    <a href="detailpage.php?id="30">Article 30</a>
    In DW server behavior parlance, it's a master/detail page
    arrangement.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Shane H" <[email protected]> wrote in
    message
    news:[email protected]...
    > Okay - say I have something like this on a page called
    list.php :
    >
    > Article 10 (link)
    >
    > Article 20 (link)
    >
    > Article 30 (link)
    >
    > Article 40 (link)
    >
    > I want those to open with the .php page say
    "articles.php" but have
    > ?id=20, 30, etc.
    >
    > Do those need seperate .php pages created for them, or
    how exactly would I
    > do that?
    >
    > Thanks for sticking with me here, guys.
    >
    > --
    > Shane H
    > [email protected]
    >
    http://www.avenuedesigners.com
    >
    >
    > "(_seb_)" <[email protected]> wrote in message
    > news:[email protected]...
    >> Shane H wrote:
    >>>
    http://www.foo.com/fooing.php?id=10
    >>>
    >>> OR
    >>>
    >>>
    http://www.foo.com/fooing.php?id=20
    >>>
    >>> etc.
    >>>
    >>> --
    >>> Shane H
    >>> [email protected]
    >>>
    http://www.avenuedesigners.com
    >>
    >> whatever is after the "?" is a variable ("id") and
    its value ("20").
    >> The variable value is retreived by PHP via the $_GET
    array:
    >>
    >> <?php
    >> $var = $_GET['id'];
    >> echo $var;
    >> ?>
    >>
    >> This will output the variable value (10 or 20).
    >>
    >> Then you can use these values to outup different
    things:
    >>
    >> <?php
    >> $var = $_GET['id'];
    >> if ($var == 10){
    >> do_something();
    >> }
    >> if ($var == 20){
    >> do_someting_else();
    >> }
    >> ?>
    >>
    >> A typical example would be withy an image gallery,
    each thumbnail would
    >> have a link to the same page, but with a different
    variable:
    >> <a href="big_image.php?id=10"><img
    src="thumb10.jpg"></a>
    >>
    >> so each thumbnail would open the same page, but in
    this page, the
    >> approperiate bigger image would be outputted buy PHP
    according to the
    >> variable:
    >>
    >> <?php
    >> $big_image = $_GET['id'].'.jpg';
    >> echo '<img src="'.$big_image.'">';
    >> ?>
    >>
    >> this will output:
    >>
    >> <img src="10.jpg">
    >>
    >> --
    >> seb ( [email protected])
    >>
    http://webtrans1.com | high-end web
    design
    >> Downloads: Slide Show, Directory Browser, Mailing
    List
    >
    >

  • How to make an avatar like this,

    Hello Adobe Community, i'm new here, i have a big question. I want to know HOW to make an avatar like this:
    I want to know how to do that effect that who zoom in and zoom out etc. WITHOUT SNOWING, only that effect, if you can help me please!
    That zoom effect is AWESOME... send me a tutorial please!

    I thought you said you knew how to make animated gif.  A frame is the composite of the layers that have their visibility on for the frame a frame may be made using many layers. You use tools and filters on layers.You make frame using layers.
    Photoshop also supports any size layer. Layers can be  larger the canvas size can have image data out side the canvas.  Layer image data position above can be move relative to the canvas.  The Cloud logo animation has two layer one is masked is masked the mask is not linked to the layers image data it stationary over the canvas and is more on less a masks more foe the background canvas then the layer its on. The layer it is on image data is more off canvas then over canvas. Photoshop also notes layer position in a frame information, A layer potion can be change from frame to frame. I only create two frame for that animation.  The first and last frame, The first frame I had the top late image JJMACK high and off canvas to the left.  The last frame had it low and off canvas to the right. I then had Photoshop generate 138 frames between the two frames I created.  So Photoshop moved the top layer position across the canvas  left to right and high to low direction and the stationary layer mask masked it as if it were going through the background layers clouds.  The two layers are visible in all frames.

  • How are ePrint apps created and maintained?

    Just bougt a new small HP printer for my home office and discovered ePrint and apps support. And amazed, did not expect this technology in entry level small/home office type printers.
    And immediately new questions on what possibilities this opens up for printing applications
    What is required to create new apps?
    Is it possible to use this technology to add local office apps? I.e. to print site/office specific forms, trivial network interactions and maybe a bit more.
    Is subscription type apps supported/allowed, where the app is only available as part of a third party subscription package?
    A lot can be built around the email based ePrint service alone, but having ability to also do some simple interaction with the user at the printer would open for a wide range of new possible uses.

    Hi,
    Double post, please use:
        http://h30434.www3.hp.com/t5/Printer-All-in-One-Install-Setup/How-are-ePrint-apps-created-and-mainta...
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • How can i generate xml like this?

    Hi all,
    How can i generate xml like this & i need to send it to via HTTP :
    <mms>
                 <subject>message subject</subject>
                 <url_image>http://image_url</url_image>
                 <url_sound>http://sound_url</url_sound>
                 <url_video>http://video_url</url_video>
                 <text>message text</text>
                 <msisdn_sender>6281XYYYYYY</msisdn_sender>
                 <msisdn_receipient>6281XYYYYYY</msisdn_receipient>
                 <sid>to be define later</sid>
                 <trx_id>Unique number</trx_id>
                 <trx_date>yyyyMMddHHmmss</trx_date>
                 <contentid>see note</contentid>
    </mms>& how can i get the value of the sid (for example)?
    I hav tried to generate that xml by using StringBuffer & append, but it's not what i mean...
    Anyone can help me?

    Ok...i got it. But i still hav some problems.
    This is the sample code that i used :
    public class XMLCreator {
         //No generics
         List myData;
         Document dom;
            Element rootEle, mmsEle, mmsE;
            StringWriter stringOut;
            mms mms;
         public XMLCreator(String subject, String image, String sound,
                    String video, String text, String sender, String recipient,
                    int id, String date, String contentid) {
              mms = new mms(subject, image, sound, video, text, sender,
                            recipient, id, contentid, date);
                    createDocument();
         public void run(){
              createDOMTree();
              print();
         private void createDocument() {
              //get an instance of factory
              DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
              try {
              //get an instance of builder
              DocumentBuilder db = dbf.newDocumentBuilder();
              //create an instance of DOM
              dom = db.newDocument();
              }catch(ParserConfigurationException pce) {
                   //dump it
                   System.out.println("Error while trying to instantiate DocumentBuilder " + pce);
         private void createDOMTree(){
              //create the root element <Mms>
              rootEle = dom.createElement("mms");
              dom.appendChild(rootEle);
              createMmsElement(mms);
         private Element createMmsElement(mms b){
              Element subjectEle = dom.createElement("subject");
              Text subjectText = dom.createTextNode(b.getSubject());
              subjectEle.appendChild(subjectText);
              rootEle.appendChild(subjectEle);
              //create url_image element and author text node and attach it to mmsElement
              Element imageEle = dom.createElement("url_image");
              Text imageText = dom.createTextNode(b.getUrl_image());
              imageEle.appendChild(imageText);
              rootEle.appendChild(imageEle);
              // & etc....
              return rootEle;
          * This method uses Xerces specific classes
          * prints the XML document to file.
         private void print(){
              try
                   //print
                   OutputFormat format = new OutputFormat(dom);
                   format.setIndenting(true);
                            stringOut = new StringWriter();
                   //to generate output to console use this serializer
                   XMLSerializer serializer = new XMLSerializer(stringOut, format);
                   //to generate a file output use fileoutputstream instead of system.out
                   //XMLSerializer serializer = new XMLSerializer(
                   //new FileOutputStream(new File("mms.xml")), format);
                   serializer.serialize(dom);
              } catch(IOException ie) {
                  ie.printStackTrace();
            public String getStringOut() {
                return stringOut.toString();
    }when i tried to show the stringOut.toString() in my jsp, it's only showed string like this :
    The Lords Of The Ring http://localhost:8084/movie/lotr.3gp 6281321488448 6281321488448 123 0 20070220114851 LOTR.
    1. Why this is happen?i want to generate xml which its format is like above.
    2. How can i send this xml (put in msg parameter) using jsp (via web) without creating the mms.xml?
    3. if i want to set the msg parameter equal to mms.xml - means that msg = mms.xml, what is the data type for msg? is it an object or anything else?
    Thx b4 in advance...

  • I was wondering how you would do something like this?

    Hi i was wondering how you would do something like this?
    i recently got photshop CS5 and wanted to do something like this!

    Not sure exactly what the effect you are looking at, but my first glance is just an overly of 3 or more pictures.  The portrait in the back is just like 50% transparency.

  • How are deliveries automatically created from scheduling agreement?

    How are deliveries automatically created from the schedule line of the scheduling agreement? Can anybody explain this step by step? Can we use the code VL10BATCH for this purpose? If we can, how is this code used?
    Thanks in advance.

    hi
    A customer scheduling agreement is an outline agreement with the customer containing delivery quantities and dates. These are then entered as schedule lines in a delivery schedule. You can either create schedule lines when you create the scheduling agreement or you can create them later.
    You fulfill a scheduling agreement by creating the deliveries in the schedule as they become due. You process deliveries for a scheduling agreement in exactly the same way as you process a normal delivery. After you have carried out the delivery, the system updates the Delivered quantity field in the scheduling agreement item with the delivery quantity.
    The scheduling agreement is used as a basis for delivering a material. The customer sends in scheduling agreement releases, referred to as delivery schedules, at regular intervals to release a quantity of the material.
    Document Types
    To configure document types for scheduling agreements, choose Sales -> Sales Documents -> Sales Document Header -> Define sales document types in Customizing for Sales and Distribution.
    The R/3 System contains the following document types for component suppliers:
    LZ - Scheduling agreement with delivery schedules (no external agents)
    LZM - Scheduling agreement with delivery orders
    LK - Scheduling agreement with delivery schedules (external agents)
    ED - Delivery by external agent (consignment issue)
    EDKO - External agent correction
    RZ - Scheduling agreement returns (no external agents)
    KAZU - Consignment pick-up for external agents
    KRZU - Consignment returns for external agents
    Item Categories
    To configure item categories for scheduling agreements, choose Sales -> Sales Documents -> Sales Document Item -> Define item categories in Customizing for Sales and Distribution.
    The system determines the following item categories for the related document types in
    documents containing materials with item category group NORM:
    Item category LZN for scheduling agreement type LZ
    Item category LZMA for scheduling agreement type LZM
    Item category LKN for scheduling agreement type LK
    Item category KEN for document type ED
    Item category EDK for positive corrections (or the manual alternative EDK1 for
    negative corrections) for document type EDKO
    Item category REN for document type RZ
    Item category KAN for document type KAZU
    Item category KRN for document type KRZU
    Schedule Line Categories
    To configure schedule line categories for scheduling agreements, choose Sales -> Sales Documents -> Schedule lines -> Define or Assign schedule line categories in Customizing for Sales and Distribution.
    The R/3 System contains the following schedule line categories for component suppliers:
    L1, BN, L2, and CN for item category LZN
    E4, E0, E5, and BN for item category LKN
    L2 for item category LZMA (standard for delivery order processing)
    Schedule Line Types
    To configure schedule line types for scheduling agreements, choose Sales -> Sales Documents -> Scheduling Agreements with Delivery Schedules -> Define schedule line types in Customizing for Sales and Distribution.
    Creating Scheduling Agreements
    To create a scheduling agreement with delivery schedules:
    1. In the Sales menu http://Ext. choose Scheduling agreement ->Create.
    2. Enter scheduling agreement type LK (standard) or LZ (external agents) and the
    relevantorganizational data.
    3. Choose ENTER.
    4. Enter the following data:
    Sold-to or ship-to party number
    Purchase order or closing number
    Material or customer material number
    You can use the Description field to identify the scheduling agreement. For
    example,
    you could enter the model year for a particular production series.
    The system allows up to 35 digits for a customer material number.
    Rounding quantity
    Usage
    Choose Goto -> Header -> Sales to enter the usage at header level, or Goto ->
    Item-> Sales A to enter it at item level. The system proposes usage S, for series, as default in both cases.
    Planning indicator
    Choose Goto -> Header ->Sales.
    Target quantity
    Mark an item and choose Goto -> Item -> Sales A
    Partners
    For scheduling agreements with external agents , choose Goto -> Header
    ->Partners to enter the external agent as forwarding agent and special stock partner
    on the partner function screen.
    5. Create a delivery schedule
    Mark an item in the scheduling agreement and choose Goto -> Item -> <Delivery
    schedule>. Enter:
    A delivery schedule number and date
    The cumulative quantity received by the customer
    The last delivery confirmed by the customer
    A schedule line with date, time, and quantity
    To enter additional data in the delivery schedule, choose DlvSch.Hdr (delivery schedule header).
    configuration:
    img->SD->Sales->sales document->scheduling agreements with delivery schedules->
    step1: define schedule line types
    schedule line types are not schedule line categories. Schedule line types are used for information purpose only.
    stds are 1. fixed date 2. backlog 3. immediate requirement
    4. estimate
    step2: maintain planning delivery sched. instruct/splitting rules
    The planning delivery schedule is an internal delivery schedule used to plan requirement s more efficiently.  It is sub divided into 3 parts
    2.1 delivery schedule splitting rules
    2.2 dly schedule instrusctions
    2.3 assign dly schedule splitting rules
    step3: define sales documents type
    step4 : define item categories
    step5: define schedule line categories
    step6: maintain copy control
    PROCESS
    step1:  create scheduling agreement
    VA31
    enter SP,SH valid from, valid to,
    goto ITEM OVERVIEW tab
    enter material, rouding qty
    select ITEM  click on FORECAST DLSCH
    enter different dly dates and qties
    save it.
    step2: create sales order with reference to above
    step3: create delivery
    step4: create billing
    regards
    krishna

  • FF6 wont connect to websites. Shows 'connecting...'or green circle going round. Loads some or none of page. remains like this indefinitely. Have removed & re-entered FF in Norton360 f/wall & uninstalled then downloaded FF6 again to no avail. IE/Chrome OK

    FF6 wont connect to websites. Shows 'connecting...'or green circle going round. Loads some or none of page. remains like this indefinitely.
    Have removed & re-entered FF in Norton360 f/wall & uninstalled then downloaded FF6 again to no avail. IE/Chrome OK

    Just an update... A rep contacted me and we did a screen share. They were convinced that I wasn't full of <insert proper word here>. They promised to get back to me in a few days, and now? A few months later? Nothing.
    Still no files. Still no correction... Still no nothing from Adobe.
    The person I spoke to was kind, saying he'd make sure I got CC for free for a while...
    Still though, no follow up.
    Adobe, are you going to correct this or just let your customer suffer at your mistakes?

  • How Could I Make Something Like This.

    http://www.youtube.com/watch?v=vlRdjAwEzbU
    I Am Wondering How I could make something like this in AfterEffects CS4.
    Any Help Would Be Appreciated.

    dx394 wrote:
    Is There A Tutorial Anywhere About It?
    You could contact the animator or whoever posted the clip.
    Deconstruct the sequence. observe the moves and decide, with your present level of familiarity, how you would approach it. Scaling of the ten or so different layers is simple enough but acquiring the contents of the layers is not something you will do in AE.
    As Todd says, start small, figure it out one step at a time, move on to more advanced functions. Animting 3D layers is 9 times more difficult than 2D. when you add lighting and camera moves you raise the complexity level and rendering time to another power making your project about 27 times more difficult.
    bogiesan

  • HT201441 I found a phone that had been stolen, so I asked apple id to its original owner she said that she had forgotten and replace the apple id, how to solve a problem like this?

    II found a phone that had been stolen, so I asked apple id to its original owner she said that she had forgotten and replace the apple id, how to solve a problem like this?

    Send the original owner this link.
    (120249)

  • How to do a site like this on adobe muse? the sliding page effect...

    Something like this website... http://www.razvangarofeanu.com/#the-g is this possible on adobe muse? THANKS!

    Hi Macky,
    This website that you have mentioned utilizes the "Scroll Effects" In Muse and the designer has applied the Horizontal Scrolling effects.
    Please refer these links in order to understand how it can be done :-Add scroll effects | Learn Adobe Muse CC | Adobe TV
    Adobe Muse CC Motion Scroll (Parallax) Tips & Tricks - MuseThemes.com - YouTube
    Adobe Muse CC Scroll Effects Tutorial | Animated Goodie Box - YouTube
    The basics of horizontal scrolling websites from the Course Designing a Portfolio Website with Muse
    Adobe Muse CC Parallax Scrolling Tutorial | Horizontal Scrolling Websites - YouTube
    Cheers,
    Rohit Nair

  • How to make color tone like this?

    I'd like to find out how to make similar "color tone" effect like this:
    http://www.horror-movies.ca/watermark.php?filename=poster_THE_SITTER_2D_ORING.jpg
    I'm talking about those striking "artificial" skin tones you can see on many movie posters (or advertising/fashion posters). For example:
    http://www.impawards.com/2008/posters/curious_case_of_benjamin_button_ver3.jpg
    http://www.impawards.com/2008/posters/tropic_thunder_ver4.jpg
    http://www.impawards.com/2008/posters/twilight_ver6.jpg
    http://www.impawards.com/2008/*****_slap_ver7.html
    http://www.impawards.com/tv/posters/fringe_ver9.jpg
    http://www.impawards.com/tv/posters/dexter_ver2.jpg
    http://www.impawards.com/2008/posters/hellboy_two_ver2.jpg
    I don't know how to describe it (sorry, english is not my first language), but I like the way the color on the skin affects only certain tones. I hope you understand what I'm talking about :) I tried to play with layer blending (BW + color balance of shadows)... but I never manage to do something like this. I suppose it has to be a common technique, sice I see it on so may posters and photos. Does anybody have some advice? Thanks!

    Alan,
    The links you posted seem to suggest the effect you are after may be the result of luminance masking, perhaps coupled with a knockout layer to protect the eyes. Try this procedure:
    (a) Duplicate the background layer CTRL + J (and perhaps rename it Blur as that helps to emphasise the purpose of the new layer).
    (b) With the new Blur layer active, from the Menu bar choose Filter/Blur/Gaussian blur about 20% for starters each image may require slight variations to this amount.
    (c) Turn off the visibility of the new Blur layer and select/make active the Background layer.
    (d) Go to Channels Palette and CTRL click on the Red channel. Return to the Layers Palette. Turn visibility of new Blur layer back on and select it.
    (e) With the new Blur layer active, click the Add layer mask button at the bottom of the Layers Palette this adds the Luminosity Mask to this layer and results in seeing the Gaussian blur now only inside the lightest (50%) details of the image. Now change the Blend Mode of this layer from Normal to Overlay. If the effect seems too strong, try the Soft Light blend mode which is less severe. If you want a greater effect than Overlay delivers, try Linear Light. You can back off the effect of any of these blend modes with the Opacity slider but that would, I think, also back off the amount of Blur, which may or may not (depending upon the image) lessen the overall effect you are aiming for.
    (f) Next comes the Knockout Layer (KL) to remove the effect of these Blur and Blend Mode edits from the eyes. The KL must be on top of the Blur layer, so make the Blur layer active and then add a new transparent layer above it - CTRL + Shift + N and name it Knockout.
    (g) On the new KL, select the eyes with the Elliptical Marquee Tool (select too much rather than too little reason follows later) and fill the selection with Black ALT + Backspace (provided Foreground Colour in Tools Palette is Black). Then deselect the eyes CTRL + D.
    (h) Bring up the Layer Style dialog box (LSDB) by double clicking on the icon for the KL. In the LSDB change Knockout from None to Shallow and reduce Fill Opacity from 100 to zero % and click OK which dismisses the LSDB. That is it you have now eliminated the effects of the Blur layer on the eyes using the Black holes on the KL.
    (i) To remove any excess eye selection, you use the Eraser tool (set to about 50% hardness) and paint around the edges of the eyes with the Eraser tool what this is doing is reducing the size of the holes in the KL and bringing back the effects of the edits from the Blur layer.

  • How can I do sth like this ${requestScope.list.size} ?

    Hi, I have 2 attributes which I pass like this
    requsest.setAttribute("startPoint", 3);
    request.setAttribute("myList", myList);
    where myList is a ArrayList filld with objects. On jsp page I want to count 2 values first and last number:
    <c:set var="firstNumber" value="${requestScope.startPoint+1}"/> - this works fine.
    <c:set var="lastNumber" value="${requestScope.startPoint+requestScope.myList.size}"/> - this is impropper.
    How can I use as integer size of list which is passed as request attribute. Is this possible?
    I would appreciate any hepl.

    Hang on. For such things you can build your own EL functions - it is very easy and involves only 4 steps.
    1. Write a class containing a method (must be static) to calculate size of any list.
    [Put the class in /WEB-INF/classes, so your file will reside as /WEB-INF/classes/myfunctions/MyFunctions.class]
    package myfunctions;
    import java.util.List;
    public class MyFunctions{
         public static int getListSize(List list){
              return list==null?0:list.size();
    }2. In your taglib add an entry (in case you don't have already create one) for the EL function:
    [Say our taglib is mytags.tld in /WEB-INF]
    <taglib xmlns="http://java.sun.com/xml/ns/j2ee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
      http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
         version="2.0">
         <tlib-version>1.0</tlib-version>
         <short-name>MyTagLib</short-name>
         <function>
              <description>List Size</description>
              <name>size</name>
              <function-class>myfunctions.MyFunctions</function-class>
              <function-signature>int getListSize(java.util.List)</function-signature>
         </function>
    </taglib>3. Now in your JSP add following line to use your new EL function:
    <%@taglib uri="/WEB-INF/mytags.tld" prefix="mt"%>4. And use as:
    <input type=text value="${mt:size(requestScope.myList)}" />Note that there no issues using JSTL EL functions. My intention is to resolve your problem and at the same time to give you a glance how to write and use your own EL functions (might be useful in future).
    Thanks,
    Mrityunjoy

  • How to achieve a plan like this

    Hi,
    Oracle (10.2.0.5) shows me the following plan for one of my queries:
    ---------------------------------------------------------------------+
    | Id  | Operation                      | Name                        |
    ---------------------------------------------------------------------+
    | 0   | SELECT STATEMENT               |                             |
    | 1   |  HASH JOIN                     |                             |
    | 2   |   NESTED LOOPS                 |                             |
    | 3   |    SORT UNIQUE                 |                             |
    | 4   |     INDEX FAST FULL SCAN       | PK_INT_RATE_HIST            |
    | 5   |    TABLE ACCESS BY INDEX ROWID | INSTRUMENT                  |
    | 6   |     INDEX UNIQUE SCAN          | PK_INSTRUMENT               |
    | 7   |   VIEW                         |                             |
    | 8   |    SORT UNIQUE                 |                             |
    | 9   |     UNION-ALL                  |                             |
    | 10  |      INDEX FAST FULL SCAN      | DOMICILE_INSTR_IDX          |
    | 11  |      HASH JOIN                 |                             |
    | 12  |       INLIST ITERATOR          |                             |
    | 13  |        INDEX RANGE SCAN        | IE1_INSTR_EXT_ID_MAP        |
    | 14  |       INDEX FAST FULL SCAN     | PK_INSTR_SETTLEMENT_AGENCIES|
    ---------------------------------------------------------------------+The thing that caught my eye in this plan is the Sort Unique operation on the step #3, that is the lack of View after that operation. When I'm trying to get a similar plan for just those two tables Oracle creates an inline view so the plan looks like this:
    ---------------------------------------------------------------------+
    | Id  | Operation                      | Name                        |
    ---------------------------------------------------------------------+
    | 0   | SELECT STATEMENT               |                             |
    | 2   |  NESTED LOOPS                  |                             |
    | 2   |   VIEW                         |                             |
    | 3   |    SORT UNIQUE                 |                             |
    | 4   |     INDEX FAST FULL SCAN       | PK_INT_RATE_HIST            |
    | 5   |    TABLE ACCESS BY INDEX ROWID | INSTRUMENT                  |
    | 6   |     INDEX UNIQUE SCAN          | PK_INSTRUMENT               |
    ---------------------------------------------------------------------+Could anybody help me understand how to get exactly the same plan as in the first excerpt (that is without View line).
    Background:
    Two tables are participation - Instrument with PK PK_INSTRUMENT by instr_id column; and INT_RATE_HIST with PK by a few columns first of which is instr_id.
    The query I'm trying to get the plan for looks like this:
    SELECT i.instr_id
      FROM instrument i
    WHERE
    EXISTS (select
       NULL
        FROM int_rate_hist h
       WHERE h.instr_id = i.instr_id)
    AND i.currency = 'USD'
    AND i.type = 'BOND'
    AND i.status = 'ACTIVE'Many Thanks
    Alex

    Looked at it today morning with fresh head and the mere thing I needed was to make that table in EXISTS statement to be leading in the query:
    SQL> SELECT /*+ qb_name(main) leading(h@SUB I@main) index(i@main) use_nl(h@SUB I@main) */
      2   i.instr_id
      3    FROM instrument i
      4   WHERE EXISTS (SELECT /*+ qb_name(sub)*/
      5           NULL
      6            FROM int_rate_hist h
      7           WHERE h.instr_id = i.instr_id)
      8     AND i.instr_ccy = 'USD'
      9     AND i.instr_type = 'BOND'
    10     AND i.exp_type = 'NEXP';
    Execution Plan
    Plan hash value: 3687647629
    | Id  | Operation                    | Name             | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |                  |   699K|    17M|  2113K  (1)| 08:13:04 |
    |   1 |  NESTED LOOPS                |                  |   699K|    17M|  2113K  (1)| 08:13:04 |
    |   2 |   SORT UNIQUE                |                  |    13M|    76M| 11586   (2)| 00:02:43 |
    |   3 |    INDEX FAST FULL SCAN      | PK_INT_RATE_HIST |    13M|    76M| 11586   (2)| 00:02:43 |
    |*  4 |   TABLE ACCESS BY INDEX ROWID| INSTRUMENT       |     1 |    20 |     2   (0)| 00:00:01 |
    |*  5 |    INDEX UNIQUE SCAN         | PK_INSTRUMENT    |     1 |       |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       4 - filter("I"."INSTR_CCY"='USD' AND "I"."EXP_TYPE"='NEXP' AND
                  "I"."INSTR_TYPE"='BOND')
       5 - access("H"."INSTR_ID"="I"."INSTR_ID")Thanks anyone who looked into this question.
    Alex
    Edited by: Alexandr Antonov on Oct 31, 2011 12:48 PM

  • How to make a photo like this? (footballer)

    Dear All,
    I am enclosing a photo that I found in the Internet. This is a footballer photo.
    May I know how I can make a photo like this in terms of color and texture in Photoshop? Many thanks!
    Best regards,
    Keith

    What you'll want to do is pick a photo with something like a person or an animal in the foreground. Then, use the Lasso tool to trace around the outside. Separate the person and the background into two or more layers, depending on how much you want to change. Up the saturation on the background, and apply a blur under the filter menu. It might just be the angle the photo was taken from, but they could have possibly added a light effect behind him as well. As for the guy, it looks like they upped the contrast and lowered brightness. Since i don't know from what angle the photo was taken, those are the only effects I can say were most likely used.
    Hope this helps,
    Cole

Maybe you are looking for

  • I am having a issue with getting data useage alerts for my iphone 4s

    I am having a issue with getting data useage alerts for my iphone 4s from AT&T.  I do not download anything huge at all. I looked into it and figured out that the phone dials out nightly at 12:29am every night.   I went into my settings and went to g

  • I am interested in an iMac 20" but need help

    I was looking into getting a new computer because the PC i have is a bit old and a bit unstable. I checked out dell because i like to play games like WoW and HL2 and BF2 and that stuff. My question is would those games run well on the windows side of

  • Is it possible to customize (some) of JDev features?

    Well, like - changing the default-generated files (my own custom initial web.xml, ....) - adding new items (sort of templates) in the New... dialog and so on. I did not find anything in the docs on this (my apologies if it was there, but please someo

  • How can I kill a OS process

    How can I get a handle to a OS process in my java application and then use that handle to kill the process. Note..that i want handle to a process which has not been started from my java application .

  • Application freezes when loading amCharts-component on AIR 3.9 in iOS devices

    Hello, I'm having problems with amCharts component, for it works fine with AIR 3.6 -version, but when I updated AIR SDK to 3.9 it stopped working. When chart should be loaded, application just freezes. It won't work even if chart's dataprovider and s