File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Cattle Drive and the fly likes Breaking the path roadblock.... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "Breaking the path roadblock...." Watch "Breaking the path roadblock...." New topic

Breaking the path roadblock....

Carol Murphy
village idiot

Joined: Mar 15, 2001
Posts: 1195
* The servlet url is defined by the app server config files. The base url
* plus /servlet/ is the default in Orion.
* For example, if request.getRequestURI() returns "/videos/addvideos.jsp",
* the path returned will be "/videos/servlet/". (The relative path would be
* "servlet/VideoServlet)"
* @param request
* @return the jsp document path plus the directory where the app server expects
* to find the servlets ending with a slash.
public static String getPathFromJSPToUnMappedServlet( HttpServletRequest request )
return getBasePath( request ) + "servlet/";

This comes from the documentation in I'm working on getting the input from addvideo.jsp to VideoServlet, but for some reason VideoServlet remains hidden to my browser. If I understand the documentation here (!) the form in addvideo will post the input parameters to this location:

PathFinder.getPathFromJSPToUnMappedServlet( request ) + "VideoServlet"

which would be this on my system:


The location of this servlet is actually: orion/applications/videos/WEB-INF/classes/com/javaranch/drive/videos/

Do I have everything set up right? The package statement in VideoServlet is:
package ;
Why can't my browser see this servlet?
Marilyn de Queiroz

Joined: Jul 22, 2000
Posts: 9046
What do you have in your web.xml?

"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Carol Murphy
village idiot

Joined: Mar 15, 2001
Posts: 1195
Aha! This is the web.xml that was inside videos/WEB-INF/
The thing is, I edited this for VideoServlet, but now it has reverted to Reverse2Servlet, but I don't know why. I'm going to try commenting out the Reverse2Servlet and adding VideoServlet in its own tags.
This isn't the first time I've edited a file, only to have the original version from before the edit show up in the war file. What's up with that?

<?xml version="1.0"?>
< !DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "">

< !-- A demo servlet, add servlets below -->
< !--<br /> <servlet><br /> <servlet-name>BeeServlet</servlet-name><br /> <servlet-class></servlet-class><br /> </servlet> -->
Carol Murphy
village idiot

Joined: Mar 15, 2001
Posts: 1195
Hmm, I must have changed the web.xml file in some location other than the java.resources file. I edited the file there, and now VideoServlet is visible. Doesn't work right yet, but it's visible. Thanks!
I agree. Here's the link:
subject: Breaking the path roadblock....