- Lt; a href = "download / doc / test. Doc" target = "_blank"-gt Why do as long as it is unable to find documents on the Chinese?
Abstract: Why do as long as it is unable to find documents on the Chinese?
Gangchachu jsp Which know why?
How to resolve? (Requirement is necessary to use a Chinese document)
..
Changed to slightly
Or not, the two links are:
…… System / download% 2Fdoc% 2F% BC% AF% D6% D0% C4% A3% CA BDWEB%%%% EA CF CF% B8% C9% E8% BC% C6% B9% E6% B8% F1% CA% E9.doc "
…… System / download / doc / AF% BC%% D6% D0% C4% A3% CA BDWEB%%%% EA CF CF% B8% C9% E8% BC% C6% B9% E6% B8%% F1 CA % E9.doc
Tried to like or not
I suggest you direct the revision tomcat server.xml asked him to support Chinese url can!
MaxThreads = "150" minSpareThreads = "25" maxSpareThreads = "75"
EnableLookups = "false" redirectPort = "8443" acceptCount = "100"
ConnectionTimeout = "20000" disableUploadTimeout = "true" />
You is this, and at the end of URIEncoding = "gb2312" can be a
Try it
IE, to remove always sent URL UTF-8
I have come to learn, I have encountered this problem, the file name into the English
I said above, if you are not used to gb2312 into your code can be used in the
Tried not to.
System / download / doc / AF% BC%% D6% D0% C4% A3% CA BDWEB%%%% EA CF CF% B8% C9% E8% BC% C6% B9% E6% B8% F1% CA% E9 . doc
Receiving servlet in writing, request.setCharacterEncoding ( "GBK");
To the code, is not professional. Also Chinese
Not the best Chinese! This contains key meaning, in the proceedings best use of the English language, it will not only reduce trouble, but, more importantly, is manageable.
This feature is automatically read download / doc / directory of all documents available for downloading.
<% @ Page contentType = "text / html; charset = GBK" import = "java.io. *"%>
<%
Request.setCharacterEncoding ( "GBK");
%>
In the document have.
Mark
And so there are good answers
The page is set to try UTF-8
I get lz
————————-
MaxThreads = "150" minSpareThreads = "25" maxSpareThreads = "75"
EnableLookups = "false" redirectPort = "8443" acceptCount = "100"
ConnectionTimeout = "20000" disableUploadTimeout = "true" />
———————-
Increase at the end of URIEncoding = "UTF-8"
—————-
I have held on to
I own the machines add a tomcat URIEncoding = "UTF-8"
It can certainly, but our server using the AppServer, that thing who knows where to add?
Character encoding problem
↑ Back
Connection pool connect the largest number of the minimum number of connections how to set up each number can be increased so that the most efficient connection pool?
Abstract: In connection pool connect the largest number of the minimum number of connections how to set up each number can be increased so that the most efficient connection pool?
Tomcat5.5
Connection Pool: c3p0
Database oracle9i
MaxPoolSize = "100"
MinPoolSize = "1"
AcquireIncrement = "2"
How these three parameters can be set up to run the most efficient system? Is there any rough calculation methods, such as the number of connected cases, they were set to?
Also need to install or other parameters of what? Below is the configuration I
Description = "DB Connection"
DriverClass = "oracle.jdbc.driver.OracleDriver"
MaxPoolSize = "100"
MinPoolSize = "1"
AcquireIncrement = "2"
Name = "jdbc/oracle9"
User = "test"
Password = "test"
Factory = "org.apache.naming.factory.BeanFactory"
Type = "com.mchange.v2.c3p0.ComboPooledDataSource"
JdbcUrl = "jdbc: oracle: thin: @ 192.168.1.2:1521: ora9i" />
That depends on what you use, such as weblogic, generally speaking we have to many app, and each is different app DataSource link to a different logic DataBase, the general 1-30,000 users, 10 Suffice it to a few of the links. whole if a mainframe links to more than 100 the number of words should consider clustering or load balancing.
If your host only one application, you only visit a DataBase, not more than 30, because although multiple physical links link in the application logic can be more opportunities, but to protect the physical link for more resources , if the overall situation into consideration, around 30 best
Do you mean 30 is the highest, then the minimum number of appropriate? How to calculate? AcquireIncrement set number of the best?
Do you mean 30 is the highest, then the minimum number of appropriate? How to calculate? AcquireIncrement set number of the best?
↑ Back
Jump deal with the results location.herf
Abstract: Results handling location.herf Jump
Jump Pages in javaScript
Location.herf = "****"
If the request less than a page, no way know the result, because I think if the request not to return to this page on a default page.
Thank you, please help.
To realize what?
Server set up 404 error handling code pages
I created a button, and click to download to a file, if the document is not available, will return to another cgi procedures. But when no document at 404 and there is no opportunity to judge? ? ?
Function createHttpRequest () (
Var httpRequest;
If (typeof XMLHttpRequest! = 'Undefined') (
HttpRequest = new XMLHttpRequest ();
) Else if (typeof ActiveXObject! = 'Undefined') (
HttpRequest = new ActiveXObject ( 'Microsoft.XMLHTTP');
)
Return httpRequest;
)
Function btnclick () (
Var httpRequest = createHttpRequest ();
If (httpRequest) (
HttpRequest.open ( 'GET', "****", false);
HttpRequest.send (null);
If (httpRequest.status == 404) (
Alert ( "error");
Else ()
Navigate ("****");
)
)
)
Niu Niu not!
This method compatibility is good, I need to corresponding sofari and firefox and IE.
In web.xml, can be set Jump 404 pages.
Tomcat installation directory in the conf / web.xml final Before joining
Yes, I tried, is really a thank you.
↑ Back
Action problem
Abstract: Action problem
Config / WEB-INF/struts-config.xml Debug 2 Detail 2
Using CATALINA_BASE: D: / Tomcat 5.5
Using CATALINA_HOME: D: / Tomcat 5.5
Using CATALINA_TMPDIR: D: / Tomcat 5.5/temp
. . . . . Slightly information: XML validation disabled
2006-7-7 9:28:27 org.apache.catalina.core.ApplicationContext log
Information: Marking servlet action as unavailable
2006-7-7 9:28:27 org.apache.catalina.core.ApplicationContext log
Serious: Error loading WebappClassLoader
Delegate: false
Repositories:
/ WEB-INF/classes /
——– Parent Classloader:
Org.apache.catalina.loader.StandardClassLoader @ fd68b1
Org.apache.struts.action.ActionServlet
Java.lang.ClassNotFoundException: org.apache.struts.action.ActionServlet
At org.apache.catalina.loader.WebappClassLoader.loadClass (WebappClassLoader.java: 1352)
At org.apache.catalina.loader.WebappClassLoader.loadClass (WebappClassLoader.java: 1198)
At org.apache.catalina.core.StandardWrapper.loadServlet (StandardWrapper.java: 1034)
At org.apache.catalina.core.StandardWrapper.load (StandardWrapper.java: 932)
At org.apache.catalina.core.StandardContext.loadOnStartup (StandardContext.java: 3917)
At org.apache.catalina.core.StandardContext.start (StandardContext.java: 4201)
At org.apache.catalina.core.ContainerBase.addChildInternal (ContainerBase.java: 759)
At org.apache.catalina.core.ContainerBase.addChild (ContainerBase.java: 739)
At org.apache.catalina.core.StandardHost.addChild (StandardHost.java: 524)
At org.apache.catalina.startup.HostConfig.deployDescriptor (HostConfig.java: 608)
At org.apache.catalina.startup.HostConfig.deployDescriptors (HostConfig.java: 535)
At org.apache.catalina.startup.HostConfig.deployApps (HostConfig.java: 470)
At org.apache.catalina.startup.HostConfig.start (HostConfig.java: 1122)
At org.apache.catalina.startup.HostConfig.lifecycleEvent (HostConfig.java: 310)
At org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent (LifecycleSupport.java: 119)
At org.apache.catalina.core.ContainerBase.start (ContainerBase.java: 1021)
At org.apache.catalina.core.StandardHost.start (StandardHost.java: 718)
At org.apache.catalina.core.ContainerBase.start (ContainerBase.java: 1013)
At org.apache.catalina.core.StandardEngine.start (StandardEngine.java: 442)
At org.apache.catalina.core.StandardService.start (StandardService.java: 450)
At org.apache.catalina.core.StandardServer.start (StandardServer.java: 709)
At org.apache.catalina.startup.Catalina.start (Catalina.java: 551)
At sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
At sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java: 39)
At sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java: 25)
At java.lang.reflect.Method.invoke (Method.java: 585)
At org.apache.catalina.startup.Bootstrap.start (Bootstrap.java: 294)
At org.apache.catalina.startup.Bootstrap.main (Bootstrap.java: 432)
2006-7-7 9:28:27 org.apache.catalina.core.StandardContext loadOnStartup
Serious: Servlet / JspExamples threw load () exception
Java.lang.ClassNotFoundException: org.apache.struts.action.ActionServlet
At org.apache.catalina.loader.WebappClassLoader.loadClass (WebappClassLoader.java: 1352)
At org.apache.catalina.loader.WebappClassLoader.loadClass (WebappClassLoader.java: 1198)
At org.apache.catalina.core.StandardWrapper.loadServlet (StandardWrapper.java: 1034)
At org.apache.catalina.core.StandardWrapper.load (StandardWrapper.java: 932)
At org.apache.catalina.core.StandardContext.loadOnStartup (StandardContext.java: 3917)
At org.apache.catalina.core.StandardContext.start (StandardContext.java: 4201)
At org.apache.catalina.core.ContainerBase.addChildInternal (ContainerBase.java: 759)
At org.apache.catalina.core.ContainerBase.addChild (ContainerBase.java: 739)
At org.apache.catalina.core.StandardHost.addChild (StandardHost.java: 524)
At org.apache.catalina.startup.HostConfig.deployDescriptor (HostConfig.java: 608)
At org.apache.catalina.startup.HostConfig.deployDescriptors (HostConfig.java: 535)
At org.apache.catalina.startup.HostConfig.deployApps (HostConfig.java: 470)
At org.apache.catalina.startup.HostConfig.start (HostConfig.java: 1122)
At org.apache.catalina.startup.HostConfig.lifecycleEvent (HostConfig.java: 310)
At org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent (LifecycleSupport.java: 119)
At org.apache.catalina.core.ContainerBase.start (ContainerBase.java: 1021)
At org.apache.catalina.core.StandardHost.start (StandardHost.java: 718)
At org.apache.catalina.core.ContainerBase.start (ContainerBase.java: 1013)
At org.apache.catalina.core.StandardEngine.start (StandardEngine.java: 442)
At org.apache.catalina.core.StandardService.start (StandardService.java: 450)
At org.apache.catalina.core.StandardServer.start (StandardServer.java: 709)
At org.apache.catalina.startup.Catalina.start (Catalina.java: 551)
At sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
At sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java: 39)
At sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java: 25)
At java.lang.reflect.Method.invoke (Method.java: 585)
At org.apache.catalina.startup.Bootstrap.start (Bootstrap.java: 294)
At org.apache.catalina.startup.Bootstrap.main (Bootstrap.java: 432)
2006-7-7 9:28:29 org.apache.catalina.core.ApplicationContext log
Information: org.apache.webapp.balancer.BalancerFilter: init (): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com] [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL:
. . . Slightly
2006-7-7 9:28:32 org.apache.catalina.storeconfig.StoreLoader load
Information: Find registry server-registry.xml at classpath resource
2006-7-7 9:28:32 org.apache.catalina.startup.Catalina start
Information: Server startup in 9593 ms
When Tomcat will be activated when the error probably means that the various types of action that is not found, the problem is here, I am sure that the package is in struts.jar web-inf/lib, it is the latest from the Internet, But why is it that it can not find the course tomcat visit after the commencement of the project is that the visit can not, the following is my web.xml, you help me look at Afghanistan, a troubled few days ~ ~
<? Xml version = "1.0" encoding = "UTF-8">
30
2006-07-05 22:31 358,273 antlr.jar
2006-07-05 22:31 188671 commons-beanutils.jar
2006-07-05 22:31 107617 commons-dbcp-1.2.jar
2006-07-05 22:31 168446 commons-digester.jar
2006-07-05 22:31 22,379 commons-fileupload.jar
2006-07-05 22:31 38,015 commons-logging.jar
2006-07-05 22:31 62,103 commons-pool-1.3.jar
2006-07-05 22:31 84,462 commons-validator.jar
2006-07-05 22:31 65,425 jakarta-oro.jar
2006-07-05 22:31 6727 jdbc2_0-stdext.jar
2006-07-05 22:31 358180 log4j-1.2.13.jar
2006-07-05 22:31 124197 oscache-2.3.1.jar
2006-07-05 22:31 10,518 struts-legacy.jar
2006-07-05 22:31 543,706 struts.jar
All these documents are? I put these documents, no problem
I just let that struts with eight jar
<? Xml version = "1.0" encoding = "UTF-8">
Empty first configuration files, Kai can try to, and then added to the configuration a try
Also do not see any problem.
Struts.jar inside look at whether it is really
Org.apache.struts.action.ActionServlet this class?
↑ Back
Jsp how to upload files from client to server?
Abstract: jsp how to upload files from client to server?
Will the jsp, how to upload files from client to server, is available ftp, how to achieve?
Fileupload
SmartUpload
There are no examples of grammar
To
Http://www.jspcn.net/htmlnews/20050115.html
Inside very detailed
I have good examples. E-mail to me.
SMARTUPLOAD. And fileupload
I have used. . But are the only normal-txt file.
Do not know what causes
I tank cuea@163.com
Incidentally give me a
To: Cuealive ()
Letter has been sent, please check
Also a bar to the occasional xsyang@longtop.com Thank you……
Dog2Cat very grateful, it has also given me a urgent need. Thank you also landlord.
To: best_threewood (Do it!)
Please leave-mail
To: umbrella_yxs ()
Letter has been sent, please check
Yan_anny@163.com can upload jpg files?
Fileupload
Sunshine413332087@yahoo.com
Thank you
SmartUpload is a good upload components
My mailbox is: mylike1410@sina.com me to a bar, please
↑ Back
Jsp connect oracle 9i there do not know how to solve the problems.
Abstract: jsp connect oracle 9i there do not know how to solve the problems.
Jsp oracle unsuccessful connections to ask how do:
<head>
<% @ Page language = "java" contentType = "text / html; GBK charset ="%>
<% @ Page import = "java.sql .*"%>
</ Head>
<body>
<%
Class.forName ( "oracle.jdbc.driver.OracleDriver"). NewInstance (); ** ** Note here the problem
String url = "jdbc: oracle: thin: @ PC113: 1521: LGTDB" / / database is not in the plane
File: LGTDB;
String user = "system";
String password = "sys123";
Connection conn = DriverManager.getConnection (url, user, password);
Statement stmt = conn.createStatement (ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
String sql = "select * from CTXSYS.MYTEST";
ResultSet rs = stmt.executeQuery (sql);
While (rs.next ())
(
%>
<% = Rs.getString (1)%>
<%
)
%>
<% Out.print ( "database operations successful, congratulate you ");%>
<%
Rs.close ();
Stmt.close ();
Conn.close ();
%>
</ Body>
An error occurred at line: 31 in the jsp file: / index.jsp
Generated servlet error:
D: / Apache / Tomcat / work / Catalina / localhost / myapp / org / apache / jsp / index_jsp.java: 80: It is not a statement
File: LGTDB;
^
A mistake
Org.apache.jasper.compiler.DefaultErrorHandler.javacError (DefaultErrorHandler.java: 84)
Org.apache.jasper.compiler.ErrorDispatcher.javacError (ErrorDispatcher.java: 332)
Org.apache.jasper.compiler.Compiler.generateClass (Compiler.java: 437)
Org.apache.jasper.compiler.Compiler.compile (Compiler.java: 497)
Org.apache.jasper.compiler.Compiler.compile (Compiler.java: 476)
Org.apache.jasper.compiler.Compiler.compile (Compiler.java: 464)
Org.apache.jasper.JspCompilationContext.compile (JspCompilationContext.java: 511)
Org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java: 295)
Org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java: 292)
Org.apache.jasper.servlet.JspServlet.service (JspServlet.java: 236)
Javax.servlet.http.HttpServlet.service (HttpServlet.java: 802)
Ask ……
I have already put classes12.jar respectively:
D: / java / jdk / lib, D: / Apache / Tomcat / webapps / myapp / WEB-INF / lib, D: / Apache / Tomcat / common / lib Below to ask how successful can be done!
A distress call
The problem has been resolved to personal access points.
Class.forName ( "oracle.jdbc.driver.OracleDriver"). NewInstance ();
String url = "jdbc: oracle: thin: @ PC113: 1521: LGTDB";
String user = "system";
String password = "sys123";
Connection conn = DriverManager.getConnection (url, user, password);
Statement stmt = conn.createStatement (ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
String sql = "select * from MYTEST";
ResultSet rs = stmt.executeQuery (sql);
While (rs.next ())
(
%>
<% = Rs.getString (2)%>
<%
)
%>
<% Out.print ( "database operations successful, congratulate you ");%>
<%
Rs.close ();
Stmt.close ();
Conn.close ();
%>
Access to the top
↑ Back
Ask STRUTS problems.
Abstract: Ask STRUTS problems.
I need to check with registered user name is already in existence, submitted to the checkName.do later, the action in the return of the original pages of the text box can not retain the original value (emptied) I would like to ask how can retain, before the original value, I would like to thank the.
Will be scope = "session" can be a
In your FORM reset method, if not set in the corresponding content is empty, it should be preserved
I did not in the reset method, "scope =" session "can" This can be said of the elaborate Thank you
Scope = "session" is in line with your FORMBEAN used in the submission of pages if you use BEAN to submit data, then return to this page can be BEAN, before the data submitted.
Agree upstairs
Struts-config.xml configuration scope of corresponding action on the request = configuration formbean
<form-bean Name="checkNameForm" type="checkNameForm"/>
Also, your page must use Struts tags checkNameForm in writing and must be userName attribute such as username
Agree upstairs
This is the state of preservation of the screen, different ways to handle the different framework, I do so in the framework of the screen information is stored in session, the screen recovery, the session information given to the screen, different different framework, but not generalize
Mark!
↑ Back
Link sqlserver2000 error, depressed ah
Abstract: Connecting sqlserver2000 error, depressed ah
Java.sql.SQLException: [Microsoft] [SQLServer 2000 Driver for JDBC] Error establishing socket
This is what ah? I downloaded several drives will not work.
Con = DriverManager.getConnection (
"Jdbc: microsoft: sqlserver: / / localhost: 1433; DatabaseName = master."
"Sa", "sa)
This sentence error
SQL did not set a meeting?
Sqlserver sp4 a patch of good. To Microsoft's Web site under the above.
Try to first go through the bridge, and can even see on.
Patching
Port and see if it is 1433
Re jobs002 (Oh! Office)
Port is 1433
Q: gks_cn (981,530). . .
That is not what jdbc drive? Driver version does not require?
A fire wall? Should turn off the firewall
Error establishing socket
Port problems
I have encountered this situation, it should be sqlserver 2000 is not a sp4 upgrade, you download an update for downloading and decompression, the directory is a batch file, it will run the
↑ Back
Jsp pages on the "include" the issue of servlet
Abstract: jsp pages on the "include" the issue of servlet
We all know that jsp pages can contain (include) jsp pages, which is dynamic contain come.
But how in the jsp page contains servlet, it is because servlet jsp pages ah, I was a beginner, ask for advice! !
Servlet not JSP pages, is a category JAVA
But how in the jsp page contains servlet, it is because servlet jsp pages ah
You contain a request, then returned to the pages of a servlet
It will not, the fact is a servlet jsp pages, all jsp pages also compiled into the final servlet ah
Your concept of a problem.
Jsp means: html included in the so called jsp with java, and not "in the jsp page contains servlet"
Servlet means: the java contains html
↑ Back
Primary key index and what is the difference between?
Abstract: The primary key index and what is the difference between?
Rt
Of course there are differences, and if the list if in a building of indexing, we will have an index page. If it is listed in accordance with this inquiry will be to find the index page, the speed of enquiries can be expedited.
Primary key is the only, in a building on the primary key field, the value of this field can not be in all the duplication of records, as identity card numbers, and will be built after the primary key index.
Index, in order to speed up the pace to establish View, the only non-indexed and the only sub-index, the only index and the bond almost.
Agree with freey (grass on the fly)
↑ Back