Hi Mitesh,
I've been developing JSPs (and before, JHTML) and EJBs on Weblogic for over a year
now, but I've never directly used an EJB from a JSP. Never thought to actually!
Possibly there is some difference in environments with the JNDI within JSP, I
wouldn't think so though.
Are you getting a JNDI error or ClassDefNotFound or something else. You can see all
server exceptions and System.out.println() if you don't start Weblogic as a service
but as an application, or use the console program.
So I can't answer your question directly. Sorry, but...
I always use a JavaBean to manage the calls from JSPs through to EJBs. This allows
you to present to the JSP an invariant object after its initialization.
By this I mean that eventually you are going to be providing the client browser
with a (mostly) static web page, so there is no need to provide access to an object
more complex than something with an initialize method and getHtmlAttributeXX,
getAttributeABC, getJavaScriptMethodXYZ, etc...
All of these get... methods can then be accessed via small and easy tags as such:
<jsp:useBean id="someObject" class="package.tree.SomeClass" />
<jsp:scriptlet> someObject.initialize(request); </jsp:scriptlet>
...
<jsp:expression>someObject.getSomeDataAsString() </jsp:expression>
This will greatly increase the ease with which a HTML author will be able to edit
your JSP files, especially with all your JNDI code in another class.
Does anybody else have any opinions on this, as I find this is my standard approach
to any JSP.
Regards
--
Andrew Evans
Adaptive Technology Pty Ltd
mailto:[EMAIL PROTECTED]
Phone : +61 2 9954 6822
Fax : +61 2 9460 1500
Mobile : 0414 783 812
http://www.adaptivetech.com.au
Mitesh Rajani wrote:
Hi,
I am in the process of starting devoloping jsps and ejbs with the =
weblogic environment. I have a setup problem i guess.
What is happening is that when i am trying to access the home and remote =
interfaces of an ejb, i am getting the message that the class files are =
not found. what is happening is that the jsp is searching for the Ejb =
classes in the root directory of the jsp.
Can anyone tell me what are the setup requirements for jsp so that i can =
integrate them with the already existing ejbs that i have deployed on =
the weblogic server.
I guess i would want to have
1. changes in the web-logic properties file.
2. directory structure required to do so
3. any changes that i need to make so that the ejbs home and remote =
interface files are easily found ie. any change that i need to make to =
the classpath.
Thanks and regards,
Mitesh
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets