Two response objects within one servlet...

Heya guys, quite new to java and got stuck for the whole day on this.
I need to combine two responses inside one servlet. One response retrieves picture from the database and it works fine. Another one retrieves text from database also works fine on its own. Second i try to use both end up with hundreds of exceptions.
Any idea what to do, not how...but what???
Thanks

Compiling 1 source file to F:\gopal\weba\WebApplication6\build\web\WEB-INF\classes
F:\gopal\weba\WebApplication6\src\java\NewServlet.java:48:
processRequest(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,javax.servlet.http.HttpServletResponse) in NewServlet cannot be applied to (javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
processRequest(request, response);
F:\gopal\weba\WebApplication6\src\java\NewServlet.java:57: processRequest(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,javax.servlet.http.HttpServletResponse) in NewServlet cannot be applied to (javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
processRequest(request, response);
2 errors
F:\gopal\weba\WebApplication6\nbproject\build-impl.xml:295: The following error occurred while executing this line:
F:\gopal\weba\WebApplication6\nbproject\build-impl.xml:149: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 2 seconds)
You cannot use two response object.

Similar Messages

  • Hi, I use two email addresses within one account with gmx.  I created one account with the first email address now. How do I add the second one to this account? Now it looks like this. One account was opened with address A. I receive in this account email

    Hi, I use two email addresses within one account with gmx.
    I created one account with the first email address now. How do I add the second one to this account?
    Now it looks like this.
    One account was opened with address A.
    I receive in this account emails for address A and B.
    But I can only write and answer with address A.

    Hi Rudegar,
    Sorry for my late reply.
    It s not the amount of accounts I'm struggling with.
    When I create now for both email addresses one account, then I receive the same emails two times.
    That is not what I want.
    Because on gmx the two email addresses have the same inbox and outbox.
    E.g. I can login to my gmx account either with email A or B. It doesn't matter.
    Now I want to have the same on my ipad.
    One account with both email addresses.

  • Uix two view-objects on one entity-object synchronize

    Hi All
    I want to add some uix pages to an old project using ADF UIX and Business Components.
    I have an entity object to a table witch about 50 fields.
    Now I create two view objects due to a better performance. One witch seven attributes for the overwiew and one with all attributes for the detail page.
    They are related via a view link.
    I create the overview as a read-only-table and the detail-page as an input-form.
    The proplem is that the synchronization don't work. The detail page shows the first dataset ever.
    Has anyone a solution or a tip where I can found that?
    Is where a performance problem if I use one view-object for both pages?
    Thanks in advance
    Roger

    Use custom DataAction for the first page:
    package controller;
    import oracle.adf.controller.struts.actions.DataAction;
    import oracle.adf.controller.struts.actions.DataActionContext;
    public class Class1 extends DataAction
      protected void validateModelUpdates(DataActionContext actionContext)
         //super.validateModelUpdates(actionContext);
          // put you custom validation here
    }http://www.oracle.com/technology/products/jdev/collateral/papers/10g/ADFBindingPrimer/index.html#usingdataaction
    Message was edited by:
    Sasha
    Message was edited by:
    Sasha

  • Merging Two Graphics2D objects into one

    Is it possible to accomplish this:
    1) have a method in class A that returns a Graphics2D object
    2) have a method in class B that returns a Graphics2D object
    3) have class C call both class A's and class B's methods that return Graphics2D objects
    4) lay those two Graphics2D objects into a new Graphics2D object within a component's paint(Graphic g) method
    What I am trying to do is a lot like a Viso diagram, that is drag a graphic onto another graphic x numberof times and perform some kind of layering technique.
    Thanks

    Why don't you pass a graphics 2D into each method, and get method to draw onto that. Then it becomes very simple to combine each.
    MArk

  • HT1918 is it possible to have two different password within one iTunes account?  one to log in with and a different one to use when making a purchase?

    Is is possible to have two different passwords within itunes? one to log in with and a different one to make purchases with?

    The system is not setup to provide that kind of sservice.  If making certain purchases it does ask for an answer to one of your security questions, so that provides a little more security for some purchases, just not all.

  • ABAP routine to join two ODS objects into one

    Hi there,
    i have two ODS objects related to each other. and i want to load them into another ODS object and join them so to say.
    as far as i got now, it seems that the only way to do this is an ABAP routine in the update rules. ca nanyone give me a hint on how to do this? no clue how ABAP works yet.
    i suppose there must be some template or something because i think others must have had the same issue before. anyone who already solved this?
    i'd appreciate your help,
    regards,
    stefan

    HI Stefan,
    First add VTS_KUN (customer code)
    VTS_BEDA (order date)
    in ODS2 VTSNWBP2 and don't map to any field intransfer rule.
    write this code in start routine of udpate rule between VTSNWBP2 and VTSNWBDN.
    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line  -
    <u>TABLES: /BIC/AVTS_NWBE00.</u>
    DATA:   ...
    $$ end of global - insert your declaration only before this line   -
    The follow definition is new in the BW3.x
    TYPES:
      BEGIN OF DATA_PACKAGE_STRUCTURE.
         INCLUDE STRUCTURE <i>/BIC/CS8ZODS2</i>.
    TYPES:
         RECNO   LIKE sy-tabix,
      END OF DATA_PACKAGE_STRUCTURE.
    DATA:
      DATA_PACKAGE TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
           WITH HEADER LINE
           WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
    FORM startup
      TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
               MONITOR_RECNO STRUCTURE RSMONITORS " monitoring with record n
               DATA_PACKAGE STRUCTURE DATA_PACKAGE
      USING    RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line        -
    fill the internal tables "MONITOR" and/or "MONITOR_RECNO",
    to make monitor entries
    <b>DATA:  S_DATA TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
           WITH HEADER LINE
           WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
    DATA:  ITEM_TABLE TYPE STANDARD TABLE OF /BIC/AVTS_NWBE00
           WITH HEADER LINE
           WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
    *start of modification
    *Populating the order number data from ODS1 table
    SELECT * FROM  /BIC/AVTS_NWBE00 INTO TABLE ITEM_TABLE.
    SORT DATA_PACKAGE BY VTS_BES  ASCENDING.
    SORT <u><i>ITEM_TABLE</i></u> BY VTS_BES  ASCENDING.
    LOOP AT DATA_PACKAGE INTO S_DATA.
       LOOP AT ITEM_TABLE WHERE VTS_BES = S_DATA-VTS_BES.
         MOVE-CORRESPONDING item_table to s_data.
         APPEND S_DATA.
       ENDLOOP.
    ENDLOOP.
    DATA_PACKAGE[] = S_DATA[].</b>
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    $$ end of routine - insert your code only before this line         -
    ENDFORM.
    *TABLES: /BIC/AVTS_NWBE00.--ODS1 table
    Lemme know this is working.
    Regards,
    San!
    Message was edited by: San!

  • Two logical switches within one Catalyst

    Hello,
    I have purchased two catalyst 3560 switches (with 24 interfaces) on Ebay to prepare for ccnp switch exam. It would be great if I have 4 switches. Is it any possibillity to create two logical switches from one? I mean, not by assigning interfaces to different vlans?

    No, it is not possible in Catalyst switches. It is possible in Nexus 7k, but it is another platform at all.

  • I am wanting to exactly match two ID numbers from two differing worksheets within one work book. Once matched I am wanting to retrieve a row value from the second worksheet into the first. Any help much appreciated.

    I am wanting to exactly match two ID numbers from two worksheets within the one work book. ID numbers are non linear. Once exactly matched I wish to retrieve a corresponding row value from worksheet two and have it appear in worksheet one against the correct ID number. I have been looking at IF, VLOOKUP, and MATCH functions and suspect that what I want to do requires a combination of two or more. Any help will be greatly appreciated.
    regards Vaughanh

    Vaughan,
    Data A:D is all cells start at column A thru column D.
    There is built-in help using the menu item "View > Show Function Browser"  in the search field (top right) you can enter vlookup and you will see the detailed description.
    From this we see:
    VLOOKUP
    (search-for, columns-range, return-column, close-match)
    search-for:  The value to find. search-value can contain any value type.
    columns-range:  A range of cells. range is a reference to a single range of cells, which may contain values of any type.
    return-column:  A number that specifies the relative column number of the cell from which to return the value. return-column is a number value. The leftmost column in the range is column 1.
    close-match:  An optional value that determines whether an exact match is required.
    close match (TRUE, 1, or omitted):  If there’s no exact match, select the column with the largest top-row value that is less than the search value. Wildcards can’t be used in search-for.
    exact match (FALSE or 0):  If there’s no exact match, return an error. Wildcards can be used in search-for.
    So... the 2,0 means return the value form the same row as the lookup value but from the 2nd column of the range.  3, 0 means from the 3rd column.  the ", 0" means exact match

  • Two PrintWriter objects in a servlet class

    Hi-
    In one of my servlet, I have written the below code
    PrintWriter out=res.getWriter();
    +          out.write("hi");+
    +          out.close();+
    +          PrintWriter out2=res.getWriter();+
    +          out2.write("hi again");+
    +          out2.close();+
    This will print "hi" but not printing "hi again".
    Can anybody tell me what would be the reason behind this..
    Thanks in advance.

    Do you take any time to think about your questions, or do you just post them in rapid fire?
    In one of your other postings you already noted that when you close a PrintWriter it doesn't give an Exception when you try to write to it again.
    So I would guess because you've close it, you can't just open it by using the getWriter() method.
    Or your class on the other end only reads until EOF and since you've already closed it, there is nothing else to read.

  • How to add osd file into app-v package - need to have two osd files within one app-v package

    We have app-v 4.6 sp2 I get one app-v existing package which has two OSD files associated.
    It is needed for separate license servers located in different sites. I need to create a new app-v package with new version of this application and want to have similar two OSD files associated with it. How to do it?

    Using Notepad for creating a new copy of an OSD is OK, but requires some thinking:
    Inside the new OSD, the NAME= and/or VERSION= attribute should be modified: you shall not have two applications with the same Name+Version combination
    the name of the new OSD file should be added to .sprj file (similar to the original OSD file name) as this motivates the Sequencer to load both OSDs when opening the package
    inside the OSD in the <MGMT_SHORTCUTLIST> section the name of the shortcut file (.lnk) shopuld be adjusted
    The new OSD won't get added to the MSI (if you are using that) unless you open & save the package in the Sequencer.
    Sorry Dan, but except for super-professionals I'd advise
    Use GridMetric
    Application Virtualization Explorer to add/modify shortcuts (you'd need the Professional Edition for App-V 4)
    or
    If you already have the package with just one OSD: select the 'Modify an existing packge' in the Sequencer, then use the 'Add
    Application' wizard. Quite at the end this will bring you to the 'shortcuts and file type associations' step. In there you can create a new shortcut (resulting in a new OSD). Other wizards make it more difficult (or impossible) to add shortcuts: https://kirxblog.wordpress.com/2011/06/01/app-v-4-6-sp1-the-right-sequencing-wizard/
    Falko
    Twitter
    @kirk_tn   |   Blog
    kirxblog   |   Web
    kirx.org   |   Fireside
    appvbook.com

  • How can I make two video clips within one frame?

    OK, I have two video clips. I just need to shrink one video and put it in to the corner of my other video. How can I do this?
    Thank you for your help!
    Message was edited by: Stevamundo

    Hi
    Picture in picture - is no a standard option in any version of iMovie.
    iMovie ? - 6 You'll need a third party *plug in* to do this: (iM'08 no go at all)
    • Stupendous software http://www.stupendous-software.com
    • GeeThree http://www.geethree.com
    • cf/x. http://www.imovieplugins.com
    • Apple http://www.apple.com/downloads/macosx/video/ezediapluginsforimovievol1.html
    • http://www.imovieplugins.com/fxhome.html
    *You also can do this with QuickTime-pro.* But You need the disipline of an angle.
    Quoting:
    Klaus1 writes: As Bengt says, you can do this with Quicktime Pro. Here is how:
    Organize the video clips and/or stills that you want to superimpose on to your main video clip, by having these in separate, individual iMovie projects (no matter how small). It helps if these are in the exact length/time you want later.
    Now start with the clip in your iMovie project on to which you want to superimpose one of more smaller video clips or stills. Lets call it Main Clip. Export this (share) to Quicktime Pro in DV (full quality). make sure it has the same aspect as before (Quicktime tends to default to 4:3. If you want 16:9, read on).
    In Quicktime, with this project open, select File ~ Open File. Select the iMovie file (in your movies folder) of the first clip/still you want superimposed. This will open in its own QT window. Select Edit ~ copy. If it is a movie clip then select all ~ copy (or you will only get one frame!). Switch back to the Main Clip window, and click in the scroll bar where you want the extra clip/still to appear. Choose Edit ~ Add to Movie.
    You can repeat this as many times as you like, if you want to build a 'Video Wall', i.e. have several superimposed clips/stills on the same Main Clip.
    Do not worry that the new clip overlaps or covers up the Main Clip, at this stage.
    Choose Window ~ Show Movie Properties. The Properties Dialogue appears.
    You will see a list of video (and audio) tracks. Track one will be the Main Clip, track 2 your new added (superimposed) clip. Click track 2, then click visual settings. From the Scaled Size pop-op menu, choose percent. Then type 50 into the first box. If Preserve Aspect Ratio is turned on you won't need to type 50 into the second box. You have made the pasted footage appear at one quarter its original size. The inset is now hugging the top-left corner of the Main Clip. If you want, you can type numbers into the Offset Boxes to shove it away from that corner (there are 72 pixels to the inch).
    If your original Main Clip was required in 16:9, unclick (de-select) Preserve Aspect Ratio, and type in the relevant numbers in the two boxes, in Video Track 1.
    PAL (for Europe):
    Standard DV (4:3) 788 x 576
    DV Widescreen (16:9) 1050 x 576
    NTSC (for the USA):
    Standard DV (4:3) 720 x 528
    DV Widescreen (16:9) 874 x 480
    This will not affect video track 2, but if that is also wanted in 16:9 repeat for that track.
    You can superimpose, 3, 4, or more such 'overlaps' on the same clip, and spend a happy afternoon tapping away for each track in the Offset Boxes until you have got them all in the right place! You can even overlap them, if you can remember (or note down - hire a secretary to take notes) which track you want on top etc.
    Save the completed QT file. Import the completed file into a new iMovie project. Import this into the original iMovie project, substituting the old clip you copied to QT as Main Clip for the new fancy clip you have made.
    Have fun!
    END OF QUOTE !
    *My way:* When I started to need more than iMovie could offer I took a look into
    FinalCut Express and counting the sum of all Plug-ins needed and FCE I found out
    that FCE is a real bargin.
    • color-correction
    • blue/green screen
    • 99 video and audio tracks
    • slightly rotation a clip eg 1 deg - nice horizon
    • slightly or major scale up or down
    • and of cause Picture in pictures
    And so much more.
    Yours Bengt W

  • Two Data Objects is one too much

    I got a field in a database named 'Date'. Now i want to get the date and formate it. For both operations i need the packages java.sql (for database) and java.text.SimpledateFormatter (to formate the date). Now i get the errror message that java don't now which Date Object i mean in my code, cause Class data is part of the package java.sql and java.text.SimpleDateFormatter. Has anyone an idea?

    I take it you are getting the 'amibiguous' error message returned? To eradicate this, simply import the exact classes of the specific packages you require, as opposed to simply importing the whole package. ie do not just import java.sql.*, on different lines import specific classes. Since this produces no performance degredation it does not matter, and some poeple would say it is a better programming style (unless you are using several classes from a package) since readers of your code can see exactly what you are using and where.

  • Two View objects with one Entity object

    Hi
    I have such a requirement that, I need to take some mandatory attributes of one table in one page and the remaining in following page. After clicking Submit in the second page, i need to insert data in to the table.
    How to proceed with this ? When i click on next button of first page it is validating for all mandatory fields.
    Regds,

    Use custom DataAction for the first page:
    package controller;
    import oracle.adf.controller.struts.actions.DataAction;
    import oracle.adf.controller.struts.actions.DataActionContext;
    public class Class1 extends DataAction
      protected void validateModelUpdates(DataActionContext actionContext)
         //super.validateModelUpdates(actionContext);
          // put you custom validation here
    }http://www.oracle.com/technology/products/jdev/collateral/papers/10g/ADFBindingPrimer/index.html#usingdataaction
    Message was edited by:
    Sasha
    Message was edited by:
    Sasha

  • Save different Objects in one file by two different streams

    Hi all,
    I have a issue to read two Objects from one file if I write those in two different streams.
    I open the ObjectOutputStream and save an Object to the file. Then I close this stream and file. Then I open the new ObjectOutputStream and save the second Object in the same file. It works Ok. Then I open the ObjectInputStream and try to read those two objects and get java.io.StreamCorruptedException.
    This exception happes only when app tryes to read the second Object.
    this is the code example:
    //Write part
    for (int i=0;i<2;i++)
    File file = new File("test.swp");
    FileOutputStream fileOut = new FileOutputStream(file,true);
    ObjectOutputStream objOut = new ObjectOutputStream(fileOut);
    JobObject jobObj = new JobObject();
    jobObj.setID(i);
    objOut.writeObject(jobObj);
    objOut.flush();
    objOut.close();
    fileOut.close();
    //Read part
    FileInputStream fileOut = new FileInputStream("test.swp");
    ObjectInputStream objOut = new ObjectInputStream(fileOut);
    for (int i=0;i<2;i++)
    JobObject jobObj = (JobObject)objOut.readObject();
    objOut.close();
    fileOut.close();
    Thank for any help.

    Maybe try closing the ObjectInputStream (and re-creating it as needed) within your for loop?
    - Saish
    "My karma ran over your dogma." - Anon

  • Does any one implemented solution for httpservlet request/response object in IWSDLInterceptor implemented class?

    I am trying to handle Producer not available situation in which I am using Interceptor IWSDLInterceptor in WLP 10.3.4. I am able to retrieve exception using onWSDLException but from here if I have to forward my pageURL object I need httpservlet request and response. I tried my own filter class to have its own customize request and also tried it out all other Interceptor to see if any one can handle IOException. I did manage to throw my own Customize exception but  that also did not work out as Page does not have any backing file or any supportive Controller class.
    Does any one implemented solution for httpservlet request/response object in IWSDLInterceptor implemented class? or do we have any specific documentation in regards to this? As I am not able to find much martial on IWSDLInterceptor except Java API from Oracle and article defining Two way SSL handshake Producer.
    Any kind of help is appreciated.
    Thanks
    PT

    Thanks Emmanuel for your response but render behavior is not available for IWSDLRequestContext/IWDSLResponseContext object which IWSDLInterceptor uses for implementation.
    Let me put my question in little simpler manner. May be my approach to the problem is not proper.
    Problem : Handle Producer Not available (no application exists on server) on consumer side.
    So far tried approach : Producer is not running then I am able to handle that TransportException at IInitCookieInterceptor/IHandleEventInterceptor onFault behaviour but in the case of Producer not even exists Consumer try to get WSDL fetch operation and failed with FileNotFoundException.
    To handle this exception, I used IWSDLInterceptor which is available under IWSDLInterceptor.OnWSDLException (Oracle Fusion Middleware Java API for Oracle WebLogic Portal)
    I am able to catch the exception but problem arise when application needs to forward at specific page/render portlet for this situation. For that it required request/response object but IWSDLInterceptor does not give any kind of instances to redirect request as there is no direct access to HTTPServlet request/response object.
    I tried my custom request object to use there. I tried out custom filter object of IWSDLrequestContext. nothing works.
    One approach works is to put producer WSDL file at consumer level. But in that, you need to handle different producer files for different environment. Which I don't think its a good approach.
    eAny one Let me know if my approach to the problem/scenario is wrong. Or if I am missing out any other supporting interface which also required to handle this scenario. or I am using wrong interface for this scenario.
    Thanks for your help in advance.
    PT.

Maybe you are looking for

  • RE: Idoc types , Function modules

    HI All What are the generic <b>Idoc types</b> and <b>function modules</b> used for the following objects for SAP R/3 4.7 Invoice Release (inbound) Payments (outbound) Purchase Orders (outbound) Goods Receipts (outbound) Cost Centers (outbound) GL Cod

  • Ipod plugged in with light turned on, but computer and itunes not seeing it

    I got this ipod as a gift and when I first plugged it in, it worked fine and I put my music on it. I went to do it again the other day and it does not show up on my computer or in my itunes. I've tried to uninstall and reinstall itunes multiple times

  • Why when I ckick on an email tab I get click.email in Firefox address line?

    Most of the time when I click on a tab in an email in Thunderbird, Firefox comes up with "http://click.email" instesd of "http://www." like it should. Some ot the times I can take out the "click.email" and type in "www." and it will go through, but m

  • I can not upgrade Java 5.0

    Hi all, I have java J2SE 1.4.2. I click on the package I follow the steps and it gets to , selecting destination and gives me this error message:"(Select a destination Volume to Install the J2SE 5.0 Release 1 Package Software) How do I select a desti

  • MRP4 View: Significance of Individual/Collective indicator

    Hi, Ref : MRP 4 view , Field : "Individual/Coll." Request to give the significance of the above field. I am not able to understand the help data available for the filed in SAP. If possible request to give example to elaborate the significance Regards