This week's book giveaway is in the Artificial Intelligence and Machine Learning forum.
We're giving away four copies of Succeeding with AI and have Veljko Krunic on-line!
See this thread for details.
Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!

Kv Payal

Greenhorn
+ Follow
since Apr 17, 2011
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Kv Payal

Hi,

I am writing a simple Web application using only jsp and servlets. I have a form in a jsp page which is calling a servlet in form action. If it is till this, it is working fine and I could see the text printed in the servlet. However, if I am using RequestDispatcher to navigate again to another jsp page from servlets, it is only showing the jsp page contents and not showing the text printed thru servlet program.

What should I do so that it waits on servlet's output page for some time and then navigates to jsp page?
I tried Thread.sleep but that is not working.

Please help.

Thanks
8 years ago
Hi,

I am trying to execute a jdbc program to read data from MS Excel(I have Microsoft Excel Starter 2010) on Windows 7, 64bit operating system.

I created a system DSN(and also tried with UserDSN) the following program and it is throwing the exception :

Exception: [Microsoft][ODBC Driver Manager] : The specified DSN contains an architecture mismatch between the Driver and Application

Program
//import java.io.*;
import java.sql.*;
public class ExcelReadTest{
public static void main(String[] args){
// Connection connection = null;
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection( "jdbc:odbc:test2" );
Statement st = con.createStatement();
ResultSet rs = st.executeQuery( "Select * from [Sheet1$]" );

ResultSetMetaData rsmd = rs.getMetaData();
int numberOfColumns = rsmd.getColumnCount();


while (rs.next()) {
for (int i = 1; i <= numberOfColumns; i++) {
if (i > 1) System.out.print(", ");
String columnValue = rs.getString(i);
System.out.print(columnValue);
}
System.out.println("");
}

st.close();
con.close();
} catch(Exception ex) {
System.err.print("Exception: ");
System.err.println(ex.getMessage());
}
}
}

Note :I used c:\windows\sysWOW64\odbcad32.exe to create a data source that connects to a 32-bit driver under 64-bit platform,. I also tried c:\windows\system32\odbcad32.exe to connect a 64-bit driver but there was no driver for MS Excel. Only driver for SQL Server was available

Can somebody please help me to run the jdbc program in windows 7 and let me know what drivers do I need to use and how?

Thanks in advance.
Hi,

I am trying again to configure tomcat in another system with the same sysdeo plugin link provided by Manish. It worked well in my system but now it is giving error.

I clicked Help->Install New Software and in the Work with field, I pasted

http://www.eclipsetotale.com/tomcatPlugin.html

and clicked Add. It is asking to Add Repository Name and Location. What should I type there? It didn't ask that last time. If I type anything, it is giving the error, not a software location.

Can somebody help me with the steps to configure sysdeo plugin in eclipse3.6?

Thanks in advance.
My original question "how to configure tomcat with eclipse" is resolved by following the link you gave. Yes I configured the Tomcat version and Home directory and it is starting when I click on start Tomcat button.

Since you asked me to "Check out the Hello World tutorial in the link". When I was checking that link, there it asked to create Tomcat project and I don't have that option( That's why I asked that question)
Though I have an option to create Web Project in File Menu but it is only allowing me to create GWT projects. Thats why I am confused as to how to create a web project to run on tomcat server with all the folders WEB-INF etc created automatically. Do we have to to run ant scripts for getting them also? or do we need to do them manually?

I don't know how to get and run ant scripts. Probably that is why I am not getting any option for creating .war or .ear files in my eclipse menus.

The reason I am confused about that is because in my office, in eclipse3.3, they configured JBoss server and I could get options to create .war and .ear files and an option to create web applications, enterprise applications(which is not possible in Tomcat though) etc and it was automatically creating the tree structure needed while deploying.

Sorry if I am deviating from the original question and extending the same thread. However, Thanks for giving a resolution to my original question.
As mentioned in the Hello World tutorial link to create Tomcat project, I dont see that option in my eclipse. I only have Java Project and Web Application project(which is only allowing me to create GWT project). When I created Java project, it is not creating all the WEB-INF etc folders. Do I have to do it manually? Or how can I get that link of Tomcat Project?
Thanks Maneesh,

From the link you gave, I could download the plugins and Tomcat could be configured in my eclipse. Thank You very much. I could see three Tomcat icons in the toolbar after installing-Start Tomcat, Stop Tomcat and Restart Tomcat. Anyways, I still don't see any Servers tab in Show View. Is it only visible in MyEclipse? How can I deploy my files into Tomcat webapps folder automatically from eclipse?

Hi Peter,

I have downloaded eclipse from www.eclipse.org site. The Helios version(eclipse3.6). The link you've provided in your answer is giving error while downloading. Please let me know correctly where should I download eclipse from and from where should I get the plugins and also which version I can use with Tomcat. The link you've given is I think for MyEclipse.

Thanks
I have Eclipse3.6(Helios) Version in which I installed plugins for AppEngine and GWT. I also want to configure Tomcat5.5 but dont know what plugin to install. I have Tomcat already installed in my system and it is working fine outside eclipse. I also don't see a Server tab in Window->Show View. How can I get that. With that can I configure any other server like Weblogic, JBoss etc. Please help.

Thanks in advance.

Hi Mike,

I tried with java.util.Calender and its the same. However I could use the following to get the correct time.

int time=t.get(Calendar.HOUR)+1;

Thanks a lot.
9 years ago
JSP
Hi Stefan,

I am using <%= new java.util.Date() %> and it is obviously Daylight savings issue. How to overcome it?

Thanks for answering
9 years ago
JSP
When I am trying to print date and time using java.util.Date() in an expression or scriplet, it is displaying one hour back of system time. However the date is shown correctly. I tried storing it in a date variable and tried incrementing it by 1 to get the correct time but it is throwing an error and unable to increment.

How can I get correct time ?
9 years ago
JSP