example dosn't workexample dosn't workhttps://liferay.dev/c/message_boards/find_thread?p_l_id=119785333&threadId=1030250112024-03-28T18:02:22Z2024-03-28T18:02:22ZRE: example dosn't workfrancesco viscomihttps://liferay.dev/c/message_boards/find_message?p_l_id=119785333&messageId=1030767642018-01-23T14:47:26Z2018-01-23T14:47:26ZI've solved my original problem and thanks to you for your replay;<br />it 's ok; <br /><br />I'm going to study liferay with maven at the moment<br />regardsfrancesco viscomi2018-01-23T14:47:26ZRE: example dosn't workOlaf Kockhttps://liferay.dev/c/message_boards/find_message?p_l_id=119785333&messageId=1030774182018-01-23T14:14:21Z2018-01-23T14:14:21Z<div class="quote-title">francesco viscomi:</div><blockquote>I need to use 5.2 liferay portal indeed, and i'm new to portlet container;<br /><br />I don't know why but if i use sdk 6.2, it does not allow me to create a plugin project because there is something wrong with ivy; <br />...</blockquote><br /><br />Now you've got me completely confused: You're using plugins SDK from Liferay 6.0, state that you're running 6.2 but have to run 5.2. Then you're talking about Maven while you have problems with the Ant-based Plugins SDK that doesn't work because of Ivy? (Ant/Ivy is the only legit combination, as far as I remember my 6.2 setup) <br /><br />I think it's time to start over: State which version you target, then try all of the environment from the same version. No mixing of different versions please. Assume I know no information that you stated above: What are the steps to reproduce your problem on that one explicitly named target version?Olaf Kock2018-01-23T14:14:21ZRE: example dosn't workfrancesco viscomihttps://liferay.dev/c/message_boards/find_message?p_l_id=119785333&messageId=1030737722018-01-23T13:44:40Z2018-01-23T13:44:40ZI need to use 5.2 liferay portal indeed, and i'm new to portlet container;<br /><br />I don't know why but if i use sdk 6.2, it does not allow me to create a plugin project because there is something wrong with ivy; <br /><br />Anyway i have to use maven as a building tool.<br /><br />really thanks <img alt="emoticon" src="@theme_images_path@/emoticons/happy.gif" ><br />Francescofrancesco viscomi2018-01-23T13:44:40ZRE: example dosn't workOlaf Kockhttps://liferay.dev/c/message_boards/find_message?p_l_id=119785333&messageId=1030748412018-01-23T13:26:21Z2018-01-23T13:26:21ZNot sure if this makes a difference, but I wouldn't use the 6.0 plugins SDK with Liferay 6.2 - rather use matching versions (this is what made me think you were using 6.0).<br /><br />Also, you might want to try the latest GA version of 6.2 if you're not using 7.0 - at least for a quick try. No need to hunt down long-fixed issues in versions that are out of date.Olaf Kock2018-01-23T13:26:21ZRE: example dosn't workfrancesco viscomihttps://liferay.dev/c/message_boards/find_message?p_l_id=119785333&messageId=1030734372018-01-23T12:46:45Z2018-01-23T12:46:45ZI've used<br />liferay portal : liferay-portal-tomcat-6.2-ce-ga2-20140319114139101<br /><br />ide liferay : liferay-ide-eclipse-windows-x64-2.2.4-ga5-201507230603<br /><br />sdk : liferay-plugins-sdk-6.0.6-20110225<br /><br />and it works<br />thnaksfrancesco viscomi2018-01-23T12:46:45ZRE: example dosn't workOlaf Kockhttps://liferay.dev/c/message_boards/find_message?p_l_id=119785333&messageId=1030299342018-01-22T13:56:54Z2018-01-22T13:56:54ZRead on to the next chapter - then I'd assume it to work. See the last paragraph in this tutorial?<br /><br /><blockquote>A warning about our newly created portlet: For the purpose of making our example easy to follow, we cheated a little bit. The portlet specification doesn’t allow setting preferences from a JSP, because they are executed in what is known as the render state. There are good reasons for this restriction, and they’re explained in the next section. </blockquote><br /><br />Another option is to continue with the current version, not with a version (6.0) that had its last release in 2011 and was superceded with the next version (6.1) in January 2012. Version 7.0 is current. Go with that.Olaf Kock2018-01-22T13:56:54ZRE: example dosn't workfrancesco viscomihttps://liferay.dev/c/message_boards/find_message?p_l_id=119785333&messageId=1030286742018-01-22T13:36:07Z2018-01-22T13:36:07Zthere are no java class, because everything is mamaged by MVCPortlet;<br /><br />there are just two jsp page, the one is view.jsp and at the same level there is edit.jsp:<br />view.jsp<br /><em><strong><span style="font-size: 18px;"></span></strong><%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %><br /><%@ page import="javax.portlet.PortletPreferences" %><br /><br /><portlet:defineObjects /><br /><br /><%<br /> PortletPreferences prefs = renderRequest.getPreferences();<br />String greeting = (String) prefs.getValue("greeting",<br /> "Hello! Welcome to our portal.");<br />%><br /><br /><p><%= greeting %></p><br /><br /><portlet:renderURL var="editGreetingURL"><br /> <portlet:param name="mvcPath" value="/edit.jsp" /><br /></portlet:renderURL><br /><br /><p><a href="<%= editGreetingURL %>">Edit greeting</a></p><br /></em><br />and edit.jsp<br /><em><strong><span style="font-size: 18px;"></span></strong><br /><%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %><br /><%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %><br /><br /><%@ page import="javax.portlet.PortletPreferences" %><br /><br /><portlet:defineObjects /><br /><br /><%<br />PortletPreferences prefs = renderRequest.getPreferences();<br />String greeting = renderRequest.getParameter("greeting");<br />if (greeting != null) {<br /> prefs.setValue("greeting", greeting);<br /> prefs.store();<br />%><br /><br /> <p>Greeting saved successfully!</p><br /><br /><%<br />}<br />%><br /><br /><%<br />greeting = (String)prefs.getValue(<br /> "greeting", "Hello! Welcome to our portal.");<br />%><br /><br /><portlet:renderURL var="editGreetingURL"><br /> <portlet:param name="mvcPath" value="/edit.jsp" /><br /></portlet:renderURL><br /><br /><aui:form action="<%= editGreetingURL %>" method="post"><br /> <aui:input label="greeting" name="greeting" type="text" value="<%=<br />greeting %>" /><br /> <aui:button type="submit" /><br /></aui:form><br /><br /><portlet:renderURL var="viewGreetingURL"><br /> <portlet:param name="mvcPath" value="/view.jsp" /><br /></portlet:renderURL><br /><br /><p><a href="<%= viewGreetingURL %>">&larr; Back</a></p></em>francesco viscomi2018-01-22T13:36:07ZRE: example dosn't workDaniele Baggiohttps://liferay.dev/c/message_boards/find_message?p_l_id=119785333&messageId=1030262022018-01-22T13:30:21Z2018-01-22T13:30:21ZIt's a very old liferay version... <br /><br />If you share the code, we can try to understand the mistake.<br /><br />@baxthemanDaniele Baggio2018-01-22T13:30:21Zexample dosn't workfrancesco viscomihttps://liferay.dev/c/message_boards/find_message?p_l_id=119785333&messageId=1030250102018-01-22T13:00:47Z2018-01-22T13:00:47ZHi all,<br />i'm follow the following example:<br />https://dev.liferay.com/develop/tutorials/-/knowledge_base/6-1/writing-the-my-greeting-portlet<br /><br />but when i click on "Edit greeting", the page reload and i do not see nothing (only the view.jsp page); Besides no error is logged in any part;<br /><br />I'm using:<br />Luna Release (4.4.0), with liferay plugin installed;<br />SDK: liferay-plugins-sdk-6.0.6-201102