我试图改变对话框的默认宽度,但它不是working.I尝试中提到的解决方案这个职位.这是我的HTML代码:
<style>
#myDialog .modal-dialog{
width:80%;
}
</style>
<div id="myDialog" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fa fa-times"></i></button>
<div class="modal-title" id="Dialog_title">Text Document</div>
</div>
<div class="modal-body">
<div id="my_doc_content"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal" onclick="rg.closeDialog('myDialog');">Close</button>
</div>
</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud) 在引用其他堆栈溢出线程和用于安装/配置maven的在线资源之后,我已执行了以下所有必要步骤.这是我做的:
export M2_HOME=/usr/local/apache-maven/apache-maven-3.3.9
export M2=$M2_HOME/bin
Run Code Online (Sandbox Code Playgroud)
我的Java Home变量也设置如下:
echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.8.0_60/Contents/Home
export PATH=$M2:$PATH
Run Code Online (Sandbox Code Playgroud)
尽管如此,当我跑步时mvn --version,我得到了Error: JAVA_HOME is not defined correctly.
We cannot execute /Library/Java/JavaVirtualMachines/jdk1.8.0_60/Contents/Home/bin/java.
PATH输出如下:
echo $PATH
/usr/local/apache-maven/apache-maven-3.3.9/bin:/usr/local/apache-maven/apache-maven-3.2.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin:/usr/local/MacGPG2/bin
Run Code Online (Sandbox Code Playgroud) 我正在尝试发送一个 GET 请求,如下所示,但我不断收到控制台上的以下错误:
Test_API_Access.Exception:Cannot send a content-body with this verb-type.
System.Net.ProtocolViolationException: Cannot send a content-body with this verb-type.
at System.Net.HttpWebRequest.CheckProtocol(Boolean onRequestStream)
at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
at System.Net.HttpWebRequest.GetRequestStream()
at Test_API_Access.Program.Test_API_Access() in c:\Users\<username>\Documents\Visual Studio 2013\Projects\Test_API_Access\Test_API_Access\Program.cs:line 43
Run Code Online (Sandbox Code Playgroud)
我阅读了另一个关于堆栈溢出的相关线程,这里提到:无法发送具有此动词类型的内容正文
但我想,我一直(HttpWebResponse response = (HttpWebResponse)webRequest.GetResponse())在我的 try 块中使用 using可以避免这个错误吗?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
using System.Net;
using System.Runtime.Serialization;
using System.IO;
namespace Test_API_Access
{ class Program
{ static void Main(string[] args)
{ Test_API_Access();}
private static void Test_API_Access()
{ var publicKey = …Run Code Online (Sandbox Code Playgroud) 当我使用以下内容时web.xml,我的项目运行正常,我可以通过index.jsp页面看到"Hello World".我使用的是Netbeans 7.4和Apache tomcat 6.0.41
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
</web-app>
Run Code Online (Sandbox Code Playgroud)
但是,当我创建自己的servlet并使用以下时web.xml,=
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<servlet>
<servlet-name>TEST_Authenticate</servlet-name>
<servlet-class>restapi.TEST_Authenticate</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>TEST_Authenticate</servlet-name>
<url-pattern>/TEST_Authenticate</url-pattern>
</servlet-mapping>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
Run Code Online (Sandbox Code Playgroud)
我最终在Apache Tomcat日志中收到以下错误:
Jul 24, 2014 9:36:14 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Allocate exception for servlet TEST_Authenticate
java.lang.ClassNotFoundException: TEST_Authenticate
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1128)
at …Run Code Online (Sandbox Code Playgroud) 我试图将以下序列化为JSON并以两种方式检查输出,如下所示:
Line #13 : <cfset convertjson = SerializeJSON([
{
"Id":"123",
"Value":"1",
"Desc":"Checking Description ",
"Group":"1"
}
])/>
Normal Output : <cfoutput>#convertjson#</cfoutput>
<br/>
Dump Output: <cfdump var="#convertjson#">
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
Invalid CFML construct found on line 13 at column 98.
ColdFusion was looking at the following text:
:
The CFML compiler was processing:
An expression beginning with SerializeJSON, on line 11, column 26.This message is usually caused by a problem in the expressions structure.
A cfset tag beginning on line 11, column 2. …Run Code Online (Sandbox Code Playgroud) 请考虑以下代码,我用它来获取Sendgrid发布的数据.
<cftry>
<cfset incomingData = toString(getHttpRequestData().content) />
<cfset djs = DeserializeJSON(incomingData)/>
<cfset a = "0">
<cfset b = "">
<cfset c = "0">
<cfset d = "0">
<cfset e = "">
<cfset f = "">
<cfset g = "">
<cfset h = "">
<cfset i = "">
<cfset k = "#NOW()#">
<cfset l = "">
<cfset m = "">
<cfset n = "">
<cfoutput>
<cfloop from="1" to="#arraylen(djs)#" index="i">
<cfset a = "0">
<cfset b = "">
<cfset c = "0"> …Run Code Online (Sandbox Code Playgroud) coldfusion ×2
coldfusion-9 ×2
java ×2
.net ×1
css ×1
get ×1
html ×1
json ×1
macos ×1
maven ×1
mysql ×1
netbeans ×1
sendgrid ×1
servlets ×1
webrequest ×1