himanshu patel

Ranch Hand
+ Follow
since Feb 03, 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 himanshu patel

Thanks Lasse. I very much appreciate your help. With little modification in your code, I was able to achieve what I wanted.
18 years ago
I want this tool to clone/duplicate the original file. File name could be anything. Ex. for file ABC.txt, this tool should generate hundred or thousands of copy of ABC.txt with name something like ABC1.txt, ABC2.txt etc.... The bottomline is I need thousand of files to test my application's processing time.
18 years ago
I want do a performance test where in I will gradually increase number of files to measure the load. For that I need to create a thousand files. Can anybody suggest any tool by which I can duplicate number of files? Let say I have file x.txt. I want 10000 copy of x.txt. Is there any tool that can duplicate files?
18 years ago
Dear all,

I am working on ATG upgrade migration project where i have to upgrade
ATG 5.6.1 with oracle 8i to ATG 6.4 with oracle 9i. While exploring
ATG site, i came to know that upgrading to ATG 6.4 is a two step process.
First upgrade from 5.6.1 to 6.1 and than 6.1 to 6.4. I would like to find
out whether is there any way to upgrade directly from 5.6.1 to 6.1.

I appriciate if someone can provide email id to contact ATG .
19 years ago
I got the solutions. Posting the modified code here so that other can get benefit.

String fileName = "";
String actionVal = "";

FileUpload fileUploader = new FileUpload();

List fileItems = fileUploader.parseRequest(request);

Iterator i = fileItems.iterator();

while (i.hasNext()) {

FileItem item = (FileItem) i.next();

if (!item.isFormField()) {
String ufilePath = item.getName();
if (ufilePath.indexOf(".csv") < 0) {
errorString = "The type of the file being imported is not valid. Please select a CSV file to import";
}
ufilePath = ufilePath.replace('\\','/');
StringTokenizer st = new StringTokenizer(ufilePath, "/");
while (st.hasMoreTokens()) {
fileName += st.nextToken();
}

item.write(FILE_PATH + "/" + fileName);

} else {
/* Get form fields value */
/* Since form type is "multipart/form-data", we can not get
form field value through usual request.getParameter() method.
Hence get it from FileItem.
*/

String name = item.getFieldName();

if ("action".equals(name)) {
actionVal = item.getString();
}
}
}
19 years ago
JSP
Hi all,

Can anybody give me example how to get parameters when form type is
multipart/form-data?

I am using org.apache.commons.fileupload API for file uploading.

Here is my code for file uploading.

FileUpload fileUploader = new FileUpload();

List fileItems = fileUploader.parseRequest(request);

Iterator i = fileItems.iterator();

while (i.hasNext()) {

FileItem item = (FileItem) i.next();
String fileName = "";
if (!item.isFormField()) {
String ufilePath = item.getName();
if (ufilePath.indexOf(".csv") < 0) {
errorString = "The type of the file being imported is not valid.
Please select a CSV file to import";
}
ufilePath = ufilePath.replace('\\','/');
StringTokenizer st = new StringTokenizer(ufilePath, "/");
while (st.hasMoreTokens()) {
fileName += st.nextToken();
}
item.write(FILE_PATH + "/" + fileName);
}
}

Apart from File uploading i want to get parameters which is a part of
fom data.

How do i achieve String action= request.getParameter("action") ?

I came across third party package which straight away offers getParameter()
method to retrieve form data. But i just need one form parameters so i have to stick with apache fileupload package.

Some where I have read that we can get form data using readHeaders() from org.apache.commons.MultipartStream class but do not know how exactly i should use.

Can anybody help me.

Thanks
19 years ago
JSP
You should have Primary key in your db either product name or product id.
Put constraints on it so that it won't allow duplicate raw. Alternatively,
before inserting product into db, check first wheter product with same name already exist, if yes do not insert and return to client with valid
error description.
19 years ago
JSP
I think it is Javascript related, should be moved to javascipt forum.
On onClick event, call javascript function which opens popup window
using window.open() wih URL of other JSP which you want to access.
I can think of one more way to do this using div as Jeroen suggested.

Ex. When the first time page is loaded , get all the texts from database corresponding to each text item in list. This will typically be in each different div block.

Now using javascipt make visible any default text and invisible all other text. Now when item is selected from the list, make corresponding
text visible and other invisible. This way i think we should be able to
refresh data without sending request to server. I have not tested it so
not so sure.

But this is advisable if we have few items in the list and has small corresponding data. Otherwise it would increase page load time.

I think Eric should be able to give some javascript tricks.


Originally posted by Jeroen Wenting:
you can in fact refresh part of a page by using quite elaborate Javascript code which loads new content into a named html element (usually a div or span).

Can't show the code we use as it's proprietary, it's about a hundred lines of Javascript calling a servlet that forwards to a jsp that returns html with predetermined formatting to the javascript which then inserts it into an html control.

19 years ago
JSP
I am just exploring the possibility with doing in Javascript. I am not confident at this stage. But i would like to have some more info.

1> What interface are you expecting when clicking an image or a text
area? Is it a popup window that will have image or text list? or you
want to display just list box?
2> How many images would be there in list box. Do you considering buffering
(preloading) of those images or want to source it from server when
selecetd?

3> How the image area would look like?
4> What the text content would be?
Ex. if you select "text1" from list, from where the corresponding
content would come? Would the content be bigger in size or just a few
lines.
19 years ago
JSP
It is in bangalore, Bansakri 1st Stage. They Conducted walk-in last month
for all positions including 1-3 years experience. As far as I know, all the openings are closed now.
19 years ago
Hello all,

I have got an offer from Mindtree . I would appreciate if you could
share some information about mindtree. Work culture, Onsite oppertunity
etc. It would help me in taking my decesion.

Thanks

Himanshu
19 years ago
You may like to explore command "startx gnome" , "gnome-session" and "startkde".
[ June 23, 2004: Message edited by: himanshu patel ]
19 years ago
Also, try editing file /etc/sysconfig/desktop
19 years ago