Plug a specific value into the hidden field to pass back to the table
/**
*フォームにデータをセットする.
* @param form_noデータをセットするpropertyのform name またはformのインデックス
* @param propertyデータをセットするオブジェクト Name
* @param value propertyにセットする
*/
function Setformdata
2012.09.10 02:52 Update: Here is a more troublesome example, is that they have just learned to write struts2, using the Modeldriven interface, interested can download a reference.
Download Address: http://download.csdn.net/detail/kaulctin/4559588
---
Way1: Embed Java code inside
The JSP page embeds the following code:
Test Cases:
Way2: via El expression
An explanation of the syntax for El expressions see: http://blog.csdn.net/qwerasdf123/article/details/4189889
Add the following code
Some time ago in the use of Struts2, more is considered by the JSP get action stored in the session or request key.
Such as:
Public String getinfbysal () {
Connection con = oracleconnectionmanager.getconnection ();
Userdao Userdao = new Userdao ();
1, the browser to the action pass parameters:
set the property in action and set the Get/set method for the property. Assign a value by the name of the property when passing the parameter. such as Xxx?name=aa
value with Request.getprameters
File uploads need to use the Cos.jar package. File upload the Display page index.jsp file is as follows:
File upload
The form must be submitted using post, and the phrase "Multipart/form-data" must be written
Example of an IFRAME usage in a JSP page:
First, add the following code where you want to include another page in the JSP page:
Then add the function in JavaScript, such as:
function Shezhi (Detail_code,detail_name,detail_fenzhi)
Calendarbean.java
Package Red.star; Import java.util.*; public class Calendarbean {String calendar = null, int year = 1,month =-1; public void setyear (int year) {this.year = y Ear public int getyear () {return year;} public void setmonth (int
There are two ways of passing the argumentOne, get way:In this way, the parameters are written in the URL, for example, if the target argument page is target.jsp, then it can be written in the URL:Http://..../target.jsp? = & = ....Multiple
Basic">
Basic is the configuration in the Fckconfig.js in the Fckeditor.jar package, you can select Basic (Slim) or defaul (all works).
Put the value from the data to the FCK in the foreground page and modify it to write
${theme.themename}"/>
This format control and editing coordination FCKeditor is used, is perfect, fckeditor use in my other posts have a simple introduction.
When you read data from a textarea, and then read the data from the database, the simplest way to control how it
The Java Web project was deployed to Tomcat and a org.apache.jasper.JasperException:java.lang.NullPointerException error occurred while starting the Tomcat open JSP page. This is because some of the packages loaded in build path in the project are
Serial numberVenue nameStart timeEnd timeApplication Status "id=" " style=: Center ">/conference_room_view.action?room_id=&optype=2 '; " >
Explain it, the future of the province will not remember when you see it.
The key is the Red section, which
characteristic
struts1.x
Struts2
Action class
struts1.x requires the action class to be extended from an abstract base class. A common problem with struts1.x is programming for abstract classes rather than interface-oriented
Tomcat has been in use for more than a year, has not been carefully studied its default page how to come out, today boring research a bit. At first, it was thought that Tomcat's starting file was index.jsp in the root directory, but when I deleted
The effect of this example is that the selected value will pop up when any one of the radio boxes is chosen, and then jump to others.do;When you do not select any of the radio boxes only pop-up prompts, do not jump, but stay on this page.
Left
A simple reflection method in one of its own JSP was used to display the property method constructor of a class, as follows:
void Reflectapi (Javax.servlet.jsp.JspWriter out,string className) throws exception{Class Cls=class.forname
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.