Arron Zhang

Greenhorn
+ Follow
since Dec 27, 2002
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 Arron Zhang

package arron;
import javax.servlet.http.HttpSessionListener;
import javax.servlet.http.HttpSessionEvent;
public class SessionCount implements HttpSessionListener {

private static int activeSessions = 0;
public static int getActiveSessions() {
return activeSessions;
}
public void sessionCreated(HttpSessionEvent e) {
activeSessions++;
}

public void sessionDestroyed(HttpSessionEvent e) {
if(activeSessions > 0) activeSessions--;
}
}
21 years ago
try this,
<form name="form1" action="">
<input type="hidden" name="a" value="">
</input>
<script language="javascript">
//set value of "a"
//set action of "form1"
form1.submit()
</script>
21 years ago
JSP
I got it.
In my filter,write such statment:
HttpServletRequest hrequest=(HttpServletRequest)request;
then,
String url=hrequest.getRequestURI();
21 years ago
JSP
Sorry,
I want go get the URL in Filter.
There's no method getRequestURL() in ServletRequest.
21 years ago
JSP
example:
if user input:
http://www.xxxx.com/???/???.htm
How can I get "???/???.htm" in JSP
21 years ago
JSP
CLASSPATH=.;E:\j2sdkee1.4\lib\j2ee.jar;E:\Sun_studio_sdk\j2sdk1.4.1\lib\tools.jar
System: win2k professional
environment variable:
JAVA_HOME=E:\sun_studio\j2sdk1.4.1
J2EE_HOME=E:\j2sdkee1.4
ANT_HOME=F:\ANT1.5.1
path=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;E:\Sun_studio_sdk\j2sdk1.4.1\bin;E:\j2sdkee1.4\bin;E:\Mysql\bin
I installed the J2EE_SDK on my computer,but it can't run with command line.
If use "j2ee -verbose",there's an exception:
java.lang.NoClassDefFoundError: Files\Common
If use the Start_J2EE in start_menu,it run successfully.
You can use the deploytool which is an additional tool in J2EE_SDK to deploy EJB on J2EE server,or you have to use another server such as Weblogic server.
I test the length of String from 32k to 15M(the size of memory on my computer is 384M)
the length can be any digit less than 15M,
when the length is 15M,exception:
Exception in thread "main" java.lang.OutOfMemoryError
21 years ago
maximum length of String = 32k ?
21 years ago
but when I use getString(int i)
the program run successfully!
friends,
when I use getString(String columnName) in Mysql,
Exception:
java.sql.SQLException: Column 'User' not found.
why?