cancel
Showing results for 
Search instead for 
Did you mean: 

Create jsp iview

Former Member
0 Kudos

Hi guys

we are working on EP 6.0.

We want to create iviews which is simply a jsp page, the jsp file is ready, but we are not able to make a usable par from it.

Could any one teach how can we make it a par file to upload to Portal, then we can create iview out of it?

Thanks a lot with reward points

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

what is the run-time error you are getting. normally, we can create jsp file by deleting the following generated content.

<hbj:content

id="myContext">

<hbj:page

title="An Easy Start">

<hbj:form>

The error may be due to some other mistakes.

Rds,

Shanthakumar.

Assign points for useful answers

Former Member
0 Kudos

hi Shanthakumar,

Thanks a lot, just now it was the href things,

In my jsp page, I need to use some css files and some gifs, I think the referencing got some problem, but I dun know why.

Could you tell me how you refer to other resources in the same Portal Application?

for example:

my css files are under prjName/dist/css;

my images are under prjName/dist/images

jsp file is under prjName/dist/PORTAL-INF/pagelet

How can i refer those resources from my jsp?

Thanks a lot

Former Member
0 Kudos

hi

you can write this code in your jsp for css files

<% String webpath=componentRequest.getWebResourcePath()+"/css/";%>

<link rel=stylesheet href="<%=webpath%><css file name>">

and similiar code for images

Thanks & Regards

Harsimran

Message was edited by:

Harsimran Kaur

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Feng.

I guess you dont want JSPDynpage, but normal JSP. Here is the way for it

1. Create Java component in src core, and write following code in it, Abstract Portal Component.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

public class <CLASS_NAME>extends AbstractPortalComponent

{

public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)

{

IResource jspResource = request.getResource(IResource.JSP, "jsp/<YOUR_JSP_NAME>.jsp"); response.include(request, jspResource);

}

}

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

2. Now create a JSP file in JSP folder with name used in Java file source.

3. Write your HTML or JSP code in this file.

4. Compile and Upload, create iView from that. Now You can use JSP in your code.

regards

-Kedar Kulkarni

Reward points if useful.

Former Member
0 Kudos

Hi,

Refer the following threads content. it contains answers for your question

To include a jsp file ,

<%@include file="/pagelet/Common.jsp"%>

Rds,

Shanthakumar.

Assign points for helpful answer.

Former Member
0 Kudos

hi,

Create a new project in NWDS & use JSP Dynpage. now write code in jsp page & save it..

now deploy it in to the portal with portal loging & Password....

Create a iview based on the PAR file ...

Refer this blog

Regards,

Senthil K.

Former Member
0 Kudos

Hi,

I have tried your ways, but the auto generated jsp page is of format

<hbj:content

id="myContext">

<hbj:page

title="An Easy Start">

<hbj:form>

I was confused by this, actually i just want the jsp be of ordinary jsp format:

<html>

<head>

..

</html>

I have also tried remove all generated content and paste my own jsp inside, but after i deploy it, it shows runtime error.

Former Member
0 Kudos

hi,

Yes its a<b> htmlb</b> format, so u write a code within

<hbj:content id="myContext">

<hbj:page title="An Easy Start">

<hbj:form>

Here paste ur HTML content

</hbj:content id="myContext">

</hbj:page title="An Easy Start">

</hbj:form>

then add " <%@taglib uri="htmlbtld" prefix="hbj" %> " in the top of the jsp page...

also add this

<component-profile>

<property name="htmlbtld" value="/SERVICE/htmlb/taglib/htmlb.tld"/>

</component-profile> instead of <component-profile/>

in the portalapp.xml..

reward points..

Regards,

Senthil K.