Maybe this discussion would be more appropriate on the main
Tomcat/Catalina list. I'll post it there instead.
Mark R. Diggory wrote:
> This gives me an interesting URL in return, I assume this is out of
> Tomcats JNDI Context.
>
> <%java.net.URL theUrl =
> pageContext.getServletContext().getR
This gives me an interesting URL in return, I assume this is out of
Tomcats JNDI Context.
<%java.net.URL theUrl = pageContext.getServletContext().getResource("/");%>
<%=theUrl.toString()%>
returns
jndi:/localhost/Taglib/
Not quite there, Is there a way to get
Tim Kettering wrote:
>Um, this
I want my taglib to be able to resolve files relative to the jsp page
its within. Unfortunately, the servlet-mapping seems to get in the way
of this. I thought Tim's response was interesting so I tried it but I'm
getting wierd responses (jndi: contexts) instead of filesystems. I'm
thinking, is
Um, this code snippet is in one of my servlets, not a JSP page, but however,
since JSP pages do get compiled to servlets, this might be a clue to an
solution for you?
There may be a more efficient way to do this, but this works perfectly fine
for me for determining where the root directory of th
Interestingly enough, I'm inclined to think the answer is "no." Even if
there's some creative way of doing it that eludes me, you're still not
even guaranteed to *have* a filesystem at runtime. So at best, a solution
would be implementation-specific or container-specific.
What do you need this
I really can't get to the bottom of this one.
Is there any way to get to the "TRUE" filesystem location of the JSP
page I am within? Even if the URI is Mapped through ServletMapping like
below? I've tried getRealPath(...) and this is not accurate on the
Tomcat 4.0.3 version I'm currently using
Problems:
I'm trying to get the real file path to a "possibly" remapped jsp page
I.E. in web.xml -->
JSPTestMap
/Jaxp/JSPTransformExample.jsp
JSPTestMap
/Jaxp/MapExample.jsp
maps the request "/Jaxp/MapExample.jsp" to "/Jaxp/JSPTransformExample.jsp"
if I run your ex
Let me try that again
I think you could use the requestURI() method of the
HttpServletRequest object and pass that to
ServletContext.getRealPath().
Example:
<% out.println(application.getRealPath(request.getRequestURI())); %>
Output for the following request to the above code:
Request:
I think you could use the requestURI and pass that to
ServletContext.getRealPath().
Example the folowing:
<% out.println(application.getRealPath(request.getRequestURI())); %>
Yields:
/files/projects/jakarta-tomcat-4.0/build/webapps/tomcat-docs/tomcat-docs/test.jsp
Have to be careful as if the
Hi,
I'm trying to write a Tag that knows the absolute file path of the JSP
Page it is executing in (Not the request.getServletPath(), which could
actually just be a servlet mapping) does anyone have any tips on how to
get this in Tomcat? I was actually looking throught the actuall Catalina
co
10 matches
Mail list logo