Questions tagged [jspinclude]

The `` element allows you to include either a static or dynamic resource in a JSP page.

The <jsp:include> element allows you to include either a static or dynamic resource in a JSP page. The results of including static and dynamic resources are quite different. If the resource is static, its content is included in the calling JSP page. If the resource is dynamic, it acts on a request and sends back a result that is included in the JSP page. When the include action is finished, the JSP container continues processing the remainder of the JSP page.

181 questions
2
votes
2 answers

Simple JSP website

I'm looking for help/advice with creating simple JSP website using equivalent of PHP include+switch function. The goal is that I want to be able to switch between multiple JSP include pages in one main page. What would be the simplest possible form…
Registered User
  • 3,050
  • 5
  • 26
  • 32
2
votes
3 answers

How to load Html page which is outside application context using JSP include or c:import or symlink

I need to load some html pages created dynamically by some other application into my application jsp page using jsp include tag OR . My idea is to have a shared…
Ganesh K
  • 2,623
  • 9
  • 51
  • 78
2
votes
4 answers

How do I include a header into my site that is hosted externally?

We are hosting a site for a client and they want us to include the header they have on their server into the pages we are hosting. So whenever they change it, it will automatically change on our site. We are attempting to use the "include" tag in…
DMurph11
  • 33
  • 1
  • 4
2
votes
1 answer

JSP/Servlet scope issue in jsp:include tag

I'm just puzzled, when I use the in indexq.jsp my data didn't show up, but when I use <%@ include file="include/data.jsp" %> it works as expected. I'm not sure if its a scope or expression language issue. I…
jjz
  • 2,007
  • 3
  • 21
  • 30
2
votes
2 answers

Validation Required Before Loading jsp

I have one scenario where I want to do some validation before my welcome.jsp page get loaded. Actually the validation is like I have a user id (using request.getRemoteUser) which I want to check in my Db whether it is already there or not. If yes,…
Shibankar
  • 806
  • 3
  • 16
  • 40
2
votes
1 answer

Howto re-use War resources between Wars with Maven War Plugin

Under a Java EE enviroment, I have a web page built including several JSP files. Lets say one of the included JSP is header.jsp. Can be very similar to the one used by Stackoverflow, showing info about the user, links etc. This JSP is linked to a…
Marcos
  • 93
  • 1
  • 11
2
votes
4 answers

JSP Error: Expecting "jsp:param" standard action with "name" and "value" attributes

I have a JSP page having the following code:
<% if(researchTabON) { %>
user620339
  • 851
  • 3
  • 20
  • 42
1
vote
1 answer

How to pass a parameter to an included page with JSF 1.2

Is this possible to pass a parameter to an included page in JSF1.2 environment? I have a page a.jsp in which b.jsp is included twice (I tested all jsp:include, a4j:include, c:import) once at top of the page and once at the bottom. I want to figure…
Mohsen
  • 3,512
  • 3
  • 38
  • 66
1
vote
0 answers

Struts Passing Static Class Name Through Include

I'm attempting to reduce code by creating a include for a common block of code I have bewtween two JSPs. However, I'm having the hardest time trying to figure out how to pass this include parameters with struts. In the parent JSP, I have…
kand
  • 2,268
  • 6
  • 31
  • 43
1
vote
2 answers

How Do I Control Handling of Exceptions Thrown Inside jsp:include Includes?

I have a JSP, which includes another JSP via . I also have (what I think is) a standard error page setup. The problem is that when an exception occurs inside the included file, it doesn't "bubble up" to the including JSP. Instead, it…
machineghost
  • 33,529
  • 30
  • 159
  • 234
1
vote
1 answer

What's the equivalent of C++'s "#ifdef #endif" macro in JSP?

What's the equivalent of C++'s #ifdef #endif macro in JSP? Is there such thing in JSP? I want to conditionally include files in one JSP or another. Reason for doing that is because I have a nested setup (nested jquery ui tabs). I prefer to include…
ytw
  • 1,335
  • 2
  • 20
  • 42
1
vote
2 answers

How to use JSP tags in JSP fragment?

Can anyone tell me if you can use JSP tags like this: ... in fragments of JSPs with a .jspf extension which are embedded into JSPs using include, e.g.: or is it…
Mr Morgan
  • 13
  • 1
  • 5
1
vote
1 answer

Include a CSS file as inline style in a JSP

I have a CSS file ("style.css") that I want to embed as inline CSS in a JSP. How can this be done? I have tried the following, but the CSS file is not imported: Thanks!
Donald T
  • 10,234
  • 17
  • 63
  • 91
1
vote
4 answers

Multiple tags in the jsp page

I have jsp page, that include multiple jsp pages. And in result i have multiple tags in the main jsp page. Everything is working, but I've read that multiple tags on one page not recomended. So, is it any solution for merge all …
Oleksandr
  • 2,346
  • 4
  • 22
  • 34
1
vote
1 answer

Spring-mvc : serving JSP that was already statically included in another loaded jsp

is this possible? I'm loading a JSP that statically includes a jsp fragment. Then I use ajax to reload only the jsp fragment, but I get Caused by: org.apache.jasper.JasperException: Unable to load class for JSP at…
lisak
  • 21,611
  • 40
  • 152
  • 243