Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Dec 2009
    Posts
    16
    Thanks
    2
    Thanked 0 Times in 0 Posts

    sending an xml conetnt using ajax

    hi,

    My server has an xml configuration file which I want to receive to my browser.
    I can do HTTPrequset directly to the file config.xml and get it in the responseXML, but I want to do it im more secure way, so the post request will be to some script ("python" in my case), which will open and read the file.

    if my xml file looks like this:
    <test>some_data</test>

    what shoud be the content of the response?

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,458
    Thanks
    76
    Thanked 4,373 Times in 4,338 Posts
    And this is a Java-related question in what way???

    And how will serving up the file from something other than a simple HTTP request for the file be safer??

    [I know ways that it can be safer, but because the client has to make a request, no matter what you do somebody can hack the client code and probably figure out ways around your protection.]
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #3
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    I haven't moved this yet since I'm not quite sure that this isn't a java problem yet.
    config.xml and HTTPRequest sort of lean this towards JSP (have I ever mentioned how I hate jsp?). Perhaps we could get some clarification from the OP as to if they are looking for Javascript in particular, or if we are looking at integrating javascript with jsp.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #4
    New Coder
    Join Date
    Dec 2009
    Posts
    16
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Old Pedant View Post
    And this is a Java-related question in what way???

    And how will serving up the file from something other than a simple HTTP request for the file be safer??

    [I know ways that it can be safer, but because the client has to make a request, no matter what you do somebody can hack the client code and probably figure out ways around your protection.]
    sorry folks,
    I accidently post my question in the wrong forum...
    I meant for the javascriptProgramming....

  • #5
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    Quote Originally Posted by amitye View Post
    sorry folks,
    I accidently post my question in the wrong forum...
    I meant for the javascriptProgramming....
    Ok, moving from Java to Javascript forum.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •