NameL3ss

appPelicula

Sep 29th, 2014
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.59 KB | None | 0 0
  1. DataBase:
  2. ***********************************************************************************************************************************
  3. CREATE TABLE IF NOT EXISTS `pelicula` (
  4. `id_pelicula` int(11) NOT NULL AUTO_INCREMENT,
  5. `title` varchar(50) DEFAULT NULL,
  6. `year` int(11) DEFAULT NULL,
  7. `url_imbd` varchar(50) DEFAULT NULL,
  8. PRIMARY KEY (`id_pelicula`)
  9. ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;
  10.  
  11. ***********************************************************************************************************************************
  12. Index.html
  13. <html>
  14. <head>
  15. <meta http-equiv="Refresh" content="0; url=http://localhost:8084/appPelicula/ServletIndex">
  16. <meta charset="UTF-8">
  17. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  18. </head>
  19. <body>
  20.  
  21. </body>
  22. </html>
  23. ***********************************************************************************************************************************
  24. NuevaPelicula.html
  25. <html>
  26. <head>
  27. <title>Peliculas</title>
  28. <meta charset="UTF-8">
  29. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  30. </head>
  31. <body style="background:#0A0B0A">
  32. <center><h1 style="color:#1BE91B">Peliculas</h1></center>
  33. <form method="post" action="ServletNuevo">
  34. <table align="center">
  35. <tr><td style="color:#FFFFFF">Title:</td><td><input type="text" id="txttitle" name="txttitle"></td>
  36. <tr><td style="color:#FFFFFF">year:</td><td><input type="text" id="txtyear" name="txtyear"></td>
  37. <tr><td style="color:#FFFFFF">url_imdb:</td><td><input type="text" id="txturl_imbd" name="txturl_imbd"></td>
  38.  
  39. <tr><td colspan="3" align="right"><input type="submit" value="Agregar Pelicula"></td></tr>
  40. </table>
  41. </form>
  42. </body>
  43. </html>
  44. ***********************************************************************************************************************************
  45. BaseDato.java
  46.  
  47. import java.sql.Connection;
  48. import java.sql.DriverManager;
  49. import java.sql.ResultSet;
  50. import java.sql.SQLException;
  51. import java.sql.Statement;
  52. import java.util.ArrayList;
  53. import java.util.logging.Level;
  54. import java.util.logging.Logger;
  55.  
  56. /**
  57. *
  58. * @author SnakeChaos
  59. */
  60. public class BaseDato {
  61. private boolean conectado;
  62. private Connection conex;
  63.  
  64. public BaseDato () throws InstantiationException, IllegalAccessException {
  65. try {
  66. Class.forName("com.mysql.jdbc.Driver").newInstance();
  67. } catch (ClassNotFoundException ex) {
  68. Logger.getLogger(BaseDato.class.getName()).log(Level.SEVERE, null, ex);
  69. }
  70. try {
  71. conex = DriverManager.getConnection("jdbc:mysql://localhost:3306/peliculas", "root", "");
  72. conectado = true;
  73. }
  74. catch (SQLException ex) {
  75. conectado = false;
  76. }
  77. }
  78. public boolean isConectado() {
  79. return conectado;
  80. }
  81.  
  82. public void insertar(TipoDato t) {
  83. Statement st=null;
  84. if (isConectado()) {
  85. try {
  86. st = conex.createStatement();
  87. String title = ((Pelicula) t).getTitle();
  88. int year = ((Pelicula) t).getYear();
  89. String url_imbd = ((Pelicula) t).getUrl_imbd();
  90. st.executeUpdate(((Pelicula) t).getData());
  91. }
  92. catch (SQLException ex) {
  93. System.err.println(ex.getMessage());
  94. }
  95. }
  96. }
  97.  
  98. public ArrayList<TipoDato> getRegistros() {
  99. ArrayList<TipoDato> lista = new ArrayList<>();
  100. Statement st=null;
  101. ResultSet rs=null;
  102. if (isConectado()) {
  103. try {
  104. st = conex.createStatement();
  105. rs = st.executeQuery("SELECT * FROM pelicula");
  106. while (rs.next()) {
  107. lista.add(new Pelicula(rs.getInt("id_pelicula"),
  108. rs.getString("title"),
  109. rs.getInt("year"),
  110. rs.getString("url_imbd")
  111. ));
  112. }
  113. }
  114. catch (SQLException ex) {
  115. System.out.println(ex.getMessage());
  116. }
  117. }
  118. return lista;
  119. }
  120.  
  121.  
  122. public TipoDato getRegistro(int id_pelicula){
  123. TipoDato td = null;
  124. try {
  125. Class.forName("com.mysql.jdbc.Driver").newInstance ();
  126. conex = DriverManager.getConnection("jdbc:mysql://localhost:3306/peliculas","root","");
  127. Statement st = conex.createStatement();
  128. ResultSet rs = st.executeQuery("SELECT * FROM pelicula WHERE id_pelicula='"+id_pelicula+"'");
  129. if (rs.first()) {
  130.  
  131. td = new Pelicula(rs.getInt("id_pelicula"),
  132. rs.getString("title"),
  133. rs.getInt("year"),
  134. rs.getString("url_imbd"));
  135.  
  136. }
  137. else{
  138. td = new Pelicula("",'s',"");
  139. }
  140. st.close();
  141. conex.close();
  142.  
  143. }
  144. catch(Exception ex) {
  145. System.err.println(ex.getMessage());
  146. }
  147. return td;
  148. }
  149.  
  150. public void Modificar(Pelicula p) {
  151. try {
  152. Statement st = conex.createStatement();
  153. st.executeUpdate(String.format(
  154. "UPDATE pelicula SET title='%s', year=%d ,url_imbd='%s' WHERE id_pelicula=%d",
  155. p.getTitle(), p.getYear(), p.getUrl_imbd(), p.getId_pelicula()));
  156. st.close();
  157. }
  158. catch (SQLException ex) {
  159.  
  160. }
  161. catch (Exception ex) {
  162.  
  163. }
  164. }
  165. }
  166.  
  167. *********************************************************************************************************************************
  168. Pelicula.java
  169.  
  170. import java.util.*;
  171. /**
  172. *
  173. * @author SnakeChaos
  174. */
  175. public class Pelicula implements TipoDato{
  176.  
  177. private int id_pelicula;
  178. private String title;
  179. private int year;
  180. private String url_imbd;
  181.  
  182.  
  183.  
  184. public Pelicula(String title, int year, String url_imbd) {
  185. this(0, title, year,url_imbd);
  186. }
  187.  
  188. public Pelicula(int id_pelicula, String title, int year, String url_imbd) {
  189. this.id_pelicula = id_pelicula;
  190. this.title = title;
  191. this.year = year;
  192. this.url_imbd = url_imbd;
  193. }
  194.  
  195.  
  196. public int getId_pelicula() {
  197. return id_pelicula;
  198. }
  199.  
  200. public void setId_pelicula(int id_pelicula) {
  201. this.id_pelicula = id_pelicula;
  202. }
  203.  
  204. public String getTitle() {
  205. return title;
  206. }
  207.  
  208. public void setTitle(String title) {
  209. this.title = title;
  210. }
  211.  
  212. public int getYear() {
  213. return year;
  214. }
  215.  
  216. public void setYear(int year) {
  217. this.year = year;
  218. }
  219.  
  220. public String getUrl_imbd() {
  221. return url_imbd;
  222. }
  223.  
  224. public void setUrl_imbd(String url_imbd) {
  225. this.url_imbd = url_imbd;
  226. }
  227.  
  228.  
  229. @Override
  230. public String getData() {
  231. return String.format("insert into pelicula (title, year, url_imbd) values('%s', '%s' ,'%s')", title, year, url_imbd);
  232. }
  233.  
  234. @Override
  235. public String toString() {
  236. return "Pelicula{" + "title=" + title + ", year=" + year + ", url_imbd=" + url_imbd + '}';
  237. }
  238.  
  239.  
  240.  
  241.  
  242.  
  243. }
  244.  
  245. *********************************************************************************************************************************
  246.  
  247. ServletIndex.java
  248.  
  249. package paquete;
  250.  
  251. import java.io.IOException;
  252. import java.io.PrintWriter;
  253. import java.util.logging.Level;
  254. import java.util.logging.Logger;
  255. import javax.servlet.ServletException;
  256. import javax.servlet.annotation.WebServlet;
  257. import javax.servlet.http.HttpServlet;
  258. import javax.servlet.http.HttpServletRequest;
  259. import javax.servlet.http.HttpServletResponse;
  260.  
  261. /**
  262. *
  263. * @author SnakeChaos
  264. */
  265. @WebServlet(name = "ServletIndex", urlPatterns = {"/ServletIndex"})
  266. public class ServletIndex extends HttpServlet {
  267.  
  268. /**
  269. * Processes requests for both HTTP <code>GET</code> and <code>POST</code>
  270. * methods.
  271. *
  272. * @param request servlet request
  273. * @param response servlet response
  274. * @throws ServletException if a servlet-specific error occurs
  275. * @throws IOException if an I/O error occurs
  276. */
  277. protected void processRequest(HttpServletRequest request, HttpServletResponse response)
  278. throws ServletException, IOException {
  279. response.setContentType("text/html;charset=UTF-8");
  280. try (PrintWriter out = response.getWriter()) {
  281. /* TODO output your page here. You may use following sample code. */
  282. out.println("<!DOCTYPE html>");
  283. out.println("<html>");
  284. out.println("<head>");
  285. out.println("<title>Servlet ServletIndex</title>");
  286. out.println("</head>");
  287. out.println("<body style=\"background:#0A0B0A\">");
  288.  
  289. BaseDato bd = new BaseDato();
  290.  
  291. out.println("<center><h1 style=\"color:#1BE91B\">Listado de Peliculas</h1></center>");
  292.  
  293. out.println("<table bgcolor=\"#FFFFFF\" border=1 align='center'>");
  294. out.println("<tr><th colspan=3>Peliculas</th></tr>");
  295. out.println("<tr><th colspan=1>Title</th><th colspan=1>Year</th><th colspan=1>Url_imbd</th></tr>");
  296.  
  297. for (TipoDato t: bd.getRegistros()) {
  298. Pelicula p = (Pelicula) t;
  299.  
  300. out.println("<tr><td><a href=\"ServletModificar?id_pelicula=" +
  301. p.getId_pelicula() + "\">" +
  302. p.getTitle() + "</a></td>");
  303. out.println("<td>" + p.getYear() + "</td>");
  304. out.println("<td><a target=\"_self\" href='"+
  305. p.getUrl_imbd() + "'>"
  306. + p.getUrl_imbd() + "</a></td></tr>");
  307.  
  308. }
  309.  
  310. out.println("</table>");
  311. out.println("</br></br><center><a href=\"http://localhost:8084/appPelicula/NuevaPelicula.html\">Agregar Nueva Pelicula</a></center>");
  312.  
  313. out.println("</body>");
  314. out.println("</html>");
  315. } catch (InstantiationException ex) {
  316. Logger.getLogger(ServletIndex.class.getName()).log(Level.SEVERE, null, ex);
  317. } catch (IllegalAccessException ex) {
  318. Logger.getLogger(ServletIndex.class.getName()).log(Level.SEVERE, null, ex);
  319. }
  320. }
  321.  
  322. // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
  323. /**
  324. * Handles the HTTP <code>GET</code> method.
  325. *
  326. * @param request servlet request
  327. * @param response servlet response
  328. * @throws ServletException if a servlet-specific error occurs
  329. * @throws IOException if an I/O error occurs
  330. */
  331. @Override
  332. protected void doGet(HttpServletRequest request, HttpServletResponse response)
  333. throws ServletException, IOException {
  334. processRequest(request, response);
  335. }
  336.  
  337. /**
  338. * Handles the HTTP <code>POST</code> method.
  339. *
  340. * @param request servlet request
  341. * @param response servlet response
  342. * @throws ServletException if a servlet-specific error occurs
  343. * @throws IOException if an I/O error occurs
  344. */
  345. @Override
  346. protected void doPost(HttpServletRequest request, HttpServletResponse response)
  347. throws ServletException, IOException {
  348. processRequest(request, response);
  349. }
  350.  
  351. /**
  352. * Returns a short description of the servlet.
  353. *
  354. * @return a String containing servlet description
  355. */
  356. @Override
  357. public String getServletInfo() {
  358. return "Short description";
  359. }// </editor-fold>
  360.  
  361. }
  362.  
  363. *********************************************************************************************************************************
  364. ServletModificar.java
  365.  
  366. package paquete;
  367.  
  368. import java.io.IOException;
  369. import java.io.PrintWriter;
  370. import java.util.logging.Level;
  371. import java.util.logging.Logger;
  372. import javax.servlet.ServletException;
  373. import javax.servlet.annotation.WebServlet;
  374. import javax.servlet.http.HttpServlet;
  375. import javax.servlet.http.HttpServletRequest;
  376. import javax.servlet.http.HttpServletResponse;
  377.  
  378. /**
  379. *
  380. * @author SnakeChaos
  381. */
  382. @WebServlet(name = "ServletModificar", urlPatterns = {"/ServletModificar"})
  383. public class ServletModificar extends HttpServlet {
  384.  
  385. /**
  386. * Processes requests for both HTTP <code>GET</code> and <code>POST</code>
  387. * methods.
  388. *
  389. * @param request servlet request
  390. * @param response servlet response
  391. * @throws ServletException if a servlet-specific error occurs
  392. * @throws IOException if an I/O error occurs
  393. */
  394. protected void processRequest(HttpServletRequest request, HttpServletResponse response)
  395. throws ServletException, IOException {
  396. response.setContentType("text/html;charset=UTF-8");
  397. try (PrintWriter out = response.getWriter()) {
  398. /* TODO output your page here. You may use following sample code. */
  399. out.println("<!DOCTYPE html>");
  400. out.println("<html>");
  401. out.println("<head>");
  402. out.println("<title>Servlet ServletModificar</title>");
  403. out.println("</head>");
  404. out.println("<body style=\"background:#0A0B0A\">");
  405.  
  406. int id_pelicula = Integer.valueOf(request.getParameter("id_pelicula"));
  407.  
  408. BaseDato bd = new BaseDato();
  409.  
  410. Pelicula p = (Pelicula) bd.getRegistro(id_pelicula);
  411.  
  412.  
  413. out.println("<center><h1 style=\"color:#1BE91B\">Pelicula</h1></center>");
  414.  
  415. out.println("<form action=\"/appPelicula/ServletModificarPelicula\" method=\"post\">");
  416.  
  417. out.println("<table border='1' align='center'>");
  418.  
  419. out.println("<input type=\"hidden\" name=\"id_pelicula\" value=\""
  420. + p.getId_pelicula() + "\">");
  421. out.println("<tr><td style=\"color:#FFFFFF\">Title</td><td align='right'><input type=\"text\" name=\"title\" value=\""
  422. + p.getTitle() + "\"></td></tr>");
  423. out.println("<tr><td style=\"color:#FFFFFF\">Year</td><td align='right'><input type=\"text\" name=\"year\" value=\""
  424. + p.getYear() + "\"></td></tr>");
  425. out.println("<tr><td style=\"color:#FFFFFF\">Url_imbd<td align='right'><input align='right' type=\"text\" name=\"url_imbd\" value=\""
  426. + p.getUrl_imbd() + "\"></td></tr>");
  427. out.println("</table>");
  428.  
  429. out.println("<br><center><input type=\"submit\" value=\"ModificarDatos\"></center>");
  430. out.println("</form>");
  431.  
  432. out.println("</body>");
  433. out.println("</html>");
  434. } catch (InstantiationException ex) {
  435. Logger.getLogger(ServletModificar.class.getName()).log(Level.SEVERE, null, ex);
  436. } catch (IllegalAccessException ex) {
  437. Logger.getLogger(ServletModificar.class.getName()).log(Level.SEVERE, null, ex);
  438. }
  439. }
  440.  
  441. // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
  442. /**
  443. * Handles the HTTP <code>GET</code> method.
  444. *
  445. * @param request servlet request
  446. * @param response servlet response
  447. * @throws ServletException if a servlet-specific error occurs
  448. * @throws IOException if an I/O error occurs
  449. */
  450. @Override
  451. protected void doGet(HttpServletRequest request, HttpServletResponse response)
  452. throws ServletException, IOException {
  453. processRequest(request, response);
  454. }
  455.  
  456. /**
  457. * Handles the HTTP <code>POST</code> method.
  458. *
  459. * @param request servlet request
  460. * @param response servlet response
  461. * @throws ServletException if a servlet-specific error occurs
  462. * @throws IOException if an I/O error occurs
  463. */
  464. @Override
  465. protected void doPost(HttpServletRequest request, HttpServletResponse response)
  466. throws ServletException, IOException {
  467. processRequest(request, response);
  468. }
  469.  
  470. /**
  471. * Returns a short description of the servlet.
  472. *
  473. * @return a String containing servlet description
  474. */
  475. @Override
  476. public String getServletInfo() {
  477. return "Short description";
  478. }// </editor-fold>
  479.  
  480. }
  481.  
  482. *********************************************************************************************************************************
  483. ServletModificarPelicula.java
  484.  
  485. package paquete;
  486.  
  487. import java.io.IOException;
  488. import java.io.PrintWriter;
  489. import java.sql.Connection;
  490. import java.sql.DriverManager;
  491. import java.util.logging.Level;
  492. import java.util.logging.Logger;
  493. import javax.servlet.ServletException;
  494. import javax.servlet.annotation.WebServlet;
  495. import javax.servlet.http.HttpServlet;
  496. import javax.servlet.http.HttpServletRequest;
  497. import javax.servlet.http.HttpServletResponse;
  498. import java.sql.*;
  499.  
  500. /**
  501. *
  502. * @author SnakeChaos
  503. */
  504. @WebServlet(name = "ServletModificarPelicula", urlPatterns = {"/ServletModificarPelicula"})
  505. public class ServletModificarPelicula extends HttpServlet {
  506.  
  507. /**
  508. * Processes requests for both HTTP <code>GET</code> and <code>POST</code>
  509. * methods.
  510. *
  511. * @param request servlet request
  512. * @param response servlet response
  513. * @throws ServletException if a servlet-specific error occurs
  514. * @throws IOException if an I/O error occurs
  515. */
  516. protected void processRequest(HttpServletRequest request, HttpServletResponse response)
  517. throws ServletException, IOException {
  518. response.setContentType("text/html;charset=UTF-8");
  519. try (PrintWriter out = response.getWriter()) {
  520.  
  521. Pelicula p;
  522. int id_pelicula = Integer.valueOf(request.getParameter("id_pelicula"));
  523. int year = Integer.valueOf(request.getParameter("year"));
  524.  
  525. p = new Pelicula(id_pelicula, request.getParameter("title"),year, request.getParameter("url_imbd"));
  526.  
  527.  
  528.  
  529. BaseDato bd = new BaseDato();
  530.  
  531. bd.Modificar(p);
  532.  
  533. String site = new String("http://localhost:8084/appPelicula/ServletIndex");
  534. response.setStatus(response.SC_MOVED_TEMPORARILY);
  535. response.setHeader("Location", site);
  536.  
  537.  
  538. } catch (InstantiationException ex) {
  539. Logger.getLogger(ServletModificarPelicula.class.getName()).log(Level.SEVERE, null, ex);
  540. } catch (IllegalAccessException ex) {
  541. Logger.getLogger(ServletModificarPelicula.class.getName()).log(Level.SEVERE, null, ex);
  542. }
  543.  
  544.  
  545. }
  546.  
  547.  
  548. // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
  549. /**
  550. * Handles the HTTP <code>GET</code> method.
  551. *
  552. * @param request servlet request
  553. * @param response servlet response
  554. * @throws ServletException if a servlet-specific error occurs
  555. * @throws IOException if an I/O error occurs
  556. */
  557. @Override
  558. protected void doGet(HttpServletRequest request, HttpServletResponse response)
  559. throws ServletException, IOException {
  560. processRequest(request, response);
  561. }
  562.  
  563. /**
  564. * Handles the HTTP <code>POST</code> method.
  565. *
  566. * @param request servlet request
  567. * @param response servlet response
  568. * @throws ServletException if a servlet-specific error occurs
  569. * @throws IOException if an I/O error occurs
  570. */
  571. @Override
  572. protected void doPost(HttpServletRequest request, HttpServletResponse response)
  573. throws ServletException, IOException {
  574. processRequest(request, response);
  575. }
  576.  
  577. /**
  578. * Returns a short description of the servlet.
  579. *
  580. * @return a String containing servlet description
  581. */
  582. @Override
  583. public String getServletInfo() {
  584. return "Short description";
  585. }
  586. }
  587.  
  588. *********************************************************************************************************************************
  589. ServletNuevo.java
  590.  
  591. package paquete;
  592.  
  593. import java.io.IOException;
  594. import java.io.PrintWriter;
  595. import javax.servlet.ServletException;
  596. import javax.servlet.annotation.WebServlet;
  597. import javax.servlet.http.HttpServlet;
  598. import javax.servlet.http.HttpServletRequest;
  599. import javax.servlet.http.HttpServletResponse;
  600.  
  601. /**
  602. *
  603. * @author SnakeChaos
  604. */
  605. @WebServlet(name = "ServletNuevo", urlPatterns = {"/ServletNuevo"})
  606. public class ServletNuevo extends HttpServlet {
  607.  
  608. /**
  609. * Processes requests for both HTTP <code>GET</code> and <code>POST</code>
  610. * methods.
  611. *
  612. * @param request servlet request
  613. * @param response servlet response
  614. * @throws ServletException if a servlet-specific error occurs
  615. * @throws IOException if an I/O error occurs
  616. */
  617. protected void processRequest(HttpServletRequest request, HttpServletResponse response)
  618. throws ServletException, IOException {
  619. response.setContentType("text/html;charset=UTF-8");
  620. try (PrintWriter out = response.getWriter()) {
  621. /* TODO output your page here. You may use following sample code. */
  622. out.println("<!DOCTYPE html>");
  623. out.println("<html>");
  624. out.println("<head>");
  625. out.println("<title>Agregar Pelicula</title>");
  626. out.println("</head>");
  627. out.println("<body>");
  628.  
  629. String title = request.getParameter("txttitle");
  630. int year = Integer.parseInt(request.getParameter("txtyear"));
  631. String url_imbd = request.getParameter("txturl_imbd");
  632.  
  633. try {
  634. BaseDato bd = new BaseDato();
  635. Pelicula p = new Pelicula (title,year,url_imbd);
  636. System.out.println(p.getData());
  637. bd.insertar(p);
  638.  
  639. // New location to be redirected
  640. String site = new String("http://localhost:8084/appPelicula/ServletIndex");
  641. response.setStatus(response.SC_MOVED_TEMPORARILY);
  642. response.setHeader("Location", site);
  643.  
  644.  
  645.  
  646. }
  647. catch (InstantiationException ex) {
  648. out.println(ex.getMessage());
  649. } catch (IllegalAccessException ex) {
  650. out.println(ex.getMessage());
  651. }
  652.  
  653.  
  654.  
  655. out.println("</body>");
  656. out.println("</html>");
  657. }
  658. }
  659.  
  660. // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
  661. /**
  662. * Handles the HTTP <code>GET</code> method.
  663. *
  664. * @param request servlet request
  665. * @param response servlet response
  666. * @throws ServletException if a servlet-specific error occurs
  667. * @throws IOException if an I/O error occurs
  668. */
  669. @Override
  670. protected void doGet(HttpServletRequest request, HttpServletResponse response)
  671. throws ServletException, IOException {
  672. processRequest(request, response);
  673. }
  674.  
  675. /**
  676. * Handles the HTTP <code>POST</code> method.
  677. *
  678. * @param request servlet request
  679. * @param response servlet response
  680. * @throws ServletException if a servlet-specific error occurs
  681. * @throws IOException if an I/O error occurs
  682. */
  683. @Override
  684. protected void doPost(HttpServletRequest request, HttpServletResponse response)
  685. throws ServletException, IOException {
  686. processRequest(request, response);
  687. }
  688.  
  689. /**
  690. * Returns a short description of the servlet.
  691. *
  692. * @return a String containing servlet description
  693. */
  694. @Override
  695. public String getServletInfo() {
  696. return "Short description";
  697. }// </editor-fold>
  698.  
  699. }
  700.  
  701. *********************************************************************************************************************************
  702. TipoDato.java
  703.  
  704. package paquete;
  705.  
  706. /**
  707. *
  708. * @author SnakeChaos
  709. */
  710. public interface TipoDato {
  711. public String getData();
  712. }
Advertisement
Add Comment
Please, Sign In to add comment