Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > passing arguments from a java file to a webpage

Reply
Thread Tools

passing arguments from a java file to a webpage

 
 
leorulez@gmail.com
Guest
Posts: n/a
 
      02-28-2006
I have a java program which can pass values (d_name,item) to any file
that I desire. If I choose html and after linking this html file with
the
java program, when I open the html file the address bar is something
like this:

"http://abcd.org/test.html?op=add&d_name=NAME&item=data@19b9e1e"

I want to use these passed values in my webpage. I was wondering if
this can be done better using perl. Is there any way I can refer these
passed arguments using perl?
Thanks for any help.

 
Reply With Quote
 
 
 
 
Matt Garrish
Guest
Posts: n/a
 
      02-28-2006

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
>I have a java program which can pass values (d_name,item) to any file
> that I desire. If I choose html and after linking this html file with
> the
> java program, when I open the html file the address bar is something
> like this:
>
> "http://abcd.org/test.html?op=add&d_name=NAME&item=data@19b9e1e"
>
> I want to use these passed values in my webpage. I was wondering if
> this can be done better using perl. Is there any way I can refer these
> passed arguments using perl?


Not on the client side. You probably want to take a look at using javascript
to read the query string.

I don't really understand what this java program is, though. Is it a servlet
that redirects to the html? If so, then you could certainly write a another
cgi script in perl to receive the arguments and send back an html page to
the user. If that's all you're after, take a look at CGI.pm (in particular
the param function).

Matt


 
Reply With Quote
 
 
 
 
J. Gleixner
Guest
Posts: n/a
 
      02-28-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> I have a java program which can pass values (d_name,item) to any file
> that I desire. If I choose html and after linking this html file with
> the
> java program, when I open the html file the address bar is something
> like this:
>
> "http://abcd.org/test.html?op=add&d_name=NAME&item=data@19b9e1e"
>
> I want to use these passed values in my webpage.


How? What's generating your HTML?

>I was wondering if
> this can be done better using perl. Is there any way I can refer these
> passed arguments using perl?


I don't fully understand what it is you are asking. The language doesn't
make it better or worse, Java has methods to deal with those things, as
do many languages, so why are you wanting to code something else in perl?

Are you using a CGI written in perl and you want to pass those
attributes to it or do you want to pass that string from your Java
program to a perl script to process or something else?

If you're wanting to learn about CGI processing, using perl, there are a
lot of Web sites that cover it. However, if you have everything coded in
Java and that's what you understand, then it's probably best to stick
with it. No sense in making it more complicated than it needs to be.

Helpful perl modules to look at would be CGI and LWP, available from
http://search.cpan.org/.


 
Reply With Quote
 
leorulez@gmail.com
Guest
Posts: n/a
 
      03-01-2006
Sorry for not being very clear.
I have a Java program (an applet) which works perfectly well. This
applet has a button which when clicked should take the user to a
webpage. Its like of a shopping cart. When the order button is clicked
the order webpage should open up which will have the details of the
order. So I need to pass the order details from the applet to the
webpage. I have included the code to pass the values in the applet. But
I am stuck with the order page. Now I need to display the order
information on the webpage as a link.

J. Gleixner wrote:
> (E-Mail Removed) wrote:
> > I have a java program which can pass values (d_name,item) to any file
> > that I desire. If I choose html and after linking this html file with
> > the
> > java program, when I open the html file the address bar is something
> > like this:
> >
> > "http://abcd.org/test.html?op=add&d_name=NAME&item=data@19b9e1e"
> >
> > I want to use these passed values in my webpage.

>
> How? What's generating your HTML?
>
> >I was wondering if
> > this can be done better using perl. Is there any way I can refer these
> > passed arguments using perl?

>
> I don't fully understand what it is you are asking. The language doesn't
> make it better or worse, Java has methods to deal with those things, as
> do many languages, so why are you wanting to code something else in perl?
>
> Are you using a CGI written in perl and you want to pass those
> attributes to it or do you want to pass that string from your Java
> program to a perl script to process or something else?
>
> If you're wanting to learn about CGI processing, using perl, there are a
> lot of Web sites that cover it. However, if you have everything coded in
> Java and that's what you understand, then it's probably best to stick
> with it. No sense in making it more complicated than it needs to be.
>
> Helpful perl modules to look at would be CGI and LWP, available from
> http://search.cpan.org/.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
functions and arguments.length; passing unknown number of arguments oldyork90 Javascript 10 09-27-2008 03:05 AM
cause webpage one to reload when webpage two is closed. Paul ASP .Net 14 06-19-2008 03:02 PM
passing values from a java file to a webpage leorulez@gmail.com Java 3 03-02-2006 08:06 AM
check if a webpage is forwarding to a other webpage martijn@gamecreators.nl Python 1 09-06-2005 02:27 PM
Email contents of webpage or Form on webpage w/o using Server scripting sifar Javascript 5 08-24-2005 05:47 PM



Advertisments