blue sky

Greenhorn
+ Follow
since Jul 20, 2003
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 blue sky

Hi all,
It's said that Java is slower than other languages.
I found that that one reason is that, when running or when one object is requested, JVM loads this object into memory and keep it there until garbage colletion after finish this request.
And another is that it processes multi threads at the same time, so it's cost a lot memory useage.
Is it true?.
Would you please give me some more reason about that?
Thanks a lot.
19 years ago
Hi there,
I use Tomcat 4.1.30 and Apache 2.0.40 on Linux intergrated well
My servername is : www.test.com
I have one webapp named : testing
How can I config virtualhost in Apache so that when I enter http://www.test.com it'll run my testing application
Would you give me an examples the way you config ?
Thanks
19 years ago
Hi,
I have aprolem like this:
int a =1;
int b = 3;
double c = a*1.0/b; //c = 0.3333333333333
But i want to return values of c is 0.33
Please help me.
20 years ago
Hi all,
I use Struts to build my project and
I use windows-1258 or UTF-8 character set on my page. But after I submit a form, all my input seem to be encoded in non Unicode
Example:
<H1> With the Bean Write tag </H1>
Username <bean:write name="loginForm" property="usrname"/> <BR>
Password <bean:write name="loginForm" property="password"/>
<HR>
<H1> With the standard Http request object </H1>
Name==><%= request.getParameter("name")%><BR>
password==><%= request.getParameter("password")%><BR>
With the bean:write tag the name is printed out as ???,
With the standard request object display characters correctly.
And I know that Struts uses non Unicode encoder.
I this is the case, how can I use Unicode in my project?
Help me please!
20 years ago
Hi all,
I have a problem like this:
In the ApplicationResource.properties file, I define:
application.username = XXXX (XXXX is in Vietnamese)
In my jsp page how can I display it in Vietnamese ?
Help me please!
20 years ago
Hi all,
Could you please tell me how insert data from Excel file to database.
Example: my excel file include members information (username,pwd,email,fullname). My DB have table member. And I want insert list members from excel to DB
Hi all!
I use Apache & Tomcat to run Servlet & jsp. I've a problem like this :
I have 2 application app1 and app2
I deploy both of them run on 1 server like :
Ex : app1 : http://172.10.30.10/app1
app2 : http://172.10.30.10:81/app2
it's OK.
But I also want to config so that when I use http://172.10.30.10 then it runs app1 and http://172.10.30.10:81 then it run app2 (it means that I don't want to type /app1 or app2 after IP address anymore).
Could you please tell me how to do that?
20 years ago
Thanks very much!
I've found the answer about response commited
- First, as you explain : Once that buffer is full the server then sends the output back to the client, this is what I mean by 'committing the output'
- Second, use out.flush() to explicit send response to the client
20 years ago
Hi
Could you please give an example that it throws must be IllegalStateException.
Although buffer is filled response doesn't commited yet
Ex : I have code:
..........
out.print("<html><body>test"); // buffer is filled
getRequestDispatcher().forward(req,resp);
out.print(".....");
..........
but it works fine and ofcourse "test" isn't printed to the output, it means that buffer is filled response doesn't commited yet.
Hi all
I want to deploy 1 web application in directory outsite Tomcat_install_dir but I ca'nt. For example :
Tomcat_install_dir : d:\Tomcat
I want to put my application in : c:\myapp
I did like this :
I config in web.xml:
<context path = "/myapp" docbase = "c:\myapp" reloadble = "true">
</context>
But it dosen't work.
please help me!
thanks
Hi everybody, Hi Jones!
Thanks for your reply
But could you please explain clearly about "if you send output and then do the forward the CONTAINER WILL EITHER THROW AN EXCEPTION IF IT HAS COMMITED THE OUT PUT"?. I just don't know what is output HAS COMMITED THE OUT PUT?. if yes you can give me an example code use forward() that it throw IllegalStateException
Thanks
20 years ago
Hi all!
I have code like this
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, java.io.IOException {
PrintWriter out = resp.getWriter();
resp.setContentType("text/html");
out.print("<HTML>");
out.print("<body>");
out.print("forwarding..................." );
out.print("</body></html>");
out.close();
RequestDispatcher disp= req.getRequestDispatcher"/servlet/include");
disp.forward(req,resp);
}
and in include.java file
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, java.io.IOException
{
PrintWriter out = resp.getWriter();
out.print("<html><BODY>forwared.......... ");
out.print("</body></html>");
out.close();
}
it works fine!. but I know that "forward method can be called only if output not commited to the client yet otherwise IllegalStateException thrown"
So I wonder how can we call "response commited to the client ???"
if yes please give me an example about the way we do to make "response commited to the client"
thanks in advance!
20 years ago