Building website in JSP format facing some issues

hi friends i am developing website in Hippo for the first time by using JSP format and i am facing some issues can anybody have material or link on how to develop website in jsp please give me…

And i am developing website by taking HTMLs and converting them into JSP and making contents dynamic .

while making contents dynamic i am using jsp loops and conditions as follows

<c:choose>
<c:when test="{not empty document}" > <h1><c:out value="{document.title}" />


<hst:html hippohtml="${document.content}" />

</c:when>
<c:otherwise>

Goodbye? cruel world


</c:otherwise>
</c:choose>

Here <c:out value="{document.title}" /> this is used to select string field from the hippo document and <hst:html hippohtml="{document.content}" /> this is used to select rich text field from hippo document. Like this for images, links, videos, navigation menu, gallery and so on fields which tags are used??

Friends help me for this…

Images you create links to with hst.link and then use that in the img tag. Videos are the same. Menus require you put the menu object on the request, then you have to expand them yourself. You can check this out in an archetype with some essentials components added. Or check the test-suite for examples, it’s a bit much to explain here.

Please also follow our tutorials.

hi thanks for quick reply

can you tell me the hst tags used for images, videos, links menus like this(<hst:html hippohtml="${document.content}" />) ??

or

give me the link i will follow that link or tutorial

For binary assets in the repository you can use
<@hst.link hippobean=binaryBean var=“link”>

We have quite a few tutorials, starting here:

They work through standard features and also somewhat how to develop your own.

<@hst.link hippobean=binaryBean var=“link”>

this is used to give path that too for static

i am asking for jsp tag which can be directly linked to document image created in CMS like below image

for Rich text editor field we are giving following code to make this dynamic

<hst:html hippohtml="${document.content}" />

same way for image field which code is using???

If your document links to an image then your document bean should have a getter to retrieve it. That can be used in the hst.link tag.

<@hst.link hippobean=document.image var=“link”>

thank you for the reply bro but i am unable to get output getting error

img3

leave all bro in attachments image1 is my document type and image2 is my jsp code by using that jsp code i am getting title and content of the document on site if i modify them in document they are directly reflecting on site no issue with them, now tell me how to get image from document and what code should i write in jsp file ??

help me friends

Your variable “document” is represented by a Java bean. This should have a method getPhoto(), check that please. If that is missing, go to essentials and use the beanwriter tool. On your templateyou would use:

<@hst.link hippobean=document.photo var=“link”>

note you lose the “get” and the capital.

The spelling error you see is irrelevant. That’s just your IDE trying to be helpful, but its not a real error.

getting error bro help me

see: Unable to retrieve image from hippo document through jsp page