Some questions about Java servlets

I am having some problems with my Java servlets. Here they are below.
#1 I have a login jsp page. When user logs in, the MySQL database is queried. If a match, redirect to appropriate page. The problem is I can't seem to remain in the login page if there is no match, I get a blank screen. If there is no match, how can I redirect it back to the login screen? For example, my login screen is login.jsp. Here is my code below.
while(rs.next())
if(rs != null)
String name = rs.getString("USERNAME");
Cookie getUser = new Cookie("User", name);
response.addCookie(getUser);
String sql2 = "INSERT INTO answers (USERNAME) VALUES( '" + name +"')";
ResultSet rs2 = stmt.executeQuery(sql2);
response.sendRedirect("profile410.jsp");
out.println("<p>inside if structure");
#2 After I go to the first screen after login, I am filling out a questionaire, and everytime I click on a submit button a different servlet comes into play, called InsertRecords.java. Everytime I go from one jsp to another, information gets stored into a database, InsertRecords.java is controlling this. I use the below code.
String delete = request.getParameter("delete");
String question = request.getParameter("question");
String value = request.getParameter("R");
if (delete.equals("no") && !value.equals(""))
String sql = "INSERT INTO answers (" + question + ") VALUES (" + value + ")";
int numRows = stmt.executeUpdate(sql);
out.println("Record has been inserted");
String nextPage = request.getParameter("nextPage");
Cookie[] cookies = request.getCookies();
if (cookies != null)
for (int i = 0; i < cookies.length; i++)
String name = cookies.getName();
String valuecook = cookies.getValue();
Cookie getUser = new Cookie(name, valuecook);
response.addCookie(getUser);
response.sendRedirect(nextPage);
the table is answer and the fields are ID, username, and q1, q2 q3, up to q11. the idea is upon login, the username gets stored into the answer table, the field username. I want the values stored in the same row everytime user jumps from one page to another based on his username. Goes to first jsp, q1 gets inserted, next jsp, q2 gets inserted, etc. But they all get inserted diagonally on different rows, not the same one, that is the problem. How can I fix this?
#2 Based on the above code, say there is 11 jsp pages, remember, this is an online questionaire. When user logs in, he starts at the first jsp page, or question. When for example when the browser gets cut off at question6, when he logs back in, I want him to start at question4, if cut of at question 11, start again upon login at question 8. The reason, so he won't have to start from the beginning. Each question is on seperate jsp's. The way I see this happening is creating a session upon login and keeping that session. And grab 4th question when he logs back in, but I am not sure about how to go about it.
Can someone help me please?

Q1:
Use the update command and not insert.
Q2:
Won't work. The user may log back in after the session has expired or from a different location. On log in look for a record for that user and what questions have been answered so far.

Similar Messages

  • Questions about Java Servlets and JSP

    Hi,
    I'm a confident Java Programmer (and really enjoy using this language) but am very new to Java servlets and Java Server Pages.
    I have previously worked with Perl on my web projects (simple 'league' style voting pages). I read in my 'Core Java' book that I should no longer use perl or even cgi.
    I need to know more about Java servlets and Java Server Pages so I can make the switch to a 'real' programming language.
    I have a few questions:
    How should I start to learn JS and JSP?
    How applicable will the java knowlegdge I have already be?
    Are JSP common on the world wide web?
    What tools do I need to start? (I currently develop in JBuilder and have Java 1.4.1 Standard Edition)
    Is it likey my web host (and others) will support JSP?
    Thank-you very much for helping a novice get started,
    Regards,
    Paul

    Hi, Steve ...has to be frustrating! But do not despair.
    Let's suppose the servlet it's named MyServlet on package org.servlets
    WEB-INF should look:
    WEB-INF
    classes
    org
    servlets
    MyServlet.class
    web.xml
    web.xml file should have this two declarations:
    <web-app>
      <servlet>
        <servlet-name>MyServlet</servlet-name>
        <servlet-class>org.servlets.MyServlet</servlet-class>
      </servlet>
      <!-- other servlets -->
      <servlet-mapping>
        <servlet-name>MyServlet</servlet-name>
        <url-pattern>/MyServlet</url-pattern>
      </servlet-mapping>
      <!-- other servlets mappings -->
    </web-app>Now, once the container starts (Tomcat?), you should be able to see that servlet in:
    http://localhost:8080/[my-context/]MyServletAnd what my-context is? The web application context. This string should be empty if your're deploying to the root context, otherwise should the context name. In Tomcat, deploying to root context defaults to using webapps/ROOT.
    Sorry for my English, but I felt the need to answer your request. I hope it helps despite my writing.

  • Some questions about Java deployment steps and techniques

    All my java experience is coding and testing in my local machine (where, of course, a jre is available), but ... when I deploy to other people, they may not have a jre or they may have a different version of it than the one needed to run my application. I've read different stuff online including jars and java web start but still I have many questions.
    (1) first one first, Sun contradicts common sense, when it says that i can redistribute my own customized light version of their jre by taking out some files (java.sun.com/j2se/1.5.0/jre/README). there are two ways for me to get a jre: Way one is by downloading one from Sun, the download comes as an *.exe file and I don't see how I can take files out of it, so do you know how?. Way two would be by simply copying the set of files i choose (according to that Readme) from my current jre installation (the one on my \java\jdk\jre directory), does this make sense?, (if you're under windows) doesn't an installed version of a jre need a couple of dlls plus some new registry entries?, this contradicts common sense, if I'm not wrong, that Readme is a nonsense, but since that readme is at each of us jre installation \java\jdk1.x\jre\Readme, it can't be a nonsense, therefore I'm wrong, therefore the answer is either Way 1 or Way 2, HOW? ... or maybe there's a Way 3?
    (2) Say I never read that Readme so I download the jre (as an exe) to bundle it along with my application in a jar ... now I'll give my neighbor either a jar with two exes or two exes jars ... is there a way to make a jar so that two files get executed? ... if the answer is No and I have competition from a second neighbor, then I believe I'm asking my first neighbor to choose my application based on our friendship, that's not reasonable if we are doing business, so Java loses.
    (3) Say that my application is a single executable file like this,
    class X{
    public static void main(String[]$$$){
    System.out.println("Console, where are you?");
    At this point, say that my neighbor accepted the two executables, he executed the jre.exe and has jre6 in his system, now he double clicks on my X.jar ... it's a console application and jar files are not associated with the java.exe launcher since java 5, but with javaw which doesn't open any console ... how do i make it so a console opens and prints "Console, where are you?" ... do I ask my neighbor-customer to add a couple of lines to his path and open his console and (please) enter java -jar jarfile.jar? ... isn't it too much? ... i hope i'm wrong cause this is kind of discouraging
    (4) I've read that by installing a more recent version of a jre on a system that has an older jre (there to help other applications work), I might be causing a problem for the other applications to run ... I guess that's the reason why that Readme kind of encourage to redistribute a "private" version of a jre (one that doesn't come with a java.exe launcher ... any feedback on this?
    (5) I'm reading a lot of hype about Java Web Start ... it looks better than the traditional jar/jre deployment ... but setting up a MIME type to *.jnlp, it doesn't come with some free hosting I've checked ... somebody can recommend a free hosting service that allows to set a *.jnlp MIME? (I'll appreciate a suggestion here, cause I would like to test Web Start)... and, anyhow, how you people compare it with the paradigm of the single executable file?.
    Thanks. Your feedback is highly appreciated.

    jorgelbanda wrote:
    ..(5) I'm reading a lot of hype about Java Web Start ... It's gratifying to think that someone who wants to deploy apps., has the common sense to search first! You would not guess how I often I hear "I wanna' make an EXE" shortly followed by "What's webstart?".
    ...it looks better than the traditional jar/jre deployment ... but setting up a MIME type to .jnlp, it doesn't come with some free hosting I've checked ... OK. You cannot define new mime types, but perhaps the site already has it defined. An easy way to check is to upload 'any old file' that ends in .jnlp and use the [mime type checker|http://pscode.org/mime/] to see what content type it is served as.
    ..somebody can recommend a free hosting service that allows to set a .jnlp MIME? (I'll appreciate a suggestion here, cause I would like to test Web Start)... I'm pretty sure the Google based sites offer it.
    Note that I edited the asterisks out of your post, to avoid the forum software parsing half the reply as bold.

  • Some questions about Java card.

    Hello, everyone. I am a rookie in Java card. My major focuses in IC design so I have some questions to ask.
    1) As I understand, Java card technology is just a platform.So the regular processor can be used for Java card? What we need to do is just software?
    2) How to get the Java card license? All the Java card tech file are released to customers. And how much is the license fee?
    3) How much one Java card cost?
    Thanx.

    Hi,
    1) Yes that's right the only think that you have to bother on a JavaCard is the software part. You will have to develop an applet that you will then download and instanciate in your JavaCard.
    2) For any technical specifications and JavaCard SDK, have a look to this URL:
    http://java.sun.com/products/javacard/index.jsp
    Regarding the licensing, yo may find some information at this URL:
    http://www.internetnews.com/dev-news/article.php/70381
    3) The cost of a JavaCard depends on the volume, the card manufacturer. I think, the price of a JavaCard for low volume is from 5 to 10 USD. But you better do some enquiry with a card manufacturer.
    Regards.
    Thomas
    link: http://jaccal.sourceforge.net/

  • Some question about java Runtime!

    I have some jar files, such as class.jar resource.jar.
    I hope to compress them to a single file.
    The file can be run like this, java -cp . filename.
    Anyone can help me!!!

    You need to have a manifest for your jar which specifies which main class to start. You can take a look at the docs to see how to go about doing this.

  • Some questions about javacard 2.1.1 and smartcardio

    Hello i have some question about java card 2.1.1 and the smartcardio package.
    1.) I want to sign a message with the Signature.ALG_RSA_SHA_PKCS1 algorithm. I use the following code in the applet to sign the message:
    final static byte P1_CREATION_MODE = (byte) 0x01;
    final static byte INS_SIGN_MODE = (byte) 0x60;
    final static byte SmartCard_CLA = (byte) 0xB0;
    private void signMessage(APDU apdu) {
            byte[] buffer = apdu.getBuffer();
            byte byteRead = (byte) (apdu.setIncomingAndReceive());
            signature.init(privateKey, Signature.MODE_SIGN);
            short length = signature.sign(buffer, ISO7816.OFFSET_CDATA, byteRead, buffer, (short) 0);
            apdu.setOutgoingLength((short) length);
            apdu.sendBytesLong(buffer, (short) ISO7816.OFFSET_CDATA, (short) length);
            apdu.setOutgoing();
        }On the host side I use the following code to connect to the card and to send the sign apdu:
    if (TerminalFactory.getDefault().terminals().list().size() == 0) {
                LOGGER.log(Level.SEVERE, "No reader present");
                throw new NoSuchCardReader();
            /* Select the first terminal*/
            CardTerminal terminal = TerminalFactory.getDefault().terminals().list().get(0);
            /* Is a card present? */
            if (!terminal.isCardPresent()) {
                LOGGER.log(Level.SEVERE, "No Card present!");
                throw new NoSuchCard();
            /* Set the card protocol */
         Card card = terminal.connect("*");
            ATR atr = card.getATR();
            LOGGER.fine(getHexString(atr.getBytes()));
            LOGGER.fine(getHexString(atr.getHistoricalBytes()));
            CardChannel channel = card.getBasicChannel();
            CommandAPDU cmd = new CommandAPDU((byte) 0xb0, (byte) 0x60, (byte) 0x01, (byte) 0x00, new String("datadatdatadata").getBytes(), (byte) 0x40);
         ResponseAPDU response = channel.transmit(cmd);
            card.disconnect(false);But this does not work and i got the following error
    javax.smartcardio.CardException: sun.security.smartcardio.PCSCException: Unknown error 0x8010002f
            at sun.security.smartcardio.ChannelImpl.doTransmit(ChannelImpl.java:202)
            at sun.security.smartcardio.ChannelImpl.transmit(ChannelImpl.java:73)
            at de.upb.client.smartmeter.SmartMeter.initSmartCardApplet(SmartMeter.java:114)
            at de.upb.client.smartmeter.SmartMeterApplikation.main(SmartMeterApplikation.java:39)
    Caused by: sun.security.smartcardio.PCSCException: Unknown error 0x8010002f
            at sun.security.smartcardio.PCSC.SCardTransmit(Native Method)
            at sun.security.smartcardio.ChannelImpl.doTransmit(ChannelImpl.java:171)
            ... 3 more2.) 3Des encryption
    I want to use the 3Des algorithm to encrypt my data. I use
    keyDES = (DESKey) KeyBuilder.buildKey(KeyBuilder.TYPE_DES,
                        KeyBuilder.LENGTH_DES3_2KEY, false);
    cipherDES = Cipher.getInstance(Cipher.ALG_DES_CBC_ISO9797_M2, false);But i do not know what is the aquivalent on the host side??
    3.) Another problem is that i am not able to send the modulus of a public key from the host applikation to the smard card
    new CommandAPDU((byte) 0xb0, (byte) 0x20, (byte) 0x01, (byte) 0x00, modulus.toByteArray()); // create the apdu
    // the method in the applet
    private void setServerKeyMod(APDU apdu) {
            byte[] buffer = apdu.getBuffer();
            try {
                byte byteRead = (byte) (apdu.setIncomingAndReceive());
                short off = ISO7816.OFFSET_CDATA;
                // strip of any integer padding
                if (buffer[off] == 0) {
                    off++;
                    byteRead--;
                publicKeyServer.setModulus(buffer, off, byteRead);
            } catch (APDUException ex) {
                ISOException.throwIt((short) (SW_APDU_EXCEPTION + ex.getReason()));
        }The error code is 6700
    4.) My last problem ist, that i am not able to use a value bigger than 0x7F as the ne field in the apducommand, because i get the following error
    CommandAPDU((byte) 0xb0, (byte) 0x60, (byte) 0x01, (byte) 0x00, data, (byte) 0xff);
    java.lang.IllegalArgumentException: ne must not be negative
            at javax.smartcardio.CommandAPDU.<init>(CommandAPDU.java:371)
            at javax.smartcardio.CommandAPDU.<init>(CommandAPDU.java:252)I thought that it this should be possible in order to use all the bytes of the response apdu.
    If you need more code to help please let me know.
    Cheers
    Edited by: 858145 on 06.07.2011 08:23

    2) What is PKCS? what is the difference between
    PKCS#11 and PKCS#15??PKCS is the abbreviation of "Public-Key Cryptography Standards"
    PKCS #11: Cryptographic Token Interface Standard
    See http://www.rsasecurity.com/rsalabs/node.asp?id=2133
    PKCS #15: Cryptographic Token Information Format Standard
    http://www.rsasecurity.com/rsalabs/node.asp?id=2141
    If you want to use yor smartcard as secure token it doesn't have to be a JavaCard.
    BTW: I don't remember a way to access PKCS#15 tokens on a JavaCard from within an oncard JavaCard program. If you want to use keys in your oncard program, you have to transfer it onto the card or generate it oncard and export the public key by your own oncard/offcard code.
    Jan

  • Question about Java Errors

    I have some questions about some java errors
    1. what kind of errors are contained in Error class?
    2.does this class contain only runtime errors?
    3. if the question number 2 is positive, what about InstantiationError which is a compile error and is a subclass of Error.
    4.When our program is out of memory, which processes are done for an error to be produced. is the error actually from OS or VM?

    I have some questions about some java errors
    1. what kind of errors are contained in Error class?An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch.
    2.does this class contain only runtime errors?No
    3. if the question number 2 is positive, what about
    InstantiationError which is a compile error and is a
    subclass of Error.
    4.When our program is out of memory, which processes
    are done for an error to be produced. is the error
    actually from OS or VM?Various - both, depending on where the error occurred.

  • Question about Java's HttpServer: Threading? Backlog?

    Hello,
    I have two questions about Java's HttpServer (com.sun.net.httpserver). From the JavaDoc:
    >
    Management of threads can be done external to this object by providing a Executor object. If none is provided a default implementation is used.
    >
    How can I get information about the default implementation in 1.6.0_13? Do you know the behavior? From my observations, the default implementation uses no Threads, meaning every request is handled in the same Thread, this results in handling the requests to the HttpServer one after another.
    Is this right?
    The second question is about this, also from the JavaDoc:
    >
    When binding to an address and port number, the application can also specify an integer backlog parameter. This represents the maximum number of incoming TCP connections which the system will queue internally. [...]
    >
    When setting the backlog to -1, it uses the systems default backlog. How can I determine the systems default backlog? Can some lines of Java code reveal it (there is no getBeacklog() method)? Or is it up to the Operating System (we use Redhat Linux)?
    Thanks a lot for your help!
    Regards,
    Timo

    How can I determine the systems default backlog?You can't. There is no API for that even at the C level.
    Can some lines of Java code reveal itNo.
    Or is it up to the Operating System (we use Redhat Linux)?Yes. Linux provides a large default. It seems to be at least 50 on most platforms. This is not something you should be worrying about.

  • Some question about 9iAs R1.2.2 & R2, need your help:

    Some question about 9iAs R1.2.2 & R2, need your help:
    Since 2000, we has used 9iAS Core (R1.2.2) to publish our website. The platform is Suns Solaris (SPARC). The database is Oracle 8i. But there are so many questions:
    1.     The Web Cache cant be installed well
    2.     The web pages use JSP to query database with SQL show errors when we refresh the page a few times. The error will disappear after restarting the 9iAS or refreshing the page again. On the other hand, the same pages dont show error on resin. The error is java.sql.SQLException : Closed Connection: next. I supposed that the connection of database has some hidden troubles, but I can find it, could you give me some advice.
    Now I have installed 9iAS R2, But when I visited the manage page, I found that a password is needed to visit the web cache manage page. I dont think I have set the password, and then I cant control the web cache. I want to know is a default password occurred? If not, what is the password.

    The default password for Web Cache is: administrator
    See walkthrough on the sample code page: http://otn.oracle.com/sample_code/products/ias/content.html
    HTH,
    Ashesh Parekh
    Oracle9iAS product management

  • Some questions about configuration in MAX.

    Hello,everyone!
    I have some questions about configuration in MAX(I am a jackaroo for motion control development),I hope I can get your help.
    I use PCI-7344+UMI-7764+Servo amplifier+Servo motor,my MAX version is 4.2 and I use NI-Motion7.5
    My question as following:
    1,In Axis Configuration,for motor type,why I must select stepper but not servo?my motor is servo motor!If I select Servo,my motor can't run,I don't know why.
     If I select stepper,though motor can work but I can't test encoder in MAX.
    2,In Stepper settings,for stepper loop mode,why I must select open-loop but not close-loop?If I select close-loop,the servo motor doesn't work too.
    3,If I want my two servo motors run at different velocity,How shoud I do?It seems I just can set the same velocity in MAX for my two servo motors.
     My English is poor,Pls pardon me!I come from China.
    Thank you for your help!
    EnquanLi
    Striving is without limit!

    Hi,Jochen,
    Thank you for your kindly help!
    The manufacturer of the drive and motor that I am using now is Japan SANYO DENKI,drive type is RS1A01AA,motor type is R2AA06020FXP00.
    And I use position control mode,thehe encoder's counts per revolution is 131072.I set the electronic gear ratio to 1:1 for drive.
    Now,I can use Close-Loop to control the motor but still has some problems.When I configure it to run in closed loop mode, the motors behave strangely and never move to the target position.When I configure it to run in closed loop mode, the motors behave strangely and never move to the target position.The detail situation is as following
    1,Motor can't run.
    2, Or motor moves to a position, then moves in the same direction agian and eventually stops.
    Except for the  two points mentioned above,"Following Error" is  occured frequently,I don't know why.
    I am still not clear why I must set the motor type be stepper in MAX .
    And I have another question:what the relationship between the steps and the counts?They have the proportion relations?I notice that there are a section said like this in help document: For proper closed-loop and p-command operation, steps per revolution/counts per revolution must be in the range of 1/32,767 < steps/counts < 32,767. An incorrect counts to steps ratio can result in failure to reach the target position and erroneous closed-loop stepper operation.
    I am verry sorry I have too many questions!
    I am very appreciate for your kingly help!Thanks again!
    EnquanLi
    China
    Striving is without limit!

  • Some questions about the integration between BIEE and EBS

    Hi, dear,
    I'm a new bie of BIEE. In these days, have a look about BIEE architecture and the BIEE components. In the next project, there are some work about BIEE development based on EBS application. I have some questions about the integration :
    1) generally, is the BIEE database and application server decentralized with EBS database and application? Both BIEE 10g and 11g version can be integrated with EBS R12?
    2) In BIEE administrator tool, the first step is to create physical tables. if the source appliation is EBS, is it still needed to create the physical tables?
    3) if the physical tables creation is needed, how to complete the data transfer from the EBS source tables to BIEE physical tables? which ETL tool is prefer for most developers? warehouse builder or Oracle Data Integration?
    4) During data transfer phase, if there are many many large volume data needs to transfer, how to keep the completeness? for example, it needs to transfer 1 million rows from source database to BIEE physical tables, when 50%is completed, the users try to open the BIEE report, can they see the new 50% data on the reports? is there some transaction control in ETL phase?
    could anyone give some guide for me? I'm very appreciated if you can also give any other information.
    Thanks in advance.

    1) generally, is the BIEE database and application server decentralized with EBS database and application? Both BIEE 10g and 11g version can be integrated with EBS R12?You, shud consider OBI Application here which uses OBIEE as a reporting tool with different pre-built modules. Both 10g & 11g comes with different versions of BI apps which supports sources like Siebel CRM, EBS, Peoplesoft, JD Edwards etc..
    2) In BIEE administrator tool, the first step is to create physical tables. if the source appliation is EBS, is it still needed to create the physical tables?Its independent of any soure. This is OBIEE modeling to create RPD with all the layers. If you build it from scratch then you will require to create all the layers else if BI Apps is used then you will get pre-built RPD along with other pre-built components.
    3) if the physical tables creation is needed, how to complete the data transfer from the EBS source tables to BIEE physical tables? which ETL tool is prefer for most developers? warehouse builder or Oracle Data Integration?BI apps comes with pre-built ETL mapping to use with the tools majorly with Informatica. Only BI Apps 7.9.5.2 comes with ODI but oracle has plans to have only ODI for any further releases.
    4) During data transfer phase, if there are many many large volume data needs to transfer, how to keep the completeness? for example, it needs to transfer 1 million rows from source database to BIEE physical tables, when 50%is completed, the users try to open the BIEE report, can they see the new 50% data on the reports? is there some transaction control in ETL phase?User will still see old data because its good to turn on Cache and purge it after every load.
    Refer..http://www.oracle.com/us/solutions/ent-performance-bi/bi-applications-066544.html
    and many more docs on google
    Hope this helps

  • Hello , I want to ask some question about ipads \  How powerful is the iPad?  How useful is it for reading books, newspaper or magazines or for surfing the web? Can you identify any shortcomings of the device?   please help me :(

    Hello ,
    I want to ask some question about ipads \
    How powerful is the iPad? 
    How useful is it for reading books, newspaper or magazines or for surfing the web?
    Can you identify any shortcomings of the device?  
    please help me

    it's less powerful than your average computer. THink of it like a netbook but with a better processor.
    It'll do fine for surfing (although if you browse a lot of flash based sites you will need to get a third party browser since safari doesn't accommodate it)
    You may do OK on reading books, papers or magazines, especially if they have apps, but the ipad's screen is backlit, so it doesn't work well outdoors and you may need to fiddle with the brightness so that you don't get eye strain (it's just like doing too much reading from a computer screen)
    I would say the biggest short comings are data transfer. Apple's preferred work flow is that everything is done via iTunes or the internet....well people dont' always have 100% reliable always on internet access so you can find yourself in a situation where you can't get things on/off the iPad.
    By and large, it's a good device for day to day stuff, but is not a computer replacement.

  • Some question about fade in // fade out by hideEffect and showEffect in Actionscript

    Some question about fade in // fade out by hideEffect and
    showEffect in Actionscript
    Please kindly take a look at the following page:
    http://camusmiu.no-ip.com/HounganQuestion/PictureHolderTest.html
    (can view source)
    I tried to make an image preloaded and scale the image to
    it's preferred size.
    When I came to consolidate the stuff into a component, I
    found the application goes weird as I implementation the show/hide
    effect.
    The third trial which just hide and show the images directly,
    instead of using viewstack, fail to bring the second image onto
    screen.
    It just used fadeOut instead of fadeIn(you see there is a
    flash of the second image)
    After some study of showEffect and hideEffect behaviour,
    seems the mechanism of hide/show a component works in this way:
    this._fadeIn:Fade = new Fade();
    this._fadeIn.alphaFrom = 0;
    this._fadeIn.alphaTo = 1;
    this._fadeIn.duration = 1000;
    this._fadeOut:Fade = new Fade();
    this._fadeOut.alphaFrom = 1;
    this._fadeOut.alphaTo = 0;
    this._fadeOut.duration = 1000;
    Component_A.visible = true;
    Component_A.setStyle("showEffect", this._fadeIn);
    Component_A.setStyle("hideEffect", this._fadeOut);
    then when I set Component_A.visible = false, the sequence
    works like following:
    Component_A.visible = true
    Component_A.visible = true, alpha = 100;
    Component_A.visible = true, alpha = 50;
    Component_A.visible = true, alpha = 0;
    Component_A.visible = false;
    The above sequence works visa versa as:
    Component_A.visible = false;
    Component_A.visible = true, alpha = 0;
    Component_A.visible = true, alpha = 50;
    Component_A.visible = true, alpha = 100;
    Component_A.visible = true;
    (Correct me if i am wrong)
    ========================================================================================== ====
    From what I observe from the application, I have two
    question.
    1) When more than one component using the this._fadeIn,
    this_fadeOut as the hide/show effects, the component in instance of
    this._fadeIn? will it mess out if more than one component using the
    fadeIn instance in the same time?
    2) from the third component, i.e. PictureHolder3, when I load
    other the picture , it fade out the new image instead of fading
    in... Seems there is problem if I hide show too frequent. I think
    when I hide then show right the way, the component only do the hide
    part...
    Can someone pls look into it and tell me what I did wrong?
    Cuz in normal practice I don't think appropriate to use ViewStack
    in Actionscript...

    Hello Jack,
    Currently, you can only import an swf file or you can embed videos from youtube, vimeo etc. into Muse / add HTML5 Video to Your Website.
    Take a look at these simple videos that explain the currently available processes for adding videos in Muse, in a step by step method:
    1. http://tv.adobe.com/watch/learn-adobe-muse-cc/inserting-a-youtube-flic kr-or-hulu-video/
    2. http://www.youtube.com/watch?v=5in4swnIFsw
    3. http://www.youtube.com/watch?v=KnBFLQheOk4
    Hope this helps.
    Cheers
    Parikshit

  • Three questions about Java and Ftp

    Hello, i've the following questions about Java and Ftp:
    1- .netrc file is in $HOME directory but i can't access to this directory from java code. The following line producesan Exception (directory doesn't exists)
    FileWriter file = new FileWriter ("$HOME/.netrc");
    2- .netrc file must have the following permissions: -rw- --- --- but when i create the .netrc file the following permissions are on default: -rw- r-- r--, how can i change this permissions? (In java code, i can't use chmod.....)
    3- Are there any way to pass parameters to a .netrc file? If i get to do this i needn't change the permissions because i can't modify or create/destroy this file.
    Thanks in advanced!!!
    Kike

    1- .netrc file is in $HOME directory but i can't
    access to this directory from java code. The
    following line producesan Exception (directory
    doesn't exists)
    FileWriter file = new FileWriter ("$HOME/.netrc");$HOME would have to be replaced by a shell, I don't
    think you can use it as part of a legal path.
    Instead, use System.getProperty("user.home");
    Ok, thanks
    2- .netrc file must have the followingpermissions:
    -rw- --- --- but when i create the .netrc file the
    following permissions are on default: -rw- r--r--,
    how can i change this permissions? (In java code,i
    can't use chmod.....)Yes, you can: Runtime.exec("chmod ...");
    I need to use estrictly the .netrc with -rw- --- --- permissions
    Yes, i can use Runtime.exec ("chmod ..."); but i don't like very much this solution because is a slow solution, am i right?
    3- Are there any way to pass parameters to a.netrc
    file? If i get to do this i needn't change the
    permissions because i can't modify orcreate/destroy
    this file.I don't think so. Why do you need the .netrc file in
    Java at all? Writing a GUI frontend?I want to use automatic ftp in a java program and FTP server, the files and path are not always the same, so i can:
    - modify .netrc (for me is the complex option)
    - destroy and create a new .netrc (is easier but i have permissions problem)
    - use .netrc with parameters but i haven't found any help about it
    Thanks for your prompt reply!!!!
    Kike

  • Some question about communicating the usb RAW device

    I have some question about USB communication: I want to make my VI communicate
    TI-DSP by USB, now, the driver of USB on DSP have done, and  there are a test
    program writen by VC and a driver fold(with a .inf and a .sys files), when I
    install the driver and run the test program, the driver program on DSP run
    regularly. And then I want to program a VI which have the same function as the
    test program, so I unload the driver on PC firstly, then install the DSP in
    NI_VISA according to "Using NI-VISA 3_0 to Control Your USB Device - Tutorial -
    Instrument Drivers". When I sent the standard control request using the VISA test panel, the status below happened. I don't know what wrong with my step.
    Dev  Phase  Data                       Info           Time   Cmd.Phase.Ofs    
     15  CTL    80 06 03 00 - 00 00 04 00  GET DESCRIPTR  5.2sc        56.1.0       
     14  CTL    80 06 03 00 - 00 00 04 00  GET DESCRIPTR   11us        57.1.0       
     14  USTS   00 00 01 c0                canceled       2.0sc        57.2.0       
     15  USTS   00 00 01 c0                canceled         5us        56.2.0 
    PS: the software I use to capture the data is BUSHOUND
    1、Do I have to install the .sys driver file in VISA? How can I install the driver file without losing the device in MAX?
    2、Someone told me it must be done by calling .dll fies in LV, but I want to know if LV can program the function directly without calling .dll file?
    Thank for any reply~~!

    逍遥浪子 wrote:
    I have some question about USB communication: I want to make my VI communicate TI-DSP by USB, now, the driver of USB on DSP have done, and  there are a test program writen by VC and a driver fold(with a .inf and a .sys files), when I install the driver and run the test program, the driver program on DSP run regularly. And then I want to program a VI which have the same function as the test program, so I unload the driver on PC firstly, then install the DSP in NI_VISA according to "Using NI-VISA 3_0 to Control Your USB Device - Tutorial - Instrument
    Drivers". When I sent the standard control request using the VISA test
    panel, the status below happened. I don't know what wrong with my step. Dev 
    Phase 
    Data                      
    Info          
    Time   Cmd.Phase.Ofs     --- 
    -----  ------------------  15 
    CTL    80 06 03 00 - 00 00 04 00  GET
    DESCRIPTR  5.2sc       
    56.1.0         14 
    CTL    80 06 03 00 - 00 00 04 00  GET
    DESCRIPTR   11us       
    57.1.0         14 
    USTS   00 00 01
    c0               
    canceled      
    2.0sc       
    57.2.0         15 
    USTS   00 00 01
    c0               
    canceled        
    5us        56.2.0  PS: the
    software I use to capture the data is BUSHOUND 1、Do I have to install the .sys driver file in VISA? How can I install the driver file without losing the device in MAX? 2、
    Someone told me it must be done by calling .dll fies in LV, but I want
    to know if LV can program the function directly without calling .dll
    file?
    This thread
    contains already a related answer and explains what a sys driver is.
    While you could theoretically use the Call Library Node to call all the
    necessary Win32 API kernel functions to connect to a device driver,
    this would be very cumbersome and not doable without a real good
    understanding about C programming. Writing an interface DLL instead
    won't need more C programming knowledge at all but will give you a
    clean interface to that device driver which eventually could be used in
    other programming environments as well.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

Maybe you are looking for