struts path problem

Category: Java EE
 
abc953871440
2010-08-12 09:19:46

Sponsored Links
A low-level problem
picture here
should understand at a glance with the landing struts write
first landing page's address is http://localhost:8080/app/ Reg.jsp
became a little after the submission http://localhost:8080/reg

Reg.jsp code: <% @ page language = "java" ; import = "java.util. *" pageEncoding = "utf-8"%>

<html>
<head> ;
<title> My JSP 'Reg.jsp' starting page </title>
</head>
<body>
<form action="/reg" method="post">
; User Name <input type="text" name="username"> <br>
password <input type = "password" name = "password1"> <br>
password 2 <input type="password" name="password2"> ; <br>
<input type="submit" value="dijiao"> <br>
; </form>
</body>
</html>

struts-config.xml Code:
< ;? xml version = "1.0" encoding = "UTF-8"?>
<! DOCTYPE struts-config PUBLIC "- / / Apache Software Foundation / / DTD Struts Configuration 1.1 / / EN ""

<struts-config>
<data-sources />
<form-beans>
<form-bean name="RegisterForm" type="app.RegisterForm"> </ form-bean>
</ form-beans>
<global-exceptions />
<global-forwards />
<action-mappings>
<action
attribute = "RegisterForm"
input = "/ Reg.jsp"
name = "RegisterForm"
; path = "/ reg"
scope = "request"
type = "app.RegisterAction"
validate = "false">
<forward name="success" path="/success.jsp" />
<forward name = "failure" path = "/ failure.jsp" />
</action>

</ action-mappings>
<message-resources parameter="com.yourcompany.struts.ApplicationResources" />
</ struts-config>


Sponsored Links

Domain and server ip had changed since 8/23/2013. Suspend the user registration and posts for program maintenance.