cancel
Showing results for 
Search instead for 
Did you mean: 

How to include HTMLB in my jsp's?

Former Member
0 Kudos

Hi everybody,

I'm developing a J2EE application in NWDS. So I have my 3 modules (EJB module, WEB module and application module)

In my jsp files I'd like to be able to use the htmlb tags so that it has the SAP look and feel. But I don't know how to add these.

Supposably I will need to import a jar file and a *.tld file somewhere in my project but I don't know where to get this *.jar and *.tld nor where I need to import this.

Can somebody help me with this?

Thank you!

Kind regards

Wouter

Edited by: Wouter Delellio on May 26, 2008 3:21 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ,

You need to add the following path "/SERVICE/htmlb/taglib/htmlb.tld"

to web.xml, and can use it in the same way.

Thanks

Ritushree

Former Member
0 Kudos

and where can I get the htmlb.tld and and jar file?

Former Member
0 Kudos

Hi,

It is already deployed in SAP Web Application Server.

You can also search in sap service market place if you don't use SAP Web AS.

Thanks

Ritushree

Former Member
0 Kudos

I tried adding the following to my web.xml


<taglib>
	<taglib-uri>htmlb</taglib-uri>
        <taglib-location>/SERVICE/htmlb/taglib/htmlb.tld</taglib-location>
</taglib>

and added this line in mijn jsp.


<%@taglib uri= "htmlb" prefix="hbj"%>

But it gives an error. (I'm deploying to a SAP Web AS)

prashil
Advisor
Advisor
0 Kudos

Hi Wouter,

The tld has to be added in the component profile.

I am pasting the sample portalapps.xml

<?xml version="1.0" encoding="utf-8"?>

<application>

<application-config>

<property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>

</application-config>

<components>

<component name="MaintenancePage">

<component-config>

<property name="ClassName" value="MaintenancePage"/>

<property name="ComponentType" value="jspnative"/>

<property name="JSP" value="pagelet/Maintenance Page.jsp"/>

</component-config>

<component-profile/>

</component>

<component name="output">

<component-config>

<property name="ClassName" value="com.sap.pdk.tech.custompersonalization.output"/>

</component-config>

<component-profile/>

</component>

<component name="selectionScreen">

<component-config>

<property name="ClassName" value="com.sap.pdk.tech.custompersonalization.selectionScreen"/>

</component-config>

<component-profile>

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

<property name="PersonalizationClass" value="com.sap.personalizationDialog.selectionScreen"/>

</component-profile>

</component>

</components>

<services/>

</application>

Here you can find the class which is using the htmlb.tld, service tag has been amended in its component profile.

Hope it helps.

Regards,

Prashil

Former Member
0 Kudos

Hi Wouter,

I did that the following way:

1. In the J2EE Application: Add a reference to "com.sapportals.htmlb" to the application-j2ee-engine.xml:

	<reference 
		reference-type="hard">
		<reference-target 
			provider-name="sap.com" 
			target-type="library">com.sapportals.htmlb</reference-target>
	</reference>

2. In your Web Application: Copy the htmlb.tld to your WEB-INF-Folder. You should find the htmlb.tld in your j2ee-engine directory under:

usr/sap/<sid>/jc<xx>/j2ee/cluster/server0/apps/sap.com/com.sapportals.htmlb.ear/servlet_jsp/htmlb/root

3. Add a taglib definition in your web.xml:

	<taglib>
		<taglib-uri>htmlb</taglib-uri>
		<taglib-location>/WEB-INF/htmlb.tld</taglib-location>
	</taglib>

4. Add the taglib definition in your JSPs (as you already did):

<%@taglib uri= "htmlb" prefix="hbj"%>

Now you can use htmlb in your JSPs.

There might be other ways to achieve this. But it worked for me

Best regards,

Stefan Brauneis

Former Member
0 Kudos

Thx Stefan,

It's working now!

Answers (0)