Problem passing arguments with air.swf

I'm attempting to launch my AIR application using
launchApplication() in air.swf. I'm having problems passing
arguments to my application due to what appears to be some
restriction in allowed characters. To get around this, I've even
tried URL encoding and Base-64 encoding my arguments to make them
more friendly, but it's still failing:
Error: Invalid argument: PG5vIGlkZW50aWZpZXI+
at AIR$/escapeArguments()
at AIR/launchApplication()
at
adlm_launcher/onDownloadClick()[E:\adlm\launcher\src\adlm_launcher.mxml:181]
It seems that any kind of punctuation is not allowed in
arguments. URL encoding them doesn't work either because the % is
rejected. Is there any other way around this?

Yes; it's a security restriction. Browser invocation require
process creation, and many process creation APIs giving special
meanings to certain characters. Letting those characters through
has in the past been a source of security vulnerabilities. While we
also try to avoid using APIs with this behavior, extra layers of
defense are also good.
I think + and / may actually be safe choices; you make a good
point that they're useful for Base64. If you could submit a feature
request at www.adobe.com/go/wish, we'll definitely consider it.
Another option, btw, is to use the LocalConnection API to
pass data between the web page and your application once your app
is launched. LocalConnection has fewer restrictions on the data
passed.

Similar Messages

  • Passing arguments with spaces through to asc.jar

    According to the docs, we can pass arguments through to llc using -fllvm-llc-opt.  Additionally, with llc we can pass arguments through to asc.jar using -ascopt.  Let's say I want to define an AS3 variable in my flascc swf/swc.  asc.jar says that I can do this using "-config <ns::name=value>".
    So it seems like I should be able to do this:
    gcc ... -fllvm-llc-opt=-ascopt=-config CONFIG::RELEASE=true
    But this doesn't work, as the "-config" parameter takes its next argument via a space and not an equals, which throws the whole thing off.  gcc thinks its another argument.  Trying it with spaces like this:
    gcc ... "-fllvm-llc-opt=-ascopt=-config CONFIG::RELEASE=true"
    also doesn't work.  The toolchain outputs:
    Error:
    LLVM ERROR: Failed to run /usr/bin/java with args:
    -Xmx1500M -jar /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/asc2.jar -merge -md -abcfuture -AS3
    -import /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/builtin.abc -import /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/playerglobal.abc -import /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/BinaryData.abc -import /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/Exit.abc -import /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/LongJmp.abc -import /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/ISpecialFile.abc -import /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/IBackingStore.abc -import /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/InMemoryBackingStore.abc -import /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/IVFS.abc -import /Users/asimmons/FlasCC_1.0/sdk/usr/bin/../../usr/lib/CModule.abc
    -config CONFIG::RELEASE=false -d /var/folders/cn/hjz9nbt53bdfpn1rzn6wdb900000gr/T//ccQPoczK.lto.2.as /var/folders/cn/hjz9nbt53bdfpn1rzn6wdb900000gr/T//ccZDGxMF.lto.1.as -outdir . -out output
    As you can see, the "-config" command made it to asc.jar.  What I think is happening is that its being passed to asc.jar as one argument (not two).  For example, I can copy-paste this command into bash and it will work-- just not when done from gcc.
    So: how do I pass arguments with spaces through to asc.jar?

    I believe you should be able to do this by splitting it across two fllvm-llc-opt flags:
    gcc ... -fllvm-llc-opt=-ascopt=-config -fllvm-llc-opt=-ascopt=CONFIG::release=true
    The Makefile in the 12_Stage3D sample that ships with the FlasCC SDK demonstrates this.

  • Passing arguments from Air to Photoshop jsx script

    I would like to invoke JavaScript file in Photoshop from my Adobe Air application. I managed to call my script with the following code:
    // Create native startup info
    nativeProcessStartupInfo = new NativeProcessStartupInfo();
    nativeProcessStartupInfo.executable = filePhotoshop; // File referencing Photoshop exe
    // Create Vector array to pass arguments
    procarg = new Vector.<String>();
    procarg.push("start");
    procarg.push(jsFileToCall);// String with path to my jsx file
    procarg.push(scriptData); // String with argument to pass to jsx file
    nativeProcessStartupInfo.arguments = procarg;
    // Create native process object for calling  executable file
    process = new NativeProcess();
    // SET ERROR HANDLERS
    process.addEventListener(ProgressEvent.STANDARD_ERROR_DATA ,onError,false,0,true);
    process.addEventListener(IOErrorEvent.STANDARD_ERROR_IO_ERROR ,onError,false,0,true);
    process.addEventListener(IOErrorEvent.STANDARD_INPUT_IO_ERROR ,onError,false,0,true);
    process.addEventListener(IOErrorEvent.STANDARD_OUTPUT_IO_ERROR ,onError,false,0,true);
    process.addEventListener(ProgressEvent.STANDARD_ERROR_DATA ,onError,false,0,true);
    // CALL NATIVE PROCESS
    process.start(nativeProcessStartupInfo);
    The Photoshop app is started, my JavaScript is invoked, but the argument is not passed into jsx.
    Is there any method how to pass arguments to script in Photoshop? (I know that I can use the file to pass the parameters, but I do not like that solution.)
    Thanks in advance for any hint.
    Zdenek M

    The only documented way I know of is programming the script as a Photoshop Plug-in that has a dialog. Then record using the script in an action.  The script will record the arguments used in its dialog into the Photoshop Actions step.  Then when the action is used played the action recorded arguments are retrived and the script bypasses displaying its dialog. 
    However In CS3 I looked at Adobe Photoshop  Image Processor JavaScript it internaly used the Fit Image Plug-in Script and passed the width and hight to it. So it is posible to pass arguments from one JSX to an JSX Plug-in Script.
    From CS5 "Image Processor.jsx"
    // use the fit image automation plug-in to do this work for me
    function FitImage( inWidth, inHeight ) {
              if ( inWidth == undefined || inHeight == undefined ) {
                        alert( strWidthAndHeight );
                        return;
              var desc = new ActionDescriptor();
              var unitPixels = charIDToTypeID( '#Pxl' );
              desc.putUnitDouble( charIDToTypeID( 'Wdth' ), unitPixels, inWidth );
              desc.putUnitDouble( charIDToTypeID( 'Hght' ), unitPixels, inHeight );
              var runtimeEventID = stringIDToTypeID( "3caa3434-cb67-11d1-bc43-0060b0a13dc4" );
              executeAction( runtimeEventID, desc, DialogModes.NO );
    If You can write a file from Adobe Air you could also write the jsx file to pass the args you want to pass a to plug-in script via the ActionManager.

  • Problem passing arguments by reference

    Okay, so I'm trying to pass two variables to a function by reference, but when I go to arithmetically manipulate the variables in the function that's receiving the arguments, it's multiplying their values by four, for what reason I cannot understand. Here's my code (the relevant parts of it) -- it's a casino game:
    void BuyChips(int *, int *);
    int main()
        int money = 5000;
        int chips = 0;
        BuyChips(money, chips);
    void BuyChips(int *mny, int *chps)
        int numChipsBought;
        printf("How many chips would you like to buy? ");
        scanf("%d", &numChipsBought);
        chps += numChipsBought;
        mny -= numChipsBought;
        printf("\nYou purchase $%d in chips. You now have $%d in chips
                and $%d remaining in cash.", numChipsBought, chps, mny);
    If I type in "20" for the input for how many chips I want to buy, here's the output I get:
    You purchase $20 in chips. You now have $80 in chips and $4920 remaining in cash.
    For the life of me I can not figure this out. I can't figure out why it has multiplied the values by four. I know it has something to do with passing the arguments to the function by reference, though, because (for debugging's sake) I tried creating regular variables for chips and money within the BuyChips() function itself instead of passing them to the function from main(), and it worked fine. But for some reason, when I pass the variables there by reference, it multiplies them by four.
    Can someone please help me with this? Thanks!

    nt main()
        int money = 5000;
        int chips = 0;
         BuyChips( &money, &chips);
         (send the address of the variables)
         *chps += numChipsBought;
         *mny -= numChipsBought;
        printf("\nYou purchase $%d in chips. You now have $%d in chips
                and $%d remaining in cash.", numChipsBought, *chps, *mny);
    (access the variable through the address)

  • JSF2 : Problem passing values with f:setPropertyActionListener

    Hi,
    I'm a JSF newbie, and I'm in front of a weird problem on a JSF2 / Glassfish3 project. I'm working on GlassFish Server Open Source Edition 3.1 (build 43) with Mojarra 2.1.0 (FCS 2.1.0-b11).
    I'm using a commandLink to pass values from a page to a backing bean. This example works (here is only the relevant code) :
    user.xhtml :
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:c="http://java.sun.com/jsp/jstl/core"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://java.sun.com/jsf/facelets">
    <ui:composition template="sublayout.xhtml">
      <ui:define name="maincontent">
        <p><a name="projects"><h:outputText value="Projects" /></a></p>
        <p><h:outputText value="#{userController.user.login} has initiated the following projects:" /></p>
        <h:dataTable value="#{userController.getProjects()}" var="p">
          <h:column>
            <h:form>
              <h:outputText value="#{p.id}: " />
              <h:commandLink action="#{projectController.doGetProject()}">
                <h:outputText value="#{p.title}" />
                <f:setPropertyActionListener value="#{p.id}" target="#{projectController.projectId}" />
              </h:commandLink>
            </h:form>
          </h:column>
        </h:dataTable>
      </ui:define>
    </ui:composition>
    </html>userController.java:
    // package, imports...
    @ManagedBean(name = "userController")
    @RequestScoped
    public class UserController {
      @EJB
      private UserServiceEJBLocal userServiceEJB;
      private FacesContext ctx = FacesContext.getCurrentInstance();
      private User user = new User();
      private long userId;
      private String password;
      private String passwordConfirmation;
      public String doGetUser() {
        try {
          user = userServiceEJB.findById(userId);
        } catch (ObjectNotFoundException e) {
          ctx.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, "User not found" + userId, "User not found : " + e.getMessage()));
          return null;
          return "user.faces";
      public ArrayDataModel<Project> getProjects() {
        return new ArrayDataModel<Project>(user.getProjects().toArray(new Project[user.getProjects().size()]));
      // Getters and setters
    }projectController.java:
    // package, imports...
    @ManagedBean(name = "projectController")
    @RequestScoped
    public class ProjectController {
      @EJB
      private ProjectServiceEJBLocal projectServiceEJB;
      FacesContext ctx = FacesContext.getCurrentInstance();
      private Project project = new Project();
      private long projectId;
      public String doGetProject() {
        try {
          project = projectServiceEJB.findById(projectId);
        } catch (ObjectNotFoundException e) {
          ctx.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, "Project " + projectId + " was not found", e.getMessage()));
          return null;
        return "project.faces";
      // Getters and setters
    }The proble occurs on the XHTML page below :
    project.xhtml:
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://java.sun.com/jsf/facelets">
    <ui:composition template="sublayout.xhtml">
      <ui:define name="maincontent">
        <h:form>
          <h:commandLink action="#{userController.doGetUser()}">
            <h:outputText value="#{projectController.project.author.login}" />
            <f:setPropertyActionListener value="#{projectController.project.author.id}" target="#{userController.userId}" />
          </h:commandLink>
        </h:form>
      </ui:define>
    </ui:composition>
    </html>The commandLink syntax seems to be the same as the one provided above, but when I test this for, I get an IllegalArgumentException from Glassfish. Here it is, from the Glassfish server.log :
    [#|2011-08-22T11:15:11.462+0200|WARNING|glassfish3.1|javax.enterprise.resource.webcontainer.jsf.lifecycle|_ThreadID=95;_ThreadName=Thread-1;|/project.xhtml @32,42 target="#{userController.userId}": Can't set property 'userId' on class 'org.creagora.server.ejb.managed.UserController' to value 'null'.
    javax.el.ELException: /project.xhtml @32,42 target="#{userController.userId}": Can't set property 'userId' on class 'org.creagora.server.ejb.managed.UserController' to value 'null'.
         at com.sun.faces.facelets.el.TagValueExpression.setValue(TagValueExpression.java:139)
         at com.sun.faces.facelets.tag.jsf.core.SetPropertyActionListenerHandler$SetPropertyListener.processAction(SetPropertyActionListenerHandler.java:206)
         at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)
         at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:769)
         at javax.faces.component.UICommand.broadcast(UICommand.java:300)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
         at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:409)
         at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1534)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
         at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
         at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
         at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:326)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
         at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:170)
         at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
         at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
         at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
         at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
         at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
         at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
         at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
         at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
         at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
         at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
         at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
         at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
         at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
         at java.lang.Thread.run(Thread.java:722)
    Caused by: java.lang.IllegalArgumentException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         at java.lang.reflect.Method.invoke(Method.java:601)
         at javax.el.BeanELResolver.setValue(BeanELResolver.java:381)
         at com.sun.faces.el.DemuxCompositeELResolver._setValue(DemuxCompositeELResolver.java:255)
         at com.sun.faces.el.DemuxCompositeELResolver.setValue(DemuxCompositeELResolver.java:281)
         at com.sun.el.parser.AstValue.setValue(AstValue.java:197)
         at com.sun.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:286)
         at com.sun.faces.facelets.el.TagValueExpression.setValue(TagValueExpression.java:131)
         ... 35 more
    |#]So I wonder : what makes the first example work, that fails in this one ? Where does this 'null' value come from ? I tested every value (project, author, author id), everything is correct. But for some reason, the projectController.project.author.id is not passed to the userController.userId.
    If I try to replace
    <f:setPropertyActionListener value="#{projectController.project.author.id}" target="#{userController.userId}" />by this (obviously incoherent but syntically correct)
    <f:setPropertyActionListener value="#{projectController.project.id}" target="#{userController.userId}" />I don't get the IllegalArgumentException anymore, but the value is still not passed, and the value of userController.userId is never updated, and remains set to 0.
    But if I hardcode a valid value :
    <f:setPropertyActionListener value="1" target="#{userController.userId}" />It works...
    I can't understand why a 'null' value appears from who knows why, given that the only value passed are of long type.
    Can you help me ? It's getting frustrating, and I didn't find any help on Google so far...
    Thanks!
    Xavier
    Edited by: 880733 on 22 août 2011 04:04

    Ok, I have a little more time now.
    You ask how the value can be null when the property is a long. What is happening is that something in the chain is null, e.g. the author is not set on the project. (Although usually you get an exception with that kind of thing.) The EL resolver is actually not really part of JSF, it is a separate library. Furthermore it is weakly typed so it doesn't know what type of thing projectController.project.author.id is until it evaluates it. If something is null along the way, there is no way for it to know whether the end result should have been a long, a Long, a String or anything else.
    You asked how to pass values without setPropertyActionListener. It is certainly possible. In fact, I would not be surprised if my entire application did not use setPropertyActionListener. Let's start with the first case. In that situation you were using a dataTable. The customary thing to do is to bind the dataTable to a UIData property in a managed bean. Then, in your action method, you can invoke UIData.getRowData() and get the object instance associated with the row in the table that was activated by the user.
    In your second example it is a little difficult to appreciate everything going on without more context but I'll just guess at what I don't know. I'm going to assume you have a simple page here. On the request that generates this page, projectController.project.author.id is known. I imagine the problem is that this is in request scope, causing projectController.project.author.id to be forgotten on the next request. The simplest solution is to store the project somewhere in session scope. I would recommend against putting the Controller classes themselves in the session scope.  Instead create a set of beans for session scope and inject them into the Controller classes.
    There are many other ways to skin the same cat. Many people object to over-using session scope. So you could store something small like just the id in the session. Or you could pass the id using h:inputHidden. Or you could use Tomahawk's s:saveState.
    HTH

  • I.E./Active X problem loading movie with multiple .swf

    I have a webpage that loads .swf's into a main "container"
    swf, and I've found a fix for the I.E./Active X (this is a good
    bookmark:
    http://www.kirupa.com/developer/flash8/flash_fix.htm
    ). But the container seems to get stuck on the preloader now? Any
    ideas?
    PROBLEM PAGE HERE
    WORKING PAGE HERE

    FRAME 1:
    System.useCodepage = true;
    main="";
    pageNum=1;
    if (_framesloaded > 50){
    //if (_framesloaded == _totalframes){
    gotoAndStop (8);
    } else {
    gotoAndPlay(1);
    FRAME 7:
    gotoAndPlay(1);
    FRAME 8:
    if (whichFrame == "return"){
    gotoAndStop (20);
    less6.gotoAndStop(2);
    } else {
    gotoAndStop("splash");
    FRAME 20:
    if (_framesloaded == _totalframes){
    gotoAndStop ("p14");
    } else {
    gotoAndPlay(10);
    }

  • Problems Operating Monitor with Air?

    I have a new 13" Air which I'm trying to interface with ViewSonic 22, VX2250.  Can't get monitor and Air to display the same colors.  When colors on Air are as they should be, the monitor shows black windows with white print and the desktop is orange with green and blue galaxy colors.  If I check "mirror" on the Air, the colors reverse and the monitor shows the normal colors for the Air - blue background and pink galaxy, etc and then has black windows and the ViewSonic then shows the normal window display colors.
    Does anyone know of an adjustment on the Air which might bring the colors into sync between monitor and the Air?

    Hi Captfred:
    This approach does exactly as you suggest but I'm looking to have both screens black on white at the same time - together.  They do, indeed, toggle between black on white and white on black, but they keep exchanging with one another so they are opposing one another.  When one is black on white, the other is white on black.  Is there a fix for this?
    Thanks

  • Problems with passing arguments to app

    Hi.
    I have a litle problem with passing arguments. I create a dynamic jnlp file using jsp. This is my code:
    <%
    response.setContentType("application/x-java-jnlp-file");
    String l = request.getParameter("login");
    String p = request.getParameter("pass");
    out.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
    out.println("<jnlp spec=\"1.0+\" codebase=\"http://212.244.104.27:8080/PzP_INSTALL/\" href=\"pzp.jsp\">");
    out.println("<information>");
    out.println("<title>xxx</title>");
    out.println("<vendor>xxxx</vendor>");
    out.println("<homepage href=\"main.jsp\"/>");
    out.println("<description>text</description>");
    out.println("<offline-allowed/>");
    out.println("</information>");
    out.println("<security>");
    out.println("<all-permissions/>");
    out.println("</security>");
    out.println("<resources>");
    out.println("<j2se version=\"1.4+\"/>");
    out.println("<jar href=\"jars/pzp.jar\" main=\"true\" download=\"eager\"/>");
    out.println("<jar href=\"jars/config.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/commons-beanutils.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/commons-collections.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/commons-digester.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/commons-logging.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/commons-validator.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/easclient.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/easj2ee.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/jakarta-oro-2.0.7.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/jbcl.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/log4j-1.2.7.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/jdom.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jars/xercesImpl.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<property name =\"javaws.login \"  " + "value=" + "\"" + l + "\"" + "/>");
    out.println("<property name =\"javaws.pass \"  " + "value=" + "\"" + p + "\"" + "/>");
    out.println("</resources>");
    out.println("<application-desc main-class=\"aaa.bbb.ccc.MyClass\"/>");
    out.println("</jnlp>");
    %>My problem is when i have the href tag filled, the arguments that i passed equlas null, when i remove the href everything is ok besides that the app doesnt show in application manager and doesnt create an icon on the desktop.
    out.println("<jnlp spec=\"1.0+\" codebase=\"http://62.89.104.27:8080/PzP_INSTALL/\" href=\"pzp.jsp\">");
    Any help would be appreciated.

    Hello again.
    Thanks for your replay but unfortunetly it doesnt work too :-(
    I've tried to use the out.println statemants in the servlet instead of using a jsp page but the error is the same. Please look at my code and tell me if you can what could be wrong.
    This is the error message:
    An error occurred while launching/running the application.
    Title: PZP
    Vendor: SPEED
    Category: Download Error
    Unable to load resource: http://212.89.104.27:8080/PzP_INSTALL/ServletPZP
    Servlet code.
    package pzp_install;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    import pzp_install.LoginBean;
    import javax.swing.JOptionPane;
    public class ServletPZP extends HttpServlet {
      public void init(ServletConfig config) throws ServletException {
      super.init(config);
      config.getServletContext().setAttribute("ServletPZP", this);
      public void doPost(HttpServletRequest request, HttpServletResponse resp)
      throws IOException {
      PrintWriter out = resp.getWriter();
    // Get the value of the request parameter
      String login = request.getParameter("login");
      String pass = request.getParameter("pass");
    resp.setContentType("application/x-java-jnlp-file");
    out.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
    out.println("<jnlp spec=\"1.0+\" codebase=\"http://212.89.104.27:8080/PzP_INSTALL/\" href=\"/servletpzp\">");
    out.println("<information>");
    out.println("<title>PZP</title>");
    out.println("<vendor>SPEED</vendor>");
    out.println("<homepage href=\"main.jsp\"/>");
    out.println("<description>Aplikacja wspomagajaca zarzadzanie zleceniami</description>");
    out.println("<offline-allowed/>");
    out.println("</information>");
    out.println("<security>");
    out.println("<all-permissions/>");
    out.println("</security>");
    out.println("<resources>");
    out.println("<j2se version=\"1.4+\"/>");
    out.println("<jar href=\"pzp.jar\" main=\"true\" download=\"eager\"/>");
    out.println("<jar href=\"config.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"commons-beanutils.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"commons-collections.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"commons-digester.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"commons-logging.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"commons-validator.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"easclient.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"easj2ee.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jakarta-oro-2.0.7.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jbcl.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"log4j-1.2.7.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"jdom.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<jar href=\"xercesImpl.jar\" main=\"false\" download=\"eager\"/>");
    out.println("<property name =\"javaws.login \"  " + "value=" + "\"" + login + "\"" + "/>");
    out.println("<property name =\"javaws.pass \"  " + "value=" + "\"" + pass + "\"" + "/>");
    out.println("</resources>");
    out.println("<application-desc main-class=\"pl.speednet.pzp.PzP\"/>");
    out.println("</jnlp>");
      public void destroy() {
      super.destroy();
    This is the brief of code which starts the servlet
    <form action="http://212.89.104.27:8080/PzP_INSTALL/servletpzp" method="post">
      <input type="hide" name="login" value=<%=l%>>
      <input type="hide" name="pass" value=<%=p%>>
      <input type=submit value=Start PZP>
    </form>
    This is the web.xml file code.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
      <servlet>
        <servlet-name>ServletPZP</servlet-name>
        <servlet-class>pzp_install.ServletPZP</servlet-class>
      </servlet>
      <servlet-mapping>
        <servlet-name>ServletPZP</servlet-name>
        <url-pattern>/servletpzp</url-pattern>
      </servlet-mapping>
      <mime-mapping>
        <extension>jar</extension>
        <mime-type>application/x-java-archive</mime-type>
      </mime-mapping>
      <mime-mapping>
        <extension>jnlp</extension>
        <mime-type>application/x-java-jnlp-file</mime-type>
      </mime-mapping>
    </web-app>

  • Hi, i am facing problem as to how to pass arguments received by my swf file to an .exe that i have c

    hi, i am facing problem as to how to pass arguments received by my swf file to an .exe that i have created from a C++ project...do i need to tweak the code in the C++ project in some way that it accepts the input from the .swf file?

    Hi there and welcome to our community
    What you need to do is click the link below, then choose the forum most appropriate to the product you are using. In this forum we discuss the operation of the forums themselves.
    http://forums.adobe.com/index.jspa
    Best of luck to you in solving your issue! Rick

  • Why reloading pure asset SWF with AIR sdk 3.6+ doesn't work?

    Hi, I posted this in the AIR beta channel, but I think it suits better here... I'm sorry for double posting.
    Hi,
    I have a game targeting iOS using AIR sdk that needs to load many swf assets from the disk (packaged with the game). When using AIR sdk 3.5, everything runs just fine. When upgrading the sdk to 3.6 or later (-swf-version=19, 20, 21), we ran into the following problems:
    1) The packaging time (making the ipa file for iOS) passes from 15 minutes to 40+ minutes.
    2) The game can't load any swf twice (ie. reload a swf).
    The first problem is not a big deal. We only have to wait a little bit more. Our guess is that is has to do with new feature introduced by the sdk 3.6, which will go through all packaged secondary swfs and remove the code from it, and since we have lot of swf assets, it takes more time.
    The second problem is way more serious, as I have to be able to reload assets according to player's action. Since we have a ton of assets, I can't keep them all in the memory as we could quickly run out of memory.
    I know that there's a documented limitation of sdk 3.6 which states:
    In AIR apps on iOS running in AOT mode there is a problem when a SWF is reloaded. Therefore reloading a SWF will not be allowed for AIR apps for iOS in AOT mode and attempting to do so will result in following error:
    Error 3764: Reloading a SWF is not supported on this operating system
    It also says that "Reloading of pure asset SWFs will work with AIR 3.7". However, that's not true, since all my assets are pure asset SWF without any code inside. It won't work, even with AIR 3.8.
    While searching on the internet, I came across a forum post that says that the only way to know if a swf is a pure asset swf, is by using swfdump.exe, and searching for the DoABC2 tag. I did it, and effectively, DoABC2 tag was there, but empty.
    So my first observation is that:
    - Pure asset SWF file containing empty DoABC2 tag can be reloaded using AIR SDK 3.5
    - Pure asset SWF file containing empty DoABC2 tag can't be reloaded using AIR SDK 3.6+
    It seems to me that AIR SDK 3.6+ doesn't care if the tag is empty or not. If it is there, then it's not ok.
    Then I wanted to know why my SWFs have this empty tag. After lot of tests, it turns out that it is because I am using jsfl to automate the export of assets from a FLA file. And there comes my second observation:
    - When exporting a swf without code from Flash IDE (Ctrl+Alt+Shift+S), there's no empty DoABC2 tag.
    - When exporting a swf from the Flash IDE's library (right click on the library Movieclip -> Export Flash movie...), empty DoABC2 tag is automatically inserted.
    Unfortunately, my jsfl script uses thee same Library export functionality, and it produces the same "contaminated" swf. Why doesn't it produce the same SWF from both ways of export? I have no idea.
    In the perfect world, the AIR SDK would not only look for the DoABC2 tag, but it should check whether if there's code inside. Also, Flash should use the same export process disregarding if it is being called from the IDE or the Library, and not inserting empty DoABC2 tag when there's no code.
    As for now, I can't find any workaround to solve my problem. That means that I'm stuck with swf-version=18, and I can't benefit from all the cool features such as rectangle textures, new Context3DTextureFormat etc.
    If anyone has a solution, or simply pointing out what I'm doing wrong here, please share it.
    Thanks for reading.
    Iojeirg

    Hi makc3d,
    Thanks for the response. After all that time I started losing hope.
    I would not say that the abvious solution is to remove the tag. I think it should not be put there in the first place if there's no code at all. Moreover, this only happens when exporting a MC from the Library, and it works just fine when exporting normally (publish). It seems more like a bug than an expected behaviour.
    Also, AIR should check for actual code in this tag instead of relying only on the tag itself.
    Your solution is a nice workaround, and I will certainly try that out. But as I said, it will not fix the original bug, it will only patch it later on in the process.

  • How can I pass arguments to a TestStand sequence with LabWindows 6 ?

    Hi
    I have created sequences in a TestStand file.
    I want to program a sequence with Labwindows 6 which would call all these existing sequences (containing parameters).
    I don't have any problems to create the steps "SequenceCall" but i don't know how to pass arguments to the sequences with the TS API.
    I have used the look-up strings "TS.SData.SFPath", "TS.SData.SeqName", "TS.SData.ThreadOpt" to program the sequence file / sequence and the multithread option. But now how to program the arguments passing ? I think there is something with the lookup string "ST.SData.ActualArgs"...
    Thank u very much for any help

    I'm not sure if you want to pass values from TestStand to LabWindows or if you want to pass values in TestStand from a sequence call step to a called sequence.
    To get TestStand variables from LabWIndows, use the following function:
    tsErrChk (TS_PropertyGetValNumber(testData->seqContextCVI, &errorInfo, "Locals.StartPoint", 0, &dStartPt));
    iStartPt = (int)dStartPt;
    The TS_PropertyGetValNumber gets the TestStand variable Locals.StartPoint and puts it into the LabWindows variable called dStartPoint. Numbers to and from Test Stand are always a double type. The next line converts it to an integer.
    To put a LabWindows value to TestStand, use TS_PropertyPutValNumber.
    To pass values from a sequence call step to a called sequence, create variables in the Parameters t
    ab on your main sequence. Create same variables on the Parameters tab of the called sequence. In main, specify module to be called in calling step. There is a paramters section on the Edit Sequence Call dialog box which appears. Check the Use Prototype of the Selected Sequence box. You can then list all the parameter variables in the parameters section.
    Hope this is what you want.
    - tbob
    Inventor of the WORM Global

  • Passing arguments to a Global Activity with Instance Access

    I'm passing arguments to a Global Activity which has Instance access and then I need to assign agrument values to Instance variables. But, somehow arguments not being passed when I enable "Has Instance Access". If I turn instance access off then arguments pass but unfortunately I cannot assign due to instance not being available. Fyi, I'm using WAPI and argument names in HTML form are prefixed with "arg_" as per WAPI documentation.
    I would appreciate any help in resolving the issue.
    Thanks in advance.
    MK

    Same problem ...
    I tested with JSP.parameters["arg_myArg"] ... no result

  • How to run a java class from a shell script with passing arguments

    hi,
    I have a jar with all the required classes. I was using ant to run the classes i needed.
    But now i want to use a shell script to run the class, also the class accepts some arguments so when script is run it should accept arguments.
    So can any one tell me how to set class paths, jar location and call the required class from shell script or batch file with passing arguments to it.
    Thanks in advance.

    Let's say that the order of arguments is as below
    1. Jar file name
    2. Classpath
    Your shell script would look like this
    java -cp $CLASSPATH:$2 -jar $1 I am assuming that your jar file has the required main-class entry in its manifest. Note that $1...$9 represent the arguments to this shell script.
    The same goes for a batch file
    java -cp %CLASSPATH%;%2 -jar %1

  • Can we resize swf file created with AIR API in AIR application?

    Hi,
    I created a .swf file with AIR API.
    I want to open and resize it in AIR application. This .swf file taking dimensions as default in which it opens.
    I want to change its width and height.
    Is there any way to change its dimensions?
    Please suggest me the solution.
    thank you

    Loading a Flex WindowedApplication into another is not supported.  However,
    you might be able to access the WindowedApplication and size it.  Sub-Apps
    in AIR should be based on Application, not WindowedApplication.

  • FileStream problem with AIR deployment

    I use FileStream to load local XML file. When I test the desktop application directly from Flex everything is ok but when I install it with AIR, the application work but the file is not loaded. Here is the code I use:
    import flash.filesystem.*;
     var applicationDirectoryPath:File = File.applicationDirectory; 
    var nativePathToApplicationDirectory:String = applicationDirectoryPath.nativePath.toString(); 
    nativePathToApplicationDirectory +=
    "/config_poste_temps.xml"; 
    var file:File = new File(nativePathToApplicationDirectory); 
    var fs:FileStream = new FileStream(); 
    fs.open(file, FileMode.READ);
    var config:XML = XML(fs.readUTFBytes(fs.bytesAvailable)); 
    fs.close();
    plan.text = config.division;
    Regards

    I am having the same problem as simon_lucas although my config is slightly different:
    FlashBuilder 4 with SDK 4.6, Current app is with SDK 2.5.
    Trying to update with SDK 3.2, I double-checked per Horia Olaru that I do use the application updater swc:
             <path-element>D:\Program Files\Adobe\Adobe Flash Builder 4.6\sdks\4.6.0 - Air 3.2\frameworks\libs\air\applicationupdater.swc</path-element>
             <path-element>D:\Program Files\Adobe\Adobe Flash Builder 4.6\sdks\4.6.0 - Air 3.2\frameworks\libs\air\applicationupdater_ui.swc</path-element>
    But I still have the 16815 error.
    If I change the update.xml to be <update xmlns="http://ns.adobe.com/air/framework/update/description/2.5">
    instead of <update xmlns="http://ns.adobe.com/air/framework/update/description/3.2">, I am proposed to download the new app and then I get an error 16824.
    Please HELP!

Maybe you are looking for