Sam Wang

Ranch Hand
+ Follow
since Jul 17, 2001
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sam Wang

There are maybe different results in different implements of c. but in the platform of java, i=0 is the only answer.
Anyway, if you find code like this in your project, the author must be a bad guy. He may try to play a trick or want to bury this project!
17 years ago
I have a Encodefilter which runs well on struts + tomcat4.
Now I start a new projection bases on webwork + hibernate + tomcat5.
I use the Encodefilter as a filter to url /*,and write a jsp like this:
<%@page contentType="text/html" %>
<%@page pageEncoding="GBK"%>
<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=GBK">
The page can show chinese and english,but can't pass the chinese request parameter(it show the chinese with "???").
I watch my console,I find before the Encodefilter's doFilter(),the param is
already "???".
I don't know what's wrong.Is webwork or something else?
19 years ago
Client can upload image to the server,and can see the image on the jsp.
In tomcat,I set the path of the image to the sub-dir of the web-root-dir.
In jboss,jboss unpackage the war from the deploy dir to the tmp dir.I
don't know how to set my path of the image.Can somebody help me
19 years ago
Can anybody give me a tip or resources about this problem of xdoclet
19 years ago
I have two entities.They're both use composit pk,and they have
the relation of m:n(use a relation table).How can I write the
xdoclet's meta?
19 years ago
there are some resources about lomboz.
go to google to find them,they are so detail!
19 years ago
w2k iis5
can anyone give me the compatibled "isapi_redirector.dll" and
"ajp.jar" and "tomcat-util.jar"
19 years ago
LOMBOZ plugin
19 years ago
I have a b/s project.Now,I must get the MAC/CPU/HD-KEY of the client machine(or anything that verify the only client pc).How???
20 years ago
java.util.Calendar calendar = java.util.Calendar.getInstance();
Sun Oct 05 13:00:00 CST 2003
why not:
Fri Sep 05 13:00:00 CST 2003
I meet a question with jb9.
When I code in jb8,there's package codeinsight.
When u type java and then type ".",a pop-up
window show some package like util,sql and text.
But I can't find this feature in jb9(or sth
of my pc is wrong?).In the jb9,other codeinsight
are ok(like method and parameter).
Can anybody explain this???
After 3 days,reply cames.First much thank Philip Shanks.
I also use the tomcat-user.xml to manager the user and role through security realm.
I want to know whether there is any better means to implement the user-role in the struts.
20 years ago
I have 100 users along with their roles in database.
I have 100 functions in my web application.(for example,100+ org.apache.struts.action.Action)
The users and their roles often change(after one or two months)
How can I implement this role_based authorization (in struts1.1)?
Also I can extend a base action with authorization or implement the processRoles in the org.apache.struts.action.RequestProcessor,but I don't want to modify my java code or jsp after one or two months.
Please help me!
20 years ago
I create a new struts lib and remove the old one(
if there are two struts frameworks,the web appli-
cation will add two struts-config.xml files,is it
a bug?).Then I modify the dtd of struts-config
.xml.It's ok.
20 years ago
I modify the doctype of the struts-config.xml
config_1_0.dtd - >
If anybody has some better way?
20 years ago