Well, HTML is a static presentation language .... technically, it doesn't do anything. So, the question is, what can you embed in HTML that has the capability to interface with EJB ...
Hello Simon Cockayne, EJBs can only be invoked from a Java Application, be it a Servlet, JSP or simple StandAlone program. HTML is simple text file and can not invoke EJB.
Prakash Dwivedi (SCJP2, SCWCD, SCBCD)
"Failure is not when you fall down, Its only when you don't get up again"
Simon Cockayne
Greenhorn
Joined: Dec 11, 2000
Posts: 5
posted
0
Hello,
Yes I should have been more specific. I attempted to imply that I have a HTML page (which cannot of itself invoke an EJB), moreover, the implication should have been, what can exist within an HTML page that can invoke an EJB. I.e. javascript or some other candidate.
I have seen examples of javascript being able to invoke an EJB, but only with Netscape, not Microsoft Internet Explorer. (Note I wish to use IE).
Additionally, I was under the impression that EJB's can also be invoked by non java applications. E.g. C++ and .NET I thought.
So, to recap. Given a HTML web page, how can I extend or enhance it, potentially through some embedded "non-html", such that an EJB can be invoked.
I am most grateful for your kind attention.
Kind regards,
Si.
Prakash Dwivedi
Ranch Hand
Joined: Sep 28, 2002
Posts: 452
posted
0
I have seen examples of javascript being able to invoke an EJB, but only with Netscape, not Microsoft Internet Explorer. (Note I wish to use IE). Here is an extract from Mastering EJB from Ed Roman
Understanding How to Call Beans We now take a look at the other half of the world�the client side. We are now customers of the beans� business logic, and we are trying to solve some realworld problem by using one or more beans together. There are two different kinds of clients.
Java RMI-IIOP based clients. These clients use the Java Naming and Directory Interface (JNDI) to look up objects over a network, and they use the Java Transaction API (JTA) to control transactions.
CORBA clients. Clients can also be written to the CORBA standard. This would primarily be useful if you want to call your EJB components using another language, such as C++. CORBA clients use the CORBA Naming Service (COS Naming) to look up objects over the network, and they use the CORBA�s Object Transaction Service (OTS) to control transactions. Whether you�re using CORBA or RMI-IIOP, your client code typically looks like this: 1. Look up a home object. 2. Use the home object to create an EJB object. 3. Call business methods on the EJB object. 4. Remove the EJB object.
So, to recap. Given a HTML web page, how can I extend or enhance it, potentially through some embedded "non-html", such that an EJB can be invoked. You can have an applet in an HTML page which can theoratically invoke an EJB, but that is not recommended. Normal practice is that HTML page calls a servlet on your web-server, and this servlet (which is a java program) invokes EJB.
Ah, you mean with serverside JavaScript. That makes sense now. You do realize that "Netscape" in this instance refers to Netscape Application Server (or iPlanet as its now known), not Netscape Internet Browser?