cancel
Showing results for 
Search instead for 
Did you mean: 

How to use HTMLB in a JSP page ? (j2ee app)

diegohs
Active Participant
0 Kudos

Hi Everybody,

I have several days with no success in my lab, could you give me a clue ?

I WANT TO: create a new java app in my SAP EP6.0 sp2 J2EE server, with one JSP page using HTMLB tags.

I have created my JSP and deployed to my server using deploy tool. And now I want to use HTMLB tags, but I'm confused in which part of Deploy Tool should I include the reference to htmlb. Also, should I include htmlb.tld or htmlb.jar ?

I appreciate a lot your help !

Thanks and regards from Mexico !

Diego

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Diego!

You should append this at top of your jsp page:

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

Hope that helps!

Former Member
0 Kudos

My line is the following:

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

Former Member
0 Kudos

In web.xml you have to see something like this:

<taglib>

<taglib-uri>

/namehtmlb

</taglib-uri>

<taglib-location>

/WEB-INF/htmlb.tld

</taglib-location>

</taglib>

-


Then in your jsp page you may use this:

<%@ taglib uri="/namehtmlb" prefix="your_prefix" %>

And use them writing:

<your_prefix:link name="" target="" ... />

Best regards,

Antonio.

diegohs
Active Participant
0 Kudos

Hi Francisco/Antonio, -should we write in spanish ? 😛

Francisco: I'm creating a new j2ee app in the server, its not included inside irj application (sap ep app). For this reason, I can't see all the portal libraries automatically. Because If I put the tag directive in the jsp page, it gives me an error.

Antonio: In the deploy tool, I put some values in the "taglib" tab, and include the tld file. My web.xml file is identically as your example. If I put the tag directive in the jsp page it works ok (just the declaration). But when I try to use an htmlb tag, I receive the following error:

ParseException: ID17091: java.lang.ClassNotFoundException: Class not found com.sapportals.htmlb.taglib.RendererContextTag

My code that works is:

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

<html>

<head><title>Diego</title></head>

<body>

<h1>It works...</h1>

</body>

</html>

My code that gives me the error is:

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

<hbj:content id="MiPagina" >

<hbj:page title="Diego">

<H1>It doesn't work =(</H1>

</hbj:page>

</hbj:content>

Should I include anything else in my App ? any jar file ?

Francisco/Antonio, I appreciate your help a lot... I'm desesperated with this task =(

Thanks and regards from Monterrey, MX.

Diego

Former Member
0 Kudos

Hola Diego,

sorry I misunderstood you. I thought you wanted to write an iView.

Saludos

Francisco

Ps: we could write in spanish, but that would be unfair for the other users in this forum. *g

diegohs
Active Participant
0 Kudos

A piece of my web.xml file:

<taglib-uri>

htmlb

</taglib-uri>

<taglib-location>

/taglib/htmlb.tld

</taglib-location>

</taglib>

Physically, I have a taglib directory that includes the htmlb.tld file.

Regards,

Diego

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Diego,

you do not have to include htmlb.tld and .jar, these are already available in the Portal.

Kind regards

Francisco