masijade 1,351 Industrious Poster Team Colleague Featured Poster

As far as your code, from your last post goes, the actual error message would help. Otherwise your "new.jpg" file will be written in the current working directory of the Application server, and that can vary depending on how your server was started. Did you try running a find to see if you could find it?

masijade 1,351 Industrious Poster Team Colleague Featured Poster

I.E.

You: "Write the code for me."

Me: "NO!"

There is a wealth of information on doing file uploads out there. I do not have an example in front of me, so to give you one I would have to search (Google) for one. And, if someone has to do that anyway, it just as well be you, as it is your assignment.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Then don't make a textfield. Simply place the value on the page, and if a value for that field still needs to returned by the form, add a hidden value with the name that textfield normally would have had.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Do what I suggested in the post. On a fileupload the server gets an inputstream. How that inputstream originates doesn't matter. Investigate "File Upload" streams. Both how to receive one in a Servlet, and how to initiate one using an HttpUrlConnection, and your problem is solved.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Why don't you Google "Java File Upload" and send a normal file upload requesst.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Good for you. Experiment a bit.

masijade 1,351 Industrious Poster Team Colleague Featured Poster
filename=me.cpp
# If you use ksh or bash
filename=${filename%cpp}out
# if you use sh
filename=`echo $filename | sed -e s/cpp$/out/`
masijade 1,351 Industrious Poster Team Colleague Featured Poster

No. That he can already do, but that will lose the decimal places (i.e. expr is, essentially, int only).

Try

result=`echo "scale=2;${var1}+${var2}" | bc`
masijade 1,351 Industrious Poster Team Colleague Featured Poster

see http://java.sun.com/developer/EJTechTips/2003/tt0114.html (And an internet search for "Java JSP error page" returns this as the first hit).

masijade 1,351 Industrious Poster Team Colleague Featured Poster

No reason to pass it as a String.

float value = ((Float) session.getAttribute("name")).floatValue();
masijade 1,351 Industrious Poster Team Colleague Featured Poster

Well, if you don't know how to do it from the command line, you shouldn't be using an IDE yet. And, that you didn't know that this had to do with the classpath, is another good indication that you shouldn't be using an IDE, yet.

Go to this page (http://java.sun.com/docs/books/tutorial/index.html) and do the tutorials there, starting from "Getting Started" down through "Deployment".

As far as setting the library path (which is how most IDEs refer to the classpath when it comes to executing, they refer to the classpath as the buildpath when it refers to compiling), I assume your IDE came with some documentation?

Ezzaral commented: agreed +3
masijade 1,351 Industrious Poster Team Colleague Featured Poster

Classpath. Check the projects library path (not build path), or execute from the command line using the -cp option.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

I'm sorry, but, if you're not even willing to try, why should I. I gave you what you need to fix yourproblem, regardless of whether or not "Java is your bailiwick". And, if you're opening and closing braces in comments, it's not surprising it doesn't work.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

you're looking for ints, and the last one must be mutiplied by 10 other wise the int value will always be 0 (obviously) and the first one divided by ten or it will be e.g. 10 instead of 1.

int tens=(int) ((v / 10) % 10);
int ones=(int) (v % 10);
int tenths=(int) ((v * 10) % 10);
masijade 1,351 Industrious Poster Team Colleague Featured Poster

He's already been told this, and then will only say that he gets a 500 status back, but has not provided an error message yet. I am willing to bet it is the mysql user configuration now.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

new Float(float);

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Your OS is CentOS 5.0, which is Linux (as you also said). Try downloading just about any Linux version of JBoss, and give it a try.

Edit: Also, if you know anything about JBoss, you know that it is written in Java, so simply go to http://sourceforge.net/projects/jboss/ and download it. It says right on the page OS Independent.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

No. At the very least Google for some possibilities, but nobody is going to do your work for you.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Why are you doing System type stuff using Java? It is not designed for it. If you want a command line command to get the "application" list that appears in TaskManager, then why are you asking in a Java forum? Ask in some Windows forum somewhere.


And don't cross-post. You have posted this same non-Java question (with this nominal Java code in the JSP forum as well, where it is even more out of place than it is here).

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Why are you doing System type stuff using Java? It is not designed for it. If you want a command line command to get the "application" list that appears in TaskManager, then why are you asking in a Java forum? Ask in some Windows forum somewhere.

Edit: And this is the JSP forum. What you have posted is not JSP, but rather Java (nominally).

masijade 1,351 Industrious Poster Team Colleague Featured Poster

JavaScript != Java

I have already asked the admins to move the thread.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

I'm sorry, but that says it all.

The application server you are using to server these pages has a log. The errors should be found there. And I said nothing about a "code trace". I said a "stack trace", these should also be in the log file, probably directly after the error message, as long as the application server is not configure to prevent them.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Error messages and stack traces would help.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

We would need more than the end portion. The problem is, you have an open { without a closing }. Double check all your braces and make sure that for every { there is a corresponding } .

masijade 1,351 Industrious Poster Team Colleague Featured Poster

The actual error message and stacktrace would help. The status 500 message simply tells you something went wrong, not what. Look in the logs for your application for the actuall error (not that I think it's going to help). If you didn't understand what I said, then you have a large learning curve in front of you, and you should read a couple of good tutorials before continuing.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

1) This code should not be in a scriptlet. Move the query part out to a bean.

2) Use a connection pool, or open the connection in a session object (although this type of persistence is frowned upon) because opening a connection for every page load is extremely inefficient.

3) if you absolutely must use scriptlets (which you don't, but you may insist on it) then at least don't mix "html tag" strings into the middle of the scriptlet, that is just blurring the separation (and increasing the maintenance load) all that much more.

4) The user would generally be simply "root", as opposed to "root@localhost". The MySQL server will resolve the "@whatever" part itself, depending on where you connect from. Make sure you have the user@whatever login allowed over TCP in your MySQL configuration.

I think those are enough problems for now.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Read the file, writing it to a new file at the same time, and omit what should be deleted. Then rename the old file to a different name. rename the new file to the old name, then, if all of that is successful, delete the old file.

masijade 1,351 Industrious Poster Team Colleague Featured Poster
// Sample ATM Banking program code
masijade 1,351 Industrious Poster Team Colleague Featured Poster

Once again, if the file is coming from your server, all you can do is set the mime type and stream the data, the browser will decide how to display it. If the file already exists on the client, than you can't do anything with it, whatsoever, in a JSP as it (the JSP) is on the server. You cannot control how the file is displayed. The browser does that.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

And ?

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Than say that they "are only your thoughts". Don't present them as thopugh they are facts.

masijade 1,351 Industrious Poster Team Colleague Featured Poster
$fullDate = join( "/", "$ARGV[3]", "$ARGV[4]", "$ARGV[5]");

or

$fullDate = "$ARGV[3]" . "/" . "$ARGV[4]" . "/" . "$ARGV[5]";

you might want to do $ARGV[5] += 1900; before hand, though.

Edit: And really, you're not trying very hard yourself, if you don't even give something this simple a try.

Edit again: And don't forget to do $ARGV[4]++; beforehand as well, since month is, of course, zero based (i.e. Janauary is 0 not 1).

Edit a third time: Of course, the math opertions are only needed if those values are coming from a localtime() or gmtime() call, rather than from user input, or some other source where the values may already be properly adjusted.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

If its an Applet you have no need of any kind of sdk anyway.

Read through this tutorial completely http://java.sun.com/docs/books/tutorial/deployment/applet/index.html

masijade 1,351 Industrious Poster Team Colleague Featured Poster

try

$fullDate = join( "/", $ARGV[3], $ARGV[4], $ARGV[5]);

or

$fullDate = join( "/", $ARGV[3..5] );
masijade 1,351 Industrious Poster Team Colleague Featured Poster

Make your own number system and print and use barcode stickers.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Tomcat is already up to version 6.0

As has been said before, by others, I don't believe you are to the helping stage yet.

masijade 1,351 Industrious Poster Team Colleague Featured Poster
var="c0024"
var2=`echo ${var} | sed -e 's/[^0-9]//g'`
masijade 1,351 Industrious Poster Team Colleague Featured Poster

If it is to be "opened" on the client, you cannot do it in JSP (or actually a bean since that sort of thing would need a scriplet and shouldn't be using scriptlets) as the JSP is executed on the server, obviously, and not on the client where the browser is running. It can be uploaded (at the users request), if all you need is some information out of it, and even downloaded again (at the users request), if it is to be edited, but you cannot open a file on the client machine from the server.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Excel file can be manipulated in Java (and so also in JSP, although the actual work should be done in a Bean and in some scriptlet) and for javascript you're going to have to ask somewhere else.

I have no idea what indesign files are, but if it is a widely used application of some sort, it would surprise me to find out that there isn't an API for it.

Any further info will need much a better description of what it is you want, or are having a problem with, in order to be provided.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Only if it is a Long, and not a long. If it is a long, then, the proper way is

jvar.setText(String.valueOf(longvar));

The "quick and dirty" or improper, but still functional way is

jvar.setText("" + longvar);
masijade 1,351 Industrious Poster Team Colleague Featured Poster

Welcome

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Thanks for your reply masijide ,
Please confirm me what I understood from your reply is correct .so that I feel I can continue to study further.

What I understood from your is :

I registered the button(gui's button) with insGui object so it's(insGui) actionPerformed method will be invoked which in it's(insGui) button object 's setText method is invoked . so I'm not able to see the event triggered(Since in that frame(gui's frame) insGui's button object is not added or insGui button is not added to any frame at all) .

Am I right ?

and also tell me how can I make it to happen as you asked

That is when I click this button(gui's) insGui's button have to change .

Thanks in advance

That would all be correct, if you had defined insGui anywhere, but you didn't. To tell you the truth, I think you should be getting exceptions everytime you push the button (since insGui is not defined). As I said first, you should simply use "this", instead of "insGui".

masijade 1,351 Industrious Poster Team Colleague Featured Poster
echo "No Data" | mailx -s "$subject2 $day" $destination
masijade 1,351 Industrious Poster Team Colleague Featured Poster

Well, don't put i > 10 in parens.

Edit: You also realise (I hope), that you are setting i to zero in the first part of that, and incrementing i in the last part. In the second, you are saying that the loop should continue to run as long as i is greater than 10, but since you set i to zero in the first part, it exits the loop before ever doing anything. I assume you meant i < 10. I.e. the loop should continue running as long as i is less than ten.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Stop posting code everywhere. Especially this stuff. And then you don't even take the time (or, maybe, have the common sense) to use code tags when you do, which only compounds the "wrongness" (both the idea and the code itself) of it.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

There is a tutorial "pasted" to the top of this forum. Otherwise, this sounds far to much like homework for me to even want to give you any other answer.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Stay with the original thread http://www.daniweb.com/forums/thread92130.html

Don't start a new thread simply because you don't like the answers you've been getting. If you feel the need to "draw attention" to the thread, or "move it to the top of the list" then post a quick reply to it, or edit an entry, or something to that effect. Don't just simply start a new thread.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

You should probably add a button.validate() call after the button.setText() calls. And use "this" not "insGui". The reason nothing is happening when you use "insGui, is because you have not defined it anywhere. And even if you had, It would have it's own "button" object, which is the one you would be setting the text on, not on the "button" object of the one you are pushing the button on. (Or are you purposely trying to get the actions from one JFrame to affect items in another?)

masijade 1,351 Industrious Poster Team Colleague Featured Poster

No. I am not going to "give you teh codez". And I am not going to meet you in any restrooms, either. You can do both of those things for yourself.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Fatally Cool Flocking Stuff and Restful Relaxation?

It might help to actually say what you want rather than throwing out a bunch of abbreviations. Also, spell out, step for step, what is needed in "RR", then start trying to explain these steps in Java terms.