chang Anne

Greenhorn
+ Follow
since Jul 02, 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 chang Anne

Hello,
I read the K&B book on page 462, it said
"From outside the outer class instance code
(including static method code within the outer class), the inner name must include the outer class name"
But I run the following code without Error
I don't get the stentence "(including static method code within the outer class), the inner name must include the outer class name"
class Outer{
private int size = 5;

class Inner {

void doStuff(){

System.out.println(size);
}

}

public static void main( String args[] ) {

Inner i = new Outer().new Inner();

i.doStuff();

}

}
Hello,
I have a question that is a subclass can extends a static variable
from superclass?
I know a static variable is shared by all object, but it can share by an instance of subclass?

I am really appreciate it.
Hello,
I read the K&B books, in chapter 8, it said,
a regular inner class(not static,method-local,anonymous) can't have static declration of any kind.
I guess any kind means static methods or static variables.
But why?
Any ideas?
Thanks a lot.
Hello,
method-local inner classes can't access local variables inside Outer Class's method, ulness local variables are marked final.
I know a variable is marked final means can't change the value.
But why, method-local inner classes can access local variables are marked final?
Thank you.
Hello,
method-local inner classes can't access local variables inside Outer Class's method, ulness local variables are marked final.
I know a variable is marked final means can't change the value.
But why, method-local inner classes can access local variables are marked final?
Thank you.
Hello,
I have a field in registration form.
Users enter their information.
I match the data with database, if it didn't match, I use javascrit to
show error messages and back(using history.go(-1)) to return the registration form.
My question is I want to pass a variable and back to registration form?
How should I do?
Thanks.
Hello,
Sorry, I didn't say clearly.
I have two pages.
First page is used for user input(user enter unique id, upload file).
Second page is used to display the error messages(like, Your id is not available..) and let users reenter their id.
In my original thought,
user enter a id and upload the file,
And, I check the id is unique or not and copy the file in folders.
If id is not unique, turn to second page, user just need to reenter the id.
There's a problem in my process of user registration.
As users don't finish their registration but already upload the file(in program I copy the files they provide).
As Andres Gonzalez suggests,
Before uploading the pic I valide the id is valid or not.
My question is How should i remain the file the user provide in second page?
Any suggestions?
20 years ago
JSP
Hello,
In my registration form, there are two textfield,
id(require a unique one <input name="id" type="id">)
user's pic(<input name="userpic" type="file")
I use javascript to validate id and pic for user enter nothing.
I encountered a problem that I have a restriction on id, using
server-side validation but user's pic have already uploaded.
The user press "previous page" on browser, user's uploaded file stay in directory.
Any ideas?
Thanks.
20 years ago
JSP
Hello,
I have a form with input text fields and a file field for user registering.
And I have a validation of user personal information like id on server-side.
My question is if the user provide the wrong infromation but he/she already upload the file.
Then He quit the register but the server side have the file.
How should I do to avoid the above problem?
Any suggestions?
Thanks.
20 years ago
JSP
Hello,
I just want to try add a new ('\n') in JSTL.
Thank your suggestion.
20 years ago
JSP
Hello,
I would like to try new line in jstl run_time tag, but I get the following
errors:org.apache.jasper.JasperException: /SimpleBean.jsp(11,0) "${header['User-Agent']+ '\n'}" contains invalid expression(s): javax.servlet.jsp.el.ELException: Encountered "'\n", expected one of [, , , "true", "false", "null", "(", "-", "not", "!", "empty", ]
And my code runs in jsp2.0
Any ideas?
20 years ago
JSP
Hello,
20 years ago
JSP
Hello,
"When using the EL tag library you cannot pass a scripting language expression for the value of an attribute. This rule makes it possible to validate the syntax of an expression at translation time." is from
http://java.sun.com/webservices/docs/1.0/tutorial/doc/JSTL4.html;
I don't get it. Could someone tell what's the meanning of it?
I am really appreciate it.
20 years ago
JSP
Hello,
JSTL support runtime expressions(<c_rt:/> and expression language(<c:/>
The usage of two seems no different.
Could someone tell me what's the different between runtime expressions and expression language?
Thanks.
20 years ago
JSP