Can viewObject get a parameter from sessionScope to binding variable?

hello,
using Jdev11g ADF Fusion application
Can viewObject get a parameter from sessionScope and assign into binding variable ? without using executeWithParameter
Thanks
greenApple

A. Safwat,
As I said before, I was not trying to be offensive, but simply to explain some of the shortcomings of one solution over another. One of the reasons people give such short answers is that many questions (including this one) have been asked and answered many many many times before on the forum. As to my reasons:
1). Overkill - overkill because you are writing code to do what the framework already provides for you.
2). Not bind-variable friendly - you are gluing in literals into a SQL statement. That means that Oracle will have to hard parse the query for each new value of the filter clause, yielding to poor performance, particularly in a multiuser environment. It should ideally be done using bind variables.
3). Insecure (think about what happens if you put "'xyz' or 1=1" into the filterValue there) - not using bind variables is a security hole. Think through what happens if a filter criteria comes through like the one I mentioned.
4). Inflexible - because you are overriding executeQueryForCollection, this VO becomes inflexible and can only be used in this particular place. Using the declarative approach outlined by Timo is more flexible
5). Bad (ok, that's my opinion there) - OK, perhaps this was a bit offensive ;)
Please don't take a critique of a post as offensive, as I assure you it was not intended to be in that spirit. As I mentioned, I greatly appreciate when people point out issues/problems/etc with my ideas, as that is the best way for me to learn. I have in the past written applications that were not bind-variable friendly, and I learned the downsides the hard way (system was horribly non-performant) - I wish someone had reviewed my approach and told me "bad idea" before the application made it into production.
Respectfully,
John

Similar Messages

  • ImageIO - javax.imageio.IIOException: Can't get input stream from URL

    Hi,
    I'm developing a program which accesses a given URL of an image and saves it to a file. However when I try this I get the following error:
    javax.imageio.IIOException: Can't get input stream from URL!
         at javax.imageio.ImageIO.read(Unknown Source)
         at ImageSave.main(ImageSave.java:12)
    Caused by: java.net.ConnectException: Connection timed out: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(Unknown Source)
         at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
         at java.net.PlainSocketImpl.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at sun.net.NetworkClient.doConnect(Unknown Source)
         at sun.net.www.http.HttpClient.openServer(Unknown Source)
         at sun.net.www.http.HttpClient.openServer(Unknown Source)
         at sun.net.www.http.HttpClient.<init>(Unknown Source)
         at sun.net.www.http.HttpClient.New(Unknown Source)
         at sun.net.www.http.HttpClient.New(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
         at java.net.URL.openStream(Unknown Source)
         ... 2 moreThe internet connection I am using uses a proxy server and I think this is where the problem lies. I'm using Eclipse version 3.3 and I've tried changing the network settings to use the proxy's hostname and port but this still isn't working. I've also tried using System.setProperty("http.proxyHost", "hostname") and System.setProperty("http.proxyPort", "port") but that hasn't worked for me either. Below is my class in full.
    import java.awt.image.*;
    import javax.imageio.*;
    import java.io.*;
    import java.net.*;
    public class ImageSave
         public static void main(String args[])
              try {
                   URL url = new URL("http://www.example.com/image.jpg");
                   BufferedImage image = ImageIO.read(url);
                   ImageIO.write(image, "JPG", new File("image.jpg"));
              catch (Exception e) {
                   e.printStackTrace();
    }The error occurs with the line: BufferedImage image = ImageIO.read(url);
    I have tried looking for a way to change how this specific method accesses the internet (e.g: a Proxy parameter with URLConnection) but there doesn't seem to be any.
    Any help or suggestions would be greatly appreciated.
    -Robert

    Ah, that worked fine. I had thought of using that earlier but I was under the impression that the input stream would be HTML rather than an actual image. Not sure why.. Anyway, thanks very much for your help!
    Here is the new code with your suggested revisions and a URLConnection to get the input stream:
    import java.awt.image.*;
    import javax.imageio.*;
    import java.io.*;
    import java.net.*;
    public class ImageSave
        public static void main(String args[])
            try {
                 // This is where you'd define the proxy's host name and port.
                 SocketAddress address = new InetSocketAddress(hostName, port);
                 // Create an HTTP Proxy using the above SocketAddress.
                 Proxy proxy = new Proxy(Proxy.Type.HTTP, address);
                 URL url = new URL("www.example.com/image.jpg");
                 // Open a connection to the URL using the proxy information.
                 URLConnection conn = url.openConnection(proxy);
                 InputStream inStream = conn.getInputStream();
                 // BufferedImage image = ImageIO.read(url);
                 // Use the InputStream flavor of ImageIO.read() instead.
                 BufferedImage image = ImageIO.read(inStream);
                 ImageIO.write(image, "JPG", new File("image.jpg"));
            catch (Exception e) {
                 e.printStackTrace();
    }Edited by: Ragnarob on Apr 21, 2009 2:49 AM

  • Can not get the parameter?

    I use a form to upload files,
    like this:
    <form name="gdform10" action="upload.jsp" ENCTYPE="multipart/form-data" method="post">
    <input type="hidden" name="picName" value="wxds.jpg">
    <input type="file" name="file">
    <input type="submit" name="savePic" value="modify">
    </form>
    but I can not get the parameter picName in the upload.jsp,
    like :
    String pname = request.getParameter("picName");
    but pname is null.

    Hello,
    In Jsp, if you want to upload file, you can't directly use "request.getParameter()".
    There're two company provide components for you and it's free.
    First is jspsmart company, it offer jspsmartUpload component and link is
    http://www.jspsmart.com
    Second is o'reilly, it offer MultipartRequest component and links is http://www.servlets.com/cos/javadoc/com/oreilly/servlet/MultipartRequest.html
    for example, you use oreilly component.
    <%@ page import="com.oreilly.servlet.MultipartRequest" %>
    String saveDirectory = "c:\\Upload\\";
    int maxPostSize = 5 * 1024*1024;
    MultipartRequest multi= new MultipartRequest(request,saveDirectory,maxPostSize );
    Enumeration filesname = multi.getFileNames();
    while(filesname.hasMoreElements()){
    String name = (String)filesname.nextElement();
    FileName = multi.getFilesystemName(name);
    File f = multi.getFile(name);
    String ContentType = multi.getContentType(name);
    ps. above codes is from book named "java server pages tech reference"

  • Can't get a picture from a plugged-in VHS player on Qosmio G20

    Hi! Would be pleased if somebody could help me on the following:
    Got notebook Toshiba-Qosmio G20
    I can't get a picture from a plugged-in VHS player. I've installed the VHS player in accordance with the PC manual through the Monitor-in socket and the enclosed cable. There's also an interesting remark in the manual: "before installing any device through the Monitor-in port, you should tune the Terminal Shape parameter (socket shape)". But there's nothing said on how or where this tuning should be done.
    HELP! PLEASE! My stupidity is embarrassing!
    Many thanks in advance!

    In fact I didnt find that Terminal Shape switch. Ive simply recorded the video from VHS player onto the notebook hard drive with WinDVD Creator 2 programme. And right after that I have encountered another problem the picture from the plugged-in VHS player was shifted downwards (the upper part of the frame was below, while the lower part was seen in the top of the screen). Ive tried plugging through S-Video and RCA, but it also didnt help. I would be very pleased if somebody could help me.
    2Andrej: do You speak Russian?

  • How can i get all values from jtable with out selecting?

    i have one input table and two output tables (name it as output1, output2). Selected rows from input table are displayed in output1 table. The data in output1 table is temporary(means the dat wont store in database just for display purpose).
    Actually what i want is how can i get all values from output1 table to output2 table with out selecting the data in output1 table?
    thanks in advance.
    raja

    You could set the table's data model to be the same:
    output2.setModel( output1.getModel() );

  • How can i get thes songs from ipod nano to the itunes libary??

    hi
    i have ipod nano and i sync it with over 500 songs .....my bad i lose all that songs on my libary  .... how can i get thes songs from ipod nano to the itunes libary??

    See this older post from another forum member Zevoneer on different ways to copy content from your iPod to your computer.
    https://discussions.apple.com/thread/2452022?start=0&tstart=0
    B-rock

  • Can you get values back from a stored procedure via OUTPUT parameters?

    Can you get values back from calling a stored procedure via OUTPUT parameters/variables? I call the SP via a SQL statement from a script either in a WF or DF.
    I thought I read some reference that DI could not get the values from OUTPUT parameters but I could not find it again (don't know if it is in any of the documentation or referred to in a forum.
    I did try a couple of tests but it did not reutrn any values via OUTPUT. But before I give up I thought I'd see if you could and maybe I needed to change something.

    This isn't exactly an answer to your question, but I'll point out that, given that you're resorting to a SQL script in the first place, there's no reason you can't also turn the output parameters into a regular result or record set. (The following uses T-SQL, although I think it's pretty generic.)
    declare @param1 int, param2 varchar(100), @return int;
    exec @return = proc @param1 = @param1 output, @param2 = @param2 output;
    select @param1 as param1, @param2 as param2;
    That is, to get from output parameters to a "regular" output from the SQL script isn't much of a leap...
    Jeff Prenevost
    BI Consultant
    Ann Arbor, MI

  • How can I get all photos from iPhoto to automatically back up to iCloud from my Mac OSX Version 10.6.8 operating system.  Not enough memory to upgrade.

    How can I get all photos from iPhoto to automatically back up to iCloud from my Mac OSX Version 10.6.8 operating system.  Not enough memory to upgrade.

    You can't.  iCloud is not for general file backup from a Mac. It's for backup up and syncing data between mobile devices and and Macs and  The following is from this Apple document: iCloud: Backup and restore overview.
    iCloud automatically backs up the most important data on your (mobile) device using iOS 5 or later. Once you have enabled Backup on your iPhone, iPad, or iPod touch .....
    What is backed up
    You get unlimited free storage for:
    Purchased music, movies, TV shows, apps, and books
    Notes: Backup of purchased music is not available in all countries. Backups of purchased movies and TV shows are U.S. only. Previous purchases may not be restored if they are no longer in the iTunes Store, App Store, or iBookstore.
    Some previously purchased movies may not be available in iTunes in the Cloud. These movies will indicate that they are not available in iTunes in the Cloud on their product details page in the iTunes Store. Previous purchases may be unavailable if they have been refunded or are no longer available in the iTunes Store, App Store, or iBookstore.
    You get 5 GB of free iCloud storage for:
    Photos and videos in the Camera Roll
    Device settings (for example: Phone Favorites, Wallpaper, and Mail, Contacts, Calendar accounts)
    App data
    Home screen and app organization
    Messages (iMessage, SMS, and MMS)
    Ringtones
    Visual Voicemails
    But not from a Mac.  If you want to backup your photos and other important files I suggest you get an external hard drive and use  it with Time Machine.
    OT

  • How can I get all photos from the camera roll onto the photo stream so they will share between iphone and ipad?

    How can I get all photos from the camera roll, and all new pictures taken, to get on the photostream so they can share between iphone and ipad?

    When turning PhotoStream on with photos available in the Camera Roll, only photos captured by the iPhone or saved on the iPhone are placed in the PhotoStream.
    For all photos that were in the Camera Roll prior to turning PhotoStream on, import the photos with your computer and add the photos to your PhotoStream on your computer.

  • HT1454 why i can not get video out from my ipod touch after i did the upgrade

    why i can not get video out from my ipod touch after i did the upgrade

    why i can not get video out from my ipod touch after i did the upgrade

  • HT1454 Can not get video out from my ipod touch 3rd gen. Any ideas? It should nt be diffiicult to do this on the 21 st century, or not?

    After having spent EUR 130 on cables from apple, i still can not get video out from my ipod touch 3rd gen. Any ideas? It should nt be diffiicult to do this on the 21 st century, or not?

    Backing up an iOS device will copy some data to a backup file within iTunes, but this excludes all media.  You can also transfer iTunes Store purchases from the iDevice to iTunes but, without using a third-party tool, nothing else.  As long as you do not sync the iPod with your new library, the media that's on it will remain ... for as long as it keeps functioning, is not lost, stolen, eaten by the dog, ...
    You may also have an option to recover your previous library from your old laptop; as long as its hard drive isn't fried, a computer repair store or technician may be able to extract the drive, mount it in an external enclosure, and copy your data to another PC.  Whatever you choose, there is no real alternative to having all your media on your computer, managed by iTunes, and regularly backed up to another device/location.

  • I have an iPod Classic and the latest version of iTunes. I make all my purchases on my computer, but when I try to click the "add to" option and transfer the songs to my iPod, it doesn't work. How can I get my songs from my computer to my iPod?

    I have an iPod Classic and the latest version of iTunes. I make all my purchases on my computer, but when I try to click the "add to" option and transfer the songs to my iPod, it doesn't work. How can I get my songs from my computer to my iPod?

    See this excellent user tip from another forum member turingtest2 outlining the different methods and software available to help you copy content from your iPod back to your PC and into iTunes.
    Recovering your iTunes library from your iPod or iOS device
    B-rock

  • Can i use some other company's locked iphone? or can i get official unlock from apple? cause i had iphone but it got water damage and don't want to pay crazy amount of money to get brand new...

    can i use some other company's locked iphone? or can i get official unlock from apple? cause i had iphone but it got water damage and don't want to pay crazy amount of money to get brand new...
    and i m getting locked phone from my family memeber for free. but he's with some other carrier. so can i get official unlock for that phone. please help me with this.
    thank you

    Only the original cellular provider can authorize unlocking. You will need to contact them to determine if they offer unlocking and if the phone qualifies.

  • HT4437 I want to develop a software with AirPaly service for business things. How can I get the permission from Apple?

    I want to develop a software with AirPaly service for business things. How can I get the permission from Apple?
    This one is used in Windows laptop, and I want it support AirPlay service, but Apple doesn't publish the AirPlay protocol.
    Many thanks.

    Create a developer account, then access he developers forums and see if you can find the information that way 
    The other option would be to simply contact Apple directly.

  • I have a personal Apple ID for my home pc and iPod, and a work Apple ID for my work laptop and iPhone. Can I get the music from my home pc on my work iPhone?

    I have a home Apple id for my home pc and ipod. Then I had to create a work Apple id on my work laptop for my work iPhone 4s. My question is how can I get my music from my hoe pc onto my new iphone 4s? Thanks in advance

    Time to contact Apple support directly and have them assist you with resetting the password.
    http://www.apple.com/contact/
    B-rock

Maybe you are looking for

  • Caller ID not working on iPhone 4S

    Just got an iPhone 4S today. Also switched from AT&T to Verizon. For some reason, I am only getting caller ID on contacts that have the country code added to their numbers. I turned off International Assist, and it didn't do anything. When I add the

  • My External Hard Drive used to work on my Macbook Pro but it has now stopped working?

    I was using a Seagate Expansion Portable Drive which used to work on my mac just fine. but lately the hard drive will start humming once I connect it to the mac and then but it wont show up under devices and the blue light on the hard drive wont ligh

  • JDev 11.1.2 Config Editor - Cannot Set Locking Mode

    Anyone know the secret (other than editing the source code)? The bc4j.xcfg editor/property inspector shows "locking Mode" as a (the only) disabled field. Changing the default to "pessimistic" is possible by changing the source to the following: <Data

  • Jtapi Resync

    Can anyone tell me how long agents will be down when I do a Jtapi Resync in CCX 9.1? I updated CCM to 9.1.2 (SU1) and didn`t know that I had to do the Jtapi Resync. Now when accessing CCX admin page getting error message telling me they are out of sy

  • STMS Config error

    Hi, We are trying to configure STMS on AS400 V5R3,Solman Unicode system.when configuring the domain TP is running to error.We are on latest version of TP and R3trans.I tried to call the program CALLTP_OS400 in SM59 and its running to error. below is