You are here: Re: How to interact with a Live java process from php? « PHP Programming Language « IT news, forums, messages
Re: How to interact with a Live java process from php?

Posted by G.E.M.P on 01/20/06 06:40

Sophia wrote:
> Hi,
>
> My question is pretty much what the title describes. My situation is:
> The essential task is to provide a service to web user. This service
> can only be accessed from a java program on the backend, and this
> program, unfortunately, is a 24/7 live process. My teammate is going
> to write a php program to handle the front end request, so my question
> is that, is it possible for such a design to work? If it is, how?
>
> Any help is greatly appreciated!
>
> Sophia
>

Your details are vague, so it's hard to answer your question.
I'll guess the "live 24/7" backend java process is a "java servlet"
running inside a jakarta-tomcat servlet server.

A jakarta servlet server is essentially a webserver, written in
the java programming language, that responds to the http protocol
(processes post and get requests) and usually, but not always,
runs on port 80.

To send get parameters to the doGet() function of the servlet,
you might use a url like:
http://yourdomain:8080/servletname/pasta/fazoole

Or, in your html page (which might be generated by php code on some
other server) you might have a form whose action handler makes a post
to the servlet, with
<form action="http://yourdomain:8080/servletname" method="post">
<input type="text" name="xyz">
<input type="submit">
</form>

.......in other words, interacting with a servlet is hardly any
different than interacting with an apache webserver.
The servlet that processes the posts and gets, in your case,
sounds like it is already written. You only need to write the
html that interacts with the servlet (or write the php that makes the html)

Servlets written in java a better suited to large complex programming
logic than php......in the minds of most java programmers anyway.
That last statement will probably generate some static on this group.
I work in both languages. And I do think there is a complexity threshold
beyond which java wins, below which php wins.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация