• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Portal Deployed;but cant see it.

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I have installed jetspeed and developed a sample portal per studyguides.scja.com site. I could successfully develop and deploy the war file but i am not able to search and add it and see it working.
I didnt see any errors on the console.

can any one point me, what might be the reason?

Thanks in Advance,
 
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay, let's get this portlet going.

So, you've installed and deployed JetSpeed onto a Windows platform I'm assuming?

You have started the portal, and can log into the main page at: http://localhost:8080/jetspeed/ ?

What tool did you use to develop your portlet? Eclipse? Notepad? IRAD? Lomboz? NetBeans? Just curious.

When you deploy the war file, where do you export it to? When you deploy a JSR-168 portlet to JetSpeed2, you need to drop the portlet war file into the: C:\_jetspeed20\webapps\jetspeed\WEB-INF\deploy directory

Your actual path will depend upon where you installed your portal server.

Now, when I drop the JSR168 Ajax portlet I've been working on, into the deploy directory, I get a whole bunch of output on the DOS prompt/command window that was used to start JetSpeed. When you deploy your own portlet, you should get something similar. Mine says:



Now, I'm not sure when the list of deployable portlets is cached. I sometimes log out of JetSpeed and then log back in again when I'm doing testing to make sure the list of portlets has been regenerated or updated. But give JetSpeed a minute or two to catch up, and you should be able to view your portlet on the list of portlets, and add it to the page.

Oh, by the way, maybe you could show us the portlet.xml file. That's where the name used by the portal to display the name of the portlet to you in the list is configured. If you haven't properly named the portlet in the portlet.xml file, or maybe haven't supported the proper language of your portal server, it might not be displaying the portlet as an option for addition. Make sure the portlet supports your preferred language.

Let me know!

-Cameron McKenzie
[ April 08, 2007: Message edited by: Cameron W. McKenzie ]
 
Shridhar. Blr.
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Cameron,

Thanks for your quick reply.
Well i didn't put it in deploy folder

Now i can search for the Portlet, but when i add it i am getting the following message ;

Cannot create Portlet instance com.examscam.portlet.HelloWorldPortlet for Portlet Application HelloWorldPortlet

also, please find the portlet.xml: [HelloWorldPortlet sample example from your site.]

<?xml version="1.0" encoding="UTF-8"?>
<portlet-app
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
version="1.0" 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"
id="BasicPortlets.413e4e0df0"><portlet>
<portlet-name>HelloWorld</portlet-name>
<display-name>HelloWorld portlet</display-name>
<display-name xml:lang="en">HelloWorld portlet</display-name>
<portlet-class>
com.examscam.portlet.HelloWorldPortlet
</portlet-class>
<init-param>
<name>wps.markup</name>
<value>html</value>
</init-param>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode>
</supports>
<supported-locale>en</supported-locale>
<resource-bundle>
com.examscam.portlet.nl.HelloWorldPortletResource
</resource-bundle>
<portlet-info>
<title>HelloWorld portlet</title>
</portlet-info>
</portlet>
</portlet-app>

Waiting for your reply.

Thanks in Advance,
 
Cameron Wallace McKenzie
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay, we're getting closer.

Could you download this file and drop it in your deploy folder:

http://www.scja.com/jsr168/war/ImageDisplay.war

This is a simple JSR168 portlet that displays an image. It is uncreatively called ImageDisplayPortlet.

I just want to see if this portlet will deploy and can be added. If it works, then we know the environment works, and things should deploy properly.

One thing I do wonder is if the war file actually contains the compiled portlet class. Open up the war file with WinZip or something, and check to see if the package aware portlet is compiled with the proper name, and is under the classes folder of web-inf. The question is, why can't it create an instance? Maybe the class isn't compiled, maybe the class is incorrectly named, or maybe even, the method signature of the doView method isn't totally 100%.

Maybe you could post the actually Java class you created as well. Lets make sure it extends the GenericPortlet from javax.portlet.

We'll get this working!

-Cameron McKenzie
 
Shridhar. Blr.
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Cameron,

Thanks for your quick reply.

Deployed ImageDisplayPortlet.war and it clicked , After searching & adding, i cul see the image.

But the HelloWorld is still not working. javascript: x()
Confused

Message:
----------------
Cannot create Portlet instance com.examscam.portlet.HelloWorldPortlet for Portlet Application HelloWorld
-----------------

I checked for the .class file, package is correct and .class file is also there. This is how it looks;

-------------------------------------------
package com.examscam.portlet;

import java.io.IOException;

import javax.portlet.GenericPortlet;
import javax.portlet.PortletException;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;

public class HelloWorldPortlet extends GenericPortlet {

protected void doView(RenderRequest request, RenderResponse response)
throws PortletException, IOException {
// TODO Auto-generated method stub
response.setContentType("text/html");
response.getWriter().println("Hello World!!");
}
}

-------------------------
portlet.xml
-------------------------


<?xml version="1.0" encoding="UTF-8"?>
<portlet-app
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
version="1.0" 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"
id="BasicPortlets.413e4e0df0"><portlet>
<portlet-name>HelloWorld</portlet-name>
<display-name>HelloWorld portlet</display-name>
<display-name xml:lang="en">HelloWorld portlet</display-name>
<portlet-class>
com.examscam.portlet.HelloWorldPortlet
</portlet-class>
<init-param>
<name>wps.markup</name>
<value>html</value>
</init-param>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode>
</supports>
<supported-locale>en</supported-locale>
<resource-bundle>
com.examscam.portlet.nl.HelloWorldPortletResource
</resource-bundle>
<portlet-info>
<title>HelloWorld portlet</title>
</portlet-info>
</portlet>
</portlet-app>

-------------------------
web.xml
-------------------------

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app id="WebApp_ID">
<display-name>BasicPortlets</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<taglib id="PortletTLD">
<taglib-uri>http://java.sun.com/portlet</taglib-uri>; <taglib-location>/WEB-INF/tld/std-portlet.tld</taglib-location>
</taglib>
</web-app>
------------

I dont have std-portlet.tld file.

Waiting for your reply.

Thanks,
 
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Shridhar N",

You have previously been warned on one or more occasions regarding adjusting your display name to meet JavaRanch standards. This is not optional. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it prior to your next post.

Your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Be aware that accounts with invalid display names are removed.

bear
JavaRanch Sheriff
[ April 09, 2007: Message edited by: Bear Bibeault ]
 
Cameron Wallace McKenzie
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, I guess we're begging the question: what happens when the tld file is placed into the web-inf folder.

Or, for that matter, what if you removed the reference to the tld in the web.xml file. That might actually be the problem.

Let me know.

-Cameron McKenzie
 
Shridhar. Blr.
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

Well, i tried those options, i couldnt find the tld and also w/o that tld, it was throwing some exception on the console, hence i have commented that line.

Thanks,
 
Cameron Wallace McKenzie
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here's a link to those files just in case you need them.

std-portlet.tld

portal.tld

I'm glad you got it working. I'll dig into that a bit more.

-Cameron McKenzie
 
author
Posts: 4348
40
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Shridhar. Nagarhalli."

While we at the JavaRanch are pleased you updated your name to better match are naming policy, its still not quite right with the periods in your first and last name. Could you please remove them?

Thanks,
Scott
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Cameron Wallace McKenzie wrote:Here's a link to those files just in case you need them.

std-portlet.tld

portal.tld

I'm glad you got it working. I'll dig into that a bit more.

-Cameron McKenzie



I could not get the above files(std-portlet.tld,portal.tld) getting no network on click of the mentioned links. Please give me alternative links to get the files.
I am getting following error while launching my portlet.
org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/portlet cannot be resolved in either web.xml or the jar files deployed with this application

I have define the below tag in jsp.
<%@ taglib uri="http://java.sun.com/portlet" prefix="p" %>

Please suggest me to resolve the error.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am also facing the same issue. I tried deploying the ImageDisplay.war to the JetSpeed portal (2.2). But it is not visible in the portlets list.

Please suggest, what can be missing. There is no error while deploying the war.
 
Weeds: because mother nature refuses to be your personal bitch. But this tiny ad is willing:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic