aspose file tools*
The moose likes Tomcat and the fly likes Need help with Tomcat 4.0.4 on RedHat Linux Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Need help with Tomcat 4.0.4 on RedHat Linux" Watch "Need help with Tomcat 4.0.4 on RedHat Linux" New topic
Author

Need help with Tomcat 4.0.4 on RedHat Linux

Randall Stevens
Ranch Hand

Joined: Jul 01, 2003
Posts: 65
I am running a test server on a Linux box. Right now it is using a default configuration. My servlets are located in /jakarta-tomcat-4.0.4/webapps/examples/WEB-INF/classes.
In my servlets, I receive a relative path to different html files.
For instance I receive a relative path of "./English/US/welcome.html", where do I need to create the "./English/US/" directory structure?
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

'.' is fairly tricky.

How would you be using this path? (you speak of 'receiving' the path in your servlet). Does someone submit it to your servlet in a web form?

Is your intention to include the HTML files as part of the servlet's output? If so, then "/English/US" will be here:

/jakarta-tomcat-4.0.4/webapps/examples/

"." will only confuse the issue.
Randall Stevens
Ranch Hand

Joined: Jul 01, 2003
Posts: 65

'.' is fairly tricky.

That is a given.

How would you be using this path? (you speak of 'receiving' the path in your servlet). Does someone submit it to your servlet in a web form?

I talk to a backend application, based on certain information that I pass to the backend it will provide me with a path to an HTML file, or JSP file

Is your intention to include the HTML files as part of the servlet's output? If so, then "/English/US" will be here:
/jakarta-tomcat-4.0.4/webapps/examples/
"." will only confuse the issue.

If it returns an HTML file, my servlet does a sendRedirect(url). If it returns a JSP, then I do a setAttribute and take the url and use the RequestDispatcher's getServletContext().getRequestDispatcher(url) to forward the requested file with embedded parameters.
If I receive without the "." can I just hang my directory structure off of
/jakarta-tomcat-4.0.4/webapps/examples/ ?
Randall
 
jQuery in Action, 2nd edition
 
subject: Need help with Tomcat 4.0.4 on RedHat Linux