我在带有Xampp发行版的Windows 7 Pro上安装了Apache服务器.Apache从XAMPP控制面板启动很好,但我希望能够从命令提示符控制它.当我尝试从命令提示符启动它时,我收到以下错误:
C:\>httpd -k start
[Fri Jun 14 13:21:59.055815 2013] [mpm_winnt:error] [pid 6344:tid 144] (OS 2)The system cannot find the file specified. : AH00436: No installed service named "Apache2.4".
我试图在httpd.conf中更改Listen端口.它没有改变任何东西.有线索吗?
谢谢.
我查阅了所有消息,但没有找到该问题的明确答案.
如何配置日志记录以记录CXF入站和出站的restful消息?
我有以下设置.
文件org.apache.cxf.Logger with
org.apache.cxf.common.logging.Log4jLogger
Run Code Online (Sandbox Code Playgroud)applicationContext.xml有以下内容(听起来很傻,但它是我可以获取消息输出的拦截器的唯一地方)
<bean id="abstractLoggingInterceptor" abstract="true">
<property name="prettyLogging" value="true"/>
</bean>
<bean id="loggingInInterceptor" class="org.apache.cxf.interceptor.LoggingInInterceptor"
parent="abstractLoggingInterceptor"/>
<bean id="loggingOutInterceptor" class="org.apache.cxf.interceptor.LoggingOutInterceptor"
parent="abstractLoggingInterceptor"/>
<cxf:bus>
<cxf:inInterceptors>
<ref bean="loggingInInterceptor"/>
</cxf:inInterceptors>
<cxf:outInterceptors>
<ref bean="loggingOutInterceptor"/>
</cxf:outInterceptors>
<cxf:outFaultInterceptors>
<ref bean="loggingOutInterceptor"/>
</cxf:outFaultInterceptors>
<cxf:inFaultInterceptors>
<ref bean="loggingInInterceptor"/>
</cxf:inFaultInterceptors>
</cxf:bus>
Run Code Online (Sandbox Code Playgroud)我试着用slf4j和log4j来遵循这些指令,但是我得到的唯一输出是应用程序日志消息.我可以在我的控制台上看到入站和出站邮件.
我是否可以获得类似于logback.xml的功能,因此我将应用程序日志和消息日志分开.示例:http://www.wolfe.id.au/2011/05/20/apache-cxf-logging/
谢谢.
编辑1: 我从我的类路径中删除了org.apache.cxf.common.logging.Log4jLogger,并将以下内容放到我的log4j.xml中.当日志记录级别等于INFO时,它将记录到文件和控制台.
<appender name="RSLOGFILE" class="org.apache.log4j.RollingFileAppender">
<param name="file" value="${project.basedir}/logs/cxf_inout_messages.log"/>
<param name="MaxFileSize" value="100KB"/>
<!-- Keep one backup file -->
<param name="MaxBackupIndex" value="1"/>
<layout class="org.apache.log4j.PatternLayout">
<!-- Print the date in ISO 8601 format -->
<param name="ConversionPattern" value="%d …Run Code Online (Sandbox Code Playgroud) 我要测试的页面有一个 span 元素,它实际上用作下拉选择菜单。“select”元素的 Selenium 代码不起作用并抛出以下内容:
Exception in thread "main" org.openqa.selenium.support.ui.UnexpectedTagNameException: Element should have been "select" but was "span"
Run Code Online (Sandbox Code Playgroud)
该元素的代码如下所示:
<span style="width: 100%" val="30" id="countVal">30</span>
Run Code Online (Sandbox Code Playgroud)
打开下拉菜单时的代码是:
<tr onclick="selectNewCount(1);" class="selec_option">
<td onmouseout="blankit(this)" onmouseover="colorit(this)" class="bones_pointer out_color" id="tdgroup1">50</td>
</tr>
Run Code Online (Sandbox Code Playgroud)
这就是它的样子:

编辑 1:
这是我的硒代码:
// choose number of records.
try {
WebDriverWait wait = new WebDriverWait(driver, /*seconds=*/10);
element = wait.until(presenceOfElementLocated(By.id("countVal")));
Select select = new Select(element);
select.deselectAll();
select.selectByVisibleText("100");
} catch (NoSuchElementException ex) {
System.out.println("PAGE SOURCE: \n" + driver.getPageSource());
ex.printStackTrace();
}
Run Code Online (Sandbox Code Playgroud)
这是页面源代码如何查看此元素:

如果需要,我可以添加更多详细信息。谢谢。
我正在使用这个插件。
我的应用程序通过 ajax 调用提交签名。在成功返回 ajax 时,我想禁用用户的任何签名更改。我尝试的最后一件事是以下内容,但签名板仍然处于活动状态并绘制线条(听众不会分离):
function showResponse(itemJson, statusText, xhr, $form) {
if (itemJson.status == 'success') {
debugger;
$($form.find('.clearButton')).remove();
$($form.find('button')).remove();
$form.find('input').attr('readonly', 'readonly');
var api = $form.signaturePad();
var sig = api.getSignatureString();
api.updateOptions({displayOnly: true})
// $form.signaturePad({displayOnly: true}).regenerate(sig);
}
}
Run Code Online (Sandbox Code Playgroud)
有谁知道如何更新现有的signaturePad,使其变为禁用模式?
我正在尝试获取冒号之后的文本行部分。例如从这段文字
previous usc contact name:*assistant director of field education*
agency name:*development corporation
Run Code Online (Sandbox Code Playgroud)
我想得到以下内容:
assistant director of field education
1010 development corporation
Run Code Online (Sandbox Code Playgroud)
我尝试了以下正则表达式
.*:\*?(.*)\**$
Run Code Online (Sandbox Code Playgroud)
它不起作用。现在正在工作的是:
.*:\*?(.*)\*
Run Code Online (Sandbox Code Playgroud)
我不明白为什么它在没有星号的第二行工作,而正则表达式需要星号。我不明白为什么第一个正则表达式不能正常工作。
谢谢。
我是Spring的新手,看看如何解决以下编译失败.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project core: Compilation failure: Compilation failure:
[ERROR] /Users/vraskin/projects/moblab_src/src/main/java/com/moblab/webapp/listener/UserCounterListener.java:[9,47] cannot find symbol
[ERROR] symbol : class HttpSessionContextIntegrationFilter
[ERROR] location: package org.springframework.security.web.context
[ERROR]
[ERROR] /Users/vraskin/projects/moblab_src/src/main/java/com/moblab/webapp/listener/UserCounterListener.java:[41,43] cannot find symbol
[ERROR] symbol : variable HttpSessionContextIntegrationFilter
[ERROR] location: class com.moblab.webapp.listener.UserCounterListener
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project core: Compilation failure
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions(MojoExecutor.java:365)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:199)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) …Run Code Online (Sandbox Code Playgroud) 我是maven的新手,无法弄明白.
我在我的pom.xml文件中有插件的这个配置,但看起来mvn不使用我的配置.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.3.1</version>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<packaging>jar</packaging>
<artifactId>${project.artifactId}</artifactId>
<groupId>${project.groupId}</groupId>
<version>${project.version}</version>
<file>
${project.build.directory}/${project.artifactId}-${project.version}.jar
</file>
</configuration>
</execution>
</executions>
</plugin>
Run Code Online (Sandbox Code Playgroud)
当我注释掉这个插件时,我收到同样的错误.博客上有一些旧的讨论,认为maven忽略了执行中的配置.它还是个问题吗?我怎样才能让maven读取我的插件声明而不是别的?当我的依赖项被注释掉时它会运行什么?
错误
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install- plugin:2.3.1:install-file (default-cli) on project core: The parameters 'file' for goal org.apache.maven.plugins:maven-install-plugin:2.3.1:install-file are missing or invalid -> [Help 1]
Run Code Online (Sandbox Code Playgroud) 我正在尝试为我的Zend项目设置模块结构,这是我得到的错误.我不明白为什么Renderer在寻找这条路径"在线现场评估/在线现场评估/索引".Zend中的Camel表示法有问题吗?谢谢.
Zend\View\Exception\RuntimeException
File:
C:\dev\xampp\htdocs\OnlineFieldEvaluation\vendor\zendframework\zendframework\library\Zend\View\Renderer\PhpRenderer.php:499
Message:
Zend\View\Renderer\PhpRenderer::render: Unable to render template "online-field-evaluation/online-field-evaluation/index"; resolver could not resolve to a file
Stack trace:
#0 C:\dev\xampp\htdocs\OnlineFieldEvaluation\vendor\zendframework\zendframework\library\Zend\View\View.php(205): Zend\View\Renderer\PhpRenderer->render(Object(Zend\View\Model\ViewModel))
#1 C:\dev\xampp\htdocs\OnlineFieldEvaluation\vendor\zendframework\zendframework\library\Zend\View\View.php(233): Zend\View\View->render(Object(Zend\View\Model\ViewModel))
#2 C:\dev\xampp\htdocs\OnlineFieldEvaluation\vendor\zendframework\zendframework\library\Zend\View\View.php(198): Zend\View\View->renderChildren(Object(Zend\View\Model\ViewModel))
#3 C:\dev\xampp\htdocs\OnlineFieldEvaluation\vendor\zendframework\zendframework\library\Zend\Mvc\View\Http\DefaultRenderingStrategy.php(102): Zend\View\View->render(Object(Zend\View\Model\ViewModel))
#4 [internal function]: Zend\Mvc\View\Http\DefaultRenderingStrategy->render(Object(Zend\Mvc\MvcEvent))
#5 C:\dev\xampp\htdocs\OnlineFieldEvaluation\vendor\zendframework\zendframework\library\Zend\EventManager\EventManager.php(471): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#6 C:\dev\xampp\htdocs\OnlineFieldEvaluation\vendor\zendframework\zendframework\library\Zend\EventManager\EventManager.php(207): Zend\EventManager\EventManager->triggerListeners('render', Object(Zend\Mvc\MvcEvent), Array)
#7 C:\dev\xampp\htdocs\OnlineFieldEvaluation\vendor\zendframework\zendframework\library\Zend\Mvc\Application.php(347): Zend\EventManager\EventManager->trigger('render', Object(Zend\Mvc\MvcEvent))
#8 C:\dev\xampp\htdocs\OnlineFieldEvaluation\vendor\zendframework\zendframework\library\Zend\Mvc\Application.php(322): Zend\Mvc\Application->completeRequest(Object(Zend\Mvc\MvcEvent))
#9 C:\dev\xampp\htdocs\OnlineFieldEvaluation\public\index.php(25): Zend\Mvc\Application->run()
#10 {main}
Run Code Online (Sandbox Code Playgroud)
这是我的module.config.php:
<?php
return array(
'controllers' => array(
'invokables' => array(
'OnlineFieldEvaluation\Controller\OnlineFieldEvaluation' => 'OnlineFieldEvaluation\Controller\OnlineFieldEvaluationController',
),
),
// The following section is new …Run Code Online (Sandbox Code Playgroud)