Calling a servlet from a JSP page using the J2EE reference implementation
Joe Guzzardo
Ranch Hand
Joined: Mar 14, 2000
Posts: 57
posted
0
I have a JSP with an include tag as follows: <jsp:include page="servlet/ConnectionServlet" flush="true" /> When I use JRUN it works fine. I created an ear file and ported the application to the J2EE reference implementation. When running the app under the J2EE reference implementation the ConnectionServlet is never called. I figured it must a deployment issue. I tried adding the ConnectionServlet.class file to the WEB-INF\classes file as servlet\ConnectionServlet.class but the JSP still can't find the servlet. Any ideas where I've gone wrong? TIA, Joe
wenwei cheng
Greenhorn
Joined: Jul 12, 2001
Posts: 5
posted
0
can you try <jsp:include page="http://yourdomainname/servlet/ConnectionServlet" flush="true" />
Joe Guzzardo
Ranch Hand
Joined: Mar 14, 2000
Posts: 57
posted
0
I quote this from the j2ee guide: page= "{ relativeURL | <%= expression %> }" The relative URL that locates the file you want to include, or an expression that evaluates to a String that is equivalent to the relative URL. The relative URL looks like a pathname-it cannot contain a protocol name, port number, or domain name. The URL can be absolute or relative to the current JSP file. If it is absolute (beginning with a /), the pathname is resolved by your Web or application server. So I don't think your suggestion will work, but thanks anyway.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: Calling a servlet from a JSP page using the J2EE reference implementation