Florence Cheung

Greenhorn
+ Follow
since Mar 18, 2001
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 Florence Cheung

Hi,
I am trying to run a GUI implemented in Swing on afs. But got this exception: -
>Exception in thread "main" java.lang.InternalError: Can't con
nect to X11 window server using ':0.0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:5
9)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvi
ronment.java:58)
at java.awt.Window.<init>(Window.java:188)
at java.awt.Frame.<init>(Frame.java:315)
at java.awt.Frame.<init>(Frame.java:262)
at javax.swing.JFrame.<init>(JFrame.java:141)
at CompanyServer.<init>(CompanyServer.java:53)
at CompanyServer.main(CompanyServer.java:171)
Anybody knows how to fix this? Thanks in advance!
Florence
19 years ago
step1: fill the 5 gallon jar.
step2: fill the 3 gallon jar with the water in the 5 gallon jar.
step3: empty the 3 gallon jar, at this point, there is 2 gallons water in the 5 gallon jar.
step4: pour the 2 gallons water in the 5 gallon jar into the 3 gallon jar. Now the 5 gallon jar is empty. There is 2 gallons water in the 3 gallon jar.
step5: fill the 5 gallon jar again.
step6: fill the 3 gallon jar with the water in the 5 gallon jar.There is 4 gallons water left in the 5 gallon jar.
20 years ago
Hi,
Home interface is primarily for lifecycle operations such as creating,finding,removing EJBs. Remote interface is for business methods.
In EJB specifications, there are different layers such as client, bean,container, persistence manager (in EJB specification 2.0). There are contracts/rules between these layers. As a result, your bean can run in different containers or your client can access different beans. The server vendors can build their servers on different technologies, with many different capabilities. You follow the rules of the bean-development contract, then the container is able to provide system-level services.
Hope this helpful!
Florence
Hi, Jayakuma,
Thanks for help!
I did that already. Actually I added all the jar files in jboss-2.2.2\client to CLASSPATH. But still the same error. Why? Help needed!
Florence
20 years ago
Hi, Guys,
I am new to EJB world.
I am using jBoss-2.2.2.
I have a EJB jar file in the structure: -
META-INF\
ejb-jar.xml
productMg\
Product.class
ProductHome.class
ProductBean.class
I dropped this jar file in the "deploy" directory of jBoss. Then I want to run the client: > java productMg.Client
However, I got the error says:
Exception in thread "main" java.lang.NoClassDefFoundError: org\jboss\security\SecurityAssociation.
Looks it is caused by home.create().
Why is that? How to fix it?
Thanks in advance.
Florence
20 years ago
Hi,
I am implementing a web-related project. I want to disable the "back" tab in the browser in my program so that the user can not view the contents of the previous users. Anybody knows how to implement this?
Thanks.
Florence
Hey,Bill,
I checked the tag side & server side, the names of the checkbox are the same. I tried single quotes & double quotes ,and also viewed the source code,looks the browser interpreted correctly.But I still got "null" value on the servlet side.Why is that?
Florence
20 years ago
Hi,
I have a jsp file which is called multiple times by some servlets.This jsp file uses a tag. In the tag, I display a couple of checkboxes.At the end of the jsp file, I forward the action to a servlet which will check the result of the checkboxes.
--- jsp file:
//this jsp file is called by some servlets.
if(some condition matches)
<tagPrefix:tagName />
<form action=theCheckServletURL method=post>
<input type=submit value="buttonName">
</form>

--- in tag:
//some codes here
out.println("<table>");
for(//the loop condition){
//dynamically get checkboxName here.
out.println("<tr>");
out.println("<td>");
out.println("<input type=checkbox name="+checkBoxName+"> );
out.println("</td>");
out.println("</tr>");
}
out.println("</table"> );
--- in checkServlet:
//get checkBoxName here
String checkBoxResult=request.getParameter(checkBoxName);
//run some other logic.Then forward to the jsp file to
//display a different group of checkboxes.

I checked the checkBoxName in checkServer & tag file,they are the same name. But in the checkServlet, the checkBoxResult is always "null".What am I missing here? Please help!
Thanks!
Florence

20 years ago
Hey,Bundy,
It works. Thank you very much!
Florence
Hi,Connie,
I think the complain is from the browser because the error message window popps up after I enabled "display a notification for every script error" in menubar Tools/Internet Options/Advanced,otherwise it always displays "error on page" in status bar.
Florence
Hi,
I generated a html page ( also can be a jsp page). In this page,I have a "CANCEL" button.
<form name=myForm>
<input type=button value="CANCEL" onClick="confirmit()">
</form>
What I want to do is when I click this button, a confirm window pops up, if I click "yes", a page in the specified url should be displayed,if I click "no", the current page should be displayed.
In the javascript,I implemented:
<script language="javascript">
function confirmit(){
if(!confirm("Are you sure you want to cancel? "))
//should stay with the current page , but don't know how to
//implement it.
else
//should go to a specified url, but don't know how to
//implement it.
}
</script>
Any suggestions? Tks!
Florence
Hi,
I think you can write java code in a servlet or a jsp, for example generate a servlet called "InformServlet.java", deploy it.Let's say the url of it is /informServlet. Then in your html file or jsp file you can write:
<form action=/informServlet method=post>
<input type=submit value="ok">
</form>
When you click "ok" button, the InformServlet.java will be executed.
Hope this helps.
Florence
20 years ago
Hi,Connie,
Thank you for your help.
I tried your code in HTML,it works perfectly.But when I tried it in servlet because I want to dynamically create view,the debugger complains that document.MyForm.foo1 (assume I clicked the 1st checkbox) is NOT AN OBJECT. I tried 1) assign the same name to all the checkboxes and check document.MyForm.foo[i].check ,
also tried 2) write it in jsp tag, the same complain.
My knowledge of javascript is minimal, what is the possible cause of this complain? This is kind of urgent. Please help!
Tks!!
Florence
Hi,
Forget about it.I figured it out.
Thank you anyway for viewing my questions.
Florence
Hi,
This approach doesn't work for me. For example, there are five checkboxes, the user can randomly check up to three checkboxes,once he already checked three checkboxex,then when he checks the fourth checkbox,an alert window should be popped up. How to implement this? Or there is no way for checkboxes?
Tks.
Florence