Win a copy of Rust Web Development this week in the Other Languages forum!

Anna Wang

Ranch Hand
+ Follow
since May 26, 2006
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 Anna Wang

Hi, Niranjan ,
Thank you very much for your help. I checked all the things you mentioned. Unfortunatly my struts still can not work.

I will send you an email to discuss this.


Hello, everyone:

I am trying to deploy and run the strut example in last chapter of HFSJ. I did everything the book said.
1)write form.jsp and result.jsp
2)put three class files(BeerSelectAction.class, BeerSelectForm.class, BeerExpert.class) in right place
3)put three jar files in WEB-INF/lib/
4)put web.xml, struts-config.xml in right place

When I run , I got error:

message: Servlet FrontController is not available

I checked web.xml, did not find anything wrong. Can anybody explain a little bit about it? Thank you so very much.

I am learning Sakai. I was wondering whether there are someone here know it. I have a lot of questions, I want to find somebody to discuss. Thanks.

15 years ago
Now I am working on Sakai, I was wondering whether there are somebody here know it. I am a beginner for Sakai, I want to find someone to discuss some questions.

Thanks a lot.

15 years ago
I tried to download, but can not get it. Will somebody send the file to me via my email

Thank you very much
Hello, everyone,

From HFSJ P. 472, it shows:
<body-content> can be: empty, scriptless, tagdependent, JSP in a tag.
I was wondering what is the default value if No <body-content>, is it JSP, right?(I remember I saw this somewhere, not sure)

So, If the tag is simple tag or classic tag, what's the value of <body-content>? Still those four value(empty, scriptless, tagdependent, JSP)? I am confused in this question:

<%= display %>

is invalide because body includes a JSP expression.

Can anybody explain this? Thank you very much.

About servlet tag means: I should write
<servlet-name> </servlet-name>


in web.xml?

I want to invoke the servlet just by its class name. I don't think I need write the servelt and servlet mapping. Am I right? Thanks
Hello, everyone,

From servlet specification, it said:
You can invoke a servlet by its class name.

I tried, but always got:
The requested resource (/myApp/Hello) is not available.

I did like this:

Write a servlet( for example: ""), compile it, put Hello.class in WEB-INF/classes/, then
I invoke it by: http://localhost:8080/myApp/Hello

It doesn't work always.

Can anybody explain? Thanks.

Hello, everyone:

When I ran this JSP code, I expected it will output 14, but the result is 4. Can anybody explain a little bit? Thanks.

String s = "10";


Later I change code to:
${4 + "10" }
it outputs 14, what's different about those two codes?
Hi, everyone,

I met this question and I am not sure the answer. Can anyone give me the answer and explain it?

Which of the following statements are NOT true about the behavior of an HttpSession object in a distributable environment?
(Choose 2 answers)

A.) HttpSessionEvents are always propagated from one JVM to another
B. )An HttpSession can reside only on one JVM at a time.
C. )When a session migrates, all the session attributes that implement the HttpSessionActivationListener are notified
D. )When a session migrates, the readObject() and writeObject() methods of all its attributes are surely invoked.

BTW, where can I get more information about distributable envirooment?

Thank you very much.

Hello, everybody:

I run this servlet code, I expect it will output "head3", to my suprise, it prints null, can anybody explain it? Thanks a lot.

public doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {

PrintWriter out = response.getWriter();
response.addHeader("a", "head1");
response.addHeader("a", "head2");
response.setHeader("a", "head3");
String s = request.getHeader("a");

later, I tried this code, the output is also null.
response.addHeader("a", "head1");
String s = request.getHeader("a");
Please explain it. Thanks.
Hello, everyone:

When I do the mock exam, I found I can not do very well in design patterns. I was wondering it is enough for the certificate exam(design patterns part) if I just read HFSJ chapter 14 . Should I read other books about it? Can anybody give me some links or suggestions? Thanks a lot.

Hi, everyone:

I found this question in the mock exam, can anybody answer and explain the answer. Thanks a lot.

Select the correct sequence of actions that a servlet container performs before servicing any request.

1. Instantiate listeners defined in the deployment descriptor.
2. Initialize filters defined in the deployment descriptor.
3. Initialize servlets that are set to load on startup.
4. Call the contextInitialized method on the listeners implementing ServletContextListener interface.

Enter the item numbers in the text boxes below:

Hello, everyone,

In HFSJ ch13 Q1:

Which are true about filters?

B. The destroy methos is always a container callback method.
C. The doFilter method is always a container callback method.

Answer B is right.

Can anybody explain this answer and what is callback method?

Thank you so very much.

Thank you very much for the answers. It is very clear.