Questions tagged [jsp-fragments]

JSP Fragments Encapsulates a portion of JSP code in an object that can be invoked as many times as needed.

JSP Fragments Encapsulates a portion of JSP code in an object that can be invoked as many times as needed.

https://tomcat.apache.org/tomcat-5.5-doc/jspapi/javax/servlet/jsp/tagext/JspFragment.html

47 questions
0
votes
1 answer

Include jspf file with custom tag

How can I add jspf file to jsp page via custom tag? In the tag support class I can add code of jspf using.... JspWriter writter = this.pageContext.getOut(); writter.append( "html code"); But what shall I do to add file?
Oleksandr
  • 2,346
  • 4
  • 22
  • 34
0
votes
0 answers

Inserting HTML code snippets inside jspf file

I have a jspf file with java code inside. On one line, I have an if statement, that if excecuted, it will print one single Java line(a text string), but also some html content (a tooltip with a clickable image that expands an area). So the tooltip…
0
votes
0 answers

JSTL Choose tag always evaluating to false

<% Boolean loggedIn = (Boolean)session.getAttribute("login"); System.out.println("loggedIn is " + loggedIn); %>
<% System.out.println("loggedIn is now " + loggedIn); %>
Arvind
  • 155
  • 3
  • 12
0
votes
2 answers

highlight active menu item, according to current page with jsp/jstl, no javascript

I am currently working on a site that uses jsp and jstl. I like to highlight in the navbar the active tab with an active class used in bootstrap 4, according to the current page, i found many ways (thymeleaf) to get the result, but none with pure…
user6221709
0
votes
1 answer

JSP Custom tags - Fragment Attribute not working

I am trying to create my jsp custom tag for layout purpose. I created panelLayout.tag file like <%@ tag language="java" pageEncoding="ISO-8859-1"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@ attribute name="heading"…
commit
  • 4,777
  • 15
  • 43
  • 70
0
votes
1 answer

Why does tomcat includes *.jspf fragments as static text while jetty processes them dynamically?

I was developing my toy project using jetty maven plugin and executing goal jetty:run. Now i decided to check how it works on tomcat. I have two jspf fragments: header.jspf and footer.jspf inside of WEB-INF/jspf/ containing common code for all of my…
Kirill
  • 6,762
  • 4
  • 51
  • 81
0
votes
0 answers

JSPF file includes no CSS file

I have two JSPF-Files called header.jspf and footer.jspf header.jspf: <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
NoName123
  • 137
  • 5
  • 20
0
votes
1 answer

Not getting CatalogEntryDataBeans using CategoryDataBean

I am using a UseBean in my Jsp then I try to get 'CatalogEntryDataBeans' value using 'category' instance, something like…
Just_another_developer
  • 5,737
  • 12
  • 50
  • 83
0
votes
1 answer

Insert path into through a controller

Hi I was searching inside stackoverflow but cant get any answer. I'm using jsp fragments to generate my jsp code this way: <%@include file="/resources/fragments/contents/index.jspf" %> but I'm trying to set the path throug a ModelMap on my…
0
votes
1 answer

Strategy when retrieving user name from session

I have a technical problem and I am not sure about the correct way to solve: In a web page I am developing, I have to store the current user name from session (the person who is logged in) to "stamp" an action. (For instance, "The user created this…
stack man
  • 2,303
  • 9
  • 34
  • 54
0
votes
0 answers

Unable to compile class for JSP: An error occurred in jspf. Which JSP?

The tomcat log throws the following error: Sep 15, 2014 7:34:52 PM org.apache.catalina.core.StandardContext loadOnStartup SEVERE: Servlet threw load() exception org.apache.jasper.JasperException: Unable to compile class for JSP: An error…
Ujjwal Singh
  • 4,908
  • 4
  • 37
  • 54
0
votes
2 answers

SuppressWarnings in jsp file

How do you suppress warnings (or even errors) in a jsp fragment file in Eclipse? I have this jspf that I include in the middle of the jsp file, but that jspf relies on a variable further up in the code before it is included. However, even though…
kerafill
  • 274
  • 1
  • 4
  • 14
0
votes
1 answer

How to include css stylesheet inside partial jsp?

jspf header: <%@page contentType="text/html" pageEncoding="UTF-8"%>
Vladimir
  • 335
  • 1
  • 7
  • 24
0
votes
1 answer

Inline content not showing on more than one page

I'm facing the following problem: I'm using jQuery to display an inline pop-up when trying to press a link on a page. The inline popup is defined inside a .jspf page as follows:
0
votes
1 answer

How can I detect portion of URL and output value if condition matches?

I need to create a special condition if the page URL in the browser address bar ends in "search". In my .jpsf file, I have this code so far:
surfbird0713
  • 1,209
  • 2
  • 23
  • 45