Ok, here's my portlet.xml file:
<?xml version="1.0" encoding="UTF-8"?>
| <portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd
http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
| version="1.0">
| <portlet>
| <portlet-name>EmmiPortlet</portlet-name>
|
<portlet-class>com.rightfield.testing.portlet.EmmiPortlet</portlet-class>
| <supports>
| <mime-type>text/html</mime-type>
| <portlet-mode>VIEW</portlet-mode>
| <portlet-mode>EDIT</portlet-mode>
| </supports>
| <portlet-info>
| <title>Emmi Portlet</title>
| </portlet-info>
| </portlet>
| </portlet-app>
And here's my Portlet code:
import java.io.IOException;
| import java.io.PrintWriter;
|
| import javax.portlet.ActionRequest;
| import javax.portlet.ActionResponse;
| import javax.portlet.GenericPortlet;
| import javax.portlet.PortletException;
| import javax.portlet.PortletRequestDispatcher;
| import javax.portlet.PortletSecurityException;
| import javax.portlet.RenderRequest;
| import javax.portlet.RenderResponse;
|
|
| import com.rightfield.common.EmmiDTO;
| import com.rightfield.emmimgr.dao.EmmiMgrDAOFactory;
| import com.rightfield.emmimgr.dao.ReadOnlyEmmiMgrDAO;
|
| public class EmmiPortlet extends GenericPortlet {
|
|
|
| @Override
| protected void doEdit(RenderRequest request, RenderResponse response)
| throws PortletException, IOException {
| response.setContentType("text/html");
| PortletRequestDispatcher prd =
getPortletContext().getRequestDispatcher("/WEB-INF/jsp/edit.jsp");
| prd.include(request, response);
| }
|
| @Override
| protected void doView(RenderRequest request, RenderResponse response)
| throws PortletException, PortletSecurityException,
IOException {
| response.setContentType("text/html");
| try{
|
| request.setAttribute("accessCode", "19205679384");
| //other attribute settings...
|
| PortletRequestDispatcher prd =
getPortletContext().getRequestDispatcher("/WEB-INF/jsp/view.jsp");
| prd.include(request, response);
|
|
| }catch(Exception e){
| throw new RuntimeException(e);
| }
| }
|
| @Override
| public void processAction(ActionRequest request, ActionResponse
response)
| throws PortletException, PortletSecurityException,
IOException {
| // TODO Auto-generated method stub
| super.processAction(request, response);
| }
|
|
| }
I'm beginning to wonder whether there is an environment issue. I'm not using
the bundled distribution, rather I downloaded the binary distribution and
followed the instructions so that I could deploy the portal to the installation
of jboss I already had.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4081849#4081849
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4081849
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user