Cita de: LEYER en 27 Febrero 2010, 20:46 PMperdon pero estoy agldo desesperado
no hagas triple post
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes MenúCita de: LEYER en 27 Febrero 2010, 20:46 PMperdon pero estoy agldo desesperado
no hagas triple post
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<jsp:useBean id="mensa" scope="session" class="javabeans.mensajes">
<jsp:setProperty name="mensa" property="*"/>
</jsp:useBean>
<body>
<h1>JSP Page</h1>
<h1>Registro de Usuario</h1>
<form name="mensa" action="Mostrar" method="POST">
<table>
<tr>
<td>Nombre:</td>
<td><input type="text" name="nombre" value="" /></td>
</tr
<tr>
<td>Apellidos:</td>
<td><input type="text" name="apellidos" value=""</td>
</tr>
<tr>
<td>Usuario:</td>
<td><input type="text" name="usuario" value=""</td>
</tr>
<tr>
<td>Password:</td>
<td><input type="password" name="password" value=""</td>
</tr>
<tr>
<td>Email:</td>
<td><input type="text" name="email" value=""</td>
</tr>
</table>
<input type="submit" value="Registrar" />
<input type="reset" value="Limpiar" />
</form>
</body>
</html>
package javabeans;
/**
*
* @author Eroscracker
*/
public class mensajes {
private String nombre;
private String apellidos;
private String usuario;
private String password;
private String passwordrep;
private String email;
public String getNombre() {
return nombre;
}
public void setNombre(String nombre) {
this.nombre = nombre;
}
public String getApellidos() {
return apellidos;
}
public void setApellidos(String apellidos) {
this.apellidos = apellidos;
}
public String getUsuario() {
return usuario;
}
public void setUsuario(String usuario) {
this.usuario = usuario;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getPasswordrep() {
return passwordrep;
}
public void setPasswordrep(String passwordrep) {
this.passwordrep = passwordrep;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
}
package servlets;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javabeans.*;
/**
*
* @author Eroscracker
*/
public class Mostrar extends HttpServlet {
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
mensajes m = new mensajes();
try {
out.println("<html>");
out.println("<head>");
out.println("<title>Servlet Mostrar</title>");
out.println("</head>");
out.println("<body>");
out.println("<h1>Servlet Mostrar at " + request.getContextPath () + "</h1>");
out.println("Nombre:"+ m.getNombre()+"<br>");
out.println("Apellidos:"+ m.getApellidos()+"<br>");
out.println("Usuario:"+m.getUsuario()+"<br>");
out.println("Password:"+m.getPassword()+"<br>");
out.println("Email:"+m.getEmail()+"<br>");
out.println("</body>");
out.println("</html>");
} finally {
out.close();
}
}
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
/**
* Handles the HTTP <code>GET</code> method.
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
/**
* Handles the HTTP <code>POST</code> method.
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
/**
* Returns a short description of the servlet.
* @return a String containing servlet description
*/
@Override
public String getServletInfo() {
return "Short description";
}// </editor-fold>
}
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<jsp:forward page="Form.do"/>
package javabeans;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.*;
public class RegistroForm extends ActionForm {
private String nombre;
private String apellidos;
private String usuario;
private String password;
private String email;
//metodos de acceso
public String getNombre() {
return nombre;
}//Fin del getnombre
public void setNombre(String nombre) {
this.nombre = nombre;
}//Fin del setNombre
public String getApellidos() {
return apellidos;
}//Fin del getAmeppidos
public void setApellidos(String apellidos) {
this.apellidos = apellidos;
}//Fin del setApellidos
public String getUsuario() {
return usuario;
}//Fin del getUsuario
public void setUsuario(String usuario) {
this.usuario = usuario;
}//Fin del setUsuario
public String getPassword() {
return password;
}//Fin del getPassword
public void setPassword(String password) {
this.password = password;
}//Fin del setPassword
public String getEmail() {
return email;
}//Fin del getEmail
public void setEmail(String email) {
this.email = email;
}//Fin setEmail
}//Fin del la clase
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html:html>
<body>
<center>
<h1>Registro de Usuario</h1>
<html:form action="/registrar" method="POST">
<table>
<tr>
<td>Nombre:</td>
<td><html:text property="nombre"/></td>
</tr
<tr>
<td>Apellidos:</td>
<td><html:text property="apellidos"/></td>
</tr>
<tr>
<td>Usuario:</td>
<td><html:text property="usuario"/></td>
</tr>
<tr>
<td>Password:</td>
<td><html:password property="password"/></td>
</tr>
<tr>
<td>Email:</td>
<td><html:text property="email"/></td>
</tr>
</table>
<html:submit property="submit" value="Registrar"/>
<html:reset value="Limpiar"/>
</html:form>
</center>
</body>
</html:html>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_3.dtd">
<struts-config>
<form-beans>
<form-bean name="RegistroForm" type="javabeans.RegistroForm"/>
</form-beans>
<global-exceptions>
</global-exceptions>
<global-forwards>
<forward name="form" path="/Form.do"/>
</global-forwards>
<action-mappings>
<action path="/Form" forward="/Formulario.jsp"/>
</action-mappings>
<controller processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>
<message-resources parameter="com/myapp/struts/ApplicationResource"/>
<!-- ========================= Tiles plugin ===============================-->
<!--
This plugin initialize Tiles definition factory. This later can takes some
parameters explained here after. The plugin first read parameters from
web.xml, thenoverload them with parameters defined here. All parameters
are optional.
The plugin should be declared in each struts-config file.
- definitions-config: (optional)
Specify configuration file names. There can be several comma
separated file names (default: ?? )
- moduleAware: (optional - struts1.1)
Specify if the Tiles definition factory is module aware. If true
(default), there will be one factory for each Struts module.
If false, there will be one common factory for all module. In this
later case, it is still needed to declare one plugin per module.
The factory will be initialized with parameters found in the first
initialized plugin (generally the one associated with the default
module).
true : One factory per module. (default)
false : one single shared factory for all modules
- definitions-parser-validate: (optional)
Specify if xml parser should validate the Tiles configuration file.
true : validate. DTD should be specified in file header (default)
false : no validation
Paths found in Tiles definitions are relative to the main context.
-->
<plug-in className="org.apache.struts.tiles.TilesPlugin" >
<set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml" />
<set-property property="moduleAware" value="true" />
</plug-in>
<!-- ========================= Validator plugin ================================= -->
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property
property="pathnames"
value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
</plug-in>
</struts-config>
Cita de: ari_As en 28 Mayo 2009, 01:11 AM
amm teng esa duda tambien.
muchachos del staff ajaja que dicen de la alfaa conviene pillarsela
http://www.comprawifi.com/usb/alta-potencia/alfa-usb-500mw-antena-desmontable-realtek-8187l/prod_1898.html
inyecta bien y too el royo???
Cita de: BadDevil en 31 Marzo 2009, 00:37 AM
jajajj acabo de pasar la 7