刚学shh2,页面老是显示的样式不正确,各位大侠们帮帮我吧!!55555555~

谁的大王 2012-08-21 11:16:30

我的struts2.xml中配置了struts.ui.theme的属性:
<struts>
<constant name="struts.ui.theme" value="simple" />
<constant name="struts.i18n.encoding" value="UTF-8" />
<constant name="struts.action.extension" value="do" />
<constant name="struts.serve.static.browserCache" value="false" />
<constant name="struts.objectFactory" value="org.apache.struts2.spring.StrutsSpringObjectFactory" />
<package name="student" namespace="/student"
extends="struts-default">
<action name="std_*" class="StdAction" method="{1}">
<result name="add">/pages/list.jsp</result>
<result name="list">/pages/list.jsp</result>
</action>
</package>
</struts>

我的jsp中:
<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>添加页面</title>
</head>
<body>
<s:form action="/student/std_add.do">
姓 名:<s:textfield id="name"/><br>
性 别:<s:textfield id="gender"/><br>
入学日期:<s:textfield id="startDate"/><br>
<input type="submit" value="提交">
</s:form>
</body>
</html>


求教各位侠客们,我的是什么原因??? ~~~~(>_<)~~~~ 555
...全文
138 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
拭旧 2012-08-22
  • 打赏
  • 举报
回复
不要用struts 的主题
谁的大王 2012-08-22
  • 打赏
  • 举报
回复
求姐脱~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!!!!!!!!!!!!!!!!!!!!!!!!
谁的大王 2012-08-22
  • 打赏
  • 举报
回复
一楼说的方法试了不管用,二楼的是神马意思呢(⊙o⊙)?非得通过对象引用吗?
各位大侠们帮帮忙啊!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
五哥 2012-08-22
  • 打赏
  • 举报
回复
<s:textfield name="user.username" label="用户名" />

<s:form action="/student/std_add.do">
<s:textfield id="name" label="姓 名" />
<s:textfield id="gender" label="性 别" />
<s:textfield id="startDate"label="入学日期" />
<input type="submit" value="提交">
</s:form>

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧