Keith Pitty

Ranch Hand
+ Follow
since Sep 22, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
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 Keith Pitty

It also depends on the browser. Unfortunately I don't have the details at hand but I do know that there are differences in the way different browsers (e.g. IE, Firefox, Safari, Opera) behave with respect to whether or not new HttpSession objects are created when new browser windows are opened.

Perhaps someone else can shed some light on how the different browsers behave.
15 years ago
Actually, it is possible to have more than one browser using the same HttpSession object. It depends on the browser and how it is opened.
15 years ago
An interface cannot be instantiated, only implemented by a class. So the keywords this andsuper have no meaning in the definition of an interface.

Technically, it is possible to have an anonymous inner class within an interface (although not advisable). Since this is a class, the keywords have valid context.

In general, it is advisable to stick to using interfaces for specifying services to be implemented by classes.
Your servlet would need to act as a client to the EJB.

Briefly, it would need to use JNDI to locate the EJB, then use the EJB's Home interface to create an EJB bean instance before invoking methods on that instance via the EJB's Remote instance.
15 years ago
Do you have the show_sql property turned on in the Hibernate configuation? If so, what is the generated SQL statement?
Use a servlet for the purpose of logging out and in that servlet invalidate the session. For example:


[ September 27, 2005: Message edited by: Keith Pitty ]
15 years ago
Yes, the Model View Controller (MVC) pattern is a widely accepted good practice for separating concerns in a J2EE web application. JavaBeans or POJOs (or EJBs) are used for the Model, JSPs for the View and Servlets for the Controller.
15 years ago
A servlet is a special class that is instantiated by the web container to handle HTTP requests. Typically it delegates to JavaBeans or EJBs to perform business logic before transferring control to a JSP.

A JSP is a web page that includes some dynamic content (e.g. JSP scriptlets, JSP expressions, JSP tags) and is used to present a view to the user. At execution time it actually runs as a servlet (it is compiled into a servlet).

For more details you may be interested in exploring lessons 1 and 6 at: http://java.sun.com/developer/onlineTraining/J2EE/Intro2/j2ee.html
15 years ago
What does the compile error say?
15 years ago
Any application that defines a Class that is used to instantiate objects is one that demonstrates abstraction.

The analytical process of recognising that several real-world objects share enough characteristics to be considered as members of the same class is abstraction.
15 years ago
The keyword private indicates that a member is private to that class.

So in the contrived example where you have a constructor of the form public MyClass(MyClass myObj), it is indeed valid to refer to private members of myObj directly.

Why? Because the object reference being passed in is of the type that is being constructed. The code is all there in the class.
15 years ago
Have you considered Eclipse (eclipse.org)? I have an iBook G4 with 768MB of RAM and find Eclipse to be far and away more productive than a text editor.
15 years ago
Yes, to be exact it is the url-pattern of the servlet mapping. Did that fix your problem?
15 years ago
Have a look in the java.lang.Runtime class, specifically at the exec(String[]) method. This enables execution of a process within the underlying operating system.
15 years ago
You need to specify the servlet mapping in the argument of getRequestDispatcher.
15 years ago