Hwo to use "request" of HTTPServices in action script
hello
i have to use this code in action script
i am facing problem in "request"
Check the fault your request is generating. See the fault
string you must be getting back, look into it and get the error
number from there. Search for that error number in flex, it will
make your search more sensible and specific.
Similar Messages
-
hiiiiiiiiiiiiiiiiii
can i use my flax sdk 3.5 action script-3 code into flash builder 4.5 .....if yes so plz give me detail how??..with step....Ya i tried by keeping <fx:Declarations> part but still it is throwing error,
In flex3 we are making a component ex: <mx:canvas> and changeing that component to
<cairngorm:ServiceLocator xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:cairngorm="com.adobe.cairngorm.business.*">
</cairngorm:ServiceLocator>
if any one used 4.5 with cairngorm let me know
thanks -
How to use fscommand or equivilant in action script 3
Hello every one,
I am new to action script 3, I want to burn my flash
projector file on a CD so that when it plays it opens in full
screen mode with movie size set to 100% and no scaling allowed. I
use to do it with FScommand in previous versions but it doesn't
work in flashcs3. Can someone help this poor soul how to use it in
actionscript3.
Thanks in advance.do a search for fscommand in the Flash CS3 help and look for
a file heading called AS2.0 Migration Once you find that file, do a
search for fscommand again inside the document. -
How to use default cftree icons in action script?
How do you reference the default cftree node icons from an
action script? I found this information in the flex documentation
but I can't figure out how to reference the icons from my
<cfformitem type="script">. Is this possible?
http://www.flex2doc.com/projects/framework/asdoc/mx/controls/Tree.html
defaultLeafIcon="TreeNodeIcon in assets.swf"
disclosureOpenIcon="TreeDisclosureOpen in assets.swf"
folderClosedIcon="TreeFolderClosed in assets.swf"
folderOpenIcon="TreeFolderOpen in assets.swf"CROSS-POSTED to: ColdFusion and Flash Integration
-
Paging Problem in JSP using request.
Dear Friends,
I have an issue in JSP paging using request. In my action servelet my code is set as follows.
request.setAttribute("clients", clients);
In JSP I have
<%ClientDataBean[] clients = (ClientDataBean[]) request.getAttribute("clients");
If I navigate to another page it becomes null. I could make through session. If there any way to handle request param while navigating between pages.
Thanks,public class PagingBean{
private int pageSize;
private int pagePointer;
private int pages;
private int startPage;
private int lastPage;
private List dataList;
private List resultantList;
//respective getters and setters
// write getResultantList() method in such a way that it gives the resultantList which is to be displayed as per persisted values of all other properties in Bean and use it for displaying on your view.
}write your backing bean / Action Class to manage the respective persisted values according to the actions done.
Or if you are not intrested in re-inventing the wheel please go ahead and use custom built solutions.
please google for finding such.
could startup with the one below
http://java-source.net/open-source/jsp-tag-libraries
REGARDS,
RaHuL -
Retrieve alert values for use as parameter in corrective action sql script
I am trying to write a corrective action sql script to kill a session that is blocking other sessions. I have the "blocking session count" metric set and the alert is firing correctly.
Is there any way to retrieve the sid and serial number from the alert generated and use it in a corrective action sql script?
Here is the alert generated:
Target Name=myproddb.world
Target Type=Database Instance
Host=myprodserver
Metric=Blocking Session Count
Blocking Session ID=SID: 522 Serial#: 5228
Timestamp=Mar 4, 2008 5:57:12 PM EST
Severity=Warning
Message=Session 522 is blocking 1 other sessions
Notification Rule Name=Testing Corrective actions
Notification Rule Owner=sysman
Clearly the sid, and serial # is contained within the alert Message field
what I want to write for the sql script is :
alter system kill session '%sid%,%serial_no%' immediate;
and have GC pass in the sid and serial_no to the script.
The "Target Properties" listed on the right of the Edit Corrective Action screen lists minimal details pertaining to the alert and certainly not the session sid, serial no.
Generically, is there any way to retrieve the values from an alert and use them in a corrective action script or job?
I've looked into getting the values from the mgmt$alert_history table, but I'm hoping that GC can pass the values to the sql script.
thanks in advance for your help.Hi
You can implementing a procedure like this.
1. When a block session count alarms occurs, there is a column in the v$lock that you can examine.
#!/bin/ksh
#kill_block_session.sh
#first export your variables
export ORACLE_HOME=/oracle/product/10.2.0.3
export ORACLE_SID=SIDNAME
$ORACLE_HOME/bin/sqlplus "/ as sysdba" << EOF
execute immediate killed_blocks;
EOF
# end
The killed_blocks is a procedure:
create procedure
declare
v_sid varchar2(15);
v_serial varchar2(15);
-- now a sql query that retrieve the sid and serial
-- you can obtain these values from v$session and v$lock
select vs.sid,vs.serial into v_sid,v_serial
from v$session vs,v$lock vl
where vs.sid=vl.sid
and vl.block >0
-- After this, you execute a dbms_put line with these
-- values
But you understant that this response action is very dangerous, because its possible that you kill sessions that the blocking are transitient.
You must examine your enviroment and your application and establish the metric like UDM and not for only session blocking count.
You must to see:
- The type of block
- The ctime time in the v$lock for to understatn the amount of time to determine that the block is need killed.
- In my opinion you need a special UDM and deactivate the blocking sesion count
If you want help to create this UDM send me a mail to [email protected]
Regards
Robert -
How do I use the same execute advanced actions?
I am using captivate 5, windows 7
I created a slide with several click boxes and images. I name them, for example,
Click Box A Image A
Click Box B Image B
Click Box C Imsge C
And perhaps Images D, E, F
I created Advanced actions, for example,
Show_Image_A - which shows A and hides B and C - and shows Image D
Show_image_B - which shows B and hides A and C - and shows images D and E
Show_image_C - which shows C and hides A and B - and shows Image F
Then On Success for each of the click boxes, Execute advanced actions as below:
Click Box A - Show Image A
Click Box B - Show Image B
Click Box C - Show image C
Works fine.
My problem: I want to repeat this slide's actions again (and over and over) with new images, same actions of click boxes. SO - I thought I could copy it and paste it where I wanted it. I want to use it again later in the same project - and I want to be able to use it again in anothe project. I was hoping NOT to have to rebuild the slide every time, but here's what I am seeing:
The click boxes and images are in the duplicated slide - BUT they all have different names - no longer my named Click_Box_A, but Click_Box_<number>, etc each time I paste it has a new number. SO - my advanced actions still say Click Box A, Image A, etc - and obviously they're not recognized here. SO - my actions don't work here.
It is painful - and tedious! - to change the names of all the objects and then change the names in the advanced actions. There MUST be a way to do this that I don't know about?
Please can someone help me?
THANK YOU!!Hello,
You cannot copy an advanced action from one project to another, that is really a pity. Please, if you have time, fill in a feature request!
If the actions are always similar: why not create a template with the advanced actions you mostly use and create future projects on that template. I do it that way for the advanced actions I'm using often.
Lilybiri -
Unable get complete filepath from jsp page using request.getParameter()
Hey all,
i am actually trying to get the selected file path value using request.getParameter into the servlet where i will read the (csv or txt) file but i dont get the full path but only the file name(test.txt) not the complete path(C:\\Temp\\test.txt) i selected in JSP page using browse file.
Output :
FILE NAME : TEST
FILE PATH : test.txt
Error : java.io.FileNotFoundException: test.txt (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at java.io.FileReader.<init>(FileReader.java:55)
at com.test.TestServlet.processRequest(TestServlet.java:39)
at com.test.TestServlet.doPost(TestServlet.java:75)
JSP CODE:
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>DEMO SERVLET</title>
</script>
</head>
<body>
<h2>Hello World!</h2>
<form name="myform" action="TestServlet" method="POST"
FILE NAME : <input type="text" name="filename" value="" size="25" /><br><br>
FILE SELECT : <input type="file" name="myfile" value="" width="25" /><br><br>
<input type="submit" value="Submit" name="submit" />
</form>
</body>
</html>
Servlet Code :
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException, FileNotFoundException {
response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
try {
String filename = request.getParameter("filename");
out.println(filename);
String filepath = request.getParameter("myfile");
out.println(filepath);
out.println("<html>");
out.println("<head>");
out.println("<title>Servlet TestServlet</title>");
out.println("</head>");
out.println("<body>");
out.println("<h1>Servlet TestServlet at " + request.getContextPath() + "</h1>");
if (filepath != null) {
File f = new File(filepath);
BufferedReader br = new BufferedReader(new FileReader(f));
String strLine;
String[] tokens;
while ((strLine = br.readLine()) != null) {
tokens = strLine.split(",");
for (int i = 0; i < tokens.length; i++) {
out.println("<h1>Servlet TestServlet at " + tokens[i] + "</h1>");
out.println("----------------");
out.println("</body>");
out.println("</html>");
} finally {
out.close();
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
Needed Output :
FILE NAME : TEST
FILE PATH : C:\\Temp\\test.txt
Any suggestions Plz??As the [HTML specification|http://www.w3.org/TR/html401/interact/forms.html] states, you should be setting the enctype to multipart/form-data to be able to upload files to the server. In the server side, you need to process the multipart/form-data binary stream by parsing the HttpServletRequest#getInputStream(). It is a lot of work to get it to work flawlessly. There are 3rd party API's around which can do that for you, such as [Apache Commons FileUpload|http://commons.apache.org/fileupload] (carefully read the User Guide how to use it).
You can also consider to use a Filter which makes use of the FileUpload API to preprocess the request so that you can continue writing the servlet code as usual. Here is an example: [http://balusc.blogspot.com/2007/11/multipartfilter.html]. -
How to send results to actionscript using java via HttpService
Hi,
I do RPC using HttpService.
In my situation, I need to send results from Java code to
Flex Action script. I have defined a Java Servlet receiving data
from Flex application, then it processes with the data, finally the
Servlet is supposed to send some feedbacks to the client(Flex).
My question is that how can I define codes in doPost() method
that the following function will get "result" from the Java side.
public static function httpResult(event:ResultEvent):void
var result:Object = event.result;
//Do something with the result.
if (result.toString() == "success")
resultMessage.text = "Login Success";
resultMessage.text = "Invalid User";
}I advise having your servlet build an xml string, maybe put a
status attribute in the root tag, like this:
<myroot status="success">
<mytext>Some text</mytext>
</myroot>
and return that to the calling Flex client. XML is easier to
work with than Object. On the HTTPService tag, set
resultFormat="e4x", and it will return plain XML.
then in the handler, do:
var xmlResult:XML = XML(event.result); //this will already be
the myroot node
//Do something with the result.
if (xmlResult.@status== "success") //reads the status
attribute
resultMessage.text = xmlResult.mytext.text(); //get the
value of themytext text() node
resultMessage.text = "Error";
Tracy -
Use requested filepath inside application.onConnect
Hello everybody,
i am trying to improve the conditional access procedure for our VOD service and i can't find any way how
to get the VOD filepath requested by the client inside server side action script application (and use it to apply the business rules).
Taking an example, here is what i need:
- client is requesting service rtmpe://fms.vodservice.com/vodapp for file mp4:/vodlocation/my_requested_file.mp4
- inside main.asc, prefferably in application.onConnect i would like to use the requested filepath "mp4:/vodlocation/my_requested_file.mp4" as
input for conditional access procedure.
Is this possible ? And how ?
Thank you in advance!You do not supply stream anme/file name while doing a connect operation...You just connect to app and then later on you make another call to the server to play the a given stream(live or recorded) for you.
You should check for "Stream.onStatus" to check for stream name details...Though i am not sure if the query string details are available there or not. -
How do I use the button states in an action script?
In my Captivate 8 project I use smart shape as buttons. The buttons have different images presented dependent on the state of the button. I have also created a simple action script that shows what happens when the button is pressed. When the button has been pressed the normal state of the button appear. I, however, want the down state of the button to remain visible util the user presses another button. How do I accomplish this? Is there variables for the buttons different state or how can I create that?
BR,
MadeleineWhen you talk about 'actionscript' do you mean advanced or shared actions? You cannot write actionscript within Captivate, only Javascript. If you use advanced/shared actions they'll be converted on runtime to either Actionscript (for SWF output) or Javascript (for HTML5 output).
The states in shape buttons are the normal way buttons behave (not only in Flash). If you are indeed using shared/advanced actions, and you want the down state to remain until the next shape button is clicked, you'll have to go the way described by iFlashAppsToo. Create shapes that have the look of the down state, make them initially invisible and group all those shapes on one slide. Add two statements to the shared/advanced action (please do use shared actions, you'll save time):
Hide Group so that eventual down mimicked states on previously clicked buttons disappear
Show Im_Downx to show the down image for that button -
How to use a back button in action pages?
Hi all,
I have created a user login page,home page and user profile page.
If the user provide correct username and password in the login page he will be taken to home page.
In the home page he will be having his username and a link to view his profile.
When the user click on the link "My Profile(user profile)" he wil be taken to that page.
In my profile page the user can edit only his firstname,lastname and password .
On the user profile page i have placed a Back Button(using javascript: on onclick event i have used history.back()) to go back to home page after editing his profile.
If the user edit his profile for n-number of times then atlast if he wants to go back to home page-then he wil cilck the back button.
Now the problem occurs like the back button not going to home page and it simply going back with the edited history.
How to use a back button in action pages; without repeating the actions done on the page; how to redirect to the users home page?
I simply used the hyperlink in userprofile page to go to home page but when i click onit it is displaying blank home page.
I'm using hibernate orm mapping; cflogin and cflogout tags.
Any help appreciated,
Chandru Pchandrup wrote:
Hi Dan,
Dan Bracuk wrote:
Use an anchor tag.
I simply used the hyperlink(<a href="home.cfm">Home</a>) in userprofile page to go to home page but when i click onit it is displaying blank home page.
I can see your problem. You may use javascript:history.go(-1), javascript:history.go(-2), ..., to go back one page, two pages, and so on. But how does one go back an arbitrary n pages? The link href="home.cfm" isn't a good solution for the browser. It makes a new call to the server which, as you may have discovered, can overwrite all the changes made at the browser.
You should use the Javascript variable history.length. If you open n links in succession, starting from page0.cfm, then the browser holds the value of history.length as n. So, experiment with something like
<a href="javascript:history.go(-history.length)">Go home</a>
or
<a href="javascript:history.go(-history.length+1)">Go home</a> -
using action script 2 how can i send a variable value to a dynamic textbox on a different keyframe?
Thanks for your swift response.
That sounds like a good solution, but the code I have on frame 2 is this
timer = 0;
countup = function(){
timer++;
countupInterval = setInterval(countup,100);
If I added the same actionscript to frame 3 which has a dynamic textbox with a variable timer attached wouldn't it just put the timer back to 0? What I want is the last known value that was given when it was in frame 2.
I am thinking of temple run here, I am trying to caculate the total distance(set in the timer variable) from the previous try.
Hope this makes sense.
Chazwick -
I can't get the original disk to work on a reinstall. I get the message
AdobeColorCommonSetRGB
Error:
Error 2.
I teach a class using this program on Macintosh computers running 10.9.5 and the action script is not working. It will work on any program designed using the 10.8 but if you design any animation on 10.9.5 the action script will not work for the buttonsYou would have to manually delete the color profiles in question... Run the cleaner tool and see if it gets you started.
http://www.adobe.com/support/contact/cscleanertool.html
Mylenium -
How to polulate data from lookup using request dataset in OIM 11g
Hi,
Using Request dataset in OIM 11g, I need to display one dropdown with the roles those need to come from Lookup.
For Ex; I have 2 resources,i.e Resource A and Resource B. Resource A has 5 roles and Resource B has 3 Roles.
While creating a request, If I select Resource A, then I should be able to get 5 Roles and if I select Resource B then I should be able to see corresponding 3 roles.
Pls. note I have only one Look up definition , where I have roles for both Resource A and B.
I have done simillar thing in OIM 10g , however I am unable to do it using OIM 11g Request dataset.
Pls suggest.Hi BB,
I am trying to follow up your response.
You are suggestng to use prepopulate adapter for to populate respource object name, that means We have to just use an sql query from obj tabke to get the resource object name. right ?? it could be like below, what should I have entity-type value here ??
<AttributeReference name="Field1" attr-ref="act_key"
available-in-bulk="false" type="Long" length="20" widget="ENTITY" required="true"
entity-type="????"/>
<PrePopulationAdapter name="prepopulateResurceObject"
classname="my.sample.package.prepopulateResurceObject" />
</AttributeReference>
<AttributeReference name="Field2" attr-ref="Field2" type="String" length="256" widget="lookup-query"
available-in-bulk="true" required="true">
<lookupQuery lookup-query="select lkv_encoded as Value,lkv_decoded as Description from lkv lkv,lku lku
where lkv.lku_key=lku.lku_key and lku_type_string_key='Lookup.xxx.BO.Field2'
and instr(lkv_encoded,concat('$Form data.Field1', '~'))>0" display-field="Description" save-field="Value" />
</AttributeReference>
Then I need think about the 'Lookup.xxx.BO.Field2' format.
Could you please let me know if my understanding is correct?? What is the entity-type value of the first attribute reference value?
Thanks for your all help.
Maybe you are looking for
-
Airport Express wireless audio streaming keeps skipping
Hi all I'm new to the forums, so hope you're going to be able to help me! We have 2 airport express's in our apartment. One downstairs and one upstairs. Our main router is downstairs. Our living area is upstairs. We have all of our music loaded onto
-
Move equipment: drag and drop to new location
Hello, We are using CC04 to move/ copy equipment to a new location. When we copy a equipment and put to a new location it does not include the sub equipment. Is there a quick and easier was to move or copy equipment to new locations and include every
-
how the **** do i talk to someone at apple since this ******* website keeps taking me in circles
-
How do you change the battery in an ipad?
I haven't had a problem with the battery on my Ipad Air as yet but was wondering how you would change the battery if needed?
-
Lost playlists when I installed newer version of itunes.
My employer recently purchased a new computer for me and transfered all of my files to a new Macbook. (Also, I have my itunes set up to run from an external hard drive.) Anyway when I tried to open itunes, I got a message saying that Itunes couldn't