HI,

Try giving the same url you use directly in the browser..
i.e, something like http://localhost/yourproject/testServlet. Make
sure your web server is started when you run you flex application.

Note: When you run a project from flex builder, it is just like
opening a swf with a browser. No web server is involved.

If you had moved the resulting swf file into the project directory
(place where you had dropped your html files earlier)
 you can access your servlet by using a url like /PrefetchService/
PrefetchServiceServlet"

Hope it helps.

Thanks,
Venkat
http://techmytongue.blogspot.com


On Nov 11, 12:04 pm, harshagalla <[EMAIL PROTECTED]> wrote:
> i think you did not get my query correctly..
>
> i have the followoing project structure..
>
> PrefetchService.swf, .html files in the folder.." \DCs\test.sap.com\nw
> \lm\itsam\cdp\prefetchservice\test_web\_comp\webContent
> \PrefetchService.swf"
>
> and servlet in the following folder.."\DCs\test.sap.com\nw\lm\itsam\cdp
> \prefetchservice\test_web\_comp\source\com\sap\itsam\cdp\prefetch\test
> \PrefetchServiceServlet.java"
>
> so now how do i five the url in the http service so that it sends a
> post to the servlet...
>
> On Nov 11, 11:46 am, "Vinod M. Jacob" <[EMAIL PROTECTED]> wrote:
>
> > Try this...
>
> > *
>
> > public var uploadURL:String = "path to your servlet" ;
> > public var fileRef:FileReference = new FileReference();
>
> > private function uploadFile():void {
> >              var request:URLRequest = new URLRequest(uploadURL)
> >              var variable:URLVariables = new URLVariables();
> >              variable.Name = NameTxt.text;
> >              variable.Key = KeywordsTxt.text;
> >              variable.Desc = DescTxt.text;
> >              request.data = variable;
> >              request.method="POST";
> >                 fileRef.upload(request);
>
> > }*
> > On Mon, Nov 10, 2008 at 5:07 PM, harshagalla <[EMAIL PROTECTED]> wrote:
>
> > > Hi all,
> > > I am new to using flex
> > > Im working on  a application where the front end makes a post request
> > > to the servlet.
> > > I don't know how to set the URL in the httpservice call.
> > > In a web java project in which front end was a basic html page with a
> > > form to be posted to the servlet, the URL was given just as "/
> > > PrefetchService/PrefetchServiceServlet" which is the location of the
> > > servlet; but what I dont understand is the same representation for
> > > httpservice url in flex does not send a call to the servlet. Though
> > > this could be done by giving the entire URL to the location of the
> > > servlet, the server on which the project is run changes regularly and
> > > so either I need to dynamically generate the URL and then make a http
> > > service call (or) there should be some way to handle calls to a
> > > servlet in the same project . I would like to know how I could get rid
> > > of this problem.
>
> > > Thanks in advance....
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to