This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes Problem with JSTL c:import Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Problem with JSTL c:import" Watch "Problem with JSTL c:import" New topic

Problem with JSTL c:import

Li Xin
Ranch Hand

Joined: Feb 06, 2004
Posts: 37
I tried to use c:import in my jsp like this:

<%@ taglib prefix="c" uri="" %>
<c:import url="" />

However, I got this error on Tomcat 5.5.

javax.servlet.ServletException: javax.servlet.jsp.JspException: Problem accessing the absolute URL "". Connection timed out: connect

The strange thing is that I can access google from IE directly, does anyone have idea about this?

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60774

That is not a complete URL. You must specify the exact resource to import.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Li Xin
Ranch Hand

Joined: Feb 06, 2004
Posts: 37
But even if I specified some complete URL like

it is still the same.
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

The import happens on the server.

Are you sure your server has access to the internet?

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
It is sorta covered in the JavaRanch Style Guide.
subject: Problem with JSTL c:import
Similar Threads
How to return ResultSet from Bean to JSP?
JSTL-XML problem
<c:url> not working properly
JSP, Tomcat, Classpath Error
jsp parsing errors; the file "/struts/html" not found