Michael Zhang

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

Recent posts by Michael Zhang

My OS is WIN2000 Adv Server, and I use WLS7.0.
When i make a simply JSP file just like:
<%="ABCD"%>
and when compile will get error below:
Compilation of 'C:\Program Files\bea\user_projects\mydomain\myserver\.wlnotdelete\DefaultWebApp_DefaultWebApp_1192339\jsp_servlet\__test.java' failed:
--------------------------------------------------------------------------------
C:\Program Files\bea\user_projects\mydomain\myserver\.wlnotdelete\DefaultWebApp_DefaultWebApp_1192339\jsp_servlet\__test.java" error=2
--------------------------------------------------------------------------------
Full compiler error(s):
java.io.IOException: CreateProcess: javac -classpath "C:\Program Files\bea\user_projects\mydomain\.\applications\DefaultWebApp\WEB-INF\classes;C:\Program Files\bea\user_projects\mydomain\myserver\.wlnotdelete\DefaultWebApp_DefaultWebApp_1192339;C:\Program Files\bea\jdk131_02\jre\lib\rt.jar;C:\Program Files\bea\jdk131_02\jre\lib\i18n.jar;C:\Program Files\bea\jdk131_02\jre\lib\sunrsasign.jar;C:\Program Files\bea\jdk131_02\jre\classes;C:\Program Files\bea\jdk131_02\lib\tools.jar;C:\Program Files\bea\weblogic700\server\lib\weblogic_sp.jar;C:\Program Files\bea\weblogic700\server\lib\weblogic.jar;" -d "C:\Program Files\bea\user_projects\mydomain\myserver\.wlnotdelete\DefaultWebApp_DefaultWebApp_1192339" "C:\Program Files\bea\user_projects\mydomain\myserver\.wlnotdelete\DefaultWebApp_DefaultWebApp_1192339\jsp_servlet\__test.java" error=2
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Win32Process.java:66)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:551)
at java.lang.Runtime.exec(Runtime.java:477)
at java.lang.Runtime.exec(Runtime.java:443)
at weblogic.utils.Executable.exec(Executable.java:208)
at weblogic.utils.Executable.exec(Executable.java:133)
at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.java:545)
at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:354)
at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:406)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:206)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:160)
at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:447)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:287)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:242)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5363)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:721)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3043)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2466)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)
So, I added below into Environment variable:
set path=c:\Program Files\bea\jdk131_02\bin;%PATH%
set classpath=.;c:\Program Files\bea\jdk131_02\lib;c:\Program Files\bea\weblogic700\server\lib
and restar WLS, but still get the error. Why?
21 years ago
I have set IISProxy.dll into IIS, and I uses "http://localhost/weblogic/test.jsp" to test, it's works OK, but "http://localhost/weblogic/console" can't work, why?
[ April 09, 2003: Message edited by: Michael Zhang ]
21 years ago
Thanks a lot.
21 years ago
JSP
Hi, all.
I want to use JavaScript's variable in JSP block. I know JavaScript is Client-Side script and JSP is Server-Side script, so, following code is impossible, but I hope it's another way to achieve my aim. Please help me.
SCRIPT language=JavaScript>
function loadSubMenu(Value){
<% Vector term1 = teacher.getTerm(Value); //I want to use JavaScript's variable "Value"
%>
}
</SCRIPT>
21 years ago
JSP
I passed SCJP 1.4 on 01/02/2003.
Thanks to everybody who helped me.
I want to take SCJD Exam, and I need your advice, how can I start my stady plan?
Thank you very much.
[ January 04, 2003: Message edited by: Michael Zhang ]
22 years ago
Hello.
Give:
class Test4 {

class Inner {
void test() {
if (Test4.this.flag); {
sample();
}
}
}

private boolean flag = false;

public void sample() {
System.out.println("Sample");
}
public Test4() {
(new Inner()).test();
}
public static void main(String args []) {
new Test4();
}
}
1) Prints out "Sample"
2) Program produces no output but terminates correctly.
3) Program does not terminate.
4) The program will not compile
I thought the answer is 2), but when I run these codes, the result is 1), why?

Originally posted by Manish Hatwalne:

Actually, there is no problem with geocities, but AFAIk few countries like china seem to block this domain. So...
- Manish


Thanks for your help.
Our gov is the despair of me.
Hi,shweta mathur.
I can't open your website.
Can you mail to [email protected]?
thanks.
Hi,Barry Gaunt.
I tried what your say, but it still worked in JRE1.4. I found these register key in my register.
[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment]
"CurrentVersion"="1.4"
[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.3.1_04]
"JavaHome"="D:\\Program Files\\JavaSoft\\JRE\\1.3.1_04"
"MicroVersion"="1"
"RuntimeLib"="D:\\Program Files\\JavaSoft\\JRE\\1.3.1_04\\bin\\hotspot\\jvm.dll"
[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.4]
"JavaHome"="D:\\Program Files\\Java\\j2re1.4.1_01"
"MicroVersion"="1"
"RuntimeLib"="D:\\Program Files\\Java\\j2re1.4.1_01\\bin\\client\\jvm.dll"
The root is HKEY_LOCAL_MACHINE, that means all of my computer's user can use them.
So, I tried to modified the key "CurrentVersion" to "1.3" or "1.3.1_04" but it still worked in JRE 1.4.
Can you tell me an other way for my trouble?
thanks.
22 years ago
I want both JRE1.3 and JRE1.4, what can I do?
and how to switch?
BTW: My OS is WIN2000
thanks.
22 years ago
class Superclass {
public static void main(String[] args) {
System.out.println(new Subclass().methodA());
}
private int methodB() {
return 9;
}

int methodA() {
return methodB();
}
}

class Subclass extends Superclass {
protected int methodB() {
return 1;
}
}
I thought the output is 1, but it is 9. Why?
Consider the following variables definitions.
Float f1 = new Float("10F");
Float f2 = new Float("10F");
Double d1 = new Double("10D");
Which of the following yields a boolean value of true.
a)f1 == f2
b)f1.equals(f2)
c)f2.equals(d1)
d)f2.equals(new Float("10"))
ANS: b,d
c is incorrect. why answer c returns false?