Edwin Wong

Greenhorn
+ Follow
since Apr 15, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Edwin Wong

Hi netharam ram
I am thinking of another way to protect your source code without encryption of your jar file.
How about using an application server to run your java application ? (just like Websphere, EA Server etc..)
You can use servlet mapping to hide your actual class name,run and web server with another machine
After making some minor setting, I think you source/class can be only access with your full control.
22 years ago
Dear all
I finished the SCWCD this morning.
Thanks to anyone who has helped me in this forum.
For this exam,I have prepared it for 2 weeks.
THe most difficult question for me is design pattern. I got only 25% in this area.
The design pattern is not straigh forward as mock exam.
Fortunately. other goes well
I have used WebJPlus and it helps me a lot. The deatiled explaination helps me to understand the concept.
Most of people regard that the Mock exam is difficult than the real one. However, in some extent, I don't think so. The tough question in the real exam is more diffiuclt than most of the mock exam(even it was declared as tough in the mock).
In the real exam, all the 5 choices are very similar. I recommand to do as least 5 mock exam before you go to the real one.
Goog Luck to all
[ April 08, 2002: Message edited by: Edwin Wong ]
Dear all
Thanks for all your reply !
After I have read the specification of JSP carefully, I got a new picture. I understand the scope of useBean tag is not related to the implicit objects. sorry
As Madhav said, unfortunately they use the same name. I found the step for instant a JSP tag in the following url :
http://java.sun.com/products/jsp/tags/10/syntaxref10.fm14.html
According to the above url:
----------------------------------
The <jsp:useBean> tag attempts to locates a Bean, or if the Bean does not exist, instantiates it from a class or serialized template. To locate or instantiate the Bean, <jsp:useBean> takes the following steps, in this order:
1)Attempts to locate a Bean with the scope and name you specify.
2)Defines an object reference variable with the name you specify.
3)If it finds the Bean, stores a reference to it in the variable. If you specified type, gives the Bean that type.
4)If it does not find the Bean, instantiates it from the class you specify, storing a reference to it in the new variable. If the class name represents a serialized template, the Bean is instantiated by java.beans.Beans.instantiate.
5)If it has instantiated (rather than located) the Bean, and if it has body tags (between <jsp:useBean> and </jsp:useBean> , executes the body tags.
----------------------------------
The scope in useBean tag is used for locate bean only
Cheers
Edwin
[ April 04, 2002: Message edited by: Edwin Wong ]
[ April 04, 2002: Message edited by: Edwin Wong ]
Hi all
I have a question about scope in JSP
When I type
<jsp:useBean id="hello" class="ABC"/>
I know that the default scope is "page".
Therefore, it is no doubt that I can use all the implicit objects in this scope.
However, (1)I can still use the implicit object "application" without specify the scope ="application" (2) I can't use the implicit object "session" without specify scope="session"
I got th following observation:
1) scope="page" , all page implicit object + "application"
2) scope="session", ?
3) scope="application", ?
4) scope="request" ?
Please correct me if I make any mistake
I am using Tomcat 4.0
Many thanks
Edwin
[ April 03, 2002: Message edited by: Edwin Wong ]
It's me again.
The problem still exist.
Using the Lotus JDBC-Driver, following problem occurs:
Special characters were represented as TWO Bytes. I think this could be
an problem with translation between ANSI an Unicode...
I can't use java.exe to inset a character such as �
However, I can insert this character normally by jview
As jview doesn't support java2, I can't use java2 method.
Therefore, I think I can't use jveiw for my project.
I just want to insert '�' to domino normally.
Does anyone know a solution or a workaround?
Dear all
I have no idea about how to insert French to Domino R5 through JDBC 1.0
I have tried to use the setUnicodeStream() method in the preparedStatement class.
However, the result is empty when I used Domino Client to open the record. I seems that I just insert an empty string into domino.

Any other suggestion about how to achieve this goal ?
Thanks and Regards

Dear all
I have no idea about how to insert French to Domino R5 through JDBC 1.0
I have tried to use the setUnicodeStream() method in the preparedStatement class.
However, the result is empty when I used Domino Client to open the record. I seems that I just insert an empty string into domino.

Any other suggestion about how to achieve this goal ?
Thanks and Regards
23 years ago
Thanks Lam
In order to clear my confusion, I want to ask one more question
Is that mean Polymorphism(runtime binding) won't work when the method is static ?
Just want to have a more clear picture
Thanks
Sorry for typing mistake..
The coding of question 2 should be
...........................
class Base{
static int value = 0;
Base(){
addValue();
}
static void addValue(){
value += 10;
}
int getValue(){
return value;
}
}
class Derived extends Base{
Derived(){
addValue();
}
static void addValue(){
value += 20;
}
}
public class Test {
public static void main(String[] args){
Base b = new Derived();
System.out.println(b.getValue());
}
}
....................
Thanks a lot
Dear all
The followinf is the mock exam on http://www.geocities.com/sahirshah/applets/mocktest.html
I don't understand the result
Here is the code for question 1
........................
class Base{
int value = 0;
Base(){
addValue();
}
void addValue(){
value += 10;
}
int getValue(){
return value;
}
}
class Derived extends Base{
Derived(){
addValue();
}
void addValue(){
value += 20;
}
}
public class Test {
public static void main(String[] args){
Base b = new Derived();
System.out.println(b.getValue());
}
}
................................
Question 1 answer is 40
Could any one can tell me why the parent woulc call the child method rahter then it's own method ?
Question 2 is almost the same but method and variable changed to static
....................................
class Base{
int value = 0;
Base(){
addValue();
}
void addValue(){
value += 10;
}
int getValue(){
return value;
}
}
class Derived extends Base{
Derived(){
addValue();
}
void addValue(){
value += 20;
}
}
public class Test {
public static void main(String[] args){
Base b = new Derived();
System.out.println(b.getValue());
}
}
.................................................
The answer is 30
Anyone can help me ?
I am confuse about this
Thanks