Php Servlet Bridge

hi
i search for a servlet php bridge.
I want to start php skript from a servlet and I should work with a servlet php bridge.
So i don t want to start the php skript with a java code from a servlet.
I want to connect the bridge, with api functionality, to start the php skript.
I think there is a bridge. But i don t find any think about it.
Does anybody knows something about this bridge.
So sorry for my english. I hope you understand, what i want.
Thanks

I thanks for reply.
I found someting about a bridge.
It the protocl jsr 223.
Jsr223 provides a bridge between php und servlets on a tomcat.
But you can only start php sides and no methodes in php sides.
Here is a code :
ublic class HelloWorld  {
     public static void main(String[] args) throws Exception {
          //Initiate ScriptEngineManager
          ScriptEngineManager manager = new ScriptEngineManager();
          //Return script engine by name
          ScriptEngine myEngine = manager.getEngineByName("php");
          //Execute the HelloWorld script
          myEngine.eval(new FileReader("./HelloWorld.php"));
}But i found nothing about, that you can start methodes like :
myEnginge.....(helloWolrd.php)
execute.writeHelloWorld();
<php
class HelloWorld {
    writeHelloWorld() {
       echo "hello World"
?> so i do not find anything about more. I think you can only start the php side.
But you can not start any methods in the php skript.
I thought, a bridge should have more functionality :-)
Does anybody has more infos or links about this issue ? with examples ?
Thanks

Similar Messages

  • PHP/Java Bridge deploy error

    I am getting the following error upon deploying a web-app PHP/Java Bridge and wonder if someone with more web-app experience can tell me if in fact that Java Server Faces is not available or if the web-app needs some
    internal changes. This might be more suitable to a development forum, but thought i'd give a try.
    Sun Java System Web Server 7.0U1 B06/12/2007 21:15
    info: FCGI1000: Sun Java System Web Server 7.0U1 FastCGI NSAPI Plugin B06/12/2007 21:15
    info: CORE5076: Using [Java HotSpot(TM) Server VM, Version 1.5.0_09] from [Sun Microsystems Inc.]
    info: WEB0100: Loading web module in virtual server [kady-amd] at [javabridge]
    info: PWC1412: WebModule[javabridge] ServletContext.log():PHP/Java Bridge servlet /webdocs/javabridge version 3.2.1b ready.
    *failure: WebModule[javabridge]ERROR: Java Server Faces is not available*
    java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory

    A step-by-step guide you find here:
    https://websmp202.sap-ag.de/~sapdownload/011000358700000877852006E/HowToWorkWithJavaProxies.pdf
    Code samples are here:
    http://de.geocities.com/stefan_grube/JavaProxyExample.zip
    Regards
    Stefan

  • EJB Servlet Bridge

    I've come across suggestions a couple of times to use a Servlet bridge to an
    EJB. One such situation was invoking an EJB running in WebLogic 6.1 from an
    application running in WebLogic 5.1. Other situations have been for applets
    invoking EJB's.
    Two questions. When should you implement a Servlet bridge rather than using
    RMI over HTTP or some other method? Are there other situations where a
    Servlet bridge would be useful?
    In the case of applets, it seem like a Servlet bridge would be nice because
    you wouldn't need to provide the EJB client classes to the applet. For
    example the InitialContext class wasn't included in the standard edition
    until 1.3.
    Thanks,
    Bob

    Bob Lee <[email protected]> wrote:
    I've come across suggestions a couple of times to use a Servlet bridge to an
    EJB. One such situation was invoking an EJB running in WebLogic 6.1 from an
    application running in WebLogic 5.1. Other situations have been for applets
    invoking EJB's.
    Two questions. When should you implement a Servlet bridge rather than using
    RMI over HTTP or some other method? Are there other situations where a
    Servlet bridge would be useful?
    In the case of applets, it seem like a Servlet bridge would be nice because
    you wouldn't need to provide the EJB client classes to the applet. For
    example the InitialContext class wasn't included in the standard edition
    until 1.3.You wouldn't need to provide WebLogic classes - you need several megabytes of them
    on the client side in order to use T3.
    Thanks,
    Bob--
    Dimitri

  • Web service / XML-RPC:  SMTP inbound to OC4J/BC4J XML servlet bridge??

    A new business problem just landed on my desk for a possible solution.
    One way XML documents coming in from a Novel mail server doing SMTP forward to something
    in the OC4J, BC4J, side to receive and parse the XML.
    It would be great of course if the JDev / BC4J / OC4J web services tools had a SMTP service
    that would route inbound SMTP messages at email address to a particular Servlet.post().
    Any other ideas??
    Thanks much,
    curt

    For others, here is a start of a response to Curtis's message talking about the BC4J Web services features combined with the BC4J readXML and writeXML capabilities:
    Re: Can we find when was a table dropped?
    Not sure if other folks have a solution to dealing with the SMTP part - a snippet of code that works with readXML and writeXML methods of BC4J, for example.
    Mike.

  • Web Service/XML-RPC: SMTP inbound to BC4J Xml Servlet bridge idea??

    A new business problem just landed on my desk for a possible solution.
    One way XML documents coming in from a Novel mail server doing SMTP forward to something
    in the OC4J, BC4J, side to receive and parse the XML.
    It would be great of course if the JDev / OC4J web services tools had a SMTP service
    that would route inbound SMTP messages at email address to a particular Servlet.post().
    Any other ideas??
    Thanks much,
    curt

    For others, here is a start of a response to Curtis's message talking about the BC4J Web services features combined with the BC4J readXML and writeXML capabilities:
    Re: Can we find when was a table dropped?
    Not sure if other folks have a solution to dealing with the SMTP part - a snippet of code that works with readXML and writeXML methods of BC4J, for example.
    Mike.

  • How to install php module into web tier.

    Previously oracle http server included built-in php module so i could start php scripts under it but in the newest(web tire) version there is no built-in php module.
    But in the docs they say that it is possible but dont explain how to...
    So how to?)))

    Maybe this will help.
    http://www.oracle.com/technology/pub/articles/dev2arch/2007/02/php-java-bridge.html

  • Is it possible to execute a ASP/CGI/PHP script thru sockets?

    hi,
    i was wondering whether it is possible in Java to pass data and execute ASP/CGI/PHP script on demand thru sockets (suppose a port has been specified by both sides) and how? i know this is possible thru the urlConnection, but how about sockets? these scripts could be stored in specific directories on the server.
    thanks!!!

    hi,
    i was wondering whether it is possible in Java to pass
    data and execute ASP/CGI/PHP script on demand Yes, completely it's possible!
    If you need to access ASP/CGI/PHP/Servlet/JSP thru' Java program, you can refer:
    http://developer.java.sun.com/developer/qow/index.jsp
    [after a week: http://developer.java.sun.com/developer/qow/archive/index.html
    and look for 'Can I send an HTTP request to a servlet from a normal class without having to use a browser to send the HTTP requests?']
    -and that's the QOW [Question Of the Week]!
    thru sockets (suppose a port has been specified by both
    sides) and how? When you say, a port has been specified on both sides,
    then it becomes, a NET/Socket programming and you
    need to use the 'net' package for the same.
    i know this is possible thru the urlConnection, 'possible' means, it's assumed that u're invoking the 'script' thru' a web-server!
    And u still use 'http://...' protocol to achieve the same; and u're NOT
    directly accessing the script file as "file:\\network-host\root\files\abc.jsp"
    but how about sockets? these scripts
    could be stored in specific directories on the
    server.It's not at all possible to 'invoke' those 'scripts' directly, by
    using sockets; If you know that they're existing in one
    particular directory of a network system, all you can do is
    you can read the file content thru' socket, but you can't
    make it become 'alive' and it would not dance for u!
    Because, if there is a 'script' [PHP/ASP/CGI/JSP] that is
    meant for dancing, then the stage for dancing is provided
    by the web-server environment which starts the appropriate
    server-side process that can understand and interpret the
    given script! And all we can do is asking the web-server
    to pull the 'script' to the stage and dance for you! But,
    the 'asking' the webserver can be done thru' browser or
    a URLConnection! If what you want to do would have been
    possible, then, just with FTP we could have achieved the same!
    Easy Go Jolly Java!
    -RK

  • Execute Java from PHP (Classpath problem?)

    Hi,
    I'm trying to execute a java application (just a few classes really), using PHP (so the app can be executed by the click of a button on a webpage). It is an Apache server running on windows.
    The code to execute the java from the webpage is as follows...
    <?php
    echo "<pre>> EXECUTING...</pre>";
    $output = shell_exec('java UpdateStock');
    echo "<pre>$output</pre>";
    ?>However, I get this error.
    java.lang.ClassNotFoundException: com.mysql.jdbc.DriverThe class runs fine from the command line (it's all setup using the typical classpath method), so I suspect its something to do with the server's configuration and not being able to find the drivers. How do I point the server-based app to the mysql drivers?
    Many thanks for your help
    Edited by: chezza on Nov 13, 2008 3:04 AM

    Is it that your CLASSPATH has to be a system variable, and you've got it setup as a user variable... and the tomcat service runs as the "system" user, so it knows not your kinky CLASSPATH.
    To totally avert such problems allways execute every java app you ever run with the -classpath (or -cp ?1.5? or later) switch... including those you launch from php.
    BTW... The [PHP Java Bridge|http://php-java-bridge.sourceforge.net/pjb/installation.php] might be an option for you.

  • Serlvet Bridge Version Issue

    Hi,
    I am using Equinox Servlet Bridge to run OSGI bundles in Tomcat using bridge.war.
    The current version for org.eclipse.osgi package is version 3.3 whereas eclipse exports bundle with latest version as 3.10 due to which few packages are not matched at run time due to mismatch in version (for e.g. - org.osgi.framework is 1.3.0 in bridge.war but 1.8.0 in eclipse bundles).
    Is there any updated version of bridge.war or any other possible way to acheive same?
    Thanks in Advance

    Hard to say for sure but generally issues with appearance are more in the way the PDF was created rather than how Reader is opening them.

  • Seeking JSR 223 Feedback -PHP/Java Integration-& giving feedback wrt JSC

    This is also posted at
    http://forum.java.sun.com/thread.jspa?threadID=691351
    But I wanted to make sure this was given to the JSC folks.
    I'm looking for feedback from anyone who has used jsr223. The last post on the jsr223 site was back in may 2005 from what I can tell and there is hardly any mention of it in the forums here.
    While this may not be the correct forum, I didnt think this fell under JSF or JSTL directly.
    I'm working at a small company with a number of php developers with a large code base in php, who I have been trying to convince to pick up another markup language like JSTL or JSF and were having a heck of a time getting Java Studio Creator to perform at anything near accceptable levels.
    I'm very familiar with Struts, J2EE, and swing. While I have been trying to push JSF, thinking this would alleviate some of the complexity for php developers (at least this is what the Java Studio Creator hype claims, I'm having a hard time convincing them to do so when Java Studio Creator the supposed RAD JSF IDE is so slow. (running 1gb ram windoze xp professional)
    I understand that the power in JSF is abstracting out request/response and having essentially interogated request objects with web apps for so long and then realizing the power of an event model to free me from the ever present controller switch statement to allow swing like callback
    methods in webapps was well initially very refreshing and I was really hopeful.
    However after trying to use studio creator....and Anyone who is using it and doesnt have this experience please let me know what we may be doing wrong (we are using JSC Early Access 2) and are experiencing compile and redeploy times that take 5-10 minutes or design time redraws in the ide that take 30 seconds to 2-3 minutes or longer.
    This is simply not acceptable developer productivity for people who are application developers used to working with interpreted scripting langauges like php ( or for ms developers either for that matter).
    So why dont We just use php then you say, well it doesnt scale well and there are so many apis that are available via java only. We also have a heck of a time with sockets in php and the java sockets api works really well/dependable/fast for us. And we realize how hard it is to enforce any sort of mvc pattern in a scripted language as well (although I know its possible with some php frameworks e.g. mojavi).
    So We have turned to JSR 223 for my golden ticket - Java Scalability and Dependability with PHP like developer productivity.
    I've got jsr223 samples working in tomcat 5.5 with php5. I can call a php page from inside of tomcat via the php servlet which allows you to access java objects and apis in that same php page that are on the tomcat web app classpath. ( Which I think is amazing quite frankly and the fact that this works at all I take my hat off to those who put it together, this maybe a great solution for us - and many others - considering our investments and need for developer productivity).
    Our initial concept was to write the view tier in php, however I feel that this will quickly deteriorate to writing the controller in php as well, since they dont have to write servlet /struts mappings or faces config files.
    And I think we may end up using only hibernate for persistence (the model) and axis for web services and Java for other heavy lifting tasks such as socket calls.
    In any case I have not been able to find any real world feedback on this or any actual examples of anyone setting up a nontrivial JSR 223 architecture and the only thing I have is a few examples from the jsr site which are more like Proof Of Concept examples.
    Anyone with any information please let me know. I have googled the heck out of jsr223 and jsr223 examples and am coming up emtpy handed and am worried that the last time the jsr223 site was updated was may 2005. I think this jsr may have been been put by the way side in the big push for JSF.
    In any case if anyone at Sun sees this, if Java Studio Creator had anywhere near acceptable performance I probably wouldnt even be looking at JSR223
    (I have even modified ant scripts to deploy directly to tomcat instead of the bundled Sun One App Server).
    I dont want to get into a debate either with anyone about php over jsp or anything like that i just want to know is anyone actually using php with java via jsr223 and if so what does their architecture look like.
    Trust me I would much rather not have to use php with java, but its pretty hard to convince a gang of time strapped php developers to use the tortoise like JSC and JSF when it takes a developer 4-5 times as long to develop a simple page with JSF in JSC as it would in php with a text editor.
    Thanks in advance for any feedback,

    Winston, Thanks for the feedback
    From http://blogs.sun.com/roller/page/tor?anchor=performance_tip_make_more_memory
    To change the memory limit, do this: locate your IDE installation, and edit with a text editor.
    In creator ea2 the file is at
    C:\Program Files\Sun\Creator2ea2\etc\creator.conf     
    By default it is
    -J-Xms96m -J-Xmx384m
    I actually was using these settings
    -J-Xms256m -J-Xmx512m
    I changed this today to
    -J-Xms256m -J-Xmx768m
    I did see a noticeable improvement, still with some serious lags (note Im not running sunone on same machine, I'm deploying to tomcat on different box)
    I monitored the ide's ram usage and it seemed to stabilized around just under 500mgs
    I think that previous default settings will cause alot of garbage collection to go on since the ide seems to need more than the maximum amount of memory for the jvm and as a result this has got to be whats slowing the app down.
    Have you altered the default memory settings, or are you using the default settings in C:\Program Files\Sun\Creator2ea2\etc\creator.conf.
    I only have a gig of memory at my disposal at this time, I guess I will need to get some more, I imagine if you have 2gb of ram that you shoudlnt see any garbage collection if you arent using the default settings.
    Thanks for your information about your setup.
    Suggestion to the folks at JSC is to change these settings out of the box and up the minimum system requirements.
    By the way Im still looking for anyone with feedback on jsr 223 (if there is a more appropriate forum please someone let me know).
    R
    S

  • Install wordpress

    Hi to All,
    We wre try integrate wordpress with netweaver for this we followed first this link
    http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/6983 but we are succed upto open PHP files with static data after this we are try to get data from mysql server like
    <?php
    # Define MySQL Settings
    define("MYSQL_HOST", "10.X.X.X");
    define("MYSQL_USER", "****");
    define("MYSQL_PASS", "******");
    define("MYSQL_DB", "wordpress");
    $conn = mysql_connect("".MYSQL_HOST."", "".MYSQL_USER."", "".MYSQL_PASS."") or die(mysql_error());
    mysql_select_db("".MYSQL_DB."",$conn) or die(mysql_error());
    $sql = "SELECT * FROM name";
    $res = mysql_query($sql);
    while ($field = mysql_fetch_array($res))
    $id = $field['id'];
    $name = $field['name'];
    echo 'ID: ' . $field['id'] . '<br />';
    echo 'Name: ' . $field['name'] . '<br /><br />';
    ?>
    But we are unable to connect mysql server.
    Can i know any solution for this.
    Error Message:
    500   Internal Server Error
      SAP J2EE Engine/7.00 
      Application error occurred during request processing.
      Details:   Error [javax.servlet.ServletException: PHP FastCGI instance failed.], with root cause [php.java.bridge.http.FCGIConnectionException: null].
    Exception id: [*************]
    Regards,
    Nari.

    Hi Nari,
    Most likely that port 3306 is blocked or the datbase name is incorrect. 
    MySQL is case-sensitive as well.
    Cheers,
    Mike Peace

  • How to pass in a parameter into a report viewer on a jsp - and hidden

    Hi, I've built a php application and am using the java environment to enable the crystal report/viewer.  The developer was looking how to pass in a parameter into a report viewer on a jsp. Ultimately the end product we need is to get an HTML report viewer loading a report file with hidden parameters so to not expose other customer data (it's a shared database for multiple customers) preferably loaded from php using maybe the php java bridge. Would anyone happen to have any sample code or any guidance?
    <%@ page contentType="text/html; charset=UTF-8"
       pageEncoding="ISO-8859-1"%>
    <%@ taglib uri="/crystal-tags-reportviewer.tld" prefix="crviewer"%>
    <%
    // just a test to grab rpt name from GET
    String rptFile = "report_files/" + request.getParameter("rpt");
    %>
    <crviewer:viewer reportSourceType="reportingComponent" viewerName=""
    isOwnPage="true">
       <crviewer:report reportName="<%= rptFile %>" />
    </crviewer:viewer>
    Many thanks in advance!
    Mark

    I am not aware of any html tags you can pass to the viewer for parameter values.  Normally, you would load the report in code and then use the SDK with the report object to pass parameter values.

  • Oracle Service Bus 10.3 - Invoke a REST service in split join flow

    Hi
    I am using WebLogic Workshop to design a split-join service that needs to call 2 services and combine their responses.
    Service A - WSDL based service
    Service B - REST service
    In the split join flow I am able to invoke Service A just fine. However I do not have a way to call Service B. When I open the invoke dialog it only list WSDL based services.
    Does this mean in a split join I can only invoke WSDL based services or is this a bug in Weblogic Workshop.
    I can get around this by creating a WSDL based proxy that calls the REST service but was hoping I do not have to go down this route.
    Any guidance is appreciated.
    Thanks,
    -Nilay

    I think that Split-Joins are implemented in BPEL. Just look at your .flow file and you will see all those BPEL directives. That's why you probably need your service to be described by WSDL, so you are probably on the right way.
    http://technology.amis.nl/blog/1273/invoking-http-services-from-oracle-bpel-pm-soa-enabling-php-servlets-rss

  • Tomcat to Apache

    I have been developing with Tomcat and MySQL. I do however want to move to the Apache server. Can someone tell me how to deploy on Apache and what the differences are? Like connecting to MySQL or configuring the server.xml etc.
    Thank you,
    Marika

    Apache is a standard HTTP web server. It will serve static content only.
    It will not run Servlets or JSPs. That is Tomcat's province.
    You can attach handlers for dynamic content (PHP, Servlet container etc) but if you want to run Servlets and JSPs with Jakarta software, Tomcat is what you want.
    Cheers,
    evnafets

  • Accessing non-Java components from Struts

    I want to access a PHP forum package through my Struts classes.
    Can someone pls help?

    I want to access a PHP forum package through my Struts classes.Do you know how to use a Search Engine ?
    http://php-java-bridge.sourceforge.net/
    andi

Maybe you are looking for

  • Assign Context Object "ProcessStep" to BPE variable?

    Hi all! What exact information does the <b>standard Context Object "ProcessStep"</b> (which should be available in BPM as stated in help.sap.com) include? Is it the ID of the current Workflow-Item / the instance ID of the parent BP process ...? I can

  • GeForce 7800GT Xorg Driver

    I've tried using the "nv" driver for my GeForce 7800GT (PCI-E) but it simply starts up and freezes on me with a corrupt image of my fluxbox desktop. Vesa driver works fine.

  • Cant find iPhone notes on Mac desktop

    Hi, I have OS X Lion running on my Mac and my 'notes' from my iPhone are nowhere to be found. I tried the suggestion of 'un' then reselecting notes in preferences - iCloud but it didn't work. When I go to system preferences - iCloud, there is no box

  • Is there some type of solution for charging multiple iphone 4s at once?

    Is there a gadget or charging station for a home with multiple iphone 4 users and ipod touch that helps eliminate all the chargers on the kitchen counters?

  • System Prefs unlocking for no apparent reason?

    Hello, My system preferences Accounts and Network seem to unlock on their own every so often. Is anyone else having this occur? Thank you.