To get that information in servlet file, we can use Here questionno is the variable whose value you can pass from jsp page to servlet To pass information other than login information from an jsp file to servlet, we can use Int userid=(Integer)(s.getAttribute("userid")) When u redirect to another page from home.java, the login information can be retrieved by getAttribute method in jsp and as well as servlets HttpSession session=request.getSession() We can set the attribute of HttpSession (Ex: userid ) in the home.java file i.e, once the user logs in as shown below: To maintain session, HttpSession is used. OracleStatement st=(OracleStatement)con.createStatement() OracleResultSet rs=(OracleResultSet)pstmt.executeQuery() Ħ. java files where ever u add librariesĬhanges to be made to JSP and Servlet code to use Type 4 JDBC driver in NetBeansġ. Right click on and select properties andĬopy the database Url and type in the. Under Tables u will see all the tables u have created in your oracle. It will ask u for password and click will see ur username of oracle and under that u will see Tables (in my computer ) it is click on it and click Connect On the New Connection Wizard Window that pops upĬhange the service ID(SID) as xe or orcl (See the first video if u dont understand or refer below)Īlso type the username and password u use to connect to your oracle databaseĪnd click on Test connection and to check the connectivity to the database Right Click on Oracle Thin and select Connect Using Under Databases-> Drivers-> you will see Oracle Thin jsp files or all files and folders in web folder except WEB-INF folder of the downloaded codeĬlick on Windows menu and select services java files of the code you have downloaded(u will find in src folder->javafolder)Ĭlick on + symbol next to Source PackagesĪnd paste all the. Under RMS four folders are already createdĬopy all the. Your project name (RMS here) will be displayed on your left side pane under Projects Project Folder will give the folder name where ur project files are stored Project Location will tell you where ur project files are stored Under Application -> select Web Application u will find all libraries that need to be added.To know how to add libraries refer video or description below) build (in build folder->web folder->WEB-INF folder->lib folder. When you download any java web application/project codeġ.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |