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

Tak Ming Laio

Ranch Hand
+ Follow
since Jun 10, 2003
Cows and Likes
Cows
Total received
1
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 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.

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.
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
JSP
Reformatted, please help!

I have a bean something like:

and a servlet something like:

and finally my JSP, like:

This JSP give this error:

What is I doing wrong? Please help!
14 years ago
JSP
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 {
NormalTestQuestionBean[] qList = NormalTestBroker.loadNormalTest();
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>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=BIG5">
<title>Normal Test</title>
</head>
<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)
What is I doing wrong? Please help!
[ January 21, 2007: Message edited by: Bear Bibeault ]
14 years ago
JSP
In fact the applet is loaded properly, I have fix it myself.

aaa.html set a javascript variable point to the loaded applet when <frameset onload>, and later one of the frame load a page ccc.jsp to check this variable to see whether the applet is loaded or not.
When I write bbb.html, I set one of the frame <frame src="ccc.jsp">, so ccc.jsp complains before bbb.html <frameset onload> set the variable. If I set the frame location to ccc.jsp at <frameset onload> after I set the variable, ccc.jsp will not complain.
14 years ago