•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 425,982 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,636 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 1781 | Replies: 26 | Solved
![]() |
•
•
Join Date: Jul 2008
Posts: 40
Reputation:
Rep Power: 0
Solved Threads: 0
hi,
I have to install it .let me upgrade with the latest version as suggested then we can go ahead with the queries.I have never installed mysql because i had seen that there is mysql server,mysql enterprise,etc .so what exactly i have to download and where can i find it free.same thing goes for java also.For now thanks .
see you.
I have to install it .let me upgrade with the latest version as suggested then we can go ahead with the queries.I have never installed mysql because i had seen that there is mysql server,mysql enterprise,etc .so what exactly i have to download and where can i find it free.same thing goes for java also.For now thanks .
see you.
•
•
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,453
Reputation:
Rep Power: 11
Solved Threads: 296
Download
- MySQL Community Server
- Tomcat 6.0.16
- JDK 5.0 Update 16 or JDK 6 Update 7 (I use JDK 5, my website provider has some issues with running JDK 6 on Tomcat 6)
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
If we helped you to solve your problem, answered your question please mark your post as SOLVED.
Publilius Syrus
(~100 BC)
If we helped you to solve your problem, answered your question please mark your post as SOLVED.
•
•
Join Date: Jul 2008
Posts: 40
Reputation:
Rep Power: 0
Solved Threads: 0
hi,
I am installing mysql server and over there it has several options for windows i.e
2.4.8.1. Choosing An Installation Package
2.4.8.2. Installing MySQL with the Automated Installer
2.4.8.3. Using the MySQL Installation Wizard
2.4.8.4. MySQL Server Configuration Wizard
2.4.8.5. Installing MySQL from a Noinstall Zip Archive
2.4.8.6. Extracting the Install Archive
2.4.8.7. Creating an Option File
2.4.8.8. Selecting a MySQL Server Type
2.4.8.9. Starting the Server for the First Time
2.4.8.10. Starting MySQL from the Windows Command Line
2.4.8.11. Starting MySQL as a Windows Service
2.4.8.12. Testing The MySQL Installation
2.4.8.13. Troubleshooting a MySQL Installation Under Windows
2.4.8.14. Upgrading MySQL on Windows
2.4.8.15. MySQL on Windows Compared to MySQL on Unix
now which one to choose and go ahead .after the complete installation of java and db,do i have to set any environment variables or else any other setting to be done.for that please assist me.thank you.
I am installing mysql server and over there it has several options for windows i.e
2.4.8.1. Choosing An Installation Package
2.4.8.2. Installing MySQL with the Automated Installer
2.4.8.3. Using the MySQL Installation Wizard
2.4.8.4. MySQL Server Configuration Wizard
2.4.8.5. Installing MySQL from a Noinstall Zip Archive
2.4.8.6. Extracting the Install Archive
2.4.8.7. Creating an Option File
2.4.8.8. Selecting a MySQL Server Type
2.4.8.9. Starting the Server for the First Time
2.4.8.10. Starting MySQL from the Windows Command Line
2.4.8.11. Starting MySQL as a Windows Service
2.4.8.12. Testing The MySQL Installation
2.4.8.13. Troubleshooting a MySQL Installation Under Windows
2.4.8.14. Upgrading MySQL on Windows
2.4.8.15. MySQL on Windows Compared to MySQL on Unix
now which one to choose and go ahead .after the complete installation of java and db,do i have to set any environment variables or else any other setting to be done.for that please assist me.thank you.
•
•
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,453
Reputation:
Rep Power: 11
Solved Threads: 296
•
•
Join Date: Aug 2008
Posts: 18
Reputation:
Rep Power: 1
Solved Threads: 1
•
•
•
•
You misunderstand the idea of JSP-servlet relation. Bellow is something you should do (I did not compile it so it may not be 100% correct)
Simple html login screen
Note: The form parameter action uses LoginEvent servlet that has been mapped through web.xml.html Syntax (Toggle Plain Text)
<html> <head> <title>Ask for Names Example</titls> </head> <body bgcolor="LightSkyBlue"> <h3 align="center">Login event with use of the POST method</h3> <form action="LoginEvent" method="post"> <p align="center">Username: <input type="text" site="20" name="username"> Password: <input type="text" size="20" name="password"></p> <p align="center"><input type="submit" value="Submit"></p> </form> </body> </html>
servlet to get data and connect to db
java Syntax (Toggle Plain Text)
import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; public class FrontController extends HttpServlet { Connection conn; Statement stmt; public void init() throws ServletException { try { Class.forName("com.mysql.jdbc.Driver").newInstance(); } catch (Exception ex) { System.out.println("Exception is : " + ex.toString() ); } public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { String username = request.getParameter("username"); String password = request.getParameter("password"); boolean bValid = true; HttpSession session = request.getSession(); if( (name.lenght() == 0) || (password.length() == )) { bValid = false; } if(bValid) // submited data are OK { try { conn = DriverManager.getConnection("jdbc:mysql://localhost/" + "database_name?user=your_username&password=your_password"); stmt = conn.createStatement(); } catch(SQLException ex) { System.out.println("SQLException : " + ex.getMessage() ); } /** * DO THE REST OF DATABASE REQUESTS * * DO NOT FORGET TO CLOSE CONNECTION * **/ } if(bValid) { // YOU MAY WANT TO CREATE SOME SESSIONS HERE RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/accept.jsp"); dispatcher.forward(request, response); } else { RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/reject.jsp"); dispatcher.forward(request, response); } } }
does this get written directly to the Dreamweaver page or should it be different,
does the system.out.println() print on the browser and what about a mailto link can you help me with that?
i am sorry if these questions seem absurd but i am new with JSP and really need help for a major project
thankyou
•
•
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,453
Reputation:
Rep Power: 11
Solved Threads: 296
@does this get written directly to the Dreamweaver page or should it be different
You do not want to use Dreamweaver for Java web development. NetBeans is more reasonable
@does the system.out.println() print on the browser
No that is system message that will displayed if anything happens while Tomcat server running command prompt
@what about a mailto link can you help me with that
mailto is a basic of HTML that you should already know, if not visit w3schools.com website
@i am sorry if these questions seem absurd but i am new with JSP and really need help for a major project
Do you have any Java programming experiences?
PS: Hijacking other people thread is not a nice thing to do...
You do not want to use Dreamweaver for Java web development. NetBeans is more reasonable
@does the system.out.println() print on the browser
No that is system message that will displayed if anything happens while Tomcat server running command prompt
@what about a mailto link can you help me with that
mailto is a basic of HTML that you should already know, if not visit w3schools.com website
@i am sorry if these questions seem absurd but i am new with JSP and really need help for a major project
Do you have any Java programming experiences?
PS: Hijacking other people thread is not a nice thing to do...
Last edited by peter_budo : Aug 2nd, 2008 at 5:09 pm. Reason: typo
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
If we helped you to solve your problem, answered your question please mark your post as SOLVED.
Publilius Syrus
(~100 BC)
If we helped you to solve your problem, answered your question please mark your post as SOLVED.
•
•
Join Date: Aug 2008
Posts: 18
Reputation:
Rep Power: 1
Solved Threads: 1
•
•
•
•
@does this get written directly to the Dreamweaver page or should it be different
You do not want to use Dreamweaver for Java web development. NetBeans is more reasonable
@does the system.out.println() print on the browser
No that is system message that will displayed if anything happens while Tomcat server running command prompt
@what about a mailto link can you help me with that
mailto is a basic of HTML that you should already know, if not visit w3schools.com website
@i am sorry if these questions seem absurd but i am new with JSP and really need help for a major project
Do you have any Java programming experiences?
PS: Hijacking other people thread is not a nice thing to do...
how can i say this...
this is an assignment by my web development lecturer which has to be done in dreamweaver as a jsp page which re-validates what has been entered in the previous page and if it is correct it has to print a mailto link on the page otherwise it displays an error message, the lectures are missing those points so i am going for any help i can get
•
•
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,453
Reputation:
Rep Power: 11
Solved Threads: 296
![]() |
•
•
•
•
•
•
•
•
DaniWeb JSP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- login form and MySQL connection/validation error (PHP)
- Help on form validation requested. (PHP)
- Page.IsPostBack (ASP.NET)
Other Threads in the JSP Forum
- Previous Thread: Need help with printcontrol.dll error
- Next Thread: Problem accessing Map values using bracket notation



Linear Mode