i developed a Stateless Session bean program.And created a
client by a common java class as
class m
{p s v m(String s[]){....}}
And i called the bean deployed in weblogic.from cmd prompt
And that run.
mind it i have to set setenv,seting classpath for that bean
jar file before compile and run it.

ok
when i do a servlet programme deployed in tomcat and call
that bean then it give classdefnotfoundException and
NoInitialContext like this.So how i sucessfully do this?

Ok
when i call that bean from java class from the console like
i previously told, if i don't set setenv i found the same
error on the cmd prompt.
pls help to get out of it

Answers were Sorted based on User's Feedback



i developed a Stateless Session bean program.And created a client by a common java class as class ..

Answer / ashutosh

tomcate is webserver..and ejb is distributed component we
cant deploy it in web server so we need app server just use
weblogic.

Is This Answer Correct ?    3 Yes 0 No

i developed a Stateless Session bean program.And created a client by a common java class as class ..

Answer / mani

Weblogic is application server where u can run
web,model,persistence and some more...like JMS,JTA,JNDI etc

But Tomcat is webserver here u only run the presentesion
layer specific things

to solve your problem you can do two things

One:
Create the jar file of your Model Layer(EJBs) and copy
that jar file in your classpath of the tomcat .Here you
have to run both servers required

Two:

Create presentation layer(servlets )make this war file and
kept that in weblogic create ear file to whole application
and deploye it..and run it .. Here you no need of using
tomcat only with weblogic u can run

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More J2EE Interview Questions

How java is used in web applications?

0 Answers  


What do you understand by j2ee?

0 Answers  


What is full form of j2ee?

0 Answers  


What is jlayeredpane java?

0 Answers  


What is the best java application server?

0 Answers  


Is downloading java safe?

0 Answers  


What is event and listener in java?

0 Answers  


There are 2 classes . Class A and Class B. In Class A i declared a variable in private. if we can access this private variable in Class B. If yes means , how we can access ?

7 Answers   HCL, Itx Centrics, Virtusa,


What is java used for in technology?

0 Answers  


How does event listener work in java?

0 Answers  


What is instance in java?

0 Answers  


what is defect. Is it runtime exception or comiletime exception

3 Answers   L&T,


Categories