• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

weblogic 6.1 ejb jsp

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
I am new to weblogic 6.1 and i need some help
i have written a demo application to get used to weblogic 6.1
which are in dir c:ejb1
and package ejb1
well everthing is fine i also have deployed the bean .
now the jsp part i am having problems when i am invoking the ejb it says cant find package
please clarify
thanks
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I suppose your problem is one of jsp not being able to contact the required bean. You need to set the class path to the directory where the ejb ..ie remote and home interfaces..reside.
something like Classpath = %Classpath%;c:\ejb1;
in the startweblogic.cmd file.
Try it out.
 
sri
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by ipog:
I suppose your problem is one of jsp not being able to contact the required bean. You need to set the class path to the directory where the ejb ..ie remote and home interfaces..reside.
something like Classpath = %Classpath%;c:\ejb1;
in the startweblogic.cmd file.
Try it out.

 
sri
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
i have set the classpath thats not the problem
let me give you little more information regarding what i have done on jsp side
i have copied the ejb remote and home interface classes into WEB-INF/classes and created a jar file with jsp and web-inf folder with .war extension.
well the error is cant find package and its also unable to refer names of remote and home interfaces.
thanks
sri
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is the class under WEB-INF/classes/ejb1/*.class? make sure the directory structure matches the package name.
 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
could u post the first 2 lines or so from your jsp file ...
 
sri
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
yes the diretory structure reflects the package structure ie its web-inf\classes\ejb1\*.classes
here is my jsp file
"
<%@ page import="javax.naming.*, javax.rmi.*, java.util.*, java.io.*, ejb1.*" %>
<%
int eno = Integer.parseInt(request.getParameter("eno"));
String name = request.getParameter("ename");
String ssal = request.getParameter("esal");
double dsal = Double.parseDouble(ssal.trim());



Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.T3InitialContextFactory");
p.put(Context.PROVIDER_URL,"t3://localhost:7001");
Context ctx = new InitialContext(p);
System.out.println("1");
DemoHome dh = (DemoHome)ctx.lookup("DemoEJB");
Demo d = dh.create();
boolean saved = d.SaveRecord(eno,name,dsal);
if (saved == true)
out.println("<font color = red size =6>the row is inserted</font>");
else
out.println("<font color = green size =6>the row is not inerted</font>");

%> "
thanks in advance
sri
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sri and ipog!
Please re-register with a name that meets the naming requirements for JavaRanch. You must use your real first name - space - real last name.
Thanks,
Tom - Moderator of this forum
 
I am going to test your electrical conductivity with this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic