Hi all,

I'm simply trying to print a 'hello world'.  

After my war file is dropped into the deployment directory, in the management 
portlet, under instances it always says "Portlet not deployed".

Can someone tell me what I'm doing wrong, please?

Here's my war file structure: - test2.war

  | WEB-INF:
  |     classes
  |         Test2.class
  |     jboss-app.xml
  |     jboss-web.xml
  |     portal.xml
  |     test2-object.xml
  |     web.xml
  | 
And the individual code for each file:

  | Test2.class:
  | 
  | mport java.io.PrintWriter;
  | import java.io.IOException;
  | 
  | import javax.portlet.GenericPortlet;
  | import javax.portlet.RenderRequest;
  | import javax.portlet.RenderResponse;
  | import javax.portlet.PortletException;
  | 
  | public class Test2 extends GenericPortlet {
  |   /**
  |    * The portlet's main view prints "Hello, World"
  |    */
  |     
  |     public void doView(RenderRequest request, RenderResponse response)
  |             throws PortletException, IOException
  |             
  |     {
  |             response.setContentType("text/html");
  |             PrintWriter out = response.getWriter();
  | 
  |             out.println("Hello, World");
  |     }
  |     
  |        public void render(RenderRequest rRequest, RenderResponse rResponse) 
throws javax.portlet.PortletException, IOException
  |        {
  |           rResponse.setTitle(getTitle(rRequest));
  |           doDispatch(rRequest, rResponse);
  |        }
  | 
  | }
  | 


jboss-app.xml

  | <?xml version="1.0" encoding="UTF-8"?>
  | <jboss-app>
  |     <app-name>Test2</app-name>
  | </jboss-app>
  | 
jboss-web.xml
<?xml version="1.0" encoding="UTF-8"?>
  | <jboss-web>
  | </jboss-web>
  | 
portal.xml

  | <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 
/opt/SUNWps/dtd/portlet.xsd"
  |              version="1.0">
  |     <portlet>
  |             <portlet-name>Test2Portlet</portlet-name>
  |             <portlet-class>com.whiteware.portlet.tests.Test2</portlet-class>
  |             <supports>
  |                     <mime-type>text/html</mime-type>
  |                     <portlet-mode>VIEW</portlet-mode>
  |             </supports>
  |             <portlet-info>
  |                     <title>My Own JBoss Portlet</title>
  |             </portlet-info>
  |     </portlet>
  | </portlet-app>
  | 
test2-object.xml

  | <?xml version="1.0" encoding="UTF-8"?>
  | <deployments>
  |     <deployment>
  |             <if-exists>overwrite</if-exists>
  |             <instance>
  |                     <instance-name>Test2PortletInstance</instance-name>
  |                     <component-ref>test2.Test2Portlet</component-ref>
  |             </instance>
  |     </deployment>
  | </deployments>
  | 
web.xml

  | <?xml version="1.0" encoding="UTF-8"?>
  | <web-app version="2.4"
  |     xmlns="http://java.sun.com/xml/ns/j2ee";
  |     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  |     xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
  | 
  | </web-app>
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3939897#3939897

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3939897


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to