Ryan Wilson

Ranch Hand
+ Follow
since Apr 16, 2003
Merit badge: grant badges
For More
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 Ryan Wilson

Try:

C:\Users\myname\Documents\JSP\MyProject\beerV1> javac -classpath C:\tools\tomcat\lib\servlet-api.jar;classes;. -d C:\Users\myname\Documents\JSP\MyProject\beerV1\classes src\com\example\web\BeerExpert.java

The separator for the classPath on windows is ';' you had a ':'

Srinivas Palam wrote:If I replace this() with super(#2) why is it skipping printing h? What is the use of this(#1) in building class? It's just to call object constructor?


The first line in a constructor needs to be either a call to this or super. If neither of those are typed (meaning you explicitly add that code) then the compiler will add a call to the parents no-args constructor ( super();)
Furthermore one of the constructors in the class will eventually need to call super to instantiate the parent class.

So when you comment out the call to this() on line 12 and added the call to super there is no longer a need to execute the no-args constructor of House. Therefore "h" is not printed.
Regarding your second question, calling this(); on line 5 will simply call the no-args constructor. However in this sample code the Building(String name) overloaded constructor is never called.
Remember that the compiler will never call the super that contains parameters so this must be explicitly done
Example:
House(String name) {
// this();
super(name); #2
System.out.print("hn " + name);
}
The code has the following flow

House(String name)
this() //calls the no-args constructor in House
House() //the compiler implicitly adds a call to parents no-args constructor, super()

Building's no-args constructor executes and prints b
then House's no-args constructor prints h
Then finally House(String name) constructor prints hn x

You would need to explicitly call super(name) from one of the House constructors to execute the overloaded constructor in Building
Brett,

When I was writing Java code I thought I knew Java. I found out that I really did not know as much as I thought I did.
Studying for the exam made me really learn the language and it was this knowledge that was most beneficial to my career.
Hariprasad this is only a validation error in RAD. You will be fine if you continue developing your portlet. The tld will be correctly resolved during runtime.
16 years ago
I assume this post is related to you other about where to find the portlet.tld.

Are you getting these errors while running on the server or only in the RAD environment?
16 years ago
Seeing as how Sun published the JSR 168/268 specification the certification would most likely come from them.

A few years ago I had asked someone at Sun if there was a going to be a certification for portlets and at that time they had no plans to do so.

Of course things could have changed since then. I would suggest that you contact them.

Please post your findings.
16 years ago
Are you asking for a particular portlet to be added to all pages that have the "t" layout?

If so this is not possible through the portal admin console. I would suggest using xmlAccess to create your pages. This would allow you the option of adding the portlet to the page.
16 years ago
John what portal/version are you running?

The actionURL tag will create a link to the action phase of the current portlet. If this form is not being called inside the portlet itself then you will need to use the vender specific APIs to generate the URLs to the portlet.

In Websphere this can be done using the advance URL generation APIs.
http://www-128.ibm.com/developerworks/websphere/library/techarticles/0603_behl/0603_behl.html
16 years ago
What portal server/version are you running?
16 years ago
Shailesh,

Your answer to 1 and 3 are incorrect.

1.) The correct answer is d.

Look in the RAD help for debugging local test environment.
"Restrictions: To debug the following kinds of portlet applications,
remote debugging is the only option:
Personalized portlet applications."

While it is not easy you can debug Cooperative portlets. It requires that you enable admin portlets before starting the UTE.

3.) The correct for this question is also d.
Search the RAD help for the following topic.
"Resetting portlets on remote servers"
16 years ago
A Java class cannot be larger than 64kb.
Since your JSP gets translated into a servlet, the compiled servlet class cannot be larger than 64kb.
20 years ago
JSP
I want to thank everyone for the good posts in forum.
I did not agree with the wording of a few questions.
I was hoping to score higher but at least I passed.
Once again thanks everyone.
20 years ago
I came across this question in a practice exam.
Which of the following apply to a web application that is distributed across multiple Java Virtual Machines?
You answered: D

A HttpSessionActivationListener needs to be implemented.
B HttpSessionMigrationListener needs to be implemented.
C Web application cannot be distributed across multiple Java Virtual
Machines.
D No precautions are required
A is correct. HttpSessionActivationListener needs to be implemented.

I did not think the you HAD to implement HttpSessionActivationListener.
Could someone please confirm this.
Malli
I'm not sure if most servers will perform the function of using URL rewriting if cookies are disabled. I think the more important questions to ask is if J2EE 1.3 specification require server to perform URL rewriting when cookies are disabled. After all we are being tested on the J2EE spec and not the extra functions of most servers. Please correct me if I'm wrong
about this point.
Thank You