我能够使用filezilla成功连接到amazon ec2实例.我使用的用户名是ec2-user.所以,当我尝试将我的应用程序战争转移到tomcat时,它说
/var/lib/tomcat6/webapps/RealEstateERP.war: open for write: permission denied
Error: File transfer failed.
Run Code Online (Sandbox Code Playgroud)
我尝试使用filezilla更改权限但不允许这样做.我知道没有写入权限,但我如何更改它.
我是linux新手.请帮我.
我正在本地测试客户端和服务器之间的SSL通信.所以我使用OpenSSL命令生成证书.在cacert文件中添加了此证书.还生成.p12文件.
我在服务器和客户端使用相同的.p12文件.这是服务器代码
Server server = component.getServers().add(Protocol.HTTPS, port);
Series<Parameter> params = server.getContext().getParameters();
params.add("keystorePath", ".p12 file path");
params.add("keystoreType", "PKCS12");
params.add("needClientAuthentication","true");
component.getDefaultHost().attach("", "/AA"), new AAClass());
component.start();
Run Code Online (Sandbox Code Playgroud)
这是客户端代码:
Client client = trustAllCerts();
clientResource = new ClientResource(url);
clientResource.setNext(client);
try{
clientText = clientResource.post"");
}
catch(ResourceException e){
e.printStackTrace();
}
public Client trustAllCerts() {
Client client = null;
try {
client = new Client(new Context(), Protocol.HTTPS);
Context context = client.getContext();
final SSLContext sslContext = SSLContext.getInstance("TLSv1.2");
context.getAttributes().put("sslContextFactory", new SslContextFactory() {
public void init(Series<Parameter> parameters) {
}
public SSLContext createSslContext() …Run Code Online (Sandbox Code Playgroud) 我想在节点中显示双引号和圆括号.
不使用A [label ="Rahul(A)"].我想在Rahul(A) - > B期间展示
我是hibernate的新手.我想传递2列值,并希望hibernate返回该表的主键.
String queryString = "select perId from Permission where document.docId=1 and user.id=2";
return getHibernateTemplate().find(queryString);
Run Code Online (Sandbox Code Playgroud)
但是这个方法返回List.我怎样才能返回int值.
我有一个Pojo类,我在其中创建一个未与DataBase Table映射的字段.所以我必须声明字段声明和setter和getter方法@Transient,否则它会显示错误.
@Transient
private String docHistoryString="";
@Transient
public String getDocHistoryString() {
return docHistoryString;
}
@Transient
public void setDocHistoryString(String docHistoryString) {
this.docHistoryString = docHistoryString;
}
Run Code Online (Sandbox Code Playgroud)
现在,我的问题在于控制器.我在这个瞬态字段中设置了一些值,但是当我尝试使用EL在视图(JSP)中访问此变量时,它没有给出值.我认为这是因为我在get方法中使用了@transient注释.
我在couchDB中有两种文件,其中包含以下json类型:
1.
{
"_id": "4a91f3e8-616a-431d-8199-ace00055763d",
"_rev": "2-9105188217acd506251c98cd4566e788",
"Vehicle": {
"type": "STRING",
"name": "Vehicle",
"value": "12345"
},
"Start": {
"type": "DATE",
"name": "Start",
"value": "2014-09-10T11:19:00.000Z"
}
}
2.
{
"_id": "4a91f3e8-616a-431d-8199-ace00055763d",
"_rev": "2-9105188217acd506251c98cd4566e788",
"Equipment": {
"type": "STRING",
"name": "Equipment",
"value": "12345"
},
"Start": {
"type": "DATE",
"name": "Start",
"value": "2014-09-10T11:19:00.000Z"
}
}
Run Code Online (Sandbox Code Playgroud)
我想创建一个视图,搜索所有这些doc.Vehicle.value = 12345或doc.Equipment.value = 12345的文档.如何使此视图返回所有这些类型的文档.提前致谢.
我有一个Hashmap的ArrayList,其中我有像name,phoneNo,Date,Age ....等键.
我想根据日期字段对Hashmap进行排序.
如果我使用LinkedHashMap,那么它也没用,因为我以随机方式获取值.
我不能使用对象而不是HashMap,因为我不知道我将获得多少条目.我动态地放置键和值.
java ×5
hibernate ×2
spring ×2
spring-mvc ×2
amazon-ec2 ×1
collections ×1
couchdb ×1
database ×1
graphviz ×1
hql ×1
linux ×1
restlet ×1
sorting ×1
ssl ×1
tomcat ×1