javabean向传jsp传值
struts-config:
<action path="/articleManage" name="articleManageForm" scope="request" type="auction.action.ArticleManageAction" validate="false">
<forward name="atriclesList" path="/WEB-INF/publish/articleManage/atriclesList.jsp"/>
<forward name="registerGood" path="/WEB-INF/publish/articleManage/registerGood.jsp"/>
</action>
Action:
ArticleManageForm theForm = new ArticleManageForm ();
theForm = theOperation.getInfo(request.getParameter("noId"));
request.setAttribute("articleManageForm", theForm);
1、配置的bean的名称要和struts-config中的一样
2、在bean中写一个方法,将取出的数据放到相应的bean的变量中
相关文档:
JSP基本语法与定义
先来看一段简单的小程序:
程序:
1.jsp
<html>
<head>
<title>example</title>
</head>
1
<%@ page language=”java” %>
2
<%@ page
contentType=”text/html,charset=”GB2312””>
3
......
这是一个用户注册的页面,部分代码(没有错误)已略,可是不能实现form的action跳转
checkform()里明明有document.form.submit(),就是不能跳转,
能帮我看下问题出在哪吗?
这是照着书上的例子写的,注册和重置动都作是通过图片来处理的。
请不吝赐教,在下不胜感激。。。
<%@ page contentType="te ......
try {
URL url = new URL("http://www.163.com");
InputStream is = url.openStream();
byte[] buffer = new byte[1024];
  ......
一、
问:org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "192.168.254.103", user "postgres",database "postgres", SSL off
答:PostgreSQ数据库为了安全,它不会监听除本地以外的所有连接请求,当用户通过JDBC访问是,就会报一些以上的异常。要解决这个问题 ......