• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

c:import problem

 
Deepinder S Narang
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends

Rest all things are working with jstl including the import from within the webapp itself. But importing from outside is not working.
Can somebody suggest why ?

<c:import url="http://www.wickedlysmart.com/skyler/horse.html" />

Error received

exception

javax.servlet.ServletException: javax.servlet.jsp.JspException: Problem accessing the absolute URL "http://www.wickedlysmart.com/skyler/horse.html". java.net.UnknownHostException: www.wickedlysmart.com
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:821)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.Using_0020JSTL_jsp._jspService(Using_0020JSTL_jsp.java:264)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

java.net.UnknownHostException: www.wickedlysmart.com
java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153)
java.net.Socket.connect(Socket.java:452)
java.net.Socket.connect(Socket.java:402)
sun.net.NetworkClient.doConnect(NetworkClient.java:139)
sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
sun.net.www.http.HttpClient.<init>(HttpClient.java:306)


Thanks in advance !
 
Tridib Samanta
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Deepinder,
It seems that your computer can't resolve the host name. Try this:

<c:import url="http://64.177.220.166/skyler/horse.html"/>
 
Deepinder S Narang
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
now the error message is

exception

javax.servlet.ServletException: javax.servlet.jsp.JspException: Problem accessing the absolute URL "http://64.177.220.166/skyler/horse.html". java.net.NoRouteToHostException: No route to host: connect
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:821)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.Using_0020JSTL_jsp._jspService(Using_0020JSTL_jsp.java:348)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

java.net.NoRouteToHostException: No route to host: connect
java.net.PlainSocketImpl.socketConnect(Native Method)
java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
java.net.Socket.connect(Socket.java:452)
java.net.Socket.connect(Socket.java:402)
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you ping 64.177.220.166 from the server? Does Tomcat possibly run with a security manager that prohibits network connections?
 
Deepinder S Narang
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well getting the host unreachable message ..........
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So the network is configured in a way that does not allow the server to reach that host. You should talk to the network administrators about that.
 
Deepinder S Narang
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks a lot
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic