Jian Zhang

Greenhorn
+ Follow
since Aug 30, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Jian Zhang

could you specify which package shall I use?
a url or what?
cheers
20 years ago
JSP
maybe the default value of your browse set the 'wrap' attribute to off, so use wrap=virtual to return data which is not broken and wrap=physical to send data with newline characters
20 years ago
JSP
in the form page I write:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Upload your Topic/Item</title>
<link rel="stylesheet" type="text/css" href="myStyle.css"/>
</head>

<body>
<form action="receiver.jsp" enctype="MULTIPART/FORM-DATA" method="post">
<p>
<table>
<tr>
<td>Topic Name *)</td>
<td> <input type="text" name="Topic" /></td>
</tr>
<tr>
<td>Item Name: (*)</td>
<td><input type="text" name="Item" /></td>
</tr>

<tr><td>Description:</td>
<td>
<textarea name="description" cols="40" rows="5" wrap="virtual">

</textarea>
</td></tr>
when I get the parameter of this textarea called "description", I got null value, I saw a post before saying that the multimedia part encryption type is not compatible with form elements sending to the server page. And If I want to unload a picture I have to use things from Jakarta...? I got the javabeans working perfectly and I don't want anything else
waiting for your reply , Thanks .
20 years ago
JSP
I have an existing sequence called TOPICSEQ in the database(oracle), there is a table called t_topic whose id is incremented using this TOPICSEQ. The detail of this seq is created like following
CREATE SEQUENCE TOPICSEQ
INCREMENT BY 1
START WITH 1001 MAXVALUE 9999 MINVALUE 1
NOCYCLE CACHE 20 NOORDER;
It works fine when populating the db with scripts, but when inserting the data using the format like this:
String insertTopic="INSERT INTO T_TOPIC VALUES (TOPICSEQ.NEXTVAL,?,0,'unchecked')";
the last topicID is 1006 in the table before I insert the data , after the insertion, the ID becomes 1021. I don't know what the hell it is and I thought it should follow the sequence since I specified the name of the sequence.

Please, just a week I have to submit my project. Any idea will be appreciated. Thanks a lot!
String insertTopic="INSERT INTO T_TOPIC VALUES (TOPICSEQ.NEXTVAL,'"+
topic+"',0,'unchecked'";
String insertItem="INSERT INTO T_ITEM VALUES (ITEMSEQ.NEXTVAL, '"+item+
"','"+picName+"','"+desc+"',null,null,null,'unchecked','"+
topicID+"','"+userID+"'";



stmt.executeUpdate(insertTopic); //where the error being thrown
stmt.executeUpdate(insertItem);
}
catch(SQLException e)
{

e.printStackTrace();
}
Error says ORA-00917: comma needed.
apparently this is the insertTopic string's problem , but I don't think I forget any comma in the string. Anybody who has a sharp eye can find it for me ,please?
Thanks a lot
I know I should do this by cookie, but I tried, and set the max age of cookie, but when I use the cookie and set the path as request.getContextPath() to set the cookies path(i am using my laptop to do server and client), It throws an error.
I just want to implement the username diplayed next time the user logs in just like what this javaranch does. Anybody help me? Thanks a lot.
I am suffering about this for a couple of days already...
20 years ago
JSP
The problem is here:
I have two frames, one calls another. the child jframe modifies a text file which is displayed in the parent jframe. I want to Update this change when I close the child jframe. How should I do it?
I checked some related topics about the getting sub-window handle. seems I need a listener to listener to the closing event to achieve it. anybody has any idea? Thanks a lot.
20 years ago
i just wonder but is it possible to make the java form or any other kind of window animated ie.the animated feature at the start or end. The window can pop out from one point,etc
20 years ago
sorry but this is the requirement of the teacher , this is my course work ,hehe. I have to use 2d array
20 years ago
I have use the read method in the filereader class to read into a char [],and it returns the number of character have been read. Now I want to read the file in a 2D array. No way to use the same method because the read() method doesn't accept 2d array, and I don't want to the array has any empty contents(since java can't let you change dynamically the length of array).Help please!
20 years ago
local-machine->software->javasoft delete all subentry
currentuser->software ->javasoft delete all subentry
of course ,if your still got any java directories in your computer,just delete them .that's it
20 years ago
thanks a lot for your help,but could you tell me how to change the font in the character array?
20 years ago
I don't mean to argue, but i think the elements in an array should hold the same type,is that right?
20 years ago
I open a file using FileReader, then use the read() method to read the file in to a char array, but in the xp of English version it will read some unknown characters like small cubes,(hell knows what is that!),but in Chinese version of xp , it reads pretty ok. Gonna confused to death!
somebody kind who is willing to help me?thanks a lot!
20 years ago
so, the bro above suggest we should use awt or applet ?but not that new gigs out now? I am a little bit confused...
20 years ago