File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need help with Tomcat 4.0.4 on RedHat Linux

 
Randall Stevens
Ranch Hand
Posts: 65
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3695
IntelliJ IDE Java Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
'.' 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
Posts: 65
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

'.' 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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic