• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Servlet not found using <jsp:include

 
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I'm attempting to call a servlet that is deployed on a different server to my jsp.
The call is being initiated from within a jsp using the following:-

<jsp:include page="<%=servletURL%>" flush="true" >
<jsp:param name="fullDebug" value="<%=turnOnFullDebug%>" />
</jsp:include>

servletURL contains the following:-

servletURL="http://"+serverIPAddress+":"+serverPort+"/applicationDeployedName/ServletName";

I get the following error:-

java.lang.IllegalArgumentException: Resource /test/admin/http://serverIPAddress:serverPort/applicationDeployedName/ServletName?fullDebug=Y not found

How can I get this detect the servlet?

Please note that my jsp is located under public-html/test/admin/

Mat
 
Sheriff
Posts: 9707
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The jsp:include action is used to include resources from the same web application. if you want to include a resource from a different web application, then use <c:import>.

This has got nothing to do with servlets. Please take time to Carefully Choose One Forum when you start a topic. Moving to JSP forum...
 
Mat Anthony
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ankit,
tried the <c:import as follows:-

><c:import url="<%=servletURL%>">
<c:param name="fullDebug" value="<%=turnOnFullDebug%>" />
</c:import>


Got the following error:-
javax.servlet.jsp.JspTagException: /opus_tests/ws/<%=servletURL%>?fullDebug


Not sure why <%=servletURL%> is not seen


MatD
 
Ranch Hand
Posts: 689
Scala Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If possible put your JSP code to get clear idea about your servletURL and other value.
 
Mat Anthony
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Nishan,
will this do

<%@ taglib prefix='c' uri='http://java.sun.com/jstl/core'%>

<%
String servletURL=servletLocation+"/testServlet";
%>

servletURL=<%=servletURL%>

<c:import url="<%=servletURL%>">
<c:param name='fullDebug' value='<%=turnOnFullDebug%>' />
</c:import>

Mat
 
reply
    Bookmark Topic Watch Topic
  • New Topic