Peng Fan

Ranch Hand
+ Follow
since May 04, 2004
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 Peng Fan

Hi all,

Can I configure multiple DispatcherServlet instance in a single web.xml, each DispacherServlet instance has their own bean configuration file, since I am going to setup several DispatcherServlet instance to handle request to different module, for eg,

and also I have two file under web-inf directory:moduleA-servlet.xml,moduleB-servlet.xml, the content of moduleA-servlet.xml includes following:

The problem is when I type following url into IE, I got a 404 error, and I debuged, found request even can't go into handleRequestInternal method:

Does any one can also tell me the relationship between applicationContext and webApplicationContext, can I share web related beans in applicationContext.xml, if I can, why I got a "can't find handler" when I move the aformentioned into applicationContext.xml from moduleA-servlet.xml.
Thank you very much indeed!!!
Hello everyone!
Recently, I'am working on a JSP project, in that project, I'm responsible for building a .png file and saved it on a hard disk with JFreeChart on the server side(the server is Tomcat 5.0.28),and then insert the .png file into a jsp page using a customized tag lib, in effect, that tag only return the absolute path of that .png file. Here is the complete code:

some fraction of my jsp file is:
but when I run the application, only me can see the image(since the Tomcat is installed on my computer), the image always stored under the {tomcat_home}/bin dir, rather than the com.amoysa.tag package.
My question is how can I solve this problem, let others see the png image.
18 years ago
JSP
Hello, everyone!
Currently, I'm working on a program which is developed using the SWT/JFace library, the program retrieves records from a database table and then show those recodes on Table widget, the database table has column indicate that to which catogory a given recode belongs,so I placed a Tree widget beside the Table widget to navigate to a given category of recodes, the type of that column is VARCHAR in which i stored absolute tree paths like"a:b:c" or"a:b:c " or "a"("a" is always the root node) . My question is: How Can I Dynamically Reconstruct The Tree Using The Absolute Tree Path Information Retrieved From Some DB When I Run The Program? Do I made myself clearly?
If such a way to dynamically construct a tree is not easily feasible, cound you suggest me some better approaches. Thank you!
19 years ago
Hi: J Arshad,thank you for your suggestion.
But, what a pity, actually I am currently write a web-based warehouse management system and most of it have been completed. If I adopted your solution, most my system's structure would be altered. I don't know whether you or any other guy could figure out a better solution! Thanks again for all your generous help!
19 years ago
Hi, everyone!
I am writing a desktop application using SWT, but I got a seemingly-trival problem, that's I don't know how to prevent unintentional closing the application window by clicking the close box of the window. I want to fulfill such goal: when a user click on the close box of the window, a message box with a ok button and a cancel button on it will pop up to warn the the user, if the user click the ok, the application window will be closed , otherwise the window will remain opening. thx a lot!
19 years ago
Hi,everyone!
here is a problem about how to make others viewing my applet through their web browser without requiring get a copy of jdbc driver in their jre subdirectory?
19 years ago
Joe Ess,thank you so much!I had solved the problem by copy the connector/j jar file to my jre/lib/ext subdirectory(only the jre but not my sdk) from my java sdk/jre/lib/ext subdirectory, i know, just as you had said, with such approach, only myself could get the applet run without any problem, how can i make others smoothly run my applet from their web browser without get a copy of connector/j into their jre subdirectory?
19 years ago
Could you please tell me the reason, when i run the same code as a standalone gui program,every thing is ok, but when i run the code as an applet, java console told me that a ClassNotFoundException was thrown,why? thank you!
19 years ago
could you give me a example of an applet that access a mysql database with connector/j jdbc driver.
19 years ago
hi,everyone! this is my first time attempting to combine an applet with a jdbc(connector/j),here is my code:
there is no warning message or runtime exception thrown, but what drive me crazy is when i run this applet from my Internet Explorer 6, it just cannot modify the data in my MySql database. so please help me getting out of such situation.thx!
19 years ago
why jvm complains about the following code? how to bypass such case?
19 years ago
we know Set cannot be tolerant with any duplicate stuff and the singleton method defined in Collections returns a Set, but how does
c.removeAll(Collections.singleton(e)) works?(suppose c is of an Iterator and c is an ordinary object)
19 years ago
if i equals to 0, then assign i++ to i,but the result is still 0, however in C++, the result is 1, why here in java is 0? THX!
19 years ago
what does the content pane stand for? we know in AWT we neednot that, but in swing content pane is necessary, why java designer add such a mechanism?
19 years ago
we know keyword this refer to the current class's object, is that mean in every class there is a static variable named this implicitly added by compiler, so in some cases, we can use ClassName.this.someVariable syntax.
what on earth does the keyword mean from this case?
19 years ago