我一直在努力工作这几天试图让它发挥作用.尝试将JSP与Spring Boot一起使用.我一直在github上关注这个例子.Web上有很多这样的例子都有一个web.xml文件,但github上的例子在这个论坛上被多次引用,甚至没有web.xml.此外,在创建Spring Boot项目时,STS不会创建具有子目录"WEB-INF"的"webapp"目录.我必须在Windows资源管理器中手动创建它们,然后在STS中刷新Project Explorer以使它们出现.
无论如何,我尽可能地遵循了这个例子,但是当我在地址字段中键入http:// localhost:8080时仍然无法在浏览器中呈现我的index.jsp文件.
任何指导将不胜感激.
这就是我到目前为止所拥有的.
目录结构:
application.properties:
spring.mvc.view.prefix=/WEB-INF/jsp/
spring.mvc.view.suffix=.jsp
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/jeddatae_editor
spring.datasource.username=webapp
spring.datasource.password=secret
Run Code Online (Sandbox Code Playgroud)
的index.jsp:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%
String name = request.getParameter("name");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>JED Login</title>
</head>
<body>
<form action="/index" method="post">
<p>Insert ID here: <input type="text" id="id" name="id"></p>
<input type=submit>
</form>
<%
if(!name.equals(""))
{
%>
<div class="welcome">
<p>Welcome <%=name %> </p><p>If you are not <%=name %>, then …Run Code Online (Sandbox Code Playgroud) 我在表单上有一个组合框,我正在尝试以编程方式在访问数据库上运行SQL查询后选择组合框中的一个项目.我使用以下代码迭代项目并设置所选项目:
'Make the appropriate location appear in the combobox
For i = 0 To cboLocations.ListCount - 1
If Me.cboLocations.Column(0, i) = locindex Then
Debug.Print "locindex: " & locindex & vbCrLf & " Me.cboLocations.Column(0, i):" & Me.cboLocations.Column(0, i)
Me.cboLocations.SetFocus
Me.cboLocations.ListIndex = i '<<< error 2115
Exit For
End If
Next i
Run Code Online (Sandbox Code Playgroud)
如上所示,我不断收到错误2115:为此字段设置为BeforeUpdate或ValidationRule属性的宏或函数阻止Access在字段中保存数据.
错误消息中指示的此组合框的任何属性都未设置为任何值.所以我被卡住了.请指教.
我收到此Object Required错误.见下面的代码.我不明白为什么我得到它.oitem变量被声明为Object,我在尝试移动之前对"MailItem"类型进行了测试.请指教.
艾伦
Public StatsArchiveFolder As Outlook.Folder
'StatsArchiveFolder is set to equal an Outlook.Folder elsewhere
_____________________________________
Sub MoveHarpStatMail()
Dim olapp As Outlook.Application
Dim olappns As Outlook.NameSpace
Dim oitem As Object
Dim ItemsToProcess As Outlook.Items
Dim myFolder As MAPIFolder
Dim sFilter As String
Dim tempMailItem As Outlook.MailItem
On Error GoTo LocalErr
'set outlook objects
Set olapp = New Outlook.Application
Set olappns = olapp.GetNamespace("MAPI")
Set myFolder = olappns.GetDefaultFolder(olFolderInbox)
'Filter or only MailItems received today
sFilter = "[ReceivedTime] >= " & AddQuotes(Format(Date, "ddddd")) …Run Code Online (Sandbox Code Playgroud) 我在 Sprint Tool Suite 中工作,并且创建了一个 Maven 项目。当我右键单击该项目时,我可以选择 Run as...Maven Install。这将获取我所有的类文件并按预期将它们打包到一个 jar 文件中,并且还会创建一个副本到我的中央 Maven 存储库 C:\Users\Owner.m2\repository
一切都很好,但我希望它还可以将所有源文件打包到一个 sources.jar 文件中。我怀疑我需要编辑项目的 pom.xml 文件才能实现这一点,但还没有看到如何做到这一点的示例。请指教。
我正在使用Outlook VBA并构建了一个For Next循环来读取MailItems的主体,其格式类似于Key = Value对.它似乎工作的一点,但在第二次迭代结束时,当它到达"下一个oitem"时,我得到错误抛出"类型不匹配".好吧,仍然有第三个MailItem被读入,所以我不知道为什么我会收到此错误.任何指导将不胜感激.
Sub ReadMailItems()
Dim olapp As Outlook.Application
Dim olappns As Outlook.NameSpace
Dim oitem As Outlook.MailItem
Dim ItemsToProcess As Outlook.Items
Dim myFolder As MAPIFolder
Dim sFilter As String
Dim dailyStats As CRBHA_Stats
Dim kvPairs As Collection
Dim Item As KeyValuePair
Dim today As Date
today = Date
On Error GoTo LocalErr
'set outlook objects
Set olapp = New Outlook.Application
Set olappns = olapp.GetNamespace("MAPI")
Set myFolder = olappns.GetDefaultFolder(olFolderInbox)
'Filter or only MailItems received today
sFilter = "[ReceivedTime] >= …Run Code Online (Sandbox Code Playgroud) 作为AJAX调用的一部分,我有一个属性"success",如下所示:
success: function(msg) {
console.log( msg );
var obj = $.parseJSON( msg );
if (obj.code=="1")
{
...
}
}
Run Code Online (Sandbox Code Playgroud)
正如您所看到的,我期待一个JSON字符串,实际上有一个从服务器返回,如下所示: {"code":"1","message":"1","name":"Alan"}
该JSON字符串是在NET/Response选项卡下显示在FireBug中的内容.哪个好.你可以看到我正在使用parseJSON(...)来获取对象的句柄.但是当条件语句执行时,我被告知obj是NULL.那不可能是好事!我不知道那里发生了什么.
您会注意到我向控制台打印了msg变量.这是看起来像:
对象{code ="1",message ="1",name ="Alan"}
我在返回的JSON字符串和打印到控制台的内容之间看到的唯一区别是我们将冒号替换为等号符号.我不知道这是不是很重要?
以前有人遇到过这个吗?请指教.
艾伦
outlook-vba ×2
vba ×2
access-vba ×1
ajax ×1
eclipse ×1
java ×1
jquery ×1
jsp ×1
maven ×1
ms-access ×1
spring-boot ×1