Connect java to php web page

Hello...
I am new in this forum, so I am sorry if I post my question in wrong place.
I have php web page and want to call my java classes i.e connect java to php. My java code will read from file some info. then will organize these info. finally, the java will write the organized info. in file, the php will display the content of the file.
can help me please to achieve this goal...
thanks in advance
ibtesam saleh

I do not how to use JPoller, put it looks very advanced.
Or you can use a simple code in (java/perl/c/what so every u know)
void main(){
while (true) {
checkDirectoryAndReadNewCommandsAndWriteNewOutputs();
Thread.sleep(waitTime);
}and put your program on your windows/linux startUp
Or you can learn using sockets in java and write your own html service with port 80 (I did some experiments)
Or you can try to use WebService example from Netbeans program (I tried it worked for me)
Or you can learn J2EE (I have never find the time to look at)
Or ... many ideas, to time :)

Similar Messages

  • After upgrading to Mac OS Lion, even after installing Java manually, some web pages don't download and appear blank whereas Firefox works

    After upgrading to Mac OS Lion, even after installing Java manually, some web pages don't download and appear blank whereas Firefox and Opera work. Can someone help?

    Might be a third party Safari addon that was compatible with Snow Leopard but not Lion that's preventing pages to load. That add on may not have any effect on the other browsers, just Safari.
    Read here  >  Safari: Unsupported third-party add-ons may cause Safari to unexpectedly quit or have performance issues
    Also, if you have Little Snitch or Peer Guardian or anti virus sofware installed on your Mac, that might prevent pages to load also.

  • I have a 3G Ipod, for the longest time I have not been able to connect to the apple server.  I am able to connect to wifi, grouse web pages however canot conncet to iTunes. I have rebooted, any every other thing I can think off.

    I have a 3G Ipod, for the longest time I have not been able to connect to the apple server.  I am able to connect to wifi, grouse web pages however canot conncet to iTunes. I have rebooted, any every other thing I can think off.

    Can't connect to the iTunes Store
    Try the following to rule out a software problem:                 
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Power off and then back on the router
    - Reset network settings: Settings>General>Reset>Reset Network Settings
    - iOS: Troubleshooting Wi-Fi networks and connections
    - Wi-Fi: Unable to connect to an 802.11n Wi-Fi network
    - iOS: Recommended settings for Wi-Fi routers and access points
    - Restore from backup. See:
    iOS: How to back up
    - Restore to factory settings/new iOS device.
    If still problem make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
    Apple Retail Store - Genius Bar

  • How to send Parameters FORM to PHP WEB Page with method POST (secure)?

    Hello everyone,
    i hope someone can help me to find a solution to this problem!
    i have to send "+precious+" parameters from an oracle form to php page, like username and password, with a secure method... i tried with WEB.SHOW_DOCUMENT procedure but it uses GET Method and when the web page open up you can read those parameters in the url...no good!
    some suggestion?
    Thank a lot in advance... FMicio

    The other way you have is to make a PJC java bean ...
    which uses HTTPClient library..
    for example:
    PostMethod post = new PostMethod("http://jakarata.apache.org/");
            NameValuePair[] data = {
              new NameValuePair("user", "joe"),
              new NameValuePair("password", "bloggs")
            post.setRequestBody(data);
            // execute method and handle any error responses.
            InputStream in = post.getResponseBodyAsStream();
            // handle response.I have done a multipart form data post to upload files to my db over httpClient.. and other things...
    Or with java.net.* api-s
    try {
        // Construct data
        String data = URLEncoder.encode("key1", "UTF-8") + "=" + URLEncoder.encode("value1", "UTF-8");
        data += "&" + URLEncoder.encode("key2", "UTF-8") + "=" + URLEncoder.encode("value2", "UTF-8");
        // Send data
        URL url = new URL("http://hostname:80/cgi");
        URLConnection conn = url.openConnection();
        conn.setDoOutput(true);
        OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
        wr.write(data);
        wr.flush();
        // Get the response
        BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
        String line;
        while ((line = rd.readLine()) != null) {
            // Process line...
        wr.close();
        rd.close();
    } catch (Exception e) {
    }Or you can call your web page (post data) from your database
    http://awads.net/wp/2005/11/30/http-post-from-inside-oracle/
    Edited by: Peterv6i on Mar 30, 2012 3:49 PM
    Edited by: Peterv6i on Mar 30, 2012 3:55 PM

  • Unkown failure when submitting a form to PHP web page

    Hello.
    I've been having a following issue when using Adobe Reader X version 10.1.3.23 and the newest version.
    An error occurred during submit process. Unkown failure.
    This happens when the document is receiving data from web page.
    Following javascript is behind the submit button:
    this.submitForm({
    cURL: "http://path.to.url/index.php",
    cSubmitAs: "XFDF" // the default, not needed here
    In the web page there is a script that processes the data and after that it sends pdf document to the user that has submitted the form:
    header('Content-type: application/pdf');
    header('Content-Disposition: attachment; filename="confirmation.pdf"');
    readfile('confirmation.pdf');
    The problem only occurs on some computers i've tried this form. I have no idea why this is happening. Any ideas?

    The submit button is in the PDF file.
    http://s29.postimg.org/v5y4hmyg7/error.png

  • My Internet Connection is Fast, but Web Pages load slowl

    I have tested my connection on several websites. I am using RoadRunner and I consistently get speeds between 3500-4500 kbps. In the past few days I have the same internet speed but all my web pages load really slow. Up until this problem I would click on a link and it would take 2-3 seconds to load the next page. Now it is more like 15-20 seconds. Once I get a page loaded if I download something from that site it is still a fast download.
    Any ideas on what could have slowed loading web pages , but download speed still shows really fast?
    Your help is appreciated
    Cheers
    mrjazz

    If your download speeds are still fast, it is most likely the broswer that is slow in rendering the pages.
    Are you using Safari and if so, do you leave it open all the time? Safari is notorious for hogging RAM and CPU cycles and slowing to a crawl if you do not quit and restart it.

  • I have been experiencing connection issues with loading web pages. It's as if the web pages do not want to load all the way and some times not at all. This has happen with all three of my computers with the same browsers.

    There are times when web pages do not want to load fully and other times not at all. They just continue to open up with a blank screen. My routers light flash during this process and then they stop as if no connection is being made. I do know for sure it is not my ISP or internet explorer browser.
    Thank you,
    David [email protected]

    I continue to have this problem and have tried all recommendations so far...I notice also when I click on a web site on the taps side of browser once it starts loading however it does not connect, web site comes up just blank while it continues to search. The same thing happens while in an email program with clicking in the email link and page pops up and continues to search for the web site. You have to reload over and over again until it finally locates it and then opens. Should I uninstall the Firefox browser and install again.....?

  • Using Java for dynamic web page content

    I've currently got a Perl program that I'd like to convert to Java. It merges two files that are stored on a web server and generates a "dynamic" HTML response.
    For example, if I have the following files on the server:
    File1:
    <Comment1>This stuff</Comment1>
    <Comment2>That stuff</Comment2>
    File2:
    <HTML>
    <Comment1><br><Comment2>
    </HTML>
    When I go to the URL
    www.mysite.com\cgibin\merge.pl?file1&file2
    the Perl program will produce a web page saying:
    This stuff
    That stuff
    The major obstical for the rewrite: NO JSP ALLOWED. It's not allowed by the ISP.
    Now for the questions:
    - Could this be done using Java?
    - How could I initiate the Java app and pass it the parameters? (applet tag, access Java inside Perl, use Java Script somehow)
    - Will an applet tag even work for this since the final page is generated completely from other files?
    Thank you very much for your help.

    If your ISP don't support JSP / Servlets,
    1.use any server side technolgy, something like ASP.
    2.Read the files and transform them as Strings (or StringBuffers).
    3.Pass these Strings as parameters to the applet (if you are forced to use java technology, otherwise you can do it using ASP itself).
    4.Construct the required format (content) in your applet.
    Don't forget that the stuff will be in applet but not a complete web page. The ideal solution is asking your ISP to provide JSP engine.

  • (how) can I access Java APIs from web-page-hosted JavaScript?

    Can I access Java APIs from a web-page via JavaScript if I have a JRE installed on the client machine? And if so, how?
    Thanks in advance for your time and consideration.

    John L. wrote:
    Can I access Java APIs from a web-page via JavaScript if I have a JRE installed on the client machine? And if so, how?As far as I can remember that was actually possible in the very first versions of Netscape because Netscape really wanted to pretend Javascript and Java were meant to be used together. But they soon removed that functionality. Can you guess why?
    Because people were using the File/IO classes to easily steal or remove files on the harddrive, among other such niceties. You do NOT want to have such control from a web application. People will abuse it.

  • Connecting to Document from web page

    I created a one page order form, copied the link on my web page, when I click on the link it connects to Adobe however the page is blank.

    Navy Bubblehead wrote:
    Here is the link:
    http://<a href="https://acrobat.com/#d=4ELTT*FpRYyqzUDNi1Z3Ww">
    Perhaps you want this link:
    <https://acrobat.com/SignIn.html#d=4ELTT*FpRYyqzUDNi1Z3>
    Good luck.

  • Can Java Interact with Web Pages??

    I wonder if it possible to develop an application or applet that can automate the process of signing up for courses at Notre Dame.
    Currently, we have to use a pretty plane text-based web system. I wonder if it's feasible to use Java to provide a more user-friendly front-end to this system. The program would need to read HTML, view different web pages, and write to web forms. Any tips on where to go from here?
    I realize that some other language might work too, but I'd like to advance my Java skills ;-)
    Thanks!!!
    - Brian

    From what you've posted so far it sounds like you want to make a specialized web browser. Is this what you had in mind? The Java API includes two classes that can be used to construct such a beast relatively easily: JEditorPane and JTextPane. The Swing tutorial has a page on how they can be used:
    http://java.sun.com/docs/books/tutorial/uiswing/components/editorpane.html
    However, their capabilities are rather limited (only support HTML 3.2). They will let you change text styles and the way pages look, but will hardly be more "user friendly" than the original site because it'll be only the old thing with a new look.
    There's also a HTML parser that can be used independently of the gui components, in principle you can use it to extract information from the site and show it in a completely new user interface that has nothing to do with the original site but I haven't used it much and i'm too tired to look up and example on the 'net (been a long day, i'm off to bed)

  • Launching Java applications from web pages

    Hi there,
    Do you know how to launch Java applications (not applets) from web pages ? Thank you.
    Berk Can Celebisoy

    Do you know how to launch Java applications (not applets) from web pages ? Thank you.
    you can setoff a java servlet from a webpage.Is that what you are talking about ??? activeateing a server side app ????

  • Why is firefox continuously connecting while on a web page? The wheel is spinning every 10 seconds or so. I reinstalled firefox so I need help.

    Firefox is continuously "connecting" while I am on the web. It does not matter what site I am on but it keeps connecting (wheel spinning) every 10 seconds or so. Like it is reloading the page. The page does not go away, but it is driving me crazy as it did not used to do this. I did download a free trial of WordPerfect, but it was not what I was looking for and deleted it. I also reinstalled Firefox, so I am not sure what is going on. Help Please! I have a Windows 7 Sony Vaio computer. I ran the virus check a couple of times and it came up okay.

    It is possible that your security software (firewall, anti-virus) blocks or restricts Firefox or the plugin-container process without informing you, possibly after detecting changes (update) to the Firefox program.
    Remove all rules for Firefox and the plugin-container from the permissions list in the firewall and let your firewall ask again for permission to get full unrestricted access to internet for Firefox and the plugin-container process and the updater process.
    See:
    *https://support.mozilla.org/kb/Server+not+found
    *https://support.mozilla.org/kb/Firewalls
    *https://support.mozilla.org/kb/fix-problems-connecting-websites-after-updating

  • Want to pass Realm login username to php web page

    I have a web directory set up as a Realm via Server Admin. I'd like to grab the authentication info (really just the username) and use it via PHP to compare against a mysql table of users to pull out username and real name so the user doesn't have to log in twice (once to access the Realm, once to authenticate to Mysql in a php form.)
    I've searched the web and these discussions but have not found any documentation that tells me that I can access or display the Realm authentication username.
    Is this even possible?

    The PHP documentation seems to have this covered:
    http://us3.php.net/manual/en/features.http-auth.php
    Once the user has filled in a username and a password, the URL containing the PHP script will be called again with the predefined variables PHPAUTHUSER, PHPAUTHPW, and AUTH_TYPE set to the user name, password and authentication type respectively.
    echo "<p>Hello {$SERVER['PHP_AUTHUSER']}.</p>";
    echo "<p>You entered {$SERVER['PHP_AUTHPW']} as your password.</p>";

  • Making changes to PHP web pages

    Hi. I am wondering if I can just open a .php file in DW and
    just make text and image changes just as I would an html file. Or
    do I need to know and be able to mess with PHP code to do this.
    Thanks in advance.
    -Bonzojr

    You can edit it as you would any other HTML page. But, if
    it's dynamically
    produced markup, you may not see what you expect to see....
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "bonzojr" <[email protected]> wrote in
    message
    news:e2t7c8$jdi$[email protected]..
    > Hi. I am wondering if I can just open a .php file in DW
    and just make text
    > and
    > image changes just as I would an html file. Or do I need
    to know and be
    > able to
    > mess with PHP code to do this. Thanks in advance.
    >
    > -Bonzojr
    >

Maybe you are looking for