Serving an image ONLY as part of servlet/JSP

I have a question regarding Tomcat 4.0. I have a servlet application. one of the servlets is used to display images. i only want this images to be displayed by the servlet (by that i mean the servlet produces html with img tags), i don't want to allow the user to type in something like that:
http://www.whatever.com/image.gif
and get the image.
Is there any way i can get Tomcat to do that? Or any other alternatives?
Thanks in advance!

If your Servlet sends out html code that can reference an image, the user can hard code that url in the browser and grab it. Instead, You may want to store the images somewhere out side the servers capability to display, and use your servlet to open the image file and stream it out via the ServletOutputStream.

Similar Messages

  • How to make the virtuval make over to an image(only hair part)

    I HAVE SELECT THE IMAGE FROM PHOTO ALBUMS OR CAM BUT I CAN'T EDIT THE HAIR WITH ANOTHER HAIR STYLES AND SAVE IT AS A ONE IMAGE.....PLEASE SIR GIVE ME SAMPLE EXAMPLE OR ANY GUIDELINE TO ME.PLEASE SIR GIVE ME AN IDEA....

    Hi!  please any one give OpenCv for this logic...
    Plese help me sir....

  • InDesign only showing part of the image

    I'm doing a job for a client in InDesign CS5. I have not worked in CS5 before, so don't know if this is a bug or if I'm doing something wrong.
    It seems to happen randomly and I have checked the preferences and tried using different settings for the Display Performance. I've even tried viewing the job with Overprint Preview switched on.
    When placing images only a part of the image shows. When I output to PDF or Print the file then the entire image shows. This makes it very hard to do layouts, especially in cases where I need to crop an image.
    In InDesign it looks like this:
    When I output to PDF (this is a low res output, just to demonstrate my point) the entire image shows:
    In InDesign it looks like this:
    When I output to PDF:
    The machine I'm ding this job on is an iMac, 2.66GHz Intel Core 2 Duo with 4GB 800MHZ DDR2 SDRAM. It is running Mac OSX 10.6.4. And InDesign is on version 7.0.2.

    mafeiteng wrote:
    I'm doing a job for a client in InDesign CS5. I have not worked in CS5 before, so don't know if this is a bug or if I'm doing something wrong.
    It seems to happen randomly and I have checked the preferences and tried using different settings for the Display Performance. I've even tried viewing the job with Overprint Preview switched on.
    When placing images only a part of the image shows. When I output to PDF or Print the file then the entire image shows. This makes it very hard to do layouts, especially in cases where I need to crop an image.
    In InDesign it looks like this:
    When I output to PDF (this is a low res output, just to demonstrate my point) the entire image shows:
    In InDesign it looks like this:
    When I output to PDF:
    The machine I'm ding this job on is an iMac, 2.66GHz Intel Core 2 Duo with 4GB 800MHZ DDR2 SDRAM. It is running Mac OSX 10.6.4. And InDesign is on version 7.0.2.
    If I understand things correctly, you're placing client-supplied images into a new InDesign file that you're creating, so the only part of the workflow that you haven't created is the graphics. This logically leaves the container file innocent.
    The question becomes "what's up with either the hardware or the graphics?" If the problem persists with the same graphic files and a new container file on a different user account on the same computer, it's possible that hardware is the villain. If it doesn't persist on a different computer, it's likely the hardware. If it does persist on a different computer, in a new container file, it's likely something in the graphics files.
    It's not clear if the graphics card in your iMac is one of the models whose video RAM is "dedicated," that is, it doesn't share video RAM with the main RAM, or if it does share VRAM. If it shares RAM, it's possible that 4GB isn't sufficient to display all the open applications and their demands. If this is the cause, it's a hardware issue (insufficient RAM.)
    Because the graphics print and convert to PDF without the problem, it would seem that the graphics are innocent, but perhaps something in the processing of these outputs causes the problem to disappear. For example, perhaps there's some flattening involved. Perhaps there's a clipping path or channel mask of some kind involved that affects the InDesign display? (Just fishing.)
    Have you tried opening the graphics in their creating application and saving them to new names? Any difference in the behavior when those graphics are freshly-placed in InDesign, or when their links are updated?
    Have you tried placing PDFs of the graphics? If they appear properly, can you crop them to achieve your requirements and hope the problem goes away after the deadline passes<G>?
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • Oddities when serving images via NES from a servlet that is part of a WAR

    Just wanted to confirm that the following behavior is normal:
              Environment:
              NT 4.0 SP5
              NES 3.6 SP3
              WLS 5.1 SP3
              jdk 1.2.2
              Goal: When constructing a page that has images embedded in it from my
              servlet, I would like NES to serve the images.
              I've found out that I've to refer to my images with an absolute URL that
              maps to the images directory under Netscape's document root. If I refer to
              my image with a relative URL (request.getContextPath() +
              "/images/cookie.jpg"), then WebLogic tries to retrieve the image from the
              WAR. What is interesting is if I use relative references to images within my
              servlet (minus the WAR, i.e. with the servlet registered in
              weblogic.properties), I see that the image is being served by Netscape.
              Why does the WAR require absolute references to images and the previous
              mechanism does not? Is this behavior consistent with the spec? How are you
              guys handling this (are you using absolute references to static content when
              using WAR?)?
              I'm really baffled by this and wanted to see how others view this. Any
              comments/feedback will be much appreciated.
              Thanks,
              Sanjiv
              

    Hi Cameron,
              You are right but see my "Goal" below. I want to serve my images from my web
              server and NOT by WebLogic. Anyway, I spent too much time on this and found
              out that I was getting inconsistent results during testing different
              approaches because I was not restarting my web server. Once I became
              consistent in restarting my web server and closing all browser windows
              before each test, I got consistent results. So, here's what works for me:
              If I want to have my JSPs/servlets running in WLS to serve images that are
              included in their output from my web server, then I've to use absolute URLs.
              An example would be:
              img src="/images/a.gif"
              On the other hand if I use relative paths like img src="images/a.gif", then
              the browser request for the image is sent to WebLogic, which then looks for
              the image in the WAR (as it should).
              All of this might be common knowledge to most folks but not me.
              Thanks,
              Sanjiv
              Cameron Purdy <[email protected]> wrote in message
              news:[email protected]...
              > The WAR does not require absolute paths. Your JSP must be served from a
              URL
              > that, when combined with a relative path, actually specifies an image in
              the
              > WAR.
              >
              > Cameron Purdy, LiveWater
              >
              > "Sanjiv Gulati" <[email protected]> wrote in message
              > news:[email protected]...
              > > Just wanted to confirm that the following behavior is normal:
              > >
              > > Environment:
              > > NT 4.0 SP5
              > > NES 3.6 SP3
              > > WLS 5.1 SP3
              > > jdk 1.2.2
              > >
              > > Goal: When constructing a page that has images embedded in it from my
              > > servlet, I would like NES to serve the images.
              > >
              > > I've found out that I've to refer to my images with an absolute URL that
              > > maps to the images directory under Netscape's document root. If I refer
              to
              > > my image with a relative URL (request.getContextPath() +
              > > "/images/cookie.jpg"), then WebLogic tries to retrieve the image from
              the
              > > WAR. What is interesting is if I use relative references to images
              within
              > my
              > > servlet (minus the WAR, i.e. with the servlet registered in
              > > weblogic.properties), I see that the image is being served by Netscape.
              > >
              > > Why does the WAR require absolute references to images and the previous
              > > mechanism does not? Is this behavior consistent with the spec? How are
              you
              > > guys handling this (are you using absolute references to static content
              > when
              > > using WAR?)?
              > >
              > > I'm really baffled by this and wanted to see how others view this. Any
              > > comments/feedback will be much appreciated.
              > >
              > > Thanks,
              > > Sanjiv
              > >
              > >
              >
              >
              

  • How to upload an image from servlet/jsp into server from clients machine?

    can anybody send me the code to upload image from client to server using servlet/jsp.
    i'm using tomcat server.

    You can use the [Apache Commons FileUpload API|http://commons.apache.org/fileupload/] to upload files using Java.
    Here is a Filter example which uses the FileUpload API to process the request and stores the regular request parameters back in the ParameterMap of the request and puts the uploades files as attributes of the request: [http://balusc.blogspot.com/2007/11/multipartfilter.html] Just define it once in web.xml and you can continue writing the servlet logic as usual.

  • Animated Gif with large base image & small animated part.

    Hello guys
    I'm not really sure how to explain that, due to my limited English comprehansion. I will try with images.
    I can easily create animated gif out of multiple layers, given each layer is identical, with small changes accuring over time.
    But I yet to figure out an animated gif, that uses one large image for the base, and only small part of it is animated.
    I always get the animated part working, without the large base applying across all the frames. All it does, is flashes once
    the frame is reached and then moves on to being transparent, showing only the small animated part.
    For example, this is a GIF made with Galaxy S4, of my friend playing with his phone, imported into PS CS6. On the Galaxy,
    after I record the GIF, I can use my finder to touch, mask and freez parts I don't want to move, and leave only small, animated bit.
    When I import it to PS, it shows one layer with full image, and bunch of frames with the animation part only.
    http://i.imgur.com/UAiopQA.jpg
    http://i.imgur.com/7XOGGV6.jpg
    Problem is, once the image is open with PS, I'm not able to export it to keep it working in the same manner. Given the Samsung's
    gifs are 8 to 10mb, it's hard to edit it, to make it more size friendly.
    The gif clearly works the way I describe, so there is a setting or method I don't know about.
    If PS is not best tool for editing GIF, what other apps would you recommand I use for it?
    Thank you for the taking the time to read
    best regards
    Monica

    This has been an ongoing issue for me since I switched from Powerpoint to Keynote. Most of the animated gifs with transparent backgrounds that I used with Powerpoint are no longer transparent in Keynote. You may want to search for those earlier threads on this topic...
    To summarize: I've had to open up my animated gifs in After Effects and use the Color Key effect to restore transparency, with mixed success.
    Good luck!

  • How to put an image to any part of an e-mail using UTL_SMTP

    We need to send an e-mail with the following format.
    |COMPANY LOGO (JPEC IMAGE)          |
    |                                    |
    |                                    |
    |              HTML table            |
    |                                    |
    |                                    |
    ------------------------------------The exact format is shown here: http://postimage.org/image/76v4e5tmd/
    Above the Automatic Payment Advice is the JPEG image.
    How do we CONSTRUCT THIS e-mail? Our DB is a 10g R2. We use UTL_SMTP. Problem is how to insert an image to any part of the e-mail (not as a separate attachment)?
    Edited by: Channa on May 24, 2012 5:51 AM

    Yes. It is possible. Read this posts of Billy Verreynne to uderstand the MIME format.
    Re: Sending HTML mail with inline/embeded images (My code is constructed on this input)
    embeded image in email body in pl/sql
    DECLARE
      /*LOB operation related varriables */
      v_src_loc  BFILE := BFILENAME('TEMP', 'otn.jpg');
      l_buffer   RAW(54);
      l_amount   BINARY_INTEGER := 54;
      l_pos      INTEGER := 1;
      l_blob     BLOB := EMPTY_BLOB;
      l_blob_len INTEGER;
      v_amount   INTEGER;
      /*UTL_SMTP related varriavles. */
      v_connection_handle  UTL_SMTP.CONNECTION;
      v_from_email_address VARCHAR2(30) := '[email protected]';
      v_to_email_address   VARCHAR2(30) := '[email protected]';
      v_smtp_host          VARCHAR2(30) := 'x.xxx.xxx.xxx'; --My mail server, replace it with yours.
      v_subject            VARCHAR2(30) := 'Your Test Mail';
      l_message            VARCHAR2(32767) := '<html>
    <meta http-equiv=3DContent-Type content=3D"text/html; charset=3Dus-ascii">
    <body background=3D"cid:[email protected]">
    ..rest of mail
    </body>
    </html>
      /* This send_header procedure is written in the documentation */
      PROCEDURE send_header(pi_name IN VARCHAR2, pi_header IN VARCHAR2) AS
      BEGIN
        UTL_SMTP.WRITE_DATA(v_connection_handle,
                            pi_name || ': ' || pi_header || UTL_TCP.CRLF);
      END;
    BEGIN
      /*Preparing the LOB from file for attachment. */
      DBMS_LOB.OPEN(v_src_loc, DBMS_LOB.LOB_READONLY); --Read the file
      DBMS_LOB.CREATETEMPORARY(l_blob, TRUE); --Create temporary LOB to store the file.
      v_amount := DBMS_LOB.GETLENGTH(v_src_loc); --Amount to store.
      DBMS_LOB.LOADFROMFILE(l_blob, v_src_loc, v_amount); -- Loading from file into temporary LOB
      l_blob_len := DBMS_LOB.getlength(l_blob);
      /*UTL_SMTP related coding. */
      v_connection_handle := UTL_SMTP.OPEN_CONNECTION(host => v_smtp_host);
      UTL_SMTP.HELO(v_connection_handle, v_smtp_host);
      UTL_SMTP.MAIL(v_connection_handle, v_from_email_address);
      UTL_SMTP.RCPT(v_connection_handle, v_to_email_address);
      UTL_SMTP.OPEN_DATA(v_connection_handle);
      send_header('From', '"Sender" <' || v_from_email_address || '>');
      send_header('To', '"Recipient" <' || v_to_email_address || '>');
      send_header('Subject', v_subject);
      --MIME header.
      UTL_SMTP.WRITE_DATA(v_connection_handle,
                          'MIME-Version: 1.0' || UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle,
                          'Content-Type: multipart/related; ' || UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle,
                          ' boundary= "' || 'SAUBHIK.SECBOUND' || '"' ||
                          UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
      -- Mail Body
      UTL_SMTP.WRITE_DATA(v_connection_handle,
                          '--' || 'SAUBHIK.SECBOUND' || UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle,
                          'Content-Type: text/html;' || UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle,
                          ' charset=US-ASCII' || UTL_TCP.CRLF);
    UTL_SMTP.WRITE_DATA(v_connection_handle,
                          'Content-Transfer-Encoding: quoted-printable' || UTL_TCP.CRLF);                     
      UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle, l_message || UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
      -- Mail Attachment
      UTL_SMTP.WRITE_DATA(v_connection_handle,
                          '--' || 'SAUBHIK.SECBOUND' || UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle,
                          'Content-Disposition: inline; filename="otn.jpg"' || UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle,
                          'Content-Type: image/jpg; name="otn.jpg"' ||
                          UTL_TCP.CRLF);
    UTL_SMTP.WRITE_DATA(v_connection_handle,
                          'Content-ID: <[email protected]>; ' ||
                          UTL_TCP.CRLF);                     
      UTL_SMTP.WRITE_DATA(v_connection_handle,
                          'Content-Transfer-Encoding: base64' || UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
      /* Writing the BLOL in chunks */
      WHILE l_pos < l_blob_len LOOP
        DBMS_LOB.READ(l_blob, l_amount, l_pos, l_buffer);
        UTL_SMTP.write_raw_data(v_connection_handle,
                                UTL_ENCODE.BASE64_ENCODE(l_buffer));
        UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
        l_buffer := NULL;
        l_pos    := l_pos + l_amount;
      END LOOP;
      UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
      -- Close Email
      UTL_SMTP.WRITE_DATA(v_connection_handle,
                          '--' || 'SAUBHIK.SECBOUND' || '--' || UTL_TCP.CRLF);
      UTL_SMTP.WRITE_DATA(v_connection_handle,
                          UTL_TCP.CRLF || '.' || UTL_TCP.CRLF);
      UTL_SMTP.CLOSE_DATA(v_connection_handle);
      UTL_SMTP.QUIT(v_connection_handle);
      DBMS_LOB.FREETEMPORARY(l_blob);
      DBMS_LOB.FILECLOSE(v_src_loc);
    EXCEPTION
      WHEN OTHERS THEN
        UTL_SMTP.QUIT(v_connection_handle);
        DBMS_LOB.FREETEMPORARY(l_blob);
        DBMS_LOB.FILECLOSE(v_src_loc);
        RAISE;
    END;Otn logo is in my database server and It will embade otn logo all over the mail body!.
    Edited by: Saubhik on May 24, 2012 9:06 PM
    Changed the original IP and email address. I should have done this earlier!: Saubhik on May 25, 2012 11:20 AM

  • Can someone solve the mystery for me?  I have old Super 8 movies when I play them on a TV and put my Macbook in front of them and record them it picks them up good but only gets part of them?

    Why does iMovie camera only record part of a home movie? It records them well but but there are many parts missing?

    no mystery ....
    'moving images' are created by projecting frames so fast, the human eye gets tricked, not to notice a slide-show but … a movie.
    a TV, esp. the old tube ones, 'write' a frame onto the screen, line by line (a frame is made of pixels, in rows and lines - take a very, very close look of your screen)
    the picture on the TV is shown for about a 1/30th of a second, a camera is able to record, letssay for example sake, a 1/60th = only half frame is 'seen'/recorded.
    .... it's never a good idea to record projected movies, not from a projection, not from a screen - you should synchronize both devices - which is for normal people like us impossible.

  • ACR 4.3 - Heal/Spot Removal One Image Only

    I must be missing something obvious. If I want to remove sensor dust spots on one image only in ACR, what's the process? The RWCR Schewe book documents the process only for multiple images. I know I could just go into PS and do it, but since I am processing the image in ACR, I thought it might be more convenient just to stay in ACR. I can get the spots and the clones selected, but I cannot finish the deal for just one image.
    MacBook Pro - OS 10.4.11, ACR 4.3, PS CS3 - updated for Nikon D300 NEFs.

    Jeff: Thanks for your responses and efforts to assist. Yes, I know how to heal the sensor spots. Yes, I have read and reread Chapters 4 and 5. And yes, the DNG previews were updated too. When I reopen the NEFs in ACR 4.3.1 I no longer see the sensor spots.
    I think I have just come to the conclusion that I really do not understand fully what a DNG file is. When I save the NEFs with the sensor spots "healed" as a DNG file and then open that file in Apple Aperture (where I presently have many projects organized - but Aperture does not support D300 NEFs), the sensor spots are still there - in fact none of the image edits are there either. I was expecting the DNG file to behave as if the ACR image edits would change the DNG image. I had lost sight of the fact that the DNG file is still a RAW image file. The edits must be a separate part of the DNG file and Aperture cannot interpret the edits. I probably have this all wrong.
    You might ask why not use Bridge as my organizational software instead of Aperture. The answer is that I have had Aperture for a year and a half. I am now just learning Bridge (with the help of your book). So, I am not there YET. I will use Bridge. BUT, one step and a time. I need to learn how to process RAW files and make the images look better than Aperture can presently do. Their tools are not as powerful as ACRs. And Capture NX 1.31 which I got free with the D300 is a mess to use (NIkon users rave about NX, but I cannot see how it could be better to use than ACR). Thanks for all your help.

  • Ipad PDF app that will allow printing of only the part of the form that is filled in?

    I have a specific job I would like to do with an ipad... I need to be able to fill out a current PDF form and print out only the part that I typed.  It will be printed on a ready made, pre-printed form. Is there an app for this? I have tried PDFReader Pro, GoodReader, pdf-notes, Documents 2, FileApp, and Touch-Fill-Go.  I also looked into PDF Expert but their tech support said that it would also print the entire form. I also need it to clear the form and not save it as I need to use it over many times.  The "job" is a medical record form that has been created in adobe acrobat to be used with a computer.  Our records are still in paper form so the patient medical record sheet is preprinted with the client info.  So, if the dr (me) wants to use an ipad to type up the medical record we only want that typed portion showing when printed onto the patient current medical record sheet.  Basically this works great with a pc or mac but I would like to use an iPad. I hope I haven't been too confusing. Thank you.

    Since the documents are on the server and not your work computer it doesn't matter that your work computer is off.
    Usually computers on a work network are firewalled from the internet. Without knowing the details of your network it is impossible to know wether it is possible. Perhaps you should speak to the IT person at your work.
    If it is possible you will probably need an app that can access the documents on the server using a compatible protocol. I am not aware of an app that handles standard Windows file sharing. Goodreader can do ftp and webDAV. You may require something like webDAV enabled on the server.

  • To move an image behind a part of our "first picture", as if two layers are overlapped !

    Hello,
    I'm french, and I already posted a question a few times ago, on this forum and I was very satisfied with your quick answers, so I come ask again a little question...
    It's about Photoshop CS6 and I would like to know if it's possible to move an image behind a part of our "first picture", as if two layers are overlapped (the first picture and the picture that I add !) and one layer was partially hidden by the first !
    It's quite complicated to understand and explain... I know ... and I'm very sorry ...
    Example: If I want to move a book behind furniture (which is located in the center of my "background" or "first picture", surrounded by a nonuniform setting !), so to see only part of the book and the other part is hidden by the furniture ! Like the picture below (where we see that the "Coraya" is behind the desk !!) :
    I thank you in advance for all your quick responses and I congratulate you in advance to your understanding and your professionalism about Photoshop !
    Makarsh

    Makarsh,
    One easy way to accomplish that look is to add a Layer Mask to the "book" Layer, in the shape of the furniture, that you wish to hide part of the book behind.
    That would probably be easier by creating a Selection for that part of the furniture, with the Selection Tool of your choice. I personally like to do such work with the Pen Tool (creates a Path), as it is very exact. However, if one is not comfortable with the Pen Tool and Paths, then the Lasso (perhaps constraining it for straight lines) might be easier. If you do use the Pen Tool, when complete, go to the Paths Panel, and from the little arrow in the top-right, choose Make Selection.
    Then, with that Selection still active, go to the book Layer, and click on the Create Layer Mask icon, at the bottom of the Layers Panel.
    If necessary, you can do touchup to that Layer Mask, after it has been created.
    Good luck, and hope that helps.
    Hunt

  • System Refresh Only Java part

    Hi Dear Gurus,
    I have been given a task to do a system refresh for only java part for BI ( ABAP is already done).
    please tell me what are all the precautions that to be taken while doing the java part.
    we are running on windows and Mysql.
    Please specify the steps that to be performed before doing the java part in the source system and target system.
    Many thanks for your time guys.
    Kind Regards,
    Vamsi.
    Edited by: vamsi koganti on Jan 23, 2008 1:11 PM

    Hi Dear Rajesh
    Many thanks for your reply and your time.
    Few more questions
    *deleting the contents of the global directory (pleasetell me where it is located)
    where to give the CONTROL.SQL file?
    and one more problem
    I am getting the fallowing error when i start sapinst.exe
    starting gui server process:
      sapinstport: 21200
      guiport    : 21212
      guistart   : true
      command    : "C:\j2sdk1.4.2_12/bin\javaw.exe" -cp "C:/WINDOWS/TEMP/sapinst_exe.8596.1201160177\jar\instgui.jar;C:/WINDOWS/TEMP/sapinst_exe.8596.1201160177\jar\inqmyxml.jar" -Xmx256M -Dsun.java2d.noddraw=true SDTServer config=jar:sdtserver.xml guiport=21212 sapinsthost=localhost sapinstport=21200 guistart=true
    guiengine: call to bind() for socket 21200 1800 failed . No error
    103 guiengine.connection.failed 21200, 943
    Exit status of child: 1
    I look in some previous post they ask the person to check the port is being used or not? how to check the port is being used or not? and how to assign this to  that port **************
    Please help me rajesh.
    Once again many thanks for your time.
    kind Regards,
    vamsi.
    Edited by: vamsi koganti on Jan 24, 2008 8:49 AM

  • Update Record Server Behavior blows error (its part of CS5.5 standard installation!)

    One wouldn't expect the code supplied by a MAJOR CORPORATION and WEB DEVELOPMENT TECHNOLOGY LEADER to blow an error on one of the server behaviors it supplies as part of its standard install. But then again, there is reality.  The UpdateRecord.js, to be found in your installation on Windows 7 at ..ProgramFiles(x86(/Adobe Dreamweaver CS5.5/configuration/ServerBehaviors/Php_MySQL/UpdateRecord.js  causes an error when it is selected from the SERVER BEHAVIORS menu.  This happens BEFORE you I enter anything into the fields.  The error states:  "While executing onLoad in  UpdateRecord.htm, the following JavaScript error(s) occured: At line 687 of file "........UpdateRecord.js":  name has no properties.  I've looked at the code and it is beyond my comprehension.  Something about the NAME of a value in the node list.... I just don't have the chops to go rewriting Adobe's code.  If I did, I'd be making the big bucks.  Does anybody know what to do about this? About my system:  Windows 7, 64bit,   CS5.5 (on a lease so it is up to date) using PHP and MySQL, on a remote dedicated server running Apache on Linux.   :<)McFrisco

    Ok, I deserved that spanking.  I was just frustrated.  Sorry for the rant. 
    I've managed to figure out a workaround on this.  There really is something wacky going on with Dreamweaver and the Update Record handler.  Here's what I did:   
    How to trick DREAMWEAVER into writing an UPDATE RECORD. 
    Dreamweaver's server behavior for Update Record doesn't work correctly sometimes.  The symptom of this is that when you try to fill in the popup form provided by the Server Behaviors/Update Record menu item, it doesn't allow you to choose form fields to update to the database if they are posted there by a previous page.  It only allows you to choose them if they are bound to the database.  This doesn't do any good, because you are updating a record with the information from the database you want to update, NOT with new information.  Kind of weird... But here's the way to get around it.  Its a bit tedious but it works.   
    1.  On a clean php page, set up a form with the input fields matching the database fields you want to update.  This page is to be used as the RESULT page of a form submitted on a previous page where the UPdate Record won't work due to conflicts, plugins, or some other unknown reason.   
    2.  Connect to the database table you want to update,  and set up a new RECORDSET on the page. 
    3.  Bind all the form fields to the appropriate database fields. 
    4.  Do an Update Record behavior based on this form.  This will actually do nothing but update the record with the stuff that is already in the record, as noted above.   
    5. Delete the php code that sets up the record set.  But, LEAVE THE Update Record code alone!  It is correct.   
    6.  Change the bindings of all the fields in the FORM to the $_POST[] variables passed from the form on the previous page. (Make sure the previous page form uses the POST, not the GET method.)
    Now, when you submit the form it will pick up the values in the form, which have been passed from the previous page's form.

  • Using sjsws to host many small servlet/jsp sites on one server

    Hello. I visited the web page at http://www.sun.com/software/products/web_srvr/features.xml, which mentions that sjsws supports mass hosting of thousands of domains. Anyone knows more information about this feature? I want to find out whether sjsws is a good choice for hosting many small servlet/jsp sites on one server.
    Some time ago, I tried using apache+tomcat to host many small servlet/jsp sites on one server. But the result was not satisfactory. If a private tomcat/jvm is used for each site, too many resources are consumed and as a result, not many sites can be hosted on one server. If a shared tomcat/jvm is used for all sites, the resources consumed are reduced, but it becomes very difficult to isolate the sites. Is it possible to overcome such problems with sjsws?
    Thx.

    Of course you dont have to use multiple VMs to host multiple applications.
    You can either choose to have multiple Virtual Servers, all in one instance of the web server, serving multiple applications. In this case only one java VM is used.
    Or you can go in the route posted in the link above, in which there is only one "physical" virtual server, with many dynamic virtual servers.
    Whether you chose to have many multiple web applications, or do the server division in a similar way to what is described in the blog, it is up to you.
    Many different web applications will give you more fine level control on the application separation, but it will probably also mean greater resource consumption associated to the web application managing.
    Less web applications, but with dynamic separation, in a similar way to what is described in the blog, will give a lesser control on the applications, but will save you a good number of resources.
    SJS Web Server is known to work in massive web sites, with very high number of JSPs and Servlets. There is some real life examples of this massive hosting. Maybe others can provide some numbers here :P

  • How can I delete only one part of my xml file?

    Hello,
    I stored more than 100 users in only one xmltype column. For instance
    Create table agro(users XMLTYPE);
    ... and I inserted all users inside
    INSERT INTO agro values(XMLTYPE
    ('<?xml version="1.0" encoding="ISO-8859-1"?>
    <authentication><users><user>
    <name>cocoon</name>
    <password>cocoon</password>
    <role>admin</role>
    <title>Mr.</title>
    <firstname>Walter</firstname>
    <lastname>Cocoon</lastname>
    <company />
    <street />
    <zipcode />
    <city />
    <country>DE</country>
    <phone />
    <fax />
    <email />
    <bankid />
    <bankname />
    <accountid />
    </user>
    ... another user, etc.
    </users></authentication>'));
    Now I tried to delete only one part of this file. For example all persons with the name"cocoon".
    I used for this target the following statement:
    DELETE FROM agro agro
    WHERE agro.users.extract('authentication/users/user/text()').getStringVal()= 'cocoon';
    When I execute this statement, Oracle DB delete all users and not only with the name "Cocoon".
    How can I delete only one part of my xml file?
    Kind Regards
    M R

    This the expected behavoir. You uploaded a document containing multiple users and then asked XML DB to delete any documnet that contained a user with the name in question. The problem here is that you are creating a mega document that contains an aggregation of user documents but then trying to work with individual user documents. This is a bad idea.
    In general XML does not understand the concept of a collection of documents. It can only operate on one document at a time. Hence the tendancy to aggregate individual documents into a single larger document. Once you have an XML database, you can perform operations on collections of document, as easily as you can perform operations on individual documents, so the need to aggregate the individual documents together disappears.
    If you store each user document as a seperate document then your delete will work as expected.

Maybe you are looking for

  • Can i have two accounts on one ipad

    Can I reset my 7 day old ipad mini back to as new so I can start again at the beginning? I am new to Apple and utterly confused. Please help!.

  • How can I call a static function in another static function?

    /** = d, as a String, using exactly 5 characters. Precondition: 0 <= d <= 999. The truncated d will have one of the forms: ddd.d, dd.dd, and d.ddd. Examples are: 360.1, 29.50, 4.003, 0.001, and 0.000 public static String truncateTo5(double d) { // To

  • Thumbnails showing Can't view photos in Preview

    Yesterday, when I turned on my MacPro with 10.6.8, I noticed many issues with the os. 1. Thubmnails showing in Preview, but cant view picture 2. iPhoto same issue 3. Safari Crashes when launches. Got it to launch after reinstalling Safari, but will s

  • Changing to IMAP without wiping my Inbox

    I want to change my email to IMAP as marking as read/deleting my emails twice, from my computer and my iPhone is becoming rather annoying. However I tried to do this once before and it deleted all my old emails. I find myself searching through old em

  • Windows 8.1 on Envy 17 upgraded to pro.. refresh / reset no longer works

    hi peeps i was testing out the refresh and reset options when i first got the laptop they worked like normal.. then i upgraded to pro via control panel/add features to windows the refresh and reset options no longer work.. how can i edit those functi