Manikandan Thiagarajan
asked on
Eclipse-how to work with simple program
Hi all
I have downloaded Ecllipse. i have an ecllipse folder in desktop.
how to work simple program in that.
i think ecclipse is anIDE environment.could i need to download any other tool
for working with ecclipse.
This is my sample program.
<%@ page language = "java" import ="java.sql.*" %>
<html>
<body>
<%
Connection con = null;
try
{
Class.forName("sun.jdbc.od bc.JdbcOdb cDriver");
con = DriverManager.getConnectio n("jdbc:od bc:ss","sa ","");
Statement st = con.createStatement();
ResultSet rs = st.executeQuery("select * from customer");
%>
<table border =2>
<%
while(rs.next())
{
%>
<tr>
<td><%= rs.getString(1)%></td>
<td><%= rs.getString(2)%></td>
<td><%= rs.getString(3)%></td>
</tr>
<%
}
%>
</table>
<%
}
catch(Exception d)
{
out.println("can not display the records");
}
%>
</body>
</html>
How to save this program and test the program in ecclipse.
I aware that Hibernate . could i down load hibernate ?
which one is better, ecclipse or hibernate
which tool should be better for test this program.I have sqlserver 2005.
I have downloaded Ecllipse. i have an ecllipse folder in desktop.
how to work simple program in that.
i think ecclipse is anIDE environment.could i need to download any other tool
for working with ecclipse.
This is my sample program.
<%@ page language = "java" import ="java.sql.*" %>
<html>
<body>
<%
Connection con = null;
try
{
Class.forName("sun.jdbc.od
con = DriverManager.getConnectio
Statement st = con.createStatement();
ResultSet rs = st.executeQuery("select * from customer");
%>
<table border =2>
<%
while(rs.next())
{
%>
<tr>
<td><%= rs.getString(1)%></td>
<td><%= rs.getString(2)%></td>
<td><%= rs.getString(3)%></td>
</tr>
<%
}
%>
</table>
<%
}
catch(Exception d)
{
out.println("can not display the records");
}
%>
</body>
</html>
How to save this program and test the program in ecclipse.
I aware that Hibernate . could i down load hibernate ?
which one is better, ecclipse or hibernate
which tool should be better for test this program.I have sqlserver 2005.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
>>you have to create a Dynamic Web Project in Eclipse
where i see the option in ecclipse?
how do i select the tomcat server
where i see the option in ecclipse?
how do i select the tomcat server
stmani2005,
go to File -> New -> Project -> Web -> Dynamic Web Project
Forgot to mention one very important thing here. You need to have
the eclipse with Web Tools Plugin distribution. You can download it
here...
http://download.eclipse.org/webtools/downloads/
________
radarsh
go to File -> New -> Project -> Web -> Dynamic Web Project
Forgot to mention one very important thing here. You need to have
the eclipse with Web Tools Plugin distribution. You can download it
here...
http://download.eclipse.org/webtools/downloads/
________
radarsh
ASKER
could you specify the name of the link to download for webtool
>>could you specify the name of the link to download for webtool
What I specified in previous post is called a link.
________
radarsh
What I specified in previous post is called a link.
________
radarsh
ASKER
wtp-all-in-one-sdk-1.0-win 32.zip.
is this a file i have to download?
where i save it?
is this a file i have to download?
where i save it?
stmani2005,
Exactly!! That "is" the file. Its is eclipse itself but with the
additional plugins. Extract and start using it.
________
radarsh
Exactly!! That "is" the file. Its is eclipse itself but with the
additional plugins. Extract and start using it.
________
radarsh
>Extract and start using it.
sometimes when you add a plug-in eclipse you need to restart Eclipse itself to take the new changes.
sometimes when you add a plug-in eclipse you need to restart Eclipse itself to take the new changes.
This the bundled version of eclipse. Not the plugin itself.
So, essentially you are installing a new eclipse.
The concept of restarting doesn't arise when you haven't started it at all!!
:)
________
radarsh
So, essentially you are installing a new eclipse.
The concept of restarting doesn't arise when you haven't started it at all!!
:)
________
radarsh
ASKER
HI Radarsh,Giant
i create a context root under dyanmic web project. that name is called jdbc jsp.
where i could paste the above code and test that jsp code.
could you please explain simple?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
well , i paste the code and save it as jdbc.jsp under jdbcjsp
how to connect with tomcat server and run this program?.
if i click run button that gives the output for previous helloworld program.
how to change this program in to runtime environment?
how to connect with tomcat server and run this program?.
if i click run button that gives the output for previous helloworld program.
how to change this program in to runtime environment?
you may set your jdbc.jsp file answer to request.
You must define the context (if not defined) and so on. The same things if your are working with Tomcat.
You must define the context (if not defined) and so on. The same things if your are working with Tomcat.
ASKER
hi,i set context jdbcjsp inside the tree view i have jdbc.jsp
how to run jdbc.jsp.
how to run jdbc.jsp.
ASKER
it doesnot support tomcat 4.1 it support only tomcat 5.0 and tomcat 5.5
i have only tomcat 4.1 version.
what i do now?
i have only tomcat 4.1 version.
what i do now?
You right-click on your JSP and select
Run As -> Run on Server
________
radarsh
Run As -> Run on Server
________
radarsh
ASKER
i clck that run on server select default server
when i click run after that i enter into create manage and run configuration wizard.
what i specify debug and run text boxes
when i click run after that i enter into create manage and run configuration wizard.
what i specify debug and run text boxes
ASKER
now i install tomcat5.5
i have jdbcjsp folder ---webcontent---jdbc.jsp
when i right click jdbc.jsp and select run as on server
that would shows the error like no launchable artifact could be found this session
when i right click jsbcjsp folder and select runon server,it starts the server
it open the browser and says the page can not be displayed
the url like http://localhost:8080/jdbcjsp
could you please explain step by step to solve the problem?
i have jdbcjsp folder ---webcontent---jdbc.jsp
when i right click jdbc.jsp and select run as on server
that would shows the error like no launchable artifact could be found this session
when i right click jsbcjsp folder and select runon server,it starts the server
it open the browser and says the page can not be displayed
the url like http://localhost:8080/jdbcjsp
could you please explain step by step to solve the problem?
>http://localhost:8080/jdbcjsp
I do not see the DOT "." Maybe you forget during editing file?
I do not see the DOT "." Maybe you forget during editing file?
ASKER
when i right click jdbc.jsp and select run as on server
that would shows the error like" no launchable artifact could be found this session"
how to solve that error
that would shows the error like" no launchable artifact could be found this session"
how to solve that error
see the log because I think you didn't put the jsp in the right WebContent
ASKER
where i go to see the log
If you use the inner Tomcat (buld in Eclipse), you can find something in the Window->Show View->Other and search for the tomcat log
Where did u put ur JSP? Under which directory? Can you give the tree structure? Something like this...
-Root
-WEB-INF
+classes
+lib
web.xml
jdbc.jsp
________
radarsh
-Root
-WEB-INF
+classes
+lib
web.xml
jdbc.jsp
________
radarsh
ASKER
-Root - jdbcjsp
-src
-Webapplibaries
-build
-webcontent
Meta-inf
web -inf
web.xml
jdbc.jsp
is that correct
-src
-Webapplibaries
-build
-webcontent
Meta-inf
web -inf
web.xml
jdbc.jsp
is that correct
ASKER
now i start the server from ecclipse that would started.now that would not open any browser.i could not able to see any output.
could i supply any url to see the output.
could i supply any url to see the output.
is an IDE where you can work on many kinds of projects.