RE: tomcat relative path in .jsp

2003-11-06 Thread Shapira, Yoav

Howdy,
What is the path used for?  Is it a link to another HTML/JSP/servlet, or
is it a destination for uploaded files?

If the former, use a relative link, e.g. ../upload.  If the latter, you
need an absolute path to a directory to which the server user has write
permissions.  You can use javax.servlet.context.tempdir or a directory
you configure via a context-param in web.xml.

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Steve Harris [mailto:[EMAIL PROTECTED]
>Sent: Thursday, November 06, 2003 1:47 PM
>To: [EMAIL PROTECTED]
>Subject: tomcat relative path in .jsp
>
>Hi,
>
>I'm managing a tomcat application server that has an application with a
>.jsp that has the path hard coded, e.g. ;
>
>/opt/local/jakarta/jakarta-tomcat-4.0.6/webapps/els/upload
>
>The path is used to upload files to.  I'd like to recommend to the
>developer a change that could be made to make this path relative rather
>than absolute  - any ideas ?
>
>Cheers - Steve
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



tomcat relative path in .jsp

2003-11-06 Thread Steve Harris
Hi,

I'm managing a tomcat application server that has an application with a
.jsp that has the path hard coded, e.g. ;

/opt/local/jakarta/jakarta-tomcat-4.0.6/webapps/els/upload

The path is used to upload files to.  I'd like to recommend to the
developer a change that could be made to make this path relative rather
than absolute  - any ideas ?

Cheers - Steve



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Path in JSP

2001-11-20 Thread Craig R. McClanahan



On Tue, 20 Nov 2001, Reto Badertscher wrote:

> Date: Tue, 20 Nov 2001 14:53:08 +0100
> From: Reto Badertscher <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Path in JSP
>
> Hello,
>
> when accessing a JSP thru a servlet (forward) the following path
> /image/logo.gif is valid. When calling a JSP directly i have to use
> ../image/logo.gif (image and jsp folder are on the same level).
> What can i do to use the same path definition?
> How can i prevent users from directly accessing a JSP?
>

You can do this by putting the JSP page itself inside the WEB-INF
directory.  This will make it impossible to access the page directly from
a browser, but still allow you to do a RequestDispatcher.forward() to it.

However, you might prefer a solution that makes your relative paths to
images work under all circumstances.  Check out the  directive in
the HTML specs.

> Thanks a lot for any tip
>
> Reto
>

Craig McClanahan


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




AW: Path in JSP

2001-11-20 Thread Reto Badertscher

Sorry for the error : path '/image/logo.gif' should be 'image/logo.gif'

Regards

Reto

-Ursprüngliche Nachricht-
Von: Reto Badertscher [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 20. November 2001 14:53
An: [EMAIL PROTECTED]
Betreff: Path in JSP


Hello,

when accessing a JSP thru a servlet (forward) the following path
/image/logo.gif is valid. When calling a JSP directly i have to use
../image/logo.gif (image and jsp folder are on the same level).
What can i do to use the same path definition?
How can i prevent users from directly accessing a JSP?

Thanks a lot for any tip

Reto


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Path in JSP

2001-11-20 Thread Reto Badertscher

Hello,

when accessing a JSP thru a servlet (forward) the following path
/image/logo.gif is valid. When calling a JSP directly i have to use
../image/logo.gif (image and jsp folder are on the same level).
What can i do to use the same path definition?
How can i prevent users from directly accessing a JSP?

Thanks a lot for any tip

Reto


--
To unsubscribe:   
For additional commands: 
Troubles with the list: