Is this the best way to redirect using servlet?

I making a servlet application where the user sends some FORM value to a servlet. I want the servlet to redirect to the answer page after processing the page. Do you think the following code is the correct way of doing?
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
        response.setContentType("text/html;charset=UTF-8");
        PrintWriter out = response.getWriter();
        String dnaText = request.getParameter("dnaText");
        /*Getting the tranlated output from dnaToRna method*/
        String finalVal = null;
        String link="http://www.mail.yahoo.com";
        try{
             finalVal = String.valueOf(dnaToRna(dnaText));
             response.sendRedirect(link);
            }catch(Exception ex){}
    }

Many thanks for replying.
My output file have lots of html code and I dont want to make my servlet heavy with unnecessary code. So I have decided to use another page result.jsp as output file. In result.jsp I intend to call these objects which is storing the value here to display the result.
As I am new to jsp. I am still in the processing of thinking the best way to handle errors. I have created a method which takes in int values and returns corresponding String values. Like this
public class DnaToRna extends HttpServlet {
   String error=" * NULL *";
private String printError(int i) {
        if(i==1){
            error = "There is an error in String to char array";
        }else if (i==2){
            error = "There is an error in your DNA sequence";
        return error;
    }Since error is declared as a class object, if there is no error then I think it should rerun the String NULL. Which can be used to tell people if there is no error. On the contrary if there is really an error, I can use this to tell what is exactly causing the error.
Although I am new to web programing. I think this would be nice.
Here is the other method
public String dnaToRna (String dnaText) throws Exception{
            /*Trim()*/
            dnaText = dnaText.trim();
            /*Codes for Dna to Rna translation*/
            if(Pattern.matches(".*[^atgc]+.*",dnaText))
            return printError(2);
            return dnaText.replaceAll("t","u");
            }

Similar Messages

  • Cfqueryparam numeric help - is this the best way

    I have an update in one of my programs and I'm using the
    cfqueryparam. It works fine if the value is not entered since the
    type is cf_sql_varchar. If the value is cf_sql_integer/cf_sql_float
    and the field is required, it again works fine. Now if the field is
    cf_sql_integer and not required, it will throw an error if no value
    is passed to it. I tried using the NULL parameter, but that will
    put NULL in the field every time. I finally ended up using a cfif
    statement to check. Is this the best way? Am I missing something?
    How do others handle this?

    Your's is as good a way as any. But since you asked, my
    approach is usually like this:
    Step 1, build a string variable called sql. Perform all your
    if/else and other logic at this step.
    Step 2
    <cfquery>
    #PreserveSingleQuotes(sql)#
    </cfquery>
    My method makes it almost impossible to use cfqueryparam
    because of all the quotes. However, I find it easier to develop,
    read, and maintain code when you have as much if/else, loop, etc
    processing in the same block of code.
    You might be able to do both. Something like
    Step 1 - use if/else logic to set a variable (call it null)
    to either yes or no.
    Step 2
    cfqueryparam null="#null#">
    I've never actually tried. Most of my work is with a db that
    does not support cfqueryparam so using it is not a high priority
    item for me.

  • What is the best way of insertion using structured or binary type in oracle

    what is the best way of insertion using structured or binary type in oracle xml db 11g database

    SQL*Loader.

  • BC4J datatags: is this the best way to do this?

    In my BC4J JSP application, in the DataTableComponent.jsp, I want to check
    if a property exists on the view object. This is the best way I could come
    up with:
    String PropertyValue =
    (String)dsBrowse.getApplicationModule()
    .findViewObject(dsBrowse.getViewObjectName())
    .getProperty("PropertyName");
    Is this the proper way to get at a view property? Seems like it should be more straightforward.
    Also, does an instance of the ViewImpl class get automatically created when the DataSource tag is used or do you have to specifically instantiate it if you want to use a client method on the view?
    Thanks,
    Steve

    You can do:
       String propVal = dsBrowse.getRowSet().getViewObject().getProperty("PropName");You do not have to instantiate any classes on your own to accomplish this.

  • Needs suggestion the best way database insertion using OSB

    Hi all, again and again I need your suggestion. Which is the best way for writing data to database using OSB in few tables as fastest as possible (speed consideration)?, should I make lots DB schema for supporting JCA adapter and transform each message and writing to database? OR should I call java callout then using EJB for writing to database?.

    Hi,
    We had the similar scenario in our project and this is my take on this.
    Its better to use a JCA DBAdapter to execute/invoke a stored procedure and then have the PL/SQL script for insertion into the Stored Procedure.
    As the OSB DBAdapter configuration is very tightly coupled to the DB structure any changes to the column types of the table will mean a regeneration of the adapter WSDL.
    In general even for other DB operations like select, delete, update... its is a good idea to use the stored procedure in conjunction with the DBAdapter to decouple the link to DB to some extent.
    Thanks,
    Patrick

  • Is This The Best Way To Put iMovie Effects On An FCE Clip?

    I have often suggested to other people that they should export clips from FCE to iMovie in order to make use of certain iMovie effects that FCE can't do.
    As with most things there are several different ways of "transporting" the clips.
    Bearing in mind that we want the quickest/lossless method possible, is this the best?
    1. In the FCE Timeline double-click the clip.
    2. Select File>Export>QuickTime Movie and click "Save".
    3.Open a new iMovie Project, import the newly made QuickTime Movie clip and add the necessary effect.
    4. Back in FCE, Import the QuickTime Movie from the iMovie Project.
    Is this in fact the best way or do you know of a better/quicker one?
    Ian.

    Thanks for the confirmation, Tom.
    By "clip" I was actually meaning a few seconds of video I had chopped up on the timeline.
    What caught me out initially was when I simply highlighted the 10 second "clip" and selected QuickTime Movie.
    The estimated time for conversion was around 10 minutes! It was actually making a QT Movie of the complete Sequence, not just the selected "clip". I soon realised that the "clip" needed double-clicking to ensure that only the required 10 seconds were converted.
    Ian.

  • Is this the best way to measure the speed of an input stream?

    Hi guys,
    I have written the following method to read the source of a web page. I have added the functionality to calculate the speed.
    public StringBuffer read(String url)
            int lc = 0;
            long lastSpeed = System.currentTimeMillis();
            //string buffer for reading in the characters
            StringBuffer buffer = new StringBuffer();
            try
                //try to set URL
                URL URL = new URL(url);
                //create input streams
                InputStream content = (InputStream) URL.getContent();
                BufferedReader in = new BufferedReader(new InputStreamReader(content));
                //in line
                String line;
                //while still reading in
                while ((line = in.readLine()) != null)
                    lc++;
                    if ((lc % _Sample_Rate) == 0)
                        this.setSpeed(System.currentTimeMillis() - lastSpeed);
                        lastSpeed = System.currentTimeMillis();
                    //add character to string buffer
                    buffer.append(line);
            //catch errors
            catch (MalformedURLException e)
                System.out.println("Invalid URL - " + e);
            catch (IOException e)
                System.out.println("Invalid URL - " + e);
            //return source
            return buffer;
        }Is it faster to read bytes rather than characters?
    This method is a very important part of my project and must be as quick as possible.
    Any ideas on how I can make it quicker? Is my approach to calculating the speed the best way to it?
    Any help/suggestions would be great.
    thanks
    alex

    sigh
    reading bytes might be slightly faster than reading chars, since you don't have to do the conversion and you don't have to make String objects. Certainly, you don't want to use readLine. If you're using a reader, use read(buf, length, offset)
    My suggestion:
    Get your inputstream, put a bufferedInputStream over it, and use tje loadAll method from my IOUtils class.
    IOUtils is given freely, but please do not change its package or submit this as your own work.
    ====
    package tjacobs;
    import java.awt.Component;
    import java.io.*;
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.List;
    import java.util.regex.Matcher;
    import java.util.regex.Pattern;
    import javax.swing.JOptionPane;
    public class IOUtils {
         public static final int DEFAULT_BUFFER_SIZE = (int) Math.pow(2, 20); //1 MByte
         public static final int DEFAULT_WAIT_TIME = 30 * 1000; // 30 Seconds
         public static final int NO_TIMEOUT = -1;
         public static final boolean ALWAYS_BACKUP = false;
         public static String loadTextFile(File f) throws IOException {
              BufferedReader br = new BufferedReader(new FileReader(f));
              char data[] = new char[(int)f.length()];
              int got = 0;
              do {
                   got += br.read(data, got, data.length - got);
              while (got < data.length);
              return new String(data);
         public static class TIMEOUT implements Runnable {
              private long mWaitTime;
              private boolean mRunning = true;
              private Thread mMyThread;
              public TIMEOUT() {
                   this(DEFAULT_WAIT_TIME);
              public TIMEOUT(int timeToWait) {
                   mWaitTime = timeToWait;
              public void stop() {
                   mRunning = false;
                   mMyThread.interrupt();
              public void run () {
                   mMyThread = Thread.currentThread();
                   while (true) {
                        try {
                             Thread.sleep(mWaitTime);
                        catch (InterruptedException ex) {
                             if (!mRunning) {
                                  return;
         public static InfoFetcher loadData(InputStream in) {
              byte buf[] = new byte[DEFAULT_BUFFER_SIZE]; // 1 MByte
              return loadData(in, buf);
         public static InfoFetcher loadData(InputStream in, byte buf[]) {
              return loadData(in, buf, DEFAULT_WAIT_TIME);
         public static InfoFetcher loadData(InputStream in, byte buf[], int waitTime) {
              return new InfoFetcher(in, buf, waitTime);
         public static String loadAllString(InputStream in) {
              InfoFetcher fetcher = loadData(in);
              fetcher.run();
              return new String(fetcher.buf, 0, fetcher.got);
         public static byte[] loadAll(InputStream in) {
              InfoFetcher fetcher = loadData(in);
              fetcher.run();
              byte bytes[] = new byte[fetcher.got];
              for (int i = 0; i < fetcher.got; i++) {
                   bytes[i] = fetcher.buf;
              return bytes;
         public static class PartialReadException extends RuntimeException {
              public PartialReadException(int got, int total) {
                   super("Got " + got + " of " + total + " bytes");
         public static class InfoFetcher implements Runnable {
              public byte[] buf;
              public InputStream in;
              public int waitTime;
              private ArrayList mListeners;
              public int got = 0;
              protected boolean mClearBufferFlag = false;
              public InfoFetcher(InputStream in, byte[] buf, int waitTime) {
                   this.buf = buf;
                   this.in = in;
                   this.waitTime = waitTime;
              public void addInputStreamListener(InputStreamListener fll) {
                   if (mListeners == null) {
                        mListeners = new ArrayList(2);
                   if (!mListeners.contains(fll)) {
                        mListeners.add(fll);
              public void removeInputStreamListener(InputStreamListener fll) {
                   if (mListeners == null) {
                        return;
                   mListeners.remove(fll);
              public byte[] readCompletely() {
                   run();
                   return buf;
              public int got() {
                   return got;
              public void run() {
                   if (waitTime > 0) {
                        TIMEOUT to = new TIMEOUT(waitTime);
                        Thread t = new Thread(to);
                        t.start();
                   int b;
                   try {
                        while ((b = in.read()) != -1) {
                             if (got + 1 > buf.length) {
                                  buf = expandBuf(buf);
                             buf[got++] = (byte) b;
                             int available = in.available();
                             if (got + available > buf.length) {
                                  buf = expandBuf(buf);
                             got += in.read(buf, got, available);
                             signalListeners(false);
                             if (mClearBufferFlag) {
                                  mClearBufferFlag = false;
                                  got = 0;
                   } catch (IOException iox) {
                        throw new PartialReadException(got, buf.length);
                   } finally {
                        buf = trimBuf(buf, got);
                        signalListeners(true);
              private void setClearBufferFlag(boolean status) {
                   mClearBufferFlag = status;
              public void clearBuffer() {
                   setClearBufferFlag(true);
              private void signalListeners(boolean over) {
                   if (mListeners != null) {
                        Iterator i = mListeners.iterator();
                        InputStreamEvent ev = new InputStreamEvent(got, buf);
                        //System.out.println("got: " + got + " buf = " + new String(buf, 0, 20));
                        while (i.hasNext()) {
                             InputStreamListener fll = (InputStreamListener) i.next();
                             if (over) {
                                  fll.gotAll(ev);
                             } else {
                                  fll.gotMore(ev);
         public static interface InputStreamListener {
              public void gotMore(InputStreamEvent ev);
              public void gotAll(InputStreamEvent ev);
         public static class InputStreamEvent {
              public int totalBytesRetrieved;
              public byte buffer[];
              public InputStreamEvent (int bytes, byte buf[]) {
                   totalBytesRetrieved = bytes;
                   buffer = buf;
              public int getBytesRetrieved() {
                   return totalBytesRetrieved;
              public byte[] getBytes() {
                   return buffer;
         public static void copyBufs(byte src[], byte target[]) {
              int length = Math.min(src.length, target.length);
              for (int i = 0; i < length; i++) {
                   target[i] = src[i];
         public static byte[] expandBuf(byte array[]) {
              int length = array.length;
              byte newbuf[] = new byte[length *2];
              copyBufs(array, newbuf);
              return newbuf;
         public static byte[] trimBuf(byte[] array, int size) {
              byte[] newbuf = new byte[size];
              for (int i = 0; i < size; i++) {
                   newbuf[i] = array[i];
              return newbuf;

  • What is the best way to sharpen using both Lightroom_4 and Photoshop CS6?

    I want to learn the best way to sharpen various subjects.  I have Martin Evening's latest Lightroom 4 and Photoshop CS6 books, but no mention of which methods are better,  or better for which subjects/conditions.  It seems that Camera Raw and Lightroom are the same, so I'm tempted to just do it all in Lightroom with the Develop module Detail panel, and the adjustment brush for local sharpening. But can I be doing more with Photoshop CS6, or Lightroom and Photoshop together?

    Lightroom and Photoshop have different capabilities.  Photoshop power lies in layers so sharpening in Photoshop is best done using a sharpening layer which can be blended and masked into layers below.  Lightroom is more a image developer then and editor and does not have layer support.  Both Lightroom and Photoshop use Adobe RAW conversion engine to develop images.  Adobe RAW Conversion Engine has very good sharpening and noise reduction capabilities. Sharpening and Noise reduction is more or less a balancing act to much sharpening enhances noise to much noise reducing loose details and add softness.  Though both Photoshop and Lightroom use the same Adobe RAW conversion engine they use different user interfaces when they use Adobe RAW conversion engine.  Lightroom also lacks Layer support.

  • Adding buttons to multiple frames -- is this the best way to do this?

    In CS5, I want to create a series of buttons that when clicked will linked to other frames in the same timeline. So one button will link to frame 5, one will link to frame 10, one will link to 15, etc. All the buttons will appear across the top of the stage on a layer, and I want them to appear on all of the frames so the user can click back-and-forth to the different frames/screens.
    1. Is the best way to do this to just add the buttons to frame 1 and add a keyframe to the last frame in the timeline, frame 15, so they are copied to all the frames in between?
    2. Are there any issues with doing it this way?
    Thanks!!!

    Just have the one keyframe in frame 1 and extend it to frame 15.  You do not need/want another keyframe at frame 15.

  • MouseOver is this the best way?

    I'm trying to create mouse over (tool tip) for everything in
    my simulated control panel my question is, is mouseOver event
    handler the best way to have the program display a small amout of
    text over the mouse pointer. seems to me this is done all the time
    and there should be a better way.
    thank you in advance for your help

    kglad i agree on the Array way i have many buttons, lights,
    vents,......... that i want tool tips for so i will do the Array.
    another dumb question what is bubbling i did not see a differance
    when i tried MOUSE or ROLL.
    i thought
    Knobtip.x = this.mouseX;
    Knobtip.y = this.mouseY;
    would make the tip follow the mouse pointer.
    thanks again guys i'm taking a 5 day class in 2 weeks so i
    will not (hopefully) ask so many stupid questions

  • Is this the best way to Triple Boot?

    Hi all, I have a had a pickle of a time setting up Leopard...with my triple boot setup.
    I am curious if I went about it "properly"or if there is a better way.
    Use instructions at your own peril if you wish. I am not responsible for errors or any problems you may have by using my instructions. This is my individual experience. *I am happy if this works for someone* struggling to set up a triple boot, but am posting this more so to see if there are any improvements to be made, or mistakes that need correcting to this method...
    I had an Intel MBP (SR) with 3 partitions. Tiger, Vista and Ubuntu but when trying to install Leopard it said it would not install and I would have to change my drive to guid partition scheme.
    So, through trial and error this is the only way I could get it to work.Keep in mind I started from scratch with vista and ubuntu, but did make a backup of my tiger drive.
    1. BACK UP
    2. Wipe everything and repartition internal disk to guid partition map and 1 partition. Install Leopard.
    3. Use either disk utility or carbon copy cloner(my purchased copy of SuperDuper is still not able to do what CCC, a free program can do,apparently because they are trying to figure out time machine and are holding up a leopard compat. version, uuughh, but thats a different post...) to clone Leopard to external drive that is set up as GUID partition scheme.Make sure you are able to boot this external.
    4. Wipe internal, repartition to 3 partitions using disk utility and MBR partition scheme in this order from top to bottom(in disk utility partition gui);
      a. Leopard partition: OSX extended journaled
      b. Vista partition: I think there is only one option: maybe Fat? Just make sure you select "windows" format (The vista installer will need to reformat this during install anyway)
      c. Ubuntu partition: "Free Space"
    5. Then to install leopard, (which apparently won't install on a drive set up as MBR partition scheme, but that is what we formatted the internal drive as anyway) clone the external copy of leopard to the internal OSX partition we just made.
    6. Then install vista by booting from install cd. During install you may have to reformat the Windows partition using the windows installer, but it should install fine after that.
    7. Then Install ubuntu using live cd/dvd to the internal free space partition, splitting/ formatting the last partition using the ubuntu install/partition tool on the "manual"partition mode(make sure you are using the correct free space partition. I confirmed this by looking at the sizes of the partitions that showed up): "free space" into root and swap partitions if you want. I used ext2 for root
         *Side note:*If you have the same MBP as me you may have to change some setting when booting the live cd: Once the cd loads and you get to the preliminary menu window, press F6 to edit. A command will show up on the screen: You have to erase the last two words starting at "quiet" till end. Then write "allgenericide" in their space, keeping all of the command before quiet.  then press enter. It should then load to the ubuntu desktop where you can click on the install icon.(this took me a long time to figure out. I have also have to do this everytime I want boot into ubuntu, which stinks. Anyone know how to resolve this? (Linux masters?)
    8. boot into osx and install rEFIt
    Issues:
    1. My Leopard partition is not showing up in OSX's startup disk pane in sys pref. but it is booting/ showing up as if it was, if having trouble, try holding option key during startup.
    2. I have also had a few issues with rEFIt not starting up as default menu, but when holding option key at startup it will show up. Then gives me the option of OSX, Vista or Ubuntu once selected.
    3. And the command thing with ubuntu at every startup I mentioned earlier.Is there a way to write allgenericide as a default or any other way to fix this?
    If anyone has a better way of accomplishing this please let me know. I got to this point through a lot of trial and error and I'm not sure if there is a more stable/better way for a triple boot setup...
    I would like for the Leopard partition to show up as the osx startup disk in the pref pane, but regardless it is still working.
    Correct me if I'm wrong, but it seems boot camp makes the drive into an MBR partition scheme anyway, so I'm curious what others who were already running dual or triple boot, boot camp systems had to do when upgrading their boot camp setups from tiger to leopard. Did it not allow you to install to the MBR partition scheme made by boot camp? Did you have to start from scratch as well?
    Thank you in advance for your patience and support.  

    http://wiki.onmac.net/index.php/TripleBoot_viaBootCampI would install Vista before installing Leopard.
    That has worked better for me anyway.
    And that may make Leopard the default.
    In Vista, AppleControl is under /Windows/SysWOW64 if you ever need to get to it (there is also AppleOSSMgr and AppleTimeSrvc )
    http://wiki.onmac.net/index.php/TripleBoot_viaBootCamp

  • What is the best way to call a servlet from another servlet?

    I have a project with 9 servlets (class project). The way I have been moving from servlet to servlet is like this
    doPost(...)
    {      response.setContentType(CONTENT_TYPE);
    PrintWriter out = response.getWriter();
    out.println("<html>");
    out.println("<head><title>Functions</title>");
    out.println(f"<form name=frm6 method=post action=/servlet2");
    out.println("<input type=submit name='btn' value='servlet2'>");
    out.println("</form>");
    So I have these 9 servlets - I call any 8 of them from the first servlet so I have 8 buttons on 8 forms <form=frm1, frm2, ...frm8 method = post...> But when I bring up the first servlet only 6 buttons show up. I was thinking about using hyperlinks instead, but I would like to do this with buttons. I wanted to do this with javascript and the location object, but I was advised to use jsp. I just want to move from one servlet to the next. Any suggestions appreciated for the best/preferred method for moving from one servlet to the next.
    Thanks

    I think you may need some clarification of terminology etc..
    First off, JSP isn't an alternative to javascript, it's an alternative to coding a servlet. A JSP is a mixture of java code and HTML and is translated into a servlet by the system. JSPs are primarilly for generating HTML pages with variable content. JSPs very frequently generate HTML which includes Javascript.
    You probably shouldn't think of what you're doing as one servlet invoking another, that does happen; a servlet can transfer an transaction to another servlet or JSP. In fact it's standard practice that a servlet does the logical stuff (like interpretting form data) then transfers to a JSP to generate the response page. However in this case it's the browser that can invoke one of the 8 servlets, the first servlet merely creates the page from which they are invoked.
    It's not obvious why only some of your buttons are showing up. In a case like this use the "view source" option on your browser to find out what HTML the servlet is actually delivering. What's wrong should be evident from that.
    You can put a hyperlink arround a button, or an image. Mostly people turn up their noses at the buttons supplied by HTML and use their own images for buttons. You
    can do somthing like this:
    <img src="/images/button3.png" border="0">
    (Of course this arrives as a GET transaction not a POST).
    Or you can do a bit of javascript like:
    <img src="/images/button3.png" style="Cursor: pointer;"
    onclick="document.locations.href='/servlet3';">

  • Is this the best way to use flash?

    Our new corporate video at [] 
    was built using flash.  Do you think the interactive piece of it works?  Interactive part starts about 1 minute in or click the "SKIP" button.
    Thanks in advance for your help and feedback!

    Flash can work quite well for presentations like this, but... I have no intention to offend with this... I didn't dare tread beyond the first step of the interactive part.
    The opening presentation has too much of a Sham-wow flavor to it--a carny sales pitch, and it makes me skeptical of what clicking anything might end up leading to.  I wouldn't create this style of presentation (the atmosphere, not the content) for a corporation, but that's just me, and I may not qualify as being young/savvy enough to know what a good corporate image is these days.

  • Just wondering how the best way to work using 2 computers and 2 people.

    If you have 2 computers, a main one doing creative changes and the other person on a second computer doing metadata and keywords, is it possible to keep them synced, so the keyword info etc is kept up to date on the main computer? Would it just be to export the new keywords for that catalogue each time?
    It is a big Library of 300,000 images that needs to be keyworded to find images easily. I am new to this but trying to help someone sort out their Library.
    Many thanks for your help.

    I don't know the answer. But here's what I do know:
    Brainstorming, not well-organized thoughts...:
    In general, you need to make sure the image developer is not working on the same images at the same time as the keyworder. Lightroom considers keywords and develop settings on a par (and will overwrite both or neither when syncing, importing, ...), so however you do it, unless you discover some clever workaround, the 2 people will need to coordinate which images are off-limits while the other is working on them. That said, here are some ideas:
    * Figure out a way to strip settings/metadata of one type before doing the sync (e.g. from the xmp).
    * Save develop settings (as snapshot), sync with keyworder's versions, restore develop settings (by re-selecting the snapshot). Unfortunately, this would need to be done on a per-image basis, since there is no way to apply a snapshot in any automated or bulk fashion.
    Note: this would be an easy plugin, but would have some (probably deal-breaking) limitations:
    1. Save develop settings in ram.
    2. Read xmp from keyworder (which will update keywords, but also overwrite develop settings).
    3. Restore develop settings from ram.
    The problem is that the SDK is missing a few develop settings, e.g. crop is missing, as is tone-curve enable/disable, and orientation. So, if developer had changed any of these things, they would not be restored after syncing keywords from xmp - not good, and one of the reasons I lobby with Adobe to make develop settings (available to plugins) complete.
    If plugins had access to snapshots for applying, that would also make a plugin solution a piece of cake.
    Another idea:
    - Export jpegs for keywording, with a special token in the filename, like "for-keywording" (I recommend PreviewExporter for fastest exporting).
    - Use John Beardy's Syncomatic to synchronize keywords from jpeg to original.
    Optional, instead of exporting, just make a physical copy using OS, and have keyworder import those and apply keywords. All else would be the same (syncomatic).
    (consider deleting exports/copies created just for keywording purpose, after syncing keywords...).
    This would also be a piece of cake for SQLiteroom, if you were willing to do some SQL+Lua programming:
    - Use SQL to query 2ndary catalog with keywords.
    - Use Lua to assign keywords to photos in master catalog.
    R

  • Is this the best way to write this in AS3

    I have converted my old AS2 to As3. It now appears to work the same as before but being new to AS3 I have a few questions.
    In this example I click on a button which takes me to a keyframe that plays a MC. There is another btn that takes me back to the original page.
    In AS2 it is written like this.
    // Go to keyFrame btn
    on (release) {
    //Movieclip GotoAndStop Behavior
    this.gotoAndStop("Jpn_Scul_mc");
    //End Behavior
    // Play Movie
    on (release) {
    //Movieclip GotoAndStop Behavior
    this.gotoAndStop("Jpn_Movie");
    //End Behavior
    //load Movie Behavior
    if(this.mcContentHolder == Number(this.mcContentHolder)){
    loadMovieNum("PL_Japan_Scul.swf",this.mcContentHolder);
    } else {
    this.mcContentHolder.loadMovie("PL_Japan_Scul.swf");
    //End Behavior
    // Return key
    on (release) {
    //Movieclip GotoAndStop Behavior
    this.gotoAndStop("Jpn_Intro");
    //End Behavior
    In AS3 it is written like this.
    // Play Movie
    var myrequest_Jpn:URLRequest=new URLRequest("PL_Japan_Scul.swf");
    var myloader_Jpn:Loader=new Loader();
    myloader_Jpn.load(myrequest_Jpn);
    function movieLoaded_Jpn(myevent_Jpn:Event):void {
    stage.addChild(myloader_Jpn);
    var mycontent:MovieClip=myevent_Jpn.target.content;
    mycontent.x=20;
    mycontent.y=20;
    //unload method - Return to keyframe
    function Rtn_Jpn_Intro_(e:Event):void {
    gotoAndStop("Japan_Intro");
    Rtn_Jpn_Intro_btn.addEventListener(MouseEvent.CLICK, removeMovie_Jpn);
    function removeMovie_Jpn(myevent_Jpn:MouseEvent):void {
    myloader_Jpn.unload();
    myloader_Jpn.contentLoaderInfo.addEventListener(Event.COMPLETE, movieLoaded_Jpn);
    Rtn_Jpn_Intro_btn.addEventListener("click",Rtn_Jpn_Intro_);
    // Go to keyFrame btn
    function Scul_Play(e:Event):void {
    gotoAndStop("Jpn_Scul_mc");
    Jpn_Scul_btn.addEventListener("click",Scul_Play);
    1. Is there a better, more efficient way to achieve this in AS3?
    2. I have used an //unload method in the AS3 script which does remove the MC from the scene but I notice in the output tab my variable code is still being counted for the last MC played.
    Is this normal?

    Hi Andrei, I have started a new project and taken your advice to construct it with a different architecture with all the code in one place.
    I have two questions regarding your last code update.
    var myrequest_Jpn:URLRequest;
    var myloader_Jpn:Loader;
    Rtn_Jpn_Intro_btn.addEventListener(MouseEvent.CLICK, removeMovie_Jpn);
    Jpn_Scul_btn.addEventListener(MouseEvent.CLICK, Scul_Play);
    function Scul_Play(e:MouseEvent):void {
         myrequest_Jpn = new URLRequest("PL_Japan_Scul.swf");
         myloader_Jpn = new Loader();
         myloader_Jpn.contentLoaderInfo.addEventListener(Event.COMPLETE, movieLoaded_Jpn);
         myloader_Jpn.load(myrequest_Jpn);
    function movieLoaded_Jpn(e:Event):void {
         // remove listener
         myevent_Jpn.target.removeEventListener(Event.COMPLETE, movieLoaded_Jpn);
         this.addChild(myloader_Jpn);
         myloader_Jpn.x = 20;
         myloader_Jpn.y = 20;
         // remove objects that are in "Japan_Intro" frame
    function removeMovie_Jpn(e:MouseEvent):void {
         // add back objects that are in "Japan_Intro" frame
         // remove from display list
         this.removeChild(myloader_Jpn);
         myloader_Jpn.unload();
         myloader_Jpn = null;
         // this moved from Rtn_Jpn_Intro_ function
         //gotoAndStop("Japan_Intro");
    Its all works great except for the line to remove event..
    1.
    myevent_Jpn.target.removeEventListener(Event.COMPLETE, movieLoaded_Jpn);
    I get an error:   1120: Access of undefined property myevent_Jpn.
    Removing this statement allows the code to work but that is not a solution.
    2.
    Rtn_Jpn_Intro_btn.addEventListener(MouseEvent.CLICK, removeMovie_Jpn);
    I would like this button to remove more than one movie. Is this possible.
    Thanks for the help todate.

Maybe you are looking for

  • How do I install Windows from USB?

    I have a 2011 MacBook Pro.  I replaced the optical drive with a second hard drive.  I have tried the following methods to install Windows. Installing from an external optical drive: I created a Windows 7 install disk.  The windows installer does not

  • Calling report with parameter screen from form using frmrwinteg

    Hi,      I am calling a report with a parameter screen from a form and am using the frmrwinteg bean. This works fine on our test application server but, when moved onto our production application server, the database logon screen is presented after p

  • Using Logitech QuickCam Pro for Notebooks with Mac..

    Can I install the Logitech QuickCam Pro for Notebooks(new version) on my G4 Powerbook(OSX 4.11) ? I have read several posts from Mac people saying that this is possible BUT is there a CD included with the installation AND does that CD only work for t

  • JDev EA1 Error with JAZN/Security Roles/Authentication

    I have a current JSF application created under JDev 10.1.3 Preview which runs fine, but under JDev EA1 it crashes. The application has a JAZN definition with a realm and user defined. The user is also tied to a security role. In the web.xml I have a

  • Collective Entry of Mesurement Documents - Change / Display Mode

    Hi All, Is there any T code or table view or program to view / display the Collective entry of measurement documents? We use T-code IK34 to make collective entries, but I am not able to find any T codes / menu path for viewing the same in change / di