Loading ...
Sorry, an error occurred while loading the content.

RE: Response->Redirect

Expand Messages
  • Raghu.Nalamada@ubsw.com
    Thanks Josh & Brock I have tried using Below my $Sdate = $Server- URLEncode( $Start_Date ); my $Edate = $Server- URLEncode( $End_Date ); my $url =
    Message 1 of 7 , Nov 1, 2002
    • 0 Attachment
      Thanks Josh & Brock

      I have tried using Below

      my $Sdate = $Server->URLEncode("$Start_Date");
      my $Edate = $Server->URLEncode("$End_Date");
      my $url = $Server->URL('http://Test/Graph.pl', { Start_Date => $Sdate,End_Date => $Edate,Format => "$Format" });
      $Response->Redirect("$url")

      Iam retrieving the values in Graph.pl as CGI Parameter Value and iam getting the below for my SQl iam using and as u know is not a valid SQL

      Date between Apr%2001%202002 and Apr%2001%202002

      When i generate the Graph on Browser directly using Graph.pl?Start_Date=Apr+01+2002&End_Date=May+01+2002&Format="OBS"
      i get
      Date between 'Apr 01 2002' and 'May 01 2002' and Graph gets generated.

      Rather than trying to replace % with a space is there anyway i can rectify ?

      Regards

      Raghu


      -----Original Message-----
      From: K Broc Seib [mailto:bseib@...]
      Sent: Friday, November 01, 2002 11:40 AM
      To: Nalamada, Raghu
      Cc: asp@...; bseib@...
      Subject: Re: Response->Redirect


      Hi Raghu,

      Two things:

      (1) On passing args on a Redirect: I have had no problem passing
      them on as part of the url, like

      $params = {
      'name' => 'Fred',
      'wife' => 'Wilma',
      }
      $url = '/server/relative/path/script.pl'; ## or could be "http://blahblah/x"

      $full_url = $Server->URL($url,$params);
      $Response->Redirect($full_url);


      You may also need $Server->URLEncode() depending on if you have odd
      characters, like spaces, in your $param structure's keys or values.

      In addition, if you are passing around args from script to script
      that need to be preserved, you may have to pre-fill your $param struct
      using $Request->Params() and add/delete keys you need or don't want.

      Checkout apache-asp docs for:

      $Server->URL($url, \%params)
      $Server->URLEncode($string)
      $Request->Params()



      (2) Is your goal to have dynamic image appear within your pages? In
      that case, you should just include your image like it is any other
      image in your html document, but make the image's url point to your
      code, e.g.

      <img src="/path/to/your/script/make_png_image.pl">

      Then have your script 'make_png_image.pl' return the proper MIME type
      to your browser, perhaps 'image/png'. E.g.,

      my $im = new GD::Image(10,10);
      ## do the drawing with $im

      $Response->{ContentType} = 'image/png'; ## read about these
      $Response->BinaryWrite($im->png); ## read about these

      That's it in general; I didn't test any of that code, but that should
      convey the concept and point you toward the right routines to read
      about in the docs.

      Hope that helps.

      -broc



      > Hi All ,
      >
      > As i have been having problems with GD:Graph in Apache::Asp , I =
      > am generating the GD using a perl scripts and hence want to call the =
      > perlscripts like
      >
      > $Response->Redirect("http:\\testcmp:8080\scripts\gd.pl") , wanted to =
      > know if we could pass @args like Response->Include for passing CGi Query =
      > Paramters instead of constructing the Query Parameters like =
      > gd,pl?Start=3D"Yes"+End=3D"No".
      >
      >
      > Thanks
      >
      > Raghu

      Visit our website at http://www.ubswarburg.com

      This message contains confidential information and is intended only
      for the individual named. If you are not the named addressee you
      should not disseminate, distribute or copy this e-mail. Please
      notify the sender immediately by e-mail if you have received this
      e-mail by mistake and delete this e-mail from your system.

      E-mail transmission cannot be guaranteed to be secure or error-free
      as information could be intercepted, corrupted, lost, destroyed,
      arrive late or incomplete, or contain viruses. The sender therefore
      does not accept liability for any errors or omissions in the contents
      of this message which arise as a result of e-mail transmission. If
      verification is required please request a hard-copy version. This
      message is provided for informational purposes and should not be
      construed as a solicitation or offer to buy or sell any securities or
      related financial instruments.


      ---------------------------------------------------------------------
      To unsubscribe, e-mail: asp-unsubscribe@...
      For additional commands, e-mail: asp-help@...
    • K Broc Seib
      In your code you should be able to read in the params like this: $start_date = $Request- Param( Start_Date ); $end_date = $Request- Param( End_Date );
      Message 2 of 7 , Nov 1, 2002
      • 0 Attachment
        In your code you should be able to read in the params like this:

        $start_date = $Request->Param('Start_Date');
        $end_date = $Request->Param('End_Date');
        $format = $Request->Param('Format');

        And you will get the decoded values (i.e. %20 gets translated to a
        space, etc.)

        ...or are you not using Apache::ASP in Graph.pl? What are you using?
        CGI.pm module? (should still work...) Can Graph.pl just become Graph.asp?

        ??

        Broc

        > Thanks Josh & Brock
        >
        > I have tried using Below
        >
        > my $Sdate =3D $Server->URLEncode("$Start_Date");
        > my $Edate =3D $Server->URLEncode("$End_Date");
        > my $url =3D $Server->URL('http://Test/Graph.pl', { Start_Date =3D> =
        > $Sdate,End_Date =3D> $Edate,Format =3D> "$Format" });
        > $Response->Redirect("$url")
        >
        > Iam retrieving the values in Graph.pl as CGI Parameter Value and iam =
        > getting the below for my SQl iam using and as u know is not a valid SQL
        >
        > Date between Apr%2001%202002 and Apr%2001%202002 =20
        >
        > When i generate the Graph on Browser directly using =
        > Graph.pl?Start_Date=3DApr+01+2002&End_Date=3DMay+01+2002&Format=3D"OBS"
        > i get=20
        > Date between 'Apr 01 2002' and 'May 01 2002' and Graph gets generated.
        >
        > Rather than trying to replace % with a space is there anyway i can =
        > rectify ?
        >
        > Regards
        >
        > Raghu=20
        >
        >
        > -----Original Message-----
        > From: K Broc Seib [mailto:bseib@...]
        > Sent: Friday, November 01, 2002 11:40 AM
        > To: Nalamada, Raghu
        > Cc: asp@...; bseib@...
        > Subject: Re: Response->Redirect=20
        >
        >
        > Hi Raghu,
        >
        > Two things:
        >
        > (1) On passing args on a Redirect: I have had no problem passing
        > them on as part of the url, like
        >
        > $params =3D {
        > 'name' =3D> 'Fred',
        > 'wife' =3D> 'Wilma',
        > }
        > $url =3D '/server/relative/path/script.pl'; ## or could be =
        > "http://blahblah/x"
        >
        > $full_url =3D $Server->URL($url,$params);
        > $Response->Redirect($full_url);
        >
        >
        > You may also need $Server->URLEncode() depending on if you have odd
        > characters, like spaces, in your $param structure's keys or values.
        >
        > In addition, if you are passing around args from script to script
        > that need to be preserved, you may have to pre-fill your $param struct
        > using $Request->Params() and add/delete keys you need or don't want.
        >
        > Checkout apache-asp docs for:
        >
        > $Server->URL($url, \%params)
        > $Server->URLEncode($string)
        > $Request->Params()
        >
        >
        >
        > (2) Is your goal to have dynamic image appear within your pages? In
        > that case, you should just include your image like it is any other
        > image in your html document, but make the image's url point to your
        > code, e.g.
        >
        > <img src=3D"/path/to/your/script/make_png_image.pl">
        >
        > Then have your script 'make_png_image.pl' return the proper MIME type
        > to your browser, perhaps 'image/png'. E.g.,
        >
        > my $im =3D new GD::Image(10,10);
        > ## do the drawing with $im
        >
        > $Response->{ContentType} =3D 'image/png'; ## read about these
        > $Response->BinaryWrite($im->png); ## read about these
        >
        > That's it in general; I didn't test any of that code, but that should
        > convey the concept and point you toward the right routines to read
        > about in the docs.
        >
        > Hope that helps.
        >
        > -broc
        >
        >
        >
        > > Hi All ,
        > >=20
        > > As i have been having problems with GD:Graph in Apache::Asp =
        > , I =3D
        > > am generating the GD using a perl scripts and hence want to call the =
        > =3D
        > > perlscripts like
        > >=20
        > > $Response->Redirect("http:\\testcmp:8080\scripts\gd.pl") , wanted to =
        > =3D
        > > know if we could pass @args like Response->Include for passing CGi =
        > Query =3D
        > > Paramters instead of constructing the Query Parameters like =3D
        > > gd,pl?Start=3D3D"Yes"+End=3D3D"No".
        > >=20
        > >=20
        > > Thanks
        > >=20
        > > Raghu
        >
        > Visit our website at http://www.ubswarburg.com
        >
        > This message contains confidential information and is intended only
        > for the individual named. If you are not the named addressee you
        > should not disseminate, distribute or copy this e-mail. Please
        > notify the sender immediately by e-mail if you have received this
        > e-mail by mistake and delete this e-mail from your system.
        >
        > E-mail transmission cannot be guaranteed to be secure or error-free
        > as information could be intercepted, corrupted, lost, destroyed,
        > arrive late or incomplete, or contain viruses. The sender therefore
        > does not accept liability for any errors or omissions in the contents
        > of this message which arise as a result of e-mail transmission. If
        > verification is required please request a hard-copy version. This
        > message is provided for informational purposes and should not be
        > construed as a solicitation or offer to buy or sell any securities or
        > related financial instruments.
        >
        >
        ---------------------------------------------------------------------
        > To unsubscribe, e-mail: asp-unsubscribe@...
        > For additional commands, e-mail: asp-help@...

        ---------------------------------------------------------------------
        To unsubscribe, e-mail: asp-unsubscribe@...
        For additional commands, e-mail: asp-help@...
      • Raghu.Nalamada@ubsw.com
        Hi Brock , Thanks for your reply , I have a main page where i retrieve Query paramters and pass it on to different .asp pages depending upon choice , I was
        Message 3 of 7 , Nov 1, 2002
        • 0 Attachment
          Hi Brock ,

          Thanks for your reply , I have a main page where i retrieve Query paramters and pass it on to different .asp pages depending upon choice , I was already doing this
          $start_date = $Request->Param('Start_Date');
          $end_date = $Request->Param('End_Date');
          $format = $Request->Param('Format'); and then i was doing this again

          my $Sdate = $Server->URLEncode("$Start_Date");
          my $Edate = $Server->URLEncode("$End_Date"); , i have removed this it works fine.

          I tried generating Graphs in .asp page , it was clashing with ASP code and generating error like GD::Graph not declared and few times i would get inconsistent Graphs and hence reverted to Generating Graph's using Perl.

          Regards

          Raghu


          -----Original Message-----
          From: K Broc Seib [mailto:bseib@...]
          Sent: Friday, November 01, 2002 3:43 PM
          To: Nalamada, Raghu
          Cc: asp@...; bseib@...
          Subject: Re: Response->Redirect


          In your code you should be able to read in the params like this:

          $start_date = $Request->Param('Start_Date');
          $end_date = $Request->Param('End_Date');
          $format = $Request->Param('Format');

          And you will get the decoded values (i.e. %20 gets translated to a
          space, etc.)

          ...or are you not using Apache::ASP in Graph.pl? What are you using?
          CGI.pm module? (should still work...) Can Graph.pl just become Graph.asp?

          ??

          Broc

          > Thanks Josh & Brock
          >
          > I have tried using Below
          >
          > my $Sdate =3D $Server->URLEncode("$Start_Date");
          > my $Edate =3D $Server->URLEncode("$End_Date");
          > my $url =3D $Server->URL('http://Test/Graph.pl', { Start_Date =3D> =
          > $Sdate,End_Date =3D> $Edate,Format =3D> "$Format" });
          > $Response->Redirect("$url")
          >
          > Iam retrieving the values in Graph.pl as CGI Parameter Value and iam =
          > getting the below for my SQl iam using and as u know is not a valid SQL
          >
          > Date between Apr%2001%202002 and Apr%2001%202002 =20
          >
          > When i generate the Graph on Browser directly using =
          > Graph.pl?Start_Date=3DApr+01+2002&End_Date=3DMay+01+2002&Format=3D"OBS"
          > i get=20
          > Date between 'Apr 01 2002' and 'May 01 2002' and Graph gets generated.
          >
          > Rather than trying to replace % with a space is there anyway i can =
          > rectify ?
          >
          > Regards
          >
          > Raghu=20
          >
          >
          > -----Original Message-----
          > From: K Broc Seib [mailto:bseib@...]
          > Sent: Friday, November 01, 2002 11:40 AM
          > To: Nalamada, Raghu
          > Cc: asp@...; bseib@...
          > Subject: Re: Response->Redirect=20
          >
          >
          > Hi Raghu,
          >
          > Two things:
          >
          > (1) On passing args on a Redirect: I have had no problem passing
          > them on as part of the url, like
          >
          > $params =3D {
          > 'name' =3D> 'Fred',
          > 'wife' =3D> 'Wilma',
          > }
          > $url =3D '/server/relative/path/script.pl'; ## or could be =
          > "http://blahblah/x"
          >
          > $full_url =3D $Server->URL($url,$params);
          > $Response->Redirect($full_url);
          >
          >
          > You may also need $Server->URLEncode() depending on if you have odd
          > characters, like spaces, in your $param structure's keys or values.
          >
          > In addition, if you are passing around args from script to script
          > that need to be preserved, you may have to pre-fill your $param struct
          > using $Request->Params() and add/delete keys you need or don't want.
          >
          > Checkout apache-asp docs for:
          >
          > $Server->URL($url, \%params)
          > $Server->URLEncode($string)
          > $Request->Params()
          >
          >
          >
          > (2) Is your goal to have dynamic image appear within your pages? In
          > that case, you should just include your image like it is any other
          > image in your html document, but make the image's url point to your
          > code, e.g.
          >
          > <img src=3D"/path/to/your/script/make_png_image.pl">
          >
          > Then have your script 'make_png_image.pl' return the proper MIME type
          > to your browser, perhaps 'image/png'. E.g.,
          >
          > my $im =3D new GD::Image(10,10);
          > ## do the drawing with $im
          >
          > $Response->{ContentType} =3D 'image/png'; ## read about these
          > $Response->BinaryWrite($im->png); ## read about these
          >
          > That's it in general; I didn't test any of that code, but that should
          > convey the concept and point you toward the right routines to read
          > about in the docs.
          >
          > Hope that helps.
          >
          > -broc
          >
          >
          >
          > > Hi All ,
          > >=20
          > > As i have been having problems with GD:Graph in Apache::Asp =
          > , I =3D
          > > am generating the GD using a perl scripts and hence want to call the =
          > =3D
          > > perlscripts like
          > >=20
          > > $Response->Redirect("http:\\testcmp:8080\scripts\gd.pl") , wanted to =
          > =3D
          > > know if we could pass @args like Response->Include for passing CGi =
          > Query =3D
          > > Paramters instead of constructing the Query Parameters like =3D
          > > gd,pl?Start=3D3D"Yes"+End=3D3D"No".
          > >=20
          > >=20
          > > Thanks
          > >=20
          > > Raghu
          >
          > Visit our website at http://www.ubswarburg.com
          >
          > This message contains confidential information and is intended only
          > for the individual named. If you are not the named addressee you
          > should not disseminate, distribute or copy this e-mail. Please
          > notify the sender immediately by e-mail if you have received this
          > e-mail by mistake and delete this e-mail from your system.
          >
          > E-mail transmission cannot be guaranteed to be secure or error-free
          > as information could be intercepted, corrupted, lost, destroyed,
          > arrive late or incomplete, or contain viruses. The sender therefore
          > does not accept liability for any errors or omissions in the contents
          > of this message which arise as a result of e-mail transmission. If
          > verification is required please request a hard-copy version. This
          > message is provided for informational purposes and should not be
          > construed as a solicitation or offer to buy or sell any securities or
          > related financial instruments.
          >
          >
          ---------------------------------------------------------------------
          > To unsubscribe, e-mail: asp-unsubscribe@...
          > For additional commands, e-mail: asp-help@...

          Visit our website at http://www.ubswarburg.com

          This message contains confidential information and is intended only
          for the individual named. If you are not the named addressee you
          should not disseminate, distribute or copy this e-mail. Please
          notify the sender immediately by e-mail if you have received this
          e-mail by mistake and delete this e-mail from your system.

          E-mail transmission cannot be guaranteed to be secure or error-free
          as information could be intercepted, corrupted, lost, destroyed,
          arrive late or incomplete, or contain viruses. The sender therefore
          does not accept liability for any errors or omissions in the contents
          of this message which arise as a result of e-mail transmission. If
          verification is required please request a hard-copy version. This
          message is provided for informational purposes and should not be
          construed as a solicitation or offer to buy or sell any securities or
          related financial instruments.


          ---------------------------------------------------------------------
          To unsubscribe, e-mail: asp-unsubscribe@...
          For additional commands, e-mail: asp-help@...
        • Josh Chamas
          ... I believe $Server- URL() will automatically URLEncode the parameters. So do not do the URLEncode first. Regards, Josh
          Message 4 of 7 , Nov 5, 2002
          • 0 Attachment
            Raghu.Nalamada@... wrote:
            > Thanks Josh & Brock
            >
            > I have tried using Below
            >
            > my $Sdate = $Server->URLEncode("$Start_Date");
            > my $Edate = $Server->URLEncode("$End_Date");
            > my $url = $Server->URL('http://Test/Graph.pl', { Start_Date => $Sdate,End_Date => $Edate,Format => "$Format" });
            > $Response->Redirect("$url")
            >
            > Iam retrieving the values in Graph.pl as CGI Parameter Value and iam getting the below for my SQl iam using and as u know is not a valid SQL
            >
            > Date between Apr%2001%202002 and Apr%2001%202002
            >

            I believe $Server->URL() will automatically URLEncode the parameters.
            So do not do the URLEncode first.

            Regards,

            Josh
            ________________________________________________________________
            Josh Chamas, Founder phone:925-552-0128
            Chamas Enterprises Inc. http://www.chamas.com
            NodeWorks Link Checking http://www.nodeworks.com


            ---------------------------------------------------------------------
            To unsubscribe, e-mail: asp-unsubscribe@...
            For additional commands, e-mail: asp-help@...
          Your message has been successfully submitted and would be delivered to recipients shortly.