我正在使用Oracle 11g作为我的Web应用程序.我想在现有表中添加列和注释.我可以使用以下命令轻松完成
ALTER TABLE product ADD product_description VARCHAR2(20)
Run Code Online (Sandbox Code Playgroud)
和
COMMENT ON COLUMN product.product_description
IS 'This is comment for the column';
Run Code Online (Sandbox Code Playgroud)
但我想在单一命令中执行上述任务.我在互联网上搜索了一个命令,在一个命令中添加一个列和注释,但我找不到.我想知道这是否可行.任何建议都将受到高度赞赏.
我正在使用JavaFX 2.2,我正在使用webview将html代码集成到JavaFX场景中,并且能够正确加载html.我正在关注此链接并尝试将一些对象从javascript传递到webview/controller但我在java端获取空值.
我在JSObject中保存了一个接口对象,如下所示
webEngine.getLoadWorker().stateProperty().addListener(
new ChangeListener<State>() {
@Override
public void changed(ObservableValue<? extends State> ov,
State oldState, State newState) {
if (newState == State.SUCCEEDED) {
JSObject win = (JSObject) webEngine.executeScript("window");
win.setMember("app", new JavaApp());
}
}
}
);
Run Code Online (Sandbox Code Playgroud)
我创建了一个类
public class JavaApp {
public void exit() {
Platform.exit();
}
public void print(Date date) {
System.out.println("Parm:"+date);
}
public Date getValue() {
return new Date();
}
}
Run Code Online (Sandbox Code Playgroud)
我的HTML是
<html lang="en">
<head>
<script type="text/javascript">
function callJava(){
app.print(new Date());
var val = app.getValue();
app.print(val); …Run Code Online (Sandbox Code Playgroud) 我在我的应用程序中使用Spring 2.5.在视图中我有主jsp,其中我包含了另一个jsp.我在主jsp中使用c:set标签声明了一个变量,我无法在jsp中访问它.下面是代码main.jsp
<c:set var="hPediquestStudy"><spring:message code="study.hpediquest.mapping" /></c:set>
<c:set var="currentStudy" value='<%=(String)session.getAttribute("currentStudy")%>'/>
<html>
<head>
</head>
<body>
<c:if test="${currentStudy eq hPediquestStudy}">
Variables are equal
</c:if>
<c:if test="${currentStudy ne hPediquestStudy}">
Variables are not equal
</c:if>
<jsp:include page="/WEB-INF/jsp/included.jsp"></jsp:include>
</body
</html>
Run Code Online (Sandbox Code Playgroud)
included.jsp
<c:if test="${currentStudy eq hPediquestStudy}">
hPediquestStudy Variable is accessible
</c:if>
<br/>currentStudy : ${currentStudy}
<br/>hPediquestStudy : ${hPediquestStudy}
Run Code Online (Sandbox Code Playgroud)
我正在输出
变量是平等的
currentStudy:hPediquest
hPediquestStudy:
如果我在主jsp中包含jsp中设置该变量,我可以看到hPediquestStudy值的值.但是每次我加入jsp时我都不想设置它.请帮忙