stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Which world are you from, If you are not aware then "if" statements can be multiline too.
For ex :

if(.........) {
    a = true;
    b= false;
    .
    .
    .
}  else if (........) {
    a = false;
    b = true;
    .
    .
    .
    .
    .
} else {
    .
    .
    .
}

You can read more about it here

And please wrap your code in [code=java] and [/code] tags. It keeps your post organized and clean rather than the garbage you can see above. Its a bit irritating that this is your eighth post and you have not yet even glanced at the forum rules.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Now if you have ever written a main, in your Java program, we write it as :-

public static void main(String args[]) {

Here the args, is an array containing the parameters you provided at the command line.

Consider the following example :-

public class CommandLineArgEx {

    public static void main(String[] args) {
        for(int i=0;i<args.length;i++) {
            System.out.println("Argument Number " + (i+1) + " : " + args[i]);
        }
    }

}

Following would be the output that you will get :-

stephen@steve:~/Development/java/daniweb> java CommandLineArgEx ABC Bcd Efg
Argument Number 1 : ABC
Argument Number 2 : Bcd
Argument Number 3 : Efg
stephen@steve:~/Development/java/daniweb>

So as you see whatever is passed via the command line, is stored in the args[] String array.
Although I have never tried it with a JAR, I do not see why it should not work.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

808

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

804

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

800

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

796

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

I do not know what the above code means, but I do remember encountering a trojan, a couple of years ago which put an iframe code like

<iframe src='http:.....'></iframe>

in all my web pages (irrespective of whether they were PHP,ASP, JSP....).

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

maybe....


Did the egg come before the chicken ???

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

794

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

would

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

-1112

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

790

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

792

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

792

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

-1110

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

If you want to invoke the JSP page then you will have to use the following URL:-
http://localhost:8080/JSPMultipleForms/<YOUR_JSP_NAME>.jsp

When you call only http://localhost:8080/JSPMultipleForms/ , you basically are calling the context root of your Web application and Tomcat will try to search for files mentioned in your <welcome-file-list> (in you applications web.xml), and the first file found in that list would be displayed whenever you call this link but since you have most probably not mentioned any files there it assumes the defaults like index.html and index.jsp etc, and hence displays 404 Error when it cannot find them.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

788

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

790

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

792

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

screams

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

788

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

:sweat:

I don't know.

Have you seen an "Earth Rise" ?

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

However

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

This is a trap! They send someone to post for us to make the game results anomalous. When we finally reach 1000 they'll have the decision revoked on a technicality...

No they cant, Its their fault, cause their member betrayed em ;-)

788

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

If you wish to be ale to fix the size and location of a component (irrespective of the users screen size, resolution etc), you will need to set your layout to "null" (not recommended) and then set the co-ordinates for each component manually.

But then this could handicap your users who may not be using the optimum resolution and screen size for which you designed your GUI.

Look here and here for more information on absolute positioning of components using null layout.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

What is the Error that MySQl threw at you ??

Also did you remember to put the "END" at the end of the Trigger.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

-1106

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

788


Ssssh !!!!, Dont tell him about it, let him continue to post for us :P

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Please use code tags, if you wish us to go through the code. Also I hope you have indented the code correctly, because honestly I do not think any one will dare try to go through such a big file, especially if it is not presentable.
To use code tags, all you have to do is place the content inside, [code=java] and [/code] tags. Also please be kind enough to mention what is going wrong in your code, is it a compilation error or a runtime problem, and paste us the actual output which the compiler or the JRE is throwing up at you.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

nope . . . . . . may be they will wake up after we've won :P

is Light really made up of photons ??

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

782

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Now let us look at the error :-

" Exception in thread “main” java.lang.Error: Do not use Login.add() use Login.getContentPane().add() instead
at javax.swing.JFrame.createRootPaneException(JFrame.java:454)
at javax.swing.JFrame.addImpl(JFrame.java:480)
at java.awt.Container.add(Container.java.490)
at Login.<init>(LoginDemo.java:26)
at LoginDemo.main(LoginDemo.java:60)

And you say you do not know what to do ?????????

Sorry I do not want be rude here, but honestly if it wouldn't have been for the forum rules I would have started swearing here.

The java compiler is telling you in a straight forward manner that go line 26 in file LoginDemo.java and instead of add(..) use getContentPane().add(..) .

Also here is a tutorial on frames which I am sure you definitely need to improve your footing in swing.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

I think this is what is causing the problem :-

add(frame);

To quote the Java Tutorial on frames here :-

A Frame is a top-level window with a title and a border.

So basically frames cannot be added into any other component.
What you could do is add the components directly to your main frame, or you could change your "frame" variable and make it a JPanel instead.

Also when adding components to a frame you cannot add the components directly to a frame, you need to add them to its content pane like this:-

frame.getContentPane().add(...);

You can learn more on swing if you go through this tutorial here.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Wishing all here a Happy New Year !!!!

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

772

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

and

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

-1104

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

768

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

The question has already been answered, so please take some time looking through some previous threads, or better yet use the search box at the top right of your screen. Also give us a complete description of your problem, give us some details as to what is your error, what is the compiler throwing up at you, and if your program is running what output are you getting and what you actually want, along with the code if possible.

Also I took the liberty to search for some old threads which have dealt with similar topics, here they are :-

http://www.daniweb.com/forums/thread164539.html
http://www.daniweb.com/forums/thread164619.html
http://www.daniweb.com/forums/thread164444.html
http://www.daniweb.com/forums/thread163689.html

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

However ~s.o.s~ if I am not wrong, every serializable class needs a static final long "serialVersionUID" field, which is used during deserialization (else the compiler throws (just) a warning), for checking if the class in memory and the serialized object match.

So I guess it must be an exception, to the normal rule.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

738

(where's team B?)

Who cares .... lets finish this before they know what hit 'em.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Considering the blatant disregard for the rules here, I had to give this guy a positive rep for exceeding the limits of ignorance.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

was

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

For that you will need to place your image in one of your published folders, So either you will have to move the image in the same published folder hierarchy as the html page and use the relative path, or else you would have to publish the folder in which your image file is stored, and then you could put the HTTP link to your image, in the "src" attribute.

Right now I am only aware of these two ways, maybe some else may have a better suggestion.

Also the "file:///" attribute functions the same way as you would if you placed the "D:/.." absolute file path in the "src" attribute.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

No, It is useful once you get the habit of reading e-Content.

Is the Sun really a Star ??

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

-1102

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

732

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Well this is not a question of JSP, since your query is related to the IMG tag of HTML,

Anyways try using the absolute path to your image file in the "src" attribute of the <img> tag, for example "D:\abc.jpeg", instead of file:///.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

hmmm... yeah, I guess it must have happened quiet a few times, Lets correct the value, According to that formula the current count down number for this post should be "-1100" (2101 + (-1100) = 1001),

So corrected count down value = -1100 , lets continue from here.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

convinced