Me

Ranch Hand
+ Follow
since Dec 01, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Me

Originally posted by Patrik Nilsson:
Where`? How do you mean??



The same way you set
JAVA_HOME to c:/Sun/AppServer/JDK



At first you have to find servlet.jar on your system.

This is what I have set on Windows XP and Tomcat

CATALINA_HOME=C:\jakarta-tomcat-5.0.24
CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\common\lib\servlet.jar

Originally posted by Kathy Sierra:
Are you saying donate your beer app? That would be so awesome!!
Kathy



Yes Kathy, I have ch1 servlet, Beer-v1, Beer-v2 and Beer-v3. Where can I post/upload these applications?
I will keep updating as I progress with book.

Anybody in need of above said applications can get it from me.

Any one willing to host on their server should let me know.
With permissions of K&B, I can donate my Beer if this is not in violation of copyrights
Mitu,
HFS is currently only book available for SCWCD 1.4
SCWCD study kit (Hanumant Deshmukh ,Jignesh Malvia) is for SCWCD 1.3
Reghu do you have

webapps/[YOUR_APPLICATION_NAEM]/WEB-INF/classes directory

and a valid Deployment descriptor
webapps/[YOUR_APPLICATION_NAEM]/WEB-INF/web.xml

In webapps directory, tomcat will not deploy any appliction without a valid deployment descriptor (even if there is a typo in dd, it will not be deployed). I believe if you put in ROOT then it will server the static contents even if it does not have a valid DD.

Look for deployment error messaes when you start up tomcat or to go to
http://localhost:[YOUR_PROT_HERE]/manager/html
and see a list of applicatins deployed succesffuly (You will have to provide username and password for manager role to go to this link)

Hope this helps.
Here are some of the suggestions.

As mentined earlier
Beer-v1 directory can be placed in any of the two directories webapps/ROOT Or webapps

Let us say that you are putting it in webapps directory you should have following directories in webapps

Beer-v1
Beer-v1/WEB-INF
Beer-v1/WEB-INF/classes

and
web.xml goes to Beer-v1/WEB-INF directories and all of the classes (along with the package directory structure) go to Beer-v1/WEB-INF/classes

Sometimes your web.xml has some typo so everything is OK but since web.xml is no good your application is not deployed. So look for such error message in Tomcat window.

Tomcat must be restarted for the FIRST time you deploy application.
Once deployed you can go to
http://localhost:YOUR_PORT_HERE/manager/html

to reload your application without restarting Tomcat


Hope this helps. Let me know if you still can not get through
vangaveti shreya

You need sdk and and a web containter. You can download SDK from here
http://java.sun.com/j2se/1.4.2/download.html

and downolad Tomcat to be used as a web containter from here. look for tomcat section
http://jakarta.apache.org/site/binindex.cgi

Hope this helps

Originally posted by yamini nadella:
(1) The statement is true or false:
In a session bean's setSessionContext(SessionContext) method the
component interface of the session bean can be obtained by calling
javax.ejb.SessionContext's getEJBObject() or getEJBLocalObject() method

Answer is FALSE. I think it should be TRUE



ONLY Bean thing you can do in set<Session/Entity>Context(...) method is
Use your <Session/Entity>Context -> to get a reference to your home
(HFEJB page 196)
So answer should be FALSE.

Originally posted by yamini nadella:
[QB(2) The statement is true or false: Transaction attributes are specified at the ejb-jar file level i.e., they are applicable to all the enterprise beans in the same ejb-jar file

Answer - FALSE . why?
[/QB]


Transaction attributes are described on per method basis. See following DD example


So you describe both ejb name and method name and trans-attributes are described on per method basis.
Hence the answer should be FALSE

Originally posted by yamini nadella:
[QB(3) A message-driven bean instance can not concurrently serve multiple clients.
if this is true then session / entity beans can serve clients concurrently?
[/QB]



A single Stateless session bean can handle multiple clients as long as only one client at a time is in the middle of a method. (HFEJB Page 103)

But clients never share the bean.

Entity beans, client share the home and may share the bean (HFJEB page 99)

Originally posted by yamini nadella:
... Then why EJB itself needs reference to EJB HOME?



In one word, I would say efficiency.

1. Using home obtained in this way, you can make new beans of this type without doing JNDI lookup.
2. Also, you don't need JNDI lookup information
3. Even if you do have JNDI lookup information, calling getEJBHome() on the bean is more efficient.

See HFEJB page 137

Hope this helps
Donna
Two things I can think about
1. Check status of ports using following command
netstat -an
and see if anyother application is running on port.

2. I guess you need to have same version of j2ee and jsdk i.e. 1.3
Good Job Nithin, pretty impressive score
15 years ago
Good Job Marco . Do you mind if we ask your your score
15 years ago