Question on HttpServletRequest object

If I have a request object (say r), am I able to remove a parameter from that object and replace it in a servet?
I am trying to take a double value from a form (not a problem) and pass it into a servlet. What I want to do is in the servlet, run some update code on the value, put it back into the request object, and then do the doPost method on it. Is that possible?
Is it just as simple as r.removeAttribute(name) and a r.setAttribute(name,obj)? Or is it a little more complex than that?
- Josh

Parameters and Attributes are completely different things.
Request parameters come from the HTTP Request. They can only be strings. Request Parameters are not normally editable.
Request attributes are java objects. Its basically a useful space to store your java beans in.
What I want to do is in the servlet, run some update code on the value, put it back into the request object, and then do the doPost method on it. Is that possible?What do you expect to trigger this "update" code? Isn't the doPost method the first entry point into the servlet? If you want to run something BEFORE the doPost of the servlet you might look at using a servlet filter
Take a look at [This post|http://forums.sun.com/thread.jspa?threadID=682565] which discusses "editing" request parameters.
Hope this helps,
evnafets

Similar Messages

  • HttpServletRequest Object Question?

    I need to manipulate the Header (specifically the Authorization) of an Http request made to a servlet. I would assume that the header is encapsulated in the HttpServletRequest object sent to the server, but I don't seem to have any way of accessing it.
    Any suggestions, advice?
    Thanks

    The header is included in the HttpServletRequest instance, but you might be misunderstanding that interface. HttpServletRequest instances are only meant to wrap a client request to some server- not the server's response. Thus, you can retrieve values from the request, but you can not set them (not through HttpServletRequest), because the instance only wraps a client's request. To set a header value, use HttpServletResponse:
    response.setHeader("Refresh", "15");
    ... you can get a Header value from the request by,
    request.getHeader("Refresh");

  • Using HttpServletRequest object to share variables between static methods.

    Does anyone know of the overhead/performance implications of using the HttpServletRequest object to share variables between a static method and the calling code?
    First, let me explain why I am doing it.
    I have some pagination code that I would like to share across multiple servlets. So I pulled the pagination code out, and created a static method that these servlets could all use for their pagination.
    public class Pagination {
         public static void setPagination (HttpServletRequest request, Config conf, int totalRows) {
              int page = 0;
              if (request.getParameter("page") != null) {
                   page = new Integer(request.getParameter("page")).intValue();
              int articlesPerPage = conf.getArticlesPerPage();
              int pageBoundary = conf.getPageBoundary();
                int numOfPages = totalRows / articlesPerPage;  
                // Checks if the page variable is empty (not set)
                if (page == 0 || (page > numOfPages && (totalRows % articlesPerPage) == 0 && page < numOfPages + 1)) {    
                 page = 1;  // If it is empty, we're on page 1
              // Ex: (2 * 25) - 25 = 25 <- data starts at 25
             int startRow = page * articlesPerPage - (articlesPerPage);
             int endRow = startRow + (articlesPerPage);           
             // Set array of page numbers.
             int minDisplayPage = page - pageBoundary;
             if (minDisplayPage < 1) {
                  minDisplayPage = 1;     
             int maxDisplayPage = page + pageBoundary;
             if (maxDisplayPage > numOfPages) {
                  maxDisplayPage = numOfPages;     
             int arraySize = (maxDisplayPage - minDisplayPage) + 1;
             // Check if there is a remainder page (partially filled page).
             if ((totalRows % articlesPerPage) != 0) arraySize++;
             // Set array to correct size.
             int[] pages = new int[arraySize];
             // Fill the array.
             for (int i = 1; i <= pages.length; i++) {
                  pages[i - 1] = i;
             // Set pageNext and pagePrev variables.
             if (page != 1) {
                  int pagePrev = page - 1;
                  request.setAttribute("pagePrev", pagePrev);
             if ((totalRows - (articlesPerPage * page)) > 0) {
                 int pageNext = page + 1;
                 request.setAttribute("pageNext", pageNext);
             // These will be used by calling code for SQL query.
             request.setAttribute("startRow", startRow);
             request.setAttribute("endRow", endRow);
             // These will be used in JSP page.
             request.setAttribute("totalRows", totalRows);
             request.setAttribute("numOfPages", numOfPages);
             request.setAttribute("page", page);
             request.setAttribute("pages", pages);          
    }I need two parameters from this method (startrow and endrow) so I can perform my SQL queries. Since this is a multithreaded app, I do not want to use class variables that I will later retrieve through methods.
    So my solution was to just set the two parameters in the request and grab them later with the calling code like this:
    // Set pagination
    Pagination.setPagination(request, conf, tl.getTotalRows());
    // Grab variables set into request by static method
    int startRow = new Integer(request.getAttribute("startRow").toString());
    int endRow = new Integer(request.getAttribute("endRow").toString());
    // Use startRow and endRow for SQL query below...Does anyone see any problem with this from a resource/performance standpoint? Any idea on what the overhead is in using the HttpServletRequest object like this to pass variables around?
    Thanks for any thoughts.

    You could either
    - create instance vars in both controllers and set them accordingly to point to the same object (from the App Delegate) OR
    - create an instance variable on the App Delegate and access it from within the view controllers
    Hope this helps!

  • How to get the HttpServletRequest object in a jsp

    Hi,
    I am a little confused here. Am trying to use the HttpServletRequest object in my jsp. I have set up just a simple test page jsp. How can i use the HttpServletRequest object to get some information about the request for example using the method getPathInfo(). I know i can do this in a servlet and pass the value as a parameter in a doGet method. But how do i do it in a jsp. Can it be done..?
    Pls help
    Thankyou

    The request object is already created for you in JSP, as are many other things
    request - the HttpServletRequest object
    response - the HttpServletResponse object
    session - the HttpSession object
    application - the ServletContext object
    out - the JspWriter object (like PrintWriter)
    So you just use them...
    <%
    String asdf = request.getParameter("asdf");
    %>

  • Technical interview questions on this objects

    Hi every one  i am putting some objects in my resume can any one tell me the all possible questions on these objects.
    my id is [email protected]
    Reports:
    &#61607;     Developed a Report to display the values of Total Finished Goods filtered by Plant.
    &#61607;     Created an Interactive Report for displaying vendor information. Based on the selection made the corresponding Vendor Details are listed such that the line selected in the basic list was visible along with the secondary list.
    &#61607;     Developed a Report, which calculates the delivery values and sales for a particulars month and year including total quantities.
    &#61607;     Created reports in SD module such as sales order report, which covers all organization levels, delivery status, invoice status, shipping details and partner function details.
          Conversions:
    &#61607;     Designed and coded a BDC program to migrate Vendor Master Data from legacy system to SAP R/3 database.
    &#61607;     Designed and coded a BDC program to Update and Change Vendor Master Data from legacy system to SAP R/3 database.
    &#61607;     Designed and coded a BDC program to migrate Material Master Data from legacy system to SAP R/3 database.
          SAP Scripts:
    &#61607;     Modified Standard Script MEDRUCK according to client requirements.
    &#61607;     Modified Standard Script SAPFM06P according to client requirements.

    Hi every one  i am putting some objects in my resume can any one tell me the all possible questions on these objects.
    my id is [email protected]
    Reports:
    &#61607;     Developed a Report to display the values of Total Finished Goods filtered by Plant.
    &#61607;     Created an Interactive Report for displaying vendor information. Based on the selection made the corresponding Vendor Details are listed such that the line selected in the basic list was visible along with the secondary list.
    &#61607;     Developed a Report, which calculates the delivery values and sales for a particulars month and year including total quantities.
    &#61607;     Created reports in SD module such as sales order report, which covers all organization levels, delivery status, invoice status, shipping details and partner function details.
          Conversions:
    &#61607;     Designed and coded a BDC program to migrate Vendor Master Data from legacy system to SAP R/3 database.
    &#61607;     Designed and coded a BDC program to Update and Change Vendor Master Data from legacy system to SAP R/3 database.
    &#61607;     Designed and coded a BDC program to migrate Material Master Data from legacy system to SAP R/3 database.
          SAP Scripts:
    &#61607;     Modified Standard Script MEDRUCK according to client requirements.
    &#61607;     Modified Standard Script SAPFM06P according to client requirements.

  • Can I get the HttpServletRequest object in my custom auth providers?

    Hello -
    If I write a custom authentication or identity assertion provider, is there a way to get the HttpServletRequest object of the user's request?
    Thanks,
    -- Scott

    You can do it from your identity asserter in the following way!
    public CallbackHandler assertIdentity(String type, Object token, ContextHandler context) throws IdentityAssertionException
    Object requestValue = context.getValue("com.bea.contextelement.servlet.HttpServletRequest");
    HttpServletRequest request = (HttpServletRequest) requestValue;
    -Faisal
    http://www.weblogic-wonders.com

  • Getting the Client Certificate out of the HttpServletRequest object

    I have an interesting issue with weblogic 5.1 SP6 and getting/obtaining Client
    Certificates.
    The issue is that the Client Certificate is not always in the HttpServletRequest
    object depending on how the weblogic.properties are set. Here is my code to get
    the Certificates.
    // get the cert chain from the request
    Object obj=request.getAttributs("javax.net.ssl.peer_certificates");
    if (obj instanceof weblogic.security.X509[]) {                          
    weblogic.security.X509[] wlogicCert = (weblogic.security.X509[]) obj;
                                            try {
                                            iaik.x509.X509Certificate iaikClientCert =
         new iaik.x509.X509Certificate(wlogicCert[0].getBytes());
         clientSDN = aiaikClientCert.getSubjectDN().getName();
         clientCert = (Certificate)iaikClientCert;
    The only time the certificate is present in the Request Object is when the following
    weblogic.properties are set:
    weblogic.security.enforceClientCert=true
    weblogic.security.clientRootCA=CARoot.pem
    If the properties are set to to this: no Certificate can be received from the
    Request object.
    weblogic.security.enforceClientCert=false
    #weblogic.security.clientRootCA=CARoot.pem
    Is there a way to have Weblogic always receive/get a Client Certificate if one
    is provided by the client, but not have weblogic do any validation of the certificate?
    Any help would be appreciated!
    Gary

    ok i see.
    although it should be able to get the underlying
    outputStream handle since i have initialized
    (associated) it on the previous line.
    ThanksWell, you might be able to get the underlying stream. Look at the API docs. If there's a method there to do it, then you can. If not, then you can't.
    If you can do it, then you have to look at the API docs for FileOutputStream and see if it lets you get the associated File or path. If such a method exists, then you can get it. If not, then you can't.
    Even if both methods exist and you can utimately get the file, do you understand why this is not the same as "getting the file associated with a PrintStream"?

  • Is it necessary to synchronize HttpServletRequest object

    Is it necessary to synchronize HttpServletRequest object .
    Justify your answer
    With regards
    Aruanbh Dash

    i'd say no, because it's supposed to be generated and processed by a single thread of the servlet engine
    after that, nobody will arrest you if you torture a request with multithreading

  • How do I get the client IP Address from the HTTPServletRequest object

    Hi ppl,
    How do I get the IP address of the client machine from the HTTPServletRequest object?
    Thnx in advance,
    Manoj

    Take a look at: http://java.sun.com/products/servlet/2.2/javadoc/index.html and check for the ServletRequest Interface.
    Be aware also if your web server is using proxy, proxyReverse and so because you could end getting the servers' IP and not client one.

  • Question on view objects

    Hi I have couple of question both might be related.
    1. In one jsf page I have several items. They are selectInputText, InputText,Shuttle,Select one choice etc. Select input text,Select one choice and Shuttle gets populated from different view objects. For others user has to enter data. I need all entered data to go to the next page for confirmation and from confirmation page once user click confirm button data should be entered in data base.
    How do you take all the data from first page to confirmation page. I have seen SRdemo tutorial where suggestion was to create Global view Object with transient column and drop them as ADF form in first page so that in next page we can get the data from Global view object. But looking at my requirement when I bring ADF form it doesn't allow to have input items as select InputText or Shuttle.
    How do I do this?
    Second question is
    2. In one jsf page I have a table with Select Many. I want to update one of the column for selected row. So if user selects the rows and click continue I need to first go on confirmation page and show him all the selected row and then when user confirms, my custom method should go and update those rows in database with predefined value. If user doesn't selects any row I should throw a warning.
    I am using Jdev10.1.3.4.0
    thanks
    Ajay

    Hi,
    1. The ADF form that you see when dragging a collection from he data control palette to the page is a "template". You can change each attribute and input component added to teh page. Just delete the field the gets created and drag and drop the attribute of teh Collection again. Then you can choose the input item you like to have.
    2. If the rows have a primary key, you can get the PK from the selected rows and then pass them to a ExecuteWithParameters method that you can create for a VO that uses bind variables. So the bind variable could be used like select ... from ... where pk_col in (:bindVariable)
    Frank

  • Differences between Oracle BAM and Oracle BI and Question BAM  Data Objects

    Hi,
    I have two questions.
    1. Can someone tell me differences between Oracle BAM and Oracle BI?
    My understanding about Oracle BAM is, we use BAM to build Dashboards or Reports.
    We can also build DashBoards or reports using Oracle BI.
    I am not able to understand why Oracle has two tools for same purpose?
    Which tool is more powerful and user friendly(Oracle BI or Oracle BAM)?
    2. Every time we plan to develop Dashboard or report in BAM, we need to create BAM ADC Data Object to store Data (i.e first step is to get data from external database or application and second step is to store data in BAM ADC data object).
    My understanding is we have an extra step(i.e creating Data Object) in Oracle BAM to develop a report or DashBoard
    I am wrong pl correct me?
    Regards,
    Shanti Nagulapalli.

    Oracle 11g has many advanced features in PL/SQL over Oracle 9i.
    refer here,
    http://www.oracle.com/technetwork/database/features/manageability/9i-to-11g-real-world-customer-exper-133754.pdf
    http://www.oracle.com/global/de/upgradecommunity/artikel/upgrade11gr2_workshop2.pdf
    http://www.compuworks.com/events/view/233.pdf
    http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getCourseDesc?dc=D52601GC10&p_org_id=15942&lang=US
    Thanks

  • Question about using objects in SQL query.

    I had posted this question in the SQL/PLSQL forum but I guess nobody took the time to understand exactly what I am asking so I decided to try here hoping to get the answer. So here is the thing:
    I have created generic object type "tree" - the constructor takes as a parameter sql query which returns "node_id" and "parent_node_id" - this is all we need to have a tree. The object has all related to a tree structure member functions and one of them is "oldest_relative" (the tree may not be fully connected - it may be more like a set of many trees, so it's not necessary all nodes to have the same root).
    I also have departments table with the following fields: department_id, parent_department_id, department_name,...
    all records in the table w/out parent_departments (parent_department_id is null) are considered divisions.
    Now if I run the following query:
    SELECT "DEPARTMENT_ID", "PARENT_DEPARTMENT_ID", "DEPARTMENT_NAME", tree('select department_id "node_id", parent_department_id "parent_node_id" from departments').oldest_relative("DEPARTMENT_ID") "DIVISION_ID" FROM departments
    my question is: Is the tree object created for every row or does Oracle somehow caches the object since the object itself is not changing but only the parameter for the oldest_relative member function.
    The table only has a few hunderd records and I can't see much of a difference in the execution time btw the query above and query like this:
    SELECT "DEPARTMENT_ID", "PARENT_DEPARTMENT_ID", "DEPARTMENT_NAME", b.t.oldest_relative("DEPARTMENT_ID") "DIVISION_ID"
    FROM departments left join (select tree('select department_id "node_id", parent_department_id "parent_node_id" from departments') t from dual) b on 1 = 1
    where the object is clearly created just ones. (there is probably a better way to do it instead of this join)
    Pls elaborate
    George

    Not exactly sure what the question is...
    As I understand, you are comparing the following two constructor calls:
    +select..  tree('select department_id "node_id", parent_department_id "parent_node_id" from departments').oldest_relative("DEPARTMENT_ID") ... FROM ...+
    +select tree('select department_id "node_id", parent_department_id "parent_node_id" from departments') ... FROM dual+
    These calls are the same (besides the 1st one doing an immediate implicit call to a method of the object being constructed). The number of times these are being called depends on the number of times this SQL projection is applied - and that is determined by the number of rows being projected by the SELECT.
    The latter one is against DUAL which only has a single row. So that constructor is only called once. The former can be against multiple rows. Obviously a single pass through a data set is desirable - which means that the sub-select (use by the constructor) should ideally only be executed once and makes the 2nd method more desirable.
    However, I'm having a hard time understanding why the class and constructor are at all needed. Why pull data from a SQL table into PL memory? As that is where the class will need to cache and store the results of that construction parameter SQL SELECT. And once in PL memory, how does the object effectively access, search and use this cached data?
    PL memory is expensive. It is not sharable.
    PL data structures are primitive - these cannot be compared to SQL structures in the form of tables and columns that can be stored in a number of physical ways (index tables, hash tables, partitioned tables, clustered tables, etc). Cannot be indexed like SQL structures using B+tree, bitmap, function and other indexing methods. Cannot be sorted, grouped, analysed, filtered, etc like SQL structured data.
    It makes very little sense to read SQL data into a class and then deal with that data, cached in expensive PL memory, using primitive PL structures.
    And the same would be true if Java or C# was used. The best place for data is inside the SQL engine. That is the most superior environment for data. It can processes more data, scale better, perform better and offer more flexibility, than pulling data from it and then crunch that data using PL or Java or C#.

  • Question about Using Objects

    Hi Guys,
    Need some help here with understanding the basics. Basically i'm getting a bit confused on how objects are instantiated and used in java. Firstly an object of a class is instantiated with the following piece of code;
    ClassA obj = new ClassA();This would allow you to use the variable and method of ClassA. Say ClassA has the method set(). You could call it via the obj object with the code;
    obj.set();that I understand. You can also declare an annonymous object which is an object that is only really going to be used once for the purposes of the statement. For example, something like;
    System.out.println(new Date());That I understand too. However what is confusing me is this type of object instantiation;
    public static ClassA obj; You cannot not call the set() method of the ClassA in the same way so why use this? Also this code is confusing me;
    obj = new ClassA();Are you saying that a precreated object is now equal to ClassA. Meaning that you can call its set() method in the same way?
    What do they mean? Why are they used? Can anyone give me an example of how they would be used?
    Any help would be appreciated.

    public static ClassA obj;This is a declaration, basically you are telling the
    computer that you intend to make a "ClassA" object
    and the program will allocate enough memory to hold a
    "ClassA" object, although the object "obj" does not
    actually "exist" at this time. This is why you can't
    use the set() method, because obj doesn't have any
    methods at all since it hasn't fully been created
    yet.
    obj = new ClassA();This is what actually creates the object, according
    to the instructions in the object's "ClassA()"
    method, which is known as a constructor.
    ClassA obj = new ClassA();This statement simply combines the two previous ones
    into one line. You are declaring "obj" to be a
    "ClassA" which allocates memory to store it, and then
    immediately executing the "ClassA()" constructor to
    build a new ClassA and store it in the memory space
    referenced by "obj". Does any of that make sense?
    I'm not exactly a teacher, but I think I understand
    your problem enough to explain it.Yes that does make sense. However i have some more questions now if you dont mind answering.
    If the code
        public static ClassA obj;simply allocates the memory (instantiate) and does not name (declare) the object then why cant you do something like this afterwards;
    obj = new ClassC();or this;
    obj1 = new ClassA();The object doesn't yet exist you only putting memory aside for it. Its only at this point that your naming the object and setting the parameters for it.
    Why bother even allocating memory for the object without actually declaring the object? Surely combing the two statements is more efficient and makes more sense than separating them. Why do you need to allocate the memory and then give it a name?
    Also the following piece of code;
    ClassA objA = obj;Since obj is already intialized as being a new ClassA object, then is this simply declaring and instantiating a new object of type ClassA? And what is the difference between this and;
    ClassA objA = new ClassA();Thank You

  • Another question about using objects in SQL queries

    Hi gurus, I need your thoughts on this:
    I have created generic object type "tree" - the constructor takes as a parameter sql query returning "node_id" and "parent_node_id". As a tree - the object has all related to a tree structure member functions and one of them is "oldest_relative" (the tree may not be fully connected - it may be more like a set of many trees, so it's not necessary all nodes to have the same root).
    I also have departments table with the following fields: department_id, parent_department_id, department_name,...
    all records in the table w/out parent_departments (parent_department_id is null) are considered divisions.
    Now if I run the following query:
    SELECT "DEPARTMENT_ID", "PARENT_DEPARTMENT_ID", "DEPARTMENT", tree('select department_id "node_id", parent_department_id "parent_node_id" from departments').oldest_relative("DEPARTMENT_ID") "DIVISION_ID" FROM departments
    my question is: Is the tree object created for every row or does Oracle somehow caches the object since the object itself is not changing but only the parameter for the oldest_relative member function.
    The table only has a few hunderd records and I can't see much of a difference in the execution time btw the query above and query like this:
    SELECT "DEPARTMENT_ID", "PARENT_DEPARTMENT_ID", "DEPARTMENT", b.t.oldest_relative("DEPARTMENT_ID") "DIVISION_ID"
    FROM departments left join (select tree('select department_id "node_id", parent_department_id "parent_node_id" from departments') t from dual) b on 1 = 1
    where the object is clearly created just ones. (there is probably a better way to do it instead of this join)
    Pls elaborate
    George

    Hi, TREE is not a function but PL/SQL object type I have written representing tree structure. The Oracle version is 10g.

  • Questions about ALV object model

    Hi,
    for a new report i´m planing to use the "new" ALV object model to create the ALV list. Now I´ve got two questions concerning this topic:
    - is it possible to switch the ALV into the edit mode like it´s possible if  the "old" CL_GUI_ALV_GRID class  
      is used?
    - how I can encolor specific cells?
    I couldn´t find any hints or demo programms for these questions
    Regards,
    Andy

    it is not possible to Edit the ALV using Object Model.
    For coloring...check this code.
    DATA: alv TYPE REF TO cl_salv_table.
    TYPES: BEGIN OF ty_tab,
             carrid TYPE sflight-carrid,
             connid TYPE sflight-connid,
             color  TYPE lvc_t_scol,
           END OF ty_tab.
    DATA: wt_color TYPE  lvc_t_scol,
          wa_color TYPE  lvc_s_scol,
          w_color  TYPE  lvc_s_colo.
    DATA: wa_flight TYPE ty_tab.
    DATA: column_tab TYPE REF TO cl_salv_columns_table,
          column TYPE REF TO cl_salv_column_table.
    DATA: column_ref TYPE   salv_t_column_ref,
          wa LIKE LINE OF column_ref.
    DATA: it_flight TYPE STANDARD TABLE OF ty_tab.
    SELECT carrid connid FROM sflight
    INTO CORRESPONDING FIELDS OF TABLE it_flight
    UP TO 10 ROWS.
    w_color-col = 4.
    w_color-int = 0.
    w_color-inv = 0.
    LOOP AT it_flight INTO wa_flight.
      w_color-col = 4.
      wa_color-fname = 'CARRID'.
      wa_color-color = w_color.
      APPEND wa_color TO wt_color.
      w_color-col = 6.
      wa_color-fname = 'CONNID'.
      wa_color-color = w_color.
      APPEND wa_color TO wt_color.
      wa_flight-color = wt_color.
      MODIFY it_flight FROM wa_flight.
    ENDLOOP.
    cl_salv_table=>factory(
      IMPORTING
        r_salv_table   = alv
      CHANGING
        t_table        = it_flight
    "get all the columns
    column_tab = alv->get_columns( ).
    column_tab->set_color_column( value = 'COLOR' ).
    column_ref = column_tab->get( ).
    "loop each column
    LOOP AT column_ref INTO wa.
      "Conditionally set the column type as key or non key
      IF wa-columnname   = 'CARRID'.
        column ?= wa-r_column.
        column->set_key( abap_true ).
      ENDIF.
    ENDLOOP.
    alv->display( ).

Maybe you are looking for

  • Thiz iz Urgent..........How to convert a .class file to a .java file

    Hi Everybody, I want to convert back a .class file (a compiled servlet) into .java (source code) file. How do I do it??? Note using javap has not been of any help. Thanks in Advance Rajib

  • Loading date in delivery

    Hello SAP gurus in sales order we have 10 line items with different loading dates for each line item and loading date in the slaes order is at item level.while creating a delivery for these line items the loading date is at header level in the delive

  • Is image editing easier on more recent versions?

    I run a small website and am trying to decide if I should purchase this software for editing, or if I can get by with an older copy as easy, or something else free online? Is there any advantage of this over a 3-4 year old copy? Will images look bett

  • I know this is the iChat but can someone help with Adium?

    Ok so my adium has worked like forever since I got it and like today it just freezes up after logging on to all my accounts (aim, msn, and yahoo) which it has never done before. All it does is log on and then the little color spinning wheel comes on

  • Making space on my ipad by moving photos

    How do I move my photos to the cloud so they do not take up space on the IPAD?