Problem with JSP syntax include


    Sponsored Links


  • 1. compiler class
    Hi to every one, I found in a java Book from Sun, that one can programmatically compile a class with a third party compiler. Someone knows one Free compiler? Someone has an example of this procedure? Happy New Year :-) -- Thanks for your attention. Jean Pierre Daviau
  • 2. Synchronization question
    Let say I have a class named Home. public class Home{ public Home() {} public int getColor() {...) public int getSize() {...} public setColor(...) {...} public setSize(...) {...} } (The actual code is irrelevant) If a method is called from that class by a thread, I would like to cut the possibility of another thread calling this method or any other methods of the same instance of this class until the execution of that method is completed. An example: Given a single instance of Home as home. Thread 1 calls home.getSize(); Thread 2 calls home.getColor(); but since Thread1 is already calling a method of class home (same instance), it is awaiting until Thread1 finishes using home. Thread 1 finishes with home.getSize(); Thread 2 can now enter home.getColor(); >From what I understand putting synchronized into public synchronized int GetColor() {...} would only work on that method but any other method in home could be called even if GetColor is already being used. Is there a simple way to allow only one access to any method of an instance of a class at the same time? Thanks for any input.
  • 3. jsp prg
    hai, I need a help where to we save the jsp file using some html tags
  • 4. a way of converting a roman numeral into an integer
    Hi i'm fairly new to java and have been assigned to create a basic application which converts a roman numeral inputted by a user and then outputs the corresponding number (integer). Any tips on how to do this will be much appriciated. I was thinking of doing an array for each numeral and number but again i can't really work this out till i figure out how to convert the numeral into an integer. Thanks
  • 5. how to execute commands.
    Hello , Am new to java. i want to go inside some drive and execute some commands ther any option of doing the same using java RUNTIME class. Regds, Prajwal.

Problem with JSP syntax include

Postby Ulrich Hobelmann » Fri, 23 Sep 2005 20:12:32 GMT

(Sorry if this isn't really Java-related, but I couldn't find a single 
newsgroup on servlets or JSP.)

I'm going through the "Spring MVC step by step" tutorial for the Spring 
framework, and at the end of step 14 (in part 2), my Tomcat gives me an 
org.apache.jasper.JasperException: The absolute uri: 
or the jar files deployed with this application

What I did was installing the jstl.jar and standard.jar (and others) in 
my webapp's lib directory and setting the include tag as mentioned in 
about every single piece of documentation on the planet I could find:

<%@ taglib prefix="c" uri=" http://www.**--****.com/ " %>

AFAIK I don't need to set anything in the web.xml since this is an 
absolute URL, right?  (well, at least the Spring intro didn't mention 

Can anybody point me in the right direction?


My mouth says the words, my brain is thinking monstertrucks.
Joey (Friends)

Re: Problem with JSP syntax include

Postby Oliver Wong » Sat, 24 Sep 2005 03:07:54 GMT

    Sorry, I don't know Spring at all, so I can't help you directly with 
your problems, but I can point you to servlet and JSP related newsgroups:


    Of course, I haven't check if they are dead or not. You may also want to 
try Google Groups related to JSP, e.g.: 

    - Oliver 

Similar Threads:

1.[JSP] difference between jsp:forward and jsp:include

What's the difference between the two :

	<jsp:forward page="two.jsp">
		<jsp:param name="param1" value="value1">
		<jsp:param name="param2" value="value2">

	<jsp:include page="two.jsp">
		<jsp:param name="param1" value="value1">
		<jsp:param name="param2" value="value2">

paramaters are passed between the pages

thx for your advice.

2.Including an external file outside the application using JSP INCLUDE


Is there an easy way to include static content outside the WEB
application using JSP include??, rather than opening a file input
stream and outputting to JSP??.

Assuming my war file is placed under

and it has a jsp which need to include a static html or jsp file
located under c:\renderedJspsFromExternalApplication\file1.jsp



how should i be doing it?


3.file included with jsp:include doesn't get parameters


I have this example (jsp 2.0):

<c:forEach items="${myItems}" var="foo">
           ${foo}  <!-- works fine -->
           <jsp:include page="mypage.jsp"/>


the expression in mypage doesn't evaluate to any value. i used c:out
and got the same results, and foo is there for sure in some_file.jsp.

i also tried to include from a tag, using pageContext.include(), same

i guess i can pass parameters to mypage.jsp using 'param', but i don't
want to do that, in the real case that i have (i want to pass
everything to this page, because i use this include generically in many
places, and using different pages)

i can (and prefer) to do it from a tag


4.Problem with <jsp:include on Tomcat 5

Hi all, I hope someone can help me understand why this doesn't work.  I
guess I don't understand how <jsp:include is supposed to work...  :-)

here is include.jsp:
<jsp:include page="include.jspf" />

and here is include.jspf:
<%  String a = "hello";  %>

when I browse to include.jsp, I would expect to see the word hello in
my browser.  However, there is nothing in the browser.  when I look at
the source, I see:
<% String a = "hello"; %>

what gives??? it seems to be blindly including the jspf file into the
source, rather than *evaluating* the .jsfp file.  If I paste the
contents of the .jspf into the .jsp file in place of the <jsp:include
statement, I get the word hello, but that defeats the purpose of code


5.Problem with jsp:include

I have a JSP that uses jsp:include to add some dynamic content.

I am using the following code:

<jsp:include page="/Controller?action=topMenu">
	<jsp:param name="top_menu" value="displayHome" />


<jsp:include page="/generic/topMenu.jsp">
	<jsp:param name="top_menu" value="viewDevices" />

When running on WebLogic 6.1 SP 5 on Unix, I am encountering problems
with the first piece of code.

In this case, the server executes JSP code that is prior to the
jsp:include tag, and returns the result from the jsp:include tag. The
rest of the page is not returned.

I have also tried to set flush=true, but the result is no different.

Both 1) and 2) run as expected on WebLogic 6.1 SP2 on PC. As far as I
can see from the Javadoc, both these versions of jsp:include should be

Any solutions or workarounds to the problem are highly appreciated.


Jon Rasmussen

6. problem with parameters in JSP includes

7. Syntax to include custom Java classes

8. <%JSP:include page="hello.jsp" %>

Return to JAVA


Who is online

Users browsing this forum: No registered users and 0 guest