Two days ago, I saw someone had to compile an examination system. At that time, I simply went back and used the random function RND.
Generally, N questions need to be randomly extracted from the database.
BelowCodeAll are based on vbs;
This
1. Obtain the image address on the original page.
Function picstr (STR)
Set objregexp = new Regexp 'to set the configuration object
Objregexp. ignorecase = true' case insensitive
Objregexp. Global = true' is set to full-text search.
Objregexp.
1. General method for calling a stored procedure
Assume that there is a stored procedure dt_users in SQL Server:
Create procedure [DBO]. [dt_users]
As
Select * from users
Return
Go
The first method is to directly use the recordset object without
1. This is also the simplest method. Two input parameters have no return value:
Set connection = server. Createobject ("ADODB. Connection ")
Connection. Open somedsn
Connection. Execute "procname varvalue1, varvalue2"
'Clear all objects as
Each large ASP-Web Application
Program The design developers have the following experiences: ASP
Code Obfuscation with page HTML is difficult, and business logic and display methods are twisted, making the code hard to understand and modify.
SimpleSendMessage. javaImport java. util .*;Import javax. mail .*;Import javax. mail. internet .*;Import javax. activation .*;Public class SimpleSendMessage {Public static void main (String [] args ){// Collect the necessary information to send a
JSP-Hitcounter counts sessions.Copyright (C) 2000 Jesper Schmitz Mouridsen.Visit www. webappcabaret/jsm2/webapps. jsp? Find = jsphcs for more info.This program is free software; you can redistribute it and/or modify it under the terms of the GNU
Package coreservlets;Import java. io .*;Import javax. servlet .*;Import javax. servlet. http .*;Import java. util .*;/** Creates a table showing the current value of each* Of the standard CGI variables.* * Taken from Core Servlets and assumerver
JSP Bean Example // Write the current value of the property countOut. println ("Count from scriptlet code :"+ Counter. getCount () + " ");%>Count from jsp: getProperty:
Environment:Tomcat5.6Commmons-fileupload-1.3.jarCommmons-io-2.4.jarJSPCode: UTF-8Temporary Folder: fileupload/tmp is relative to the root directory of the website.Storage location of the uploaded file: fileuploadTraditional API upload Method //
I encountered a problem when I was working on the project recently. I added response. sendRedirect () and the system also executed it, but it just didn't jump. Finally, I found the reasons on the Internet:First, we need to understand how to use
1. Fill in the ArrayList object obtained in UserAction to UserForm, and obtain the initial value of UserForm on the jsp page.Some code of UserAction:Copy codeThe Code is as follows:Private ActionForward executeManageAction (ActionMapping mapping,
Package coreservlets;Import java. io .*;Import javax. servlet .*;Import javax. servlet. http .*;/** Sets six cookies: three that apply only to the current* Session (regardless of how long that session lasts)* And three that persist for an hour
10.1 session status overviewThe Stateless feature of HTTP brings about a series of problems. Especially when shopping through online stores, the server cannot remember the previous transactions smoothly, which becomes a serious problem. It makes it
HttpServletLet's first review the class structure diagram mentioned in the previous section:
As you can see, HttpServlet inherits GenericServlet, but it is also an abstract class. It cannot be used directly but can only be inherited.
HttpServlet has
(1) jsp display of images with Chinese file names Method 1: Change the server. xml file in Tomcat:Copy codeThe Code is as follows:MaxThreads = "150" minSpareThreads = "25" maxSpareThreads = "75"EnableLookups = "false" redirectPort = "8443"
If the page in jsp: include is garbled, you must add the Request. setCharacterEncoding ('utf-8 "); // or the specified encoding (GBK or other)%>As shown below:Copy codeThe Code is as follows:Jsp-include.jsp jsp include test page Request.
Paste the Code directly:First, the code of the index_test.jsp page is as follows:Copy codeThe Code is as follows:Request. setCharacterEncoding ("UTF-8 ");Response. setCharacterEncoding ("UTF-8 ");Response. setContentType ("text/html; charset = UTF-8
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service