liferay-7

javax.mail.MessagingException: Could not connect to SMTP host: email-smtp.us-east-1.amazonaws.com, port: 25;

落爺英雄遲暮 提交于 2020-03-25 18:42:09
问题 public void emailTest() { Properties properties=new Properties(); properties.put("mail.smtp.host", "email-smtp.us-east-1.amazonaws.com"); properties.put("mail.smtp.port", 587); properties.put("mail.debug", "true"); try{ Session session=Session.getInstance(properties); Message msg=new MimeMessage(session); msg.setFrom(new InternetAddress("test@gmail.com", "Test")); msg.setRecipient(RecipientType.TO, new InternetAddress("test@gmail.com", "Test")); msg.setSubject("Test Subject"); msg.setText(

javax.mail.MessagingException: Could not connect to SMTP host: email-smtp.us-east-1.amazonaws.com, port: 25;

℡╲_俬逩灬. 提交于 2020-03-25 18:42:02
问题 public void emailTest() { Properties properties=new Properties(); properties.put("mail.smtp.host", "email-smtp.us-east-1.amazonaws.com"); properties.put("mail.smtp.port", 587); properties.put("mail.debug", "true"); try{ Session session=Session.getInstance(properties); Message msg=new MimeMessage(session); msg.setFrom(new InternetAddress("test@gmail.com", "Test")); msg.setRecipient(RecipientType.TO, new InternetAddress("test@gmail.com", "Test")); msg.setSubject("Test Subject"); msg.setText(

How to create a Liferay 7 structure programmatically?

送分小仙女□ 提交于 2020-01-01 19:55:25
问题 In Liferay 7, how to create a structure from a Java module? Here is my attempt: Map<Locale, String> nameMap = new HashMap<Locale, String>(); nameMap.put(Locale.JAPAN, "The name"); Map<Locale, String> descriptionMap = new HashMap<Locale, String>(); descriptionMap.put(Locale.JAPAN, "The description"); DDMForm ddmForm = DDMUtil.getDDMForm("<here goes my real JSON form>"); DDMFormLayout ddmFormLayout = DDMUtil.getDefaultDDMFormLayout(ddmForm); DDMStructureLocalServiceUtil.addStructure( 20156, //

How to add jQuery UI's datepicker to a Liferay 7 portlet?

让人想犯罪 __ 提交于 2019-12-25 09:02:10
问题 I'm trying to add jQuery UI's datepicker to my Liferay 7 portlet, yet I keep getting this error: Object doesn't support property or method 'datepicker' I'm setting up the dependency like this: @Component( immediate = true, property = { "com.liferay.portlet.display-category=category.tests", "com.liferay.portlet.header-portlet-javascript=https://code.jquery.com/ui/1.12.1/jquery-ui.js", "com.liferay.portlet.instanceable=true", "javax.portlet.display-name=Advanced Date Picker", "javax.portlet

where liferay site will store in which table details will fetch?

白昼怎懂夜的黑 提交于 2019-12-25 00:47:04
问题 if we create site,organisation where it will store.i mean in which default table it will store.`Programmatically create organization site from site template Create organization site Organization organization = OrganizationLocalServiceUtil.addOrganization(creatorUserId, 0, name, createSite); Fetch site templates List<LayoutSetPrototype> layoutSetPrototypes = LayoutSetPrototypeLocalServiceUtil.getLayoutSetPrototypes(organization.getCompanyId()); LayoutSetPrototype customSiteTemplate = null; //

Liferay 7 Eclipse IDE override default categories filters query

若如初见. 提交于 2019-12-24 23:04:45
问题 I’m looking for a way to override the default category filter behaviour for Asset Publisher widgets (point 3 of my previous question here). As far as I understand in the Setup > Asset Section > Filter a rule based on categories will look for all source > asset type components which match the selected categories. I would like to know where is default query stored and how it is possible to modify it in order to introduce other custom criteria. Update: I can create a Liferay module project

Deploying an osgi bundle (jsp hook) in liferay 7

末鹿安然 提交于 2019-12-24 17:30:01
问题 Created an osgi bundle (jsp hook) in liferay. Using the server tab in Liferay Workspace environment, added the bundle to configured server. Checked the osgi shell with lb -s mytest.hook START LEVEL 20 ID|State |Level|Symbolic name 455|Installed | 1|mystest.hook (1.0.0.201603221133) The state is "Installed". Not sure how to proceed further in terms of the deployment. How will the State change to "Active" ? 回答1: Try the following command: start 455 Probably your bundle does not resolve

How to run my liferayportal site from workspace?

…衆ロ難τιáo~ 提交于 2019-12-23 04:57:11
问题 I have a liferay workspace that I deployed through blade successfully. In my workspace I have a bundles directory: > bundles > -----data > -------document_library > -------elasticsearch > -------hypersonic > ---------lportal.lck > ---------lportal.log > ---------lportal.properties > ---------lportal.script At the moment when I run tomcat which is installed in a different location but locally , does not display the content from my bundles. How can I configure LR so it serves my webcontent from

How to integrate Liferay DXP with Apache POI?

杀马特。学长 韩版系。学妹 提交于 2019-12-21 22:53:52
问题 I'm trying to integrate Apache POI in Liferay DXP(OSGi) , but unable to resolve dependencies with POI 3.17 version in gradle project. I've created standalone project with below JAR's : poi-3.17.jar poi-ooxml-3.17.jar poi-ooxml-schemas-3.17.jar xmlbeans-2.6.0.jar commons-collections4-4.1.jar Also, I've added below gradle dependencies added in build.gradle compile group: 'org.apache.poi', name: 'poi', version: '3.17' compile group: 'org.apache.poi', name: 'poi-ooxml', version: '3.17' compile

How can I add a new language in Liferay 7?

老子叫甜甜 提交于 2019-12-20 02:43:09
问题 My problem is how to add new language like thailand language in liferay 7 . When I inspect the existing flag I see that the image is not png but it is svg, but I can't add new language with icon. In this page.jsp I see that the constructor of image is automatically generated. This code describes the generation of svg image <svg class="lexicon-icon lexicon-icon-<%= image %>" role="img" title="<%= HtmlUtil.escapeAttribute(LanguageUtil.get(resourceBundle, label)) %>" <%= InlineUtil