You can do this by:
In JSP:
<form Action="<%=ServletNames.MY_SERVLET %>">

And Create a separate class file , like this:

public class ServletNames
{
    public static final String    MY_SERVLET = "RelativePath/MyServlet" ;
}

----- Original Message -----
From: Kumar, Ashutosh(sdc) <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 07, 2000 5:11 PM
Subject: properties file for JSP(Urgent help reqd)


> Hi All
>
> To invoke a servlet from jsp , I need to give url as
> /WebappPath/servlet/package name.servlet name in WebSphere app server.
> This WebAppPath ,I dont want to hard code in my JSPs.
> So I am thinking to read this WebAppPath from a property file of JSP to
> avoid hard coding in JSP.
> How to do that, pl. guide me.(If possible , particular to WebSphere/Visual
> age).
> If any other solution possible apart from property file , pl. let me know.
>
> Thanx in advance.
>
>
> ***************************************
> * Ashutosh Kumar
> * HCL Perot Systems Ltd.
> * B-26, Sector-57
> * Noida-201301. U.P.
> * India.
> * Phone: +91-11-8-4581236/37/38/39/40
> * Fax: +91-11-8-4581235
> * email: [EMAIL PROTECTED]
> ***************************************
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to