我是一个很长时间的Java Web开发人员,但我是portlets技术的新手.
目前我正在寻找我的选择.
我曾尝试过Liferay,尽管它非常酷,但对我的需求来说有点沉重.
你能推荐一个更轻量级的portlet容器吗?
有没有人有一个简明的摘要链接到什么使得portlet"JSR-286兼容"与仅仅"符合JSR-168".我有一个规范的副本,这是简洁的,所以链接规范不是一个有用的答案.我已经在网上搜索了一个小时,我发现没有什么是清楚的(除了规范,当然要求你也阅读以前的规范,然后从"必需"中删除"新功能"合规性".
特别是我发现在web.xml的必要性上存在相当多的混乱,这似乎来自使用Liferay的人并且没有意识到Liferay正在为他们放入web.xml.
JSR-286 portlet在WAR文件中是否需要web.xml文件?
我真正喜欢的是包含以下一个或多个列表的内容:
您可以在列表中留下"使用portlet-app_2_0.xsd",因为我认为这部分很明显.
我愿意接受这样的答案:除了portlet.xml的DTD/xsd之外,两个列表都是空的,区别仅在于门户网站支持的内容,但请用链接或其他引用来支持该断言.
我关心的原因是我在Liferay中看到关于Vaadin portlet的帖子暗示某些功能不适用于JSR-168 portlet ......也可能是Liferay中的某些逻辑根据它看到的portlet.xml版本切换,但我还没有证实这样做也是有趣的信息,但不是我的问题的答案.
我正在关注Liferay In Action书.我正处于将编辑模式添加到portlet的部分.portlet已成功部署,我已添加了portlet,现在该书说要单击portlet中的扳手并单击Preferences链接,但我没有Preferences链接.查看工作正常.
这是我的portlet.xml:
<?xml version="1.0"?>
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" version="2.0">
<portlet>
<portlet-name>hello-john</portlet-name>
<display-name>Hello John</display-name>
<portlet-class>com.liferaytest.portlet.HelloJohnPortlet</portlet-class>
<init-param>
<name>view-jsp</name>
<value>/view.jsp</value>
</init-param>
<init-param>
<name>edit-jsp</name>
<value>/edit.jsp</value>
</init-param>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode>
<portlet-mode>edit</portlet-mode>
</supports>
<portlet-info>
<title>Hello John</title>
<short-title>Hello John</short-title>
<keywords>Hello John</keywords>
</portlet-info>
<security-role-ref>
<role-name>administrator</role-name>
</security-role-ref>
<security-role-ref>
<role-name>guest</role-name>
</security-role-ref>
<security-role-ref>
<role-name>power-user</role-name>
</security-role-ref>
<security-role-ref>
<role-name>user</role-name>
</security-role-ref>
</portlet>
Run Code Online (Sandbox Code Playgroud)
我的edit.jsp:
<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
<jsp:useBean class="java.lang.String" id="addNameURL" scope="request" />
<portlet:defineObjects />
<form
id ="<portlet:namespace />helloForm"
action="<%= addNameURL %>"
method="post">
<table>
<tr>
<td>Name:</td> …Run Code Online (Sandbox Code Playgroud) 我已经下载了一个Jquery Image Slider源代码,想要与我的JSP文件进行整合
这是我的Folder Struture

这是我包括他们的方式
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<link type="text/css" href="/css/jquery.ui.theme.css" rel="stylesheet" />
<link type="text/css" href="/css/jquery.ui.core.css" rel="stylesheet" />
<link type="text/css" href="/css/jquery.ui.slider.css" rel="stylesheet" />
<link rel="stylesheet" href="/css/style.css" type="text/css" media="screen"/>
Run Code Online (Sandbox Code Playgroud)
我在服务器控制台中得到了这个404
20:50:04,625 WARN [404_jsp:109] /css/jquery.ui.theme.css
20:50:04,640 WARN [404_jsp:109] /css/jquery.ui.core.css
20:50:04,640 WARN [404_jsp:109] /css/jquery.ui.slider.css
20:50:04,656 WARN [404_jsp:109] /css/style.css
20:50:04,671 WARN [404_jsp:109] /js/cufon-yui.js
20:50:04,671 WARN [404_jsp:109] /js/GreyscaleBasic.font.js
20:50:04,687 WARN [404_jsp:109] /js/jquery.easing.1.3.js
Run Code Online (Sandbox Code Playgroud) 我试图解决为什么抛出以下异常.
我认为这是因为在"查看"模式下访问了一个portlet,但由于某种原因我不知道spring servlet容器无法提供请求,这是正确的吗?
以下例外集中的"参数映射"在哪里?
org.springframework.web.portlet.NoHandlerFoundException:没有为portlet请求找到匹配的处理程序方法:mode'view',phase'ACT__PASE',参数map [empty]
这是控制器:
@Controller
@RequestMapping("VIEW")
public class DetailsController {
@RequestMapping("VIEW")
public String showDetails(final ModelMap modelMap, final RenderRequest renderRequest) {
return "allDetails/details";
}
}
Run Code Online (Sandbox Code Playgroud) 我必须为我的portlet使用一些JavaScript和CSS.我使用一些数据jQuery进行排序和一些交互式显示,但它不起作用.
任何人都可以指导我到哪里犯错误吗?
这是我的目录结构docroot,其中保存了我的JS和CSS.

这是我的view.jsp文件,其中动态填充数据.
<%@page import="com.video.util.VideoActionUtil"%>
<%@page import="com.video.database.model.Video"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"
import="com.video.database.model.Video.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Applying JQuery DataTables plugin in the Java Server application</title>
<link href="docroot/js/jquery-1.2.6.min.js" type="text/javascript">
<link href="docroot/css/demo_page.css" rel="stylesheet" type="text/css" />
<link href="docroot/css/demo_table.css" rel="stylesheet" type="text/css" />
<link href="docroot/css/demo_table_jui.css" rel="stylesheet" type="text/css" />
<link href="docroot/css/jquery-ui.css" rel="stylesheet" type="text/css" media="all" />
<link href="docroot/css/jquery-ui-1.7.2.custom.css" rel="stylesheet" type="text/css" media="all" />
<script src="docroot/js/query.js" type="text/javascript"></script>
<script src="docroot/js/jquery.dataTables.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
$("#companies").dataTable({
"sPaginationType": "full_numbers",
"bJQueryUI": true …Run Code Online (Sandbox Code Playgroud) Liferay CMS附带Alloy UI来执行几个javascript函数(可拖动,可排序等).问题是我们还使用了几个使用jQuery UI的jQuery插件.Alloy UI加载速度慢,开销很大,导致网页大量滞后,所以我们想删除它并用jQuery UI做事.
Liferay默认在DOM中加载Alloy UI文件,我们需要在服务器/ portlet文件中删除(声明等)吗?
当我开发我的portlet时,当我编写我的jsp页面时,我使用了:
<%@ taglib prefix="portlet" uri="http://java.sun.com/portlet_2_0"%>
Run Code Online (Sandbox Code Playgroud)
但是eclipse告诉我一个错误,告诉我它找不到http://java.sun.com/portlet_2_0的标签lib描述符.
如何使用tld文件解决此问题?
我在为Liferay创建portlet时遇到了困难.我有标准安装,Liferay Portal驻留在其中liferay_home/bundles并插入SDK liferay_home/plugins.
我已经安装了新的portlet应用程序liferay_home/plugins/portlets/my-portlet.从那里我运行ant deploy,我可以看到WAR文件已成功组装并被复制到liferay_home/bundles/deploy.
但是,在运行的Liferay Portal实例中,我没有看到刚刚刚刚复制到部署文件夹的portlet .所以,我虽然我将检查出的日志,但是liferay_home/bundles/tomcat-7.0.27/logs是空的.
什么想法可能是错的?
我有一个非常长的portlet编辑屏幕,所以我想使用fieldsets对其字段进行分组(然后可能将它们布局为本机表单选项卡,就像在内容的编辑视图中使用的那些).
zope.formlib可以实现吗?