stephen84s 550 Nearly a Posting Virtuoso Featured Poster

hi..
where can i get the java source code for multiple regression...

On your hard drive, in the folder you saved it, once you have typed it out in an IDE.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

The Eclipse java compiler is OK, The problem is your runtime which you are using 'GCJ', I would suggest you use the JRE from the Sun site directly which I had linked to in the first post. Remember there are two components which process your program currently:-
First the compiler which compiles your code to the class file (javac)
Second the JRE or the Java Virtual Machine which runs your programs (java).
The Eclipse compiler is fine, but since you are just starting out, rather than use your compiler and runtime from different third party vendors, I would suggest you stick to the original SUN JDK (which includes both of them) which I had linked in the first post.
Also to make it simpler to install do not download the ".rpm.bin" version of the jdk, instead use the ".bin" version.

Also if you are just starting Java then stick with the basic editors only like emacs or vim, once you are familiar with the ins and outs of Java then jump to Eclipse or Netbeans or even Peter's Favourite Intellij IDEA.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

First of all, I actually am using the javac compiler.

'javac' is not a compiler, it is a command/executable which comes with all compiler implementations for java for compiling your source code. So irrespective of whether you are using the JDK from BEA, IBM, Sun, GCJ, Oracle etc most of them should give you a javac executable to compile your source code.

Since I guess you are on Linux, so you must be using the Ecipse Java Compiler in combination with the GCJ runtime. The fact that you are using GCJ to run your application is clear from this error in your first post:-

at gnu.java.lang.MainThread.run(libgcj.so.90)

To check which version of the compiler you are using shoot:

javac -version

Peter has mentioned is the correct way to run your programs, you mention the main class name only and leave out the ".class" extension.
Finally make it a point to follow a set of standard coding conventions from the start for naming your classes, packages, identifiers etc. Here is a link to the Sun Java Code Conventions or you could use this style guide from javaranch.com which is more suitable for beginners.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

I just finished learning basic OO concepts and java programming.

If you just know the basics of Java, then I would suggest putting some more time on getting comfortable with the language by programming in it, tinkering with collections, threads, exception handling, memory management, else while learning JSP you will be spending more time learning these concepts rather than sticking to web programming.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Hi all,

I've registered a host name that I have been port forwarding to IIS for html/php pages. I recently setup up some connectors for Tomcat 6 and IIS, but that's not going so well.

I can only view a set of sample pages that came with Tomcat and none of the projects (currently being developed in eclipse and auto-deploying via .war in webapps) I create, although they work perfectly fine in eclipse and @ localhost.

Have I missed something as far server/web.xml config?

Do my individual applications need to be configured as individual context's within a host?

Also, if I shut off IIS shouldn't any traffic coming in on standard http (80) be picked up by Tomcat?

By default Tomcat works on port 8080 so even if you shut off your IIS, the traffic on port 80 would not be automatically picked up by Tomcat. In fact any traffic that you are receiving on your Tomcat would also cease, as from the current situation it appears that your IIS is actually forwarding a select few requests received on port 80 to your Tomcat server as AFAIK it is not possible for two webservers to share the same listening port at the same time.
My suggestion is here check your IIS settings, I am sure that the select few sample pages of Tomcat that you can view, have been specifically configured so that any requests for those pages or that webcontext is transferred to Tomcat directly by the IIS …

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

So...I have just begun to whet my appetite for Java today, and I have already run into a stumbling block.

If you have just begun Java, then I would strongly recommend using the JDK (Java Development Kit which includes the javac compiler and other stuff) directly available from Sun itself here, rather than going for third party compilers like the GCJ.

Also after you compiled your application, do you see a 'test.class' file generated inside your current working directory ?

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

The reason why you are getting the error on "totalInterestPaid" is cause you have declared it inside the while block, due to which it is not visible to any code outside that block and hence you are getting that error.
Move the declaration of the variable to outside the "while" block and the compiler should not complain any longer.

As far as comparing values from different loans is concerned, you will need to use arrays to store the values of the previous loan amounts, to make it possible for them to be compared later, as of now once you have calculated and displayed the values on line 36 above, you overwrite them with the values of the next loan amount.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

IMHO you cant make an OS independent executable (.exe) files, cause these files contain instructions native to the OS and your system architecture, for example an executable made for an 64 bit version of an OS may not run on its 32 bit version.

What I think you are looking for is executable JARs. They are platform independent and you can run your program directly(just by double clicking the jar like for an exe) if you have properly packaged it into an executable JAR file.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Do you need any further help?

If so post your queries.

Well if he could ask for a download location for Tomcat, I am betting he would have shamelessly asked :P if he had any other issues too, not necessary to simply bump this thread for asking that.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Have your tried Googling for your request ???
To name a few we have :-
NetBeans
Eclipse with the appropriate plugins

If you are a web designer even Dreamweaver would be a good option and if you are not satisfied with either of them you can always Google for more.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

If I am not wrong Nokia is Finnish.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

To get this code to work on Linux, just replace the line system("cls"); with system("clear") .
BTW gotta say a very nice and useful piece of code.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

That happens because when you click on your web application directly from tomcat, it goes to the ROOT of your web application and unless you have a set a welcome page in your web.xml ( or enabled directory listing) you are bound to get that error.

So to actually display your html page in your browser you would have to type "http://localhost:8080/<webappfolder>/<htmlpage>"

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Well if you do not know much about Java, then first I suggest going back and getting your foundation in Java strong first (cause after all JSPs are java code embedded inside HTML), then proceed to learning about servlets and then move on to JSPs.

As far as learning JSPs is concerned, I would suggest buy a book, Head First Servlets and JSP is pretty good book there, However if you are still adamant on learning online only then here are a few links you could look up:-

Core Servlets and JSP
Java EE 5 Tutorial
http://www.jsptut.com/

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

I dont want to do it by calling beanid.setname("fadi"); .. is there any other way??

Well you could use the <jsp:setPropery> tag, but may I ask what you are trying to achieve with it ?

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

@chackboom

Am pretty sure the O.P. must have found a solution to it long long ago, please check the dates before posting on such fossilized threads.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Actually I have no clue of how to fix line 4 to 17 but I have fixed the Sum method and it looks something like;

Well I can see how this can be fixed, but I need to know your motive in writing lines 4 to 17, are they for testing your code like in a main as VernonDozier says??
Also why does your sum() method need to return an "Integer" object, would an "int" not be just fine ?

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Just download the one with NetBeans, then you'll get a free IDE ready to use out of the box.
http://java.sun.com/javase/downloads/index.jsp

Or do it the hard way: http://java.sun.com/javase/6/webnotes/install/jdk/install-windows.html

@ O.P.

Recommend do it the hard way as Peter suggested cause that way you will learn more about Java. Don't straight away jump and use NetBeans, although its a good IDE its unnecessarily bloated, recommend you stick to simpler IDEs like BlueJ or JCreatorLite or better yet just use Notepad which will expose you more to the process of what goes on behind the scenes during in compilation and running the program using just the jdk. (not to mention the extra effort you will put in to remember stuff without auto-complete and improve your skills in finding out errors when you search for them yourself instead of them being handed out on a plate like a fully featured IDE would).

Move on to use NetBeans (or Eclipse or IntelliJ) only when you feel you have mastered enough of the basics and are comfortable in finding your way around in Java.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

You know a little bit googling wouldn't hurt you,
Heres one resource which I found via google:-

http://onjava.com/pub/a/onjava/2001/03/15/tomcat.html

You will find a ton of other resources if you just look around.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

This is just plain old Java syntax error, the operator "+" in Java is used to concatenate String objects, remove the extra plus after "a" in all the three statements and you should be good to go,

if(c.equals("BillNo")){
/*--error--*/ rs = stmt.executeQuery("select * from orders where billNo="+a+);
}else if(c.equals("UserId")){
/*--error--*/ rs = stmt.executeQuery("select * from orders where userid="+a+);
}
else if(c.equals("ProductId")){
/*--error--*/ rs = stmt.executeQuery("select * from orders where productid="+a+);
} 

Also just a point to remember next time wrap your code inside code tags as shown below it will give you syntax highlighting as shown above.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

For the past 6 years, I've been doing development work with C# and loved Visual Studio (probably a bad word around here). Intellisense is good, smooth debugging is good. With jsp, there was talk of tools working on better debugging facilities last I developed on jsp. Did any of those concepts come to the surface? I'm ok with free or pay tool, I just want quality...

Peter already hit you with the most popular suggestions for both sides:-

Free Stuff:-
Eclipse, NetBeans

Commercial:-
IntelliJ IDEA, MyEclipse, Dreamweaver*

*Dont know if I can call Dreamweaver an IDE but it does provide some good bundle of stuff for Web designing.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Hi, I need to develop a C++ application for Linux, and I am worried about its compatibility with between different distros, for example if I develop it on Kubuntu, is it possible that I may have compatibility issues if I run it on Gentoo or Open SUSE for example?

In other words, what should I keep in mind to make my application compatible with other Linux distros?

Thanks,
Komyg

Well As Far As I Know, that depends on what application you are making and what libraries you will be using. If you are going to make your application using just the Standard C++ stuff using the GCC compiler, then it should compile and run anywhere the GCC compiler has been ported to.
In case you are using some extra stuff like the Posix thread libraries or cURL or one of the many Boost libraries for C++, then you application will be restricted to run only to those platforms where those libraries have been ported to.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Well for starters you could checkout the following tutorial on JDBC:-
http://java.sun.com/docs/books/tutorial/jdbc/index.html


And I would not recommend on using the Microsoft driver, I found the jtds Driver for SQL Server to give me a lot better in performance and features.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

I need java program for SHA message digest and encrytion and decryption in RSA

Ok thank you for informing us about your need, hope you succeed in writing it.

Dukane commented: lol nice response +3
stephen84s 550 Nearly a Posting Virtuoso Featured Poster

There are quite a few things I would like to tell you in this post:-

  • Firstly never ever use the root account in mysql, apart from for performing administrative tasks.
  • Telling that you do not have the time for following Good Design (and following MVC) is like telling you don't have the time to do any research before spending millions on buying a lavish new sports car, eventually you are going to regret it.
  • Your catch blocks are not only for show, or just to stop the compiler from complaining of uncaught exceptions, they are there so that you handle those exceptional situations by writing contingency plans there or at least print a simple stack trace of the exception so that you can signal yourself or the rest of the program of problems like not able to establish a database connection etc.
  • Next is follow consistent indentation, if not for anyone else, it will ultimately aid you in reading your own code.
  • Do not return a ResultSet directly from a function, a ResultSet requires that its associated database connection be open throughout the time the ResultSet is needed, Use a CachedRowSet in case you have to return a ResultSet, or the best approach would be what Peter followed in the MVC thread.
stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Well you seem to be confused a lot, if what you are doing is for a production system for some organization I suggest you hand over the task to someone who knows what he is doing.

On the other hand if this is just some past time project you are doing to get your concepts clear in Java, then you need to learn a lot more. I will clarify a few facts for you here.

Firstly CentOS is not a web server, it is an Operating System, just like Windows XP. Apache Tomcat is a Web Server, and you need that along with a JRE (Java Runtime Environment) to run your servlets/JSPs.
Here is a good tutorial on installing the Sun JRE and Tomcat on CentOS 5.

Also as far as deploying your web application is concerned, according to me the best approach would be to package it into a properly organized WAR file and then deploy using the "Tomcat Manager" web application.

Also here are some more links to help you out:-
Apache Tomcat Documentation
Apache Tomcat Download Link
CentOS 5 Documentation


Also one final note, I would not recommend using the Apache Tomcat version that comes in repositories of CentOS, as it is configured to work with gcj which is only partially compliant with the 1.4.2 version of the JRE and although getting it to work with the Sun …

peter_budo commented: Good explanation. +22
stephen84s 550 Nearly a Posting Virtuoso Featured Poster

hello ,
can you tell me how to delete the previous contents in the file,while adding new contents in java????

How about deleting the entire file and then creating a new file with the same name at the same location !!!

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Although you have mentioned that you are working on a web application, you have not even given us the slightest hint as to what are you using in that web application, is it JSP, Servlets etc.

is it possible to do with out a db.....? i think it is...

Yes its perfectly possible, although restricted to the list of users logged in since the last time your web application was reloaded or your web server restarted, if you want it to persist even across that, then its got to be a DB or a File to store that info.

In the former if using a JSP,you want your HashMap object to be visible across multiple sessions it will have to be in the "Application" scope.
Alternatively if you are using servlets, you could have your HashMap initialised in the init() method of your Servlet, and then just keep adding the list of Users logging in, in your corresponding service() or doGet() or doPost() method whichever you are using.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

We would but apparently what effort did you put into doing that ? Heck it seems you dint even put the effort to read this announcement nor this which are highlighted at the top of the Java Forum, So why should we help you ???

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

but when I press enter, I get the error: [Microsoft][ODBC Microsoft Access Driver]Syntax error (missing operator) in query expression ‘Pa_RaM000 firstName = Pa_RaM001’

Can you please post the complete error you are getting or the complete query you are using, I cant seem to trace it in your code.

Now making a blind guess here, it appears your SQL Statement syntax is invalid, Whenever you are testing a column in a database table for any string value, the value should be enclosed within single quotes as show below:-

SELECT *
FROM User
WHERE UserName = 'xyz' AND Password = 'yza';

Now consider if you value "xyz" is coming from a string variable and you are constructing the query from with your Java program, then it would look like this:-

String user = "xyz";
ResultSet rs = st.executeQuery("SELECT * " + 
    "FROM User WHERE UserName ='" + user + "'");

Where "st" is of type java.sql.Statement.
Or you could alternatively opt for using PreparedStatement and get rid of this single quote issue permanently.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Hmmm .... Got a similar dilemma here, how do we get everyone to read the announcement at the top telling people not to post support questions in the Geeks Lounge ;)

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

I figured it out last night actually. It was just a matter of a simple GROUP BY like this:

SELECT * WHERE {where clause} GROUP BY profile_id, type ORDER BY created DESC

Thanks for your help.

Hmmm good to see you found a simpler way to work it out,
However I think its best to warn you that if tomorrow you need to replace that "*" with the actual column names you will have a few issues cause the GROUP BY would force you to select the values of only the columns present in the group by clause, and the rest of them would need to be inside a aggregate function.


PS: Had to give above explanation to save face :p , such a simple query and I twisted it beyond recognition.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Now I haven't gone through your code, but if you are looking for a data structure which can hold a list and gives you the facility to delete any element at random I suggest you take a look at the followinf:-
ArrayList
HashSet
HashMap
TreeSet
TreeMap

However if you are hell bent on using just an "array", you will have to write you own functions to move data around in the array, overwriting any location which is deleted by moving the values from the behind indexes up one place etc.

By the way, I don't care how it looks, I am not being graded on appearance but on functionality.

Just a piece of advice do not concentrate on the grades so much that you forget the main motive of this subject being given to or taken up by you.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

@ryy705
Now when I run javac -help I get the following message:-

stephen@stephen-desktop:~$ javac -help
Eclipse Java Compiler 0.894_R34x, 3.4.2 release
Copyright IBM Corp 2000, 2008. All rights reserved.

Usage: <options> <source files | directories>

Although I use the Eclipse Java compiler, but then too the usage should be the same even with the Sun JDK.
Now if you notice the above usage information properly, you need to specify your options before you specify your source files to compile, So you need to specify your CLASS path information (using the -cp option) before you specify the source files to compile, So instead of

javac JakartaFtpWrapper.java JakartaWrapperTest.java -cp commons-net-ftp-2.0.jar

try running this :-

javac -cp commons-net-ftp-2.0.jar JakartaFtpWrapper.java JakartaWrapperTest.java

And check if your sources compile.
Also while running run as :-

java -cp commons-net-ftp-2.0.jar:. <fully-qualified-name-of-main-class>

If on windows replace the ":" with ";" and do not forget the "." after it, it tells the JVM to search for the Main class in your current working directory. Hope it helps

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Since your records are and will be truly unique by date (as you have mentioned in the edit comment), you could use a simple join query like this:-

SELECT A.id, A.profile_id, A.recipient_id, A.created, A.type, A.type_id, A.notify
FROM Notifications A, Notifications B
WHERE A.receipient_id = B.receipient_id AND 
A.profile_id = B.profile_id AND
A.type = B.type AND
A.receipient_id = 8 AND
A.created >= B.created

Note:-
I have only mentally evaluated the query, could not test it as I am not close to any mysql server right now.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

If you want the MySQL J-Connector driver to be available to all your Java applications then you should copy the "jar" to "$JRE_HOME/lib/ext", If you have a JDK installed then the location would be "$JDK_HOME/jre/lib/ext".

After that you will need to restart tomcat for it to be able to find the J-Connector.

Alternatively if you do not want the J-Connector to be available to all your Java programs, you could simply copy it to the "WEB-INF/lib" folder of your web application inside tomcat.

Lastly just for your info, like all Java libraries if you want to use the J-Connector inside your Java programs, it(the MySQL J Connector jar file) should be available in your CLASSPATH variable, you do not install it like you install software on windows.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

The following link apparently seems to be tailor made for the topic of this thread :- Packaging and Deploying Desktop Java Applications

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

I think what you are looking for is a way to handle Sessions in a JSP page. Rather than using cookies you can transfer content from one JSP page to the next by using the Session object.

Of course you can also do it with cookies, but using the Session object I think would be far more simpler for your cause

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

The problem is not of PATH variables or the Oracle driver Jar not found in classpath, It is quite simply you are not invoking the program correctly.

When you are running any Java program, you give the "java" interpreter only the name of the main class (and quite obviously there is no main class by the name of C:\OraThin) .

Also in your case the complication rises cause you are specifying the value for your "classpath", here along with your other JARs you would also need to include the directory which contains the class file of your OraThin class ( which is what adatapost has done by including "c:" in the classpath as shown here d:\oracle\product\10.2.0\db1\jdbc\lib;c:\ ).

You should try what adatapost has suggested, I ended up giving him a bad cookie cause I failed to observe you are running your programs from inside the bin directory of your JDK installation. Hopefully someone will equalize for my blunder there.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Well syntactically your JSP page is correct, although the approach of firing queries directly from inside the JSP page (that too using SQL Statements constructed on the fly) is not only bad but dangerous .

Also you need some brushing up on your concepts of HTML and Javascript. The <input> tags need to be nested inside a corresponding <form> tag, if you want the data from the <input> tag to be posted to the JSP page mentioned in the "action" attribute of <form> tag.
Also I do not see any Javascript functions by the name of InsertZoneInfo(),UpdateZoneInfo() or DeleteZoneInfo()

If you are using Firefox you could go to Tools ->Error Console to see the various Javascript errors or alternatively you could install the Firebug extension for more comprehensive debugging info.
Anyways the situation as I see demands that you learn not only about JSP and MVC[ 1 , 2 , 3 ] but also about HTML and JavaScript right now.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Hi James, you have to use the noparse tags around the code tags like this:-

[noparse] [code=xyz]

[/code]


[/noparse]

In fact check this post by John A for an even better option.

You can check the entire vB Code list here

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

I agree with VernonDozier, your code compiled and ran OK,
You should not be getting this problem unless and until you are using a Java compiler prior to release 1.2 (i.e a pre Java2 compiler cause nextInt(int) was added to the java.util.Random class in JDK 1.2)

freelancelote commented: thanks a lot +1
stephen84s 550 Nearly a Posting Virtuoso Featured Poster

No problems, with the line numbers, I appreciate the fact that even though new you even care to use code tags.
The line numbers will come up if you wrap you code inside [code=java] and [/code] tags.

Anyways the problem is as follows:-
the NullPointerException was thrown on the line:-

GradientPaint bounds = new GradientPaint(x, y ,c.getColor(), 0, 20, Color.white, true);

Because c.getColor() returned "null".
If you look at the previous line you have initialized "c" with a new object of class MouseOverExample as shown below.

MouseOverExample c = new MouseOverExample();

But since you have used the default constructor, none of its internal properties are initialized, they are just set to null. As a result of which c.getColor() returns null, and hence the reason for the NullPointerException thrown from the GradientPaint constructor.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

lol thnx guyz but i realli dont know anything in java nd dis is my exam question

An exam for which no doubt you would have been given a decent time to prepare ?
Sorry "_Rosie_" but thats an all the more bigger reason why we shouldnt be helping you, cause it would be cheating. I have already given you links to the tutorials, if you can put them together, you can construct what you want.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Can you point out which is the line specified here :-

at MyPackage.MouseOverExample$Glyph.<init>(MouseOverExample.java:109)
stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Nope no ones going to write that code for you, but we will not mind helping you write it.

Here are some tutorials :-

  1. Taking user input from console on Java[ 1 , 2 , 3 ]
  2. The For Loop in Java
  3. Arrays

Put them all together and you should be able to create your program.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

@lloydsbackyard

I dont know what you are talking about. When I ran your code, it worked perfectly:-

stephen@xxx:~/Development/java> javac bonus.java
stephen@xxx:~/Development/java> java bonus
Enter Employee's Monthly Salary:
6000
The bonus is 6000
stephen@xxx:~/Development/java>

Also just to inform you the code that you pasted contains an extra "}".
And from the next time if put code in your post, please use code tags, for java code it is as simple as using:-
[code=java] and [/code] before and after your code respectively.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Can show me exactly how you are trying to call your web page via the web adress you have registered ? or maybe a printscreen so we can see what error you are getting ?

Also just in case you might be interested there is connector called as mod_jk using which you can forward requests received on the Apache web server to your Tomcat.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Have you checked whether your domain name has been registered correctly with your IP Address,
To try that just

ping www.yahoo.com

Just replace www.yahoo.com with your address.

If in the output your static IP Address is displayed, that means the web address is being forwarded correctly to your IP Address and no issues there, if not then you better contact with whoever you got the address registered, or maybe your DNS server's cache needs to be refreshed (in this case you could use OpenDNS, as they allow you to refresh their cache).

The second thing you mention is you have forwarded ports 8080 and 80. By default "tomcat" tends to run on port 8080 and most ISPs tend to block this port from receving outward traffic (as 8080 is an intranet port), Try running Tomcat on port 80 to see if this gets resolved.

@adatapost
The O.P. is pretty clear that he is using his own laptop for hosting, so webhost-service provider, private JVM, private Apache (whatever you mean by private) etc do not come into play.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Think E-Mails in Java, Think about the Java Mail API [ 1 , 2 , 3 ]