cms是开源的框架

源代码在线查看: step_4a_database_validation.jsp

软件大小: 19376 K
上传用户: jjingle
关键词: cms 开源
下载地址: 免注册下载 普通下载 VIP

相关代码

								--%>				--%>				
					// next page 
					String nextPage = "step_5_database_creation.jsp";	
					// previous page 
					String prevPage = "step_3_database_selection.jsp";
				
					CmsSetupDb db = null;
					boolean enableContinue = false;
					String chkVars = null;
					List conErrors = null;
				
					if (Bean.isInitialized()) {
						db = new CmsSetupDb(Bean.getWebAppRfsPath());
						db.setConnection(Bean.getDbDriver(), Bean.getDbWorkConStr(), Bean.getDbConStrParams(), Bean.getDbWorkUser(),Bean.getDbWorkPwd());
						if (!db.noErrors()) {
							db.clearErrors();
							db.setConnection(Bean.getDbDriver(), Bean.getDbCreateConStr(), Bean.getDbConStrParams(), Bean.getDbCreateUser(), Bean.getDbCreatePwd());
						}
						conErrors = new ArrayList(db.getErrors());
						db.clearErrors();
						enableContinue = conErrors.isEmpty();
						chkVars = db.checkVariables(Bean.getDatabase());
						if (enableContinue && db.noErrors() && chkVars == null && Bean.validateJdbc()) {
							response.sendRedirect(nextPage);
							return;
						}
					}
				
				%>
				Alkacon OpenCms Setup Wizard
				
				
				
				
				Alkacon OpenCms Setup Wizard - Validate database connection
				
				
				
				
				
					
																	if (!enableContinue) {
										%>
										
										
											
												
												  
												It was not possible to create a database connection with the given parameters.
													Please check the Exception below. There can be two reasons for this error:
													
													  Your database is down, or
													  Your database is not accessible with the given connection parameters.
													
													Be also aware that Alkacon recommends to use the
													following JDBC drivers for :
													
													Check that the Jdbc drivers are included in your class path.
												
											
											
												  
												
													
																										for (int i = 0; i < conErrors.size(); i++)	{
														out.println(conErrors.get(i) + "");
														out.println("-------------------------------------------" + "");
													}
											 		%>
													
												
															
										
										
																			} else {
										if (!Bean.validateJdbc()) {
											%>
											
											
												
													
													  
													Be aware that Alkacon recommends to use the
														following JDBC drivers for :
														
														But these drivers are not located in folder 
														If you are using a different driver or if you added the driver in another way 
														   to the classpath, you may continue to try it out. If not, be sure to get the 
														   drivers and restart your servlet container before you continue.
													
												
											
											
																					}					
										if (!db.noErrors() || chkVars != null)	{ %>
											
																					    boolean isError = !db.noErrors();
											enableContinue = enableContinue && !isError;
											if (chkVars != null) {%>
												
													
													  
													
																							}
											if (!db.noErrors()) {%>
												
													
													  
													
														
														Error while checking the server configuration!
																												out.println("-------------------------------------------" + "");
														Vector errors = db.getErrors();
														for (int i = 0; i < errors.size(); i++)	{
															out.println(errors.elementAt(i) + "");
														}
														db.clearErrors();
														%>
														
													
																							}%>
											
											
																					}
									}
								%>
				
					
				
				
				
				
				
				
				
				
				
									out.println("\ndocument.getElementById(\"btcontinue\").disabled = false;\n");
				} %>
				
				
				
				
				
				
							

相关资源