This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes JSP and the fly likes NetBeansIDE4.1 and Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "NetBeansIDE4.1 and Tomcat" Watch "NetBeansIDE4.1 and Tomcat" New topic
Author

NetBeansIDE4.1 and Tomcat

Chetan Chauhan
Greenhorn

Joined: Oct 03, 2006
Posts: 8
I m trying to use NetBeansIDE4.1 for developing jsp and servlet applications.
It comes with bundled in Tomcat-5.5.7.
I wrote a simple code for database connectivity using MS-ACCESS and
system-DSN
It is working fine.
But when i try to deploy the .war file onto a separate machine with TOMCAT-5.5.9 and java libraries and MS-ACCESS database,the code doesnt work. Jsp messages and other effects are running properly but stuff from database is not coming on the page. System-DSN is also proper.

Then i installed TOMCAT 5.5.9 on my machine and called it inside NetBeansIDE4.1. Again the project run fine.

Then what happens when i run the project outside the IDE on the same or different TOMCAT server ?

Here is a piece of code:

Connection con;
Statement stat;
String NewLanguage=new String("SPANISH");
String sql=new String("insert into languages values (1,'" + NewLanguage.toLowerCase() + "',1,null,null)");
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbcdbc:dsn_lang");
stat=con.createStatement();
stat.executeUpdate(sql);
stat.close();
con.commit();

out.println("<h1>New Language Added...</h1>");


stat.close();
con.close();
}catch(Exception e){}
}
 
GeeCON Prague 2014
 
subject: NetBeansIDE4.1 and Tomcat