Hi,
I am trying to use java beans in my jsp pages. where should I put them in weblogic server path.
thanks,
-
Jsp - weblogic - java beans (2 messages)
- Posted by: aravind shivapooja
- Posted on: August 22 2000 11:50 EDT
Threaded Messages (2)
- Jsp - weblogic - java beans by Octavio Galindo on August 22 2000 12:25 EDT
- Jsp - weblogic - java beans by Shawn Wall on August 23 2000 11:53 EDT
-
Jsp - weblogic - java beans[ Go to top ]
- Posted by: Octavio Galindo
- Posted on: August 22 2000 12:25 EDT
- in response to aravind shivapooja
You have to deploy the EJB in the WebLogic Server, and give it a name in the JNDI tree.
From the JSP page, you have to lookup the EJB through the JNDI name. See the JSP+BeanManagedPersistance example that comes with WebLogic:
<%!
String pagetitle = "JSP example using EJBean-managed persistence";
String url = "t3://localhost:7001";
String accountId = "10020";
// Declaring a Java class
public Context getInitialContext() throws Exception {
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
p.put(Context.PROVIDER_URL, url);
return new InitialContext(p);
}
.... more code ......
%>
-
Jsp - weblogic - java beans[ Go to top ]
- Posted by: Shawn Wall
- Posted on: August 23 2000 11:53 EDT
- in response to aravind shivapooja
The JNDI names must be present in an XML deployment descriptor so that they may be deployed. Have you already packaged the beans into a jar? that jar must be included in the config file also.