Win a copy of Head First Android this week in the Android forum!

# Tak Ming Laio

Ranch Hand
since Jun 10, 2003
Cows and Likes
Cows
1
In last 30 days
0
Total given
0
Likes
0
0
Total given
0
Given in last 30 days
0
Scavenger Hunt
Ranch Hand Scavenger Hunt
Greenhorn Scavenger Hunt

## Recent posts by Tak Ming Laio

Thank you Stephan and Piet, but for very large interval [A,B], this is not a fast solution. I will try another solution when have time.
5 years ago
5 years ago

Paul Anilprem wrote:...

The following two seem to be the best options so far:

"The speakers only need to be loud enough so all that the people in the room will be able to hear."

"The speakers only need to be loud enough for all the people in the room to (be able to) hear them"

I agree "The speakers only need to be loud enough for all the people in the room to (be able to) hear them" is the best options so far. I am puzzled about the word order of "... so all that ..." in the first best option, for me, I would say like this:

The speakers only need to be loud enough so that all the people in the room can hear.
6 years ago
(.008)^(-(0!))

2 0's make an 8
10 years ago
because the girl is a serial killer, she just killed her father, and next come to her sister.
10 years ago

Imran Akbar wrote:LONG

grid computing
11 years ago

Jesper Young wrote:Did you know that besides having a preference for one hand while writing, people also have a preference for one ear and eye?

To which ear do you always hold the telephone, right or left?

I think this is not a test for the preference ear but the perference hand.
11 years ago
13 years ago

Originally posted by Tak Ming Laio:
I cannot read the first word because the first and the last letter not in their right place.

No, it should be the first 3 words.
14 years ago
I cannot read the first word because the first and the last letter not in their right place.
14 years ago
I think there is no way to scroll the table body while keeping the table heading in place. If you place the table heading in one frame and the table body in another, you cannot guarantee they will align. I think the solution is to implement some kind of pagination logic instead of dump all the contents to the browser because at some point of data volume, the browser will fails.
14 years ago
I solved it myself. If I change the attribute of the bean to id, text instead of qId, qText, it works fine. The getter method become getText instead of getQText, and I use the EL expression \${question.text} to refer it. I am working on Tomcat 5, I wonder whether it is the Tomcat problem or JSTL EL mechanism problem to proper handle bean attributes of the format of xXxxx.
14 years ago

I have a bean something like:

and a servlet something like:

and finally my JSP, like:

This JSP give this error:

14 years ago
I have a bean something like:
public class NormalTestQuestionBean implements Serializable {
private static final long serialVersionUID = -8455246466385706192L;
private int qId;
private String qText;

public int getQId() {
return qId;
}
public void setQId(int id) {
qId = id;
}
public String getQText() {
return qText;
}
public void setQText(String text) {
qText = text;
}
}
and a servlet something like:
public class ControlServlet extends HttpServlet {
private static final long serialVersionUID = 1797971647102217363L;

protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
try {
request.getSession().setAttribute("qList", qList);
getServletContext().getRequestDispatcher("NormalTest.jsp").forward(request, response);
} catch (DBException e) {
request.setAttribute("message", "Database error");
getServletContext().getRequestDispatcher("message.jsp").forward(request, response);
}
}
}
and finally my JSP, like:
<%@ page language="java" contentType="text/html; charset=BIG5" pageEncoding="BIG5"%>
<%@ page isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=BIG5">
<title>Normal Test</title>
<body>
<form action="ControlServlet" action="post">
<table>
<c:forEach var="question" items="\${qList}" varStatus="status">
<tr>
<td align="right"><c:out value="\${status.count}"/></td>
<td><c:out value="\${question.qText}"/></td>
</tr>
</c:forEach>
</table>
<input type="submit" value="Done" align="middle">
</form>
</body>
</html>
This JSP give this error:
javax.servlet.ServletException: Unable to find a value for "qText" in object of class "elvis.bean.NormalTestQuestionBean" using operator "."
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
org.apache.jsp.NormalTest_jsp._jspService(NormalTest_jsp.java:65)