stephen84s 550 Nearly a Posting Virtuoso Featured Poster

case

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

I think the question was given to YOU by YOUR instructor, so YOU should solve it, WE will ONLY HELP YOU in solving it. Provided you show us you put in the effort to deserve any help.
For more info look here.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Here you go guys, this should have all the features an e-banking project should need.

peter_budo commented: Ouch, somebody nailed that one. Was that you? +9
stephen84s 550 Nearly a Posting Virtuoso Featured Poster

race

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Well the first line says that Unable to compile class for JSP ,
Which quiet simply means that you have an syntax error in you JSP and from the type of errors displayed I think you have put an extra } in your code inside the try block.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

That would be as simple as calling request.getParameter("--name-of-text-box--"); , in pagina2.jsp .

Also no need to stick to GET you can use POST without any issues. Only difference is GET would send your parameters as part of the HTTP URL (eg http://localhost/pagina2.jsp?usuario=tefbaez)
whereas POST would send it as part of the HTTP header, so it would not be visible in your address bar.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Ok fine. I need the code to send SMS.

I am not here to give you ready to eat food, just to help. See the javadocs of OpenSMPP and find your way around.

Can i actually send the sms for free or do i need to signup any contract with sms providers for this

You definitely need to sign up with a provider to send smses. Just search for "bulk sms providers" and you should get a pretty comprehensive list. I am currently not aware of any providers who would allow you to use their service for free (apart from testing their service that is)

Alternatively you can also send messages using the GSM Modem. For that you can check out the SMSLib API, the GSM Modems use a SIM Card which is charged for every SMS you send.

peter_budo commented: Nice post, with good reasons +9
stephen84s 550 Nearly a Posting Virtuoso Featured Poster

SMPP is a protocol, it is used to connect to SMSCs (Short Message Service Centres) which connect to actuall providers via SS7 which is connected to hardware.
There are quite a few Java APIs available for SMPP, my favourite is OpenSMPP, But doing such processing directly in JSP is not advisable, use JSPs just for displaying your content your processing should be done is Servlets, beans.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Have you tried what I had mentioned in my previous post ?????

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

If I am not mistaken Netbeans uses internally Apache Ant's format for its build.xml for building (compiling etc) projects, So if you are familiar on how to use Apache Ant, you may even use notepad to modify your code or any other IDE (for ex Eclipse) which allows you to import projects made with Ant.
As far as tar-ing your sources go, if you are on a Linux distro a simple man tar in a terminal will tell you how to create a tar archive, However if you are on Windows take a look here, But on windows I suggest you use Zip/Rar instead, cause I do not see any difference between the three(except for tar being a free software).
Check this tutorial on how to create an executable jar in Netbeans

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

You ought to get a BIG RED for the amount of PMs you sent me without even making a single thread here, And finally when you post you do not use code tags !!!:angry: :angry: :angry:

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

lamp

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

I got "Very High" for both my hands.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster
public static void changePerson(Person p) {
         p.setName("GHI");
         p = new Person("JKL");
         p.setName("MNO");
        System.out.println(p.getName());
     }

The above output is cause of the simple Pass by reference for objects in Java and illustrates how pointers are actually operating without you seeing them.

It is important to remember that when you declare an object like

Person p = new Person("ABC");

p is not the object, it holds a reference to the original object.
When you did p.setName("GHI"); , you actually modified the original object (created in the main) which was pointed to by "p" (local to changePerson() ), But when you did p=new Person("JKL"); , you changed object to which the version of "p" local to changePerson() was pointing to, So now "p" instead of pointing to the object that was created in you main now points to the object that was created in the changePerson() method.

But the change of value of "p" in changePerson() is local to that method cause "p" being a reference is itself passed by value, So the object which "p" points to in the main is never changed and hence GHI is printed in the main.

Sorry I couldn't make it less confusing than that.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

As Peter_budo had put it in one of his earlier posts, "Its hard to read errors from a crystal ball".

But it seems like you have no intention of learning anything from here, you just come here for quick fixes to your problems. Practically every one has already told you not to do database connectivity inside a JSP, but you refuse to budge and continue to persist in your naive ways.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

This is'nt a joke but an amazing story..... one of my friends forwarded to me

An unbelievable twist of fate!!!! At
the 1994 annual awards dinner given for Forensic
Science, AAFS
President Dr. Don Harper Mills astounded his audience
with the legal
complications of a bizarre death.
Here is the story:
On March 23, 1994....... the medical examiner viewed
the body of Ronald
Opus, and concluded that he died from a shotgun wound
to the head. Mr.
Opus had jumped from the top of a ten-story building
intending to commit
suicide..
----
He left a note to the effect indicating his
despondency. As he fell past
the ninth floor, his life was interrupted by a shotgun
blast passing
through a window, which killed him instantly. Neither
the shooter nor the
deceased was aware that a safety net had been
installed just below the
eighth floor level to protect some building workers
and that Ronald Opus
would not have been able to complete his suicide the
way he had planned
-----
"Ordinarily," Dr Mills continued, "Someone who sets
out to commit
suicide and ultimately succeeds, even though the
mechanism might not be
what he intended, is still defined as committing
suicide." That Mr. Opus
was shot on the way to certain death, but probably
would …

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Also I am guessing thats the issue cause, the maximum number int can hold is 2147483647, and 12!=2147483647 which is less than that, and hence the answers till 12 would be correct, on the other hand 13! is greater than 2147483647 and hence due to the overflow problem you are getting an incorrect answer.

Sorry I meant to say 12! < 2147483647

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

The reason you are getting negative numbers is most probably due to overflow i.e due to the capacity of data type int ,
A simple example would be as follows

int a=2147483647;
a+=1;
System.out.println("a = "+a);

The above would print -2147483648 and not 2147483648 as you might have expected.

Also I am guessing thats the issue cause, the maximum number int can hold is 2147483647, and 12!=2147483647 which is less than that, and hence the answers till 12 would be correct, on the other hand 13! is greater than 2147483647 and hence due to the overflow problem you are getting an incorrect answer.

A good way to overcome this problem would be to use the BigInteger class

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Are you sure that the element from which you are extracting the values in the previous page has the same value for name as the one you are using in the request.getParameter() method call

@Thirusha request.getParameter() in a JSP page can be used for both GET(the one you mentioned) and POST requests.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Eskiya

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

javax.servlet.ServletException: java.sql.SQLException: Illegal operation on empty result set.

Honestly I do not know why would you choose not to believe your Web Server when in fact it has practically pin pointed the root cause of the error to you, the above line clearly states the ResultSet generated from your query was empty and hence the getString() method which you are calling on it is throwing this Exception. You can check for an empty ResultSet with the first call of rs.next() , it returns false on the first call if and only if the ResultSet generated was empty(that is cause, next() tells you whether there are any more records after the current position on the cursor and initially the cursor is positioned before the first row in the ResultSet ) which is your case, but you have chosen to ignore it.
And I also am pretty sure you have been already informed many times that it is **NOT ADVISABLE** to do your database activity inside a JSP page.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

This should help.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

I think the introduction messages go here,

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

blame

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Had come across this one last week:--

The following ads appeared in a newspaper over a period of four days, the last three hopelessly trying to correct the first day's mistake.

MONDAY: For sale: R.D. Jones has one sewing machine for sale. Phone 555-0707 after 7 P.M. and ask for Mrs. Kelly who lives with him cheap.

TUESDAY Notice: We regret having erred In R.D. Jones' ad yesterday. It should have read, "One sewing machine for sale cheap. Phone 555-0707 and ask for Mrs. Kelly, who lives with him after 7 P.M."

WEDNESDAY Notice: R.D. Jones has informed us that he has received several annoying telephone calls because of the error we made in the classified ad yesterday. The ad stands correct as follows: "For sale - - R.D. Jones has one sewing machine for sale. Cheap. Phone 555-0707 after 7 P.M. and ask for Mrs. Kelly who loves with him."

THURSDAY Notice: I, R.D. Jones, have no sewing machine for sale. I smashed it. Don't call 555-0707 as I have had the phone disconnected. I have not been carrying on with Mrs. Kelly. Until yesterday she was my housekeeper, but she quit.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Basically you need a Web Server to Run any ASP Page, including Apache (HTTPD) (with extensions that is), Sun Java System Active Server Pages , etc.

But since it appears you are starting out with ASP, my suggestion would be start by using IIS as I found it pretty easy to use and it is already bundled on the Windows XP Professional CD itself.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Sorry forgot to mention that point No 3 (closing your database connection after executeUpdate() ) should most probably solve your current problem, else ... I guess you need some higher authorities help (on the forum that is ;) )

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Now I do not know what to say:

Statement st = null;
ResultSet rs = null;

rs = st.executeQuery("Select description from user ");

Sorry If I sound rude, But do you expect some magic ;) , you are calling the method on an object (st) reference set to NULL, even if the sun doesn't rise tomorrow that code is going to throw a NullPointerException.

peter_budo commented: Sun will rise tomorrow, so there will be NULL +8
stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Since you are using Netbeans, I assume you are using the Glassfish server, Now "Requested resource is not available" is a page that can be displayed for almost everything that can go wrong in a JSP or a servlet.

My suggestion would be you check the logs of glassfish, for any errors when you are calling the page from the browser for more clues.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

I suggest you use the Tomcat mentioned on here.
If my info is correct Apache Tomcat was known as Jakarta Tomcat back in the days when it was a part of the Jakarta Project (which is also a part of Apache), but now it is a full fledged Apache project and hence the name change to Apache Tomcat. In fact if you check the Jakarta Project home page here, you will see tomcat listed as an Ex-Jakarta project.
The latest version currently available is 6.0.16 and comes bundled with quite a few examples.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Hmmm, strange problem,
If you are on windows, can u try first running the command set CLASSPATH= , and then trying to run the program in the same console after it.

Oh yes and please remember to wrap code in code tags

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Please use code tags ..... it keeps the code readable, Anyways what line are you getting that error . . . knowing would have helped a lot ???

Now heres a shot from what I see ....
The first line in your init() function is Container getcontentPane = getContentPane(); , But I do not see the getcontentPane variable used anywhere, So I am assuming you should correct that to Container contentPane = getContentPane(); When the Java compiler says it cant find the symbol, its not playing jokes, it really means it ;) !!!

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

First I'd like to inform you this is not a JSP forum.
And next don't perform Database operations inside your JSP.
And finally close your database connection after you are done with your transaction

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Yes I do but may I see what have you tried or on what lines are you thinking, cause the main purpose of this program (most probably given by your instructor) is to train your brain to think of a solution and then convert it into C code, a characteristic that makes good programmers good

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

be a real time project

I am assuming that you meant real world and not real time as in REAL TIME as in Nuclear Reactions etc.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Same way, Provided your Linux distribution has a valid JVM, and the path to "java" set correctly.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Flame

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

strange .......... i use mingw

did you entered chars not ints ??

I think that was an important information u left out ;)
Yep, it does go into the infinite loop, but so does the first one.

But why exactly its occurring I cant figure it out, I hope some of the other guys know of it.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Try running the Jar file via on the command line and check the error.
To run an executable jar file from the command line you will need to type:

java -jar filename.jar
stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Tried you code out in GCC 4.1.2, no problems, same output for both cases, no infinite loops!!
I had directly copy pasted your code.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Well the reference Manual on the MySQL site is a pretty good place to start learning MySQL.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

There are quite a few good tutorials available on the for developing applications for mobiles at netbeans.org itself.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Yes, in the manifest you just separate them with a space. No other delimiter needed.

Class-Path: Some.jar Another.jar

Shucks.... From the docs I thought it was needed when we package a jar inside another jar !!!:-O

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

what seprator can I use??

in my batch file I put a semi colon, but how in manifest file??

The semicolon for separating you Jars is valid on Windows only, on Linux its a colon ( : )
Anyways whats the problem of manifest file, I don think you have to do anything to it

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Ehh. . . . . Ok Thanks for informing us about it ;)

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Nope I do not think this is the place for it, This is the place for it. Your thread with time is gonna get sunk in the list of threads.

Also snippets in your post like "[ More in this category ] [Add your comments]" give the indication that this is a direct copy from somewhere else.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

You will need to open the rmiregistry port in you firewall, Also to overcome NAT you will need learn about Port forwarding.

How is you public IP connected to the Internet, is it via a Router ?
Honestly I am not yet entirely clear about your setup.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

BTW where are you running the client i.e. on which machine, is it same as the one on which the rmiregistry is running or within the same local area network or from the some other comp connected to the internet ???

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Use of code tags would be nice

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Looks like a copy paste from his site, mentioned in the signature,
I only see Self-Promotion / Advertisement the reason for this post.