on 05-08-2006 6:03 AM
Hi all,
My requirement is to render a JSP page on click of a hyperlink on the current display page.
Both the pages are put directly under the Portal-INF directory.
when I try to directly include the file in the <a> tag -
<a href="<%@ include file="/myFile.jsp" %>">Contact us</a>
--
It gives me an error.
Can anyone please suggest as to how I can invoke "myFile.jsp" on click of the Hyperlink "Contact Us"
Regards,
Ashwini.
HI,
If you want to render the new jsp in the same window the give the link as
<a href="http://servername:porthttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/projectname.jspname_without_.jsp_extension">Contact us</a>
If you want a popup then you should go for a button, because the HTMLB Link does not have a tag lib for onClientClick. so you cannot use Jscript to render the page in a new window, then you have to go for the classlib approach to do this.
Message was edited by: Kirupanand Venkatapathi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
If you want to render the new jsp in the same window the give the link as
<a href="http://servername:porthttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/projectname.jspname_without_.jsp_extension">Contact us</a>
If you want a popup then you should go for a button, because the HTMLB Link does not have a tag lib for onClientClick. so you cannot use Jscript to render the page in a new window, then you have to go for the classlib approach to do this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ashwini,
Check out this ...
<% String contactjsp = componentRequest.getWebResourcePath() + "/PORTAL-INF/myFile.jsp"; %>
<a href="<%=contactjsp%>">Contact us</a>
where myFile.jsp is inside PORTAL-INf directory.
Regards,
Uma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This wont work as you are trying to use include directive as a href attribute value. The effect of a include directive is essentially equivalent to replacing the directive with the contents of the included file.
if you have both the files in the same directory then simply use
<a href="myFile.jsp">Contact us</a>
-- Amol
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi rajesh,
I am actually trying to modify the portal logon page. I have a link - on the click of which i need to take the user to another page-
This Hyperlink is a new addition to the umLogonTopArea.txt in the logon.par.
I have also put the new file to be displayed in the same folder as the other JSP files in the logon.par (dist/Portal-INF/..)
But since the JSP file that I need to display is a <b>new addition to the logon.par</b>, I am not too sure if I need to do some addtional configuration in the pcd directory to pick up this new file.
How can I go about adding the new file to the logon.par and invoke it from the <a> tag assuming that the current page and the page to be displayed are in the Portal-INF directory?
- Ashwini.
Hi Ashwini
For any new jsp u need to make an entry into portal-app.xml and the new JSP should be placed in PORTAL-INF\pagelet folder. Also as suggestion instead of using Jsp u can go for a html page , since contact us contain only static info ? correct me if i am wrong
hope this helps ,do not forget to reward points
regards
rajeshkr
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.