Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

J2EE Project Re-direct Url in NWDS

Status
Not open for further replies.

deepuk

Programmer
Jul 17, 2007
1
DE
Hello All,

1. I imported a zip file into a NWDS J2EE project.
2. This J2EE Project has a form.html page.
3. In this form.html page there is a button called LOGON which when pressed will go to the Standard Portal Logon Page.
The code of this form.html page is as below :
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 
<HTML>
 
<HEAD>
 
<TITLE> New Document </TITLE>
 
<META NAME="Generator" CONTENT="TSSAP HTML Generator">
 
<META NAME="Author" CONTENT="">
 
<META NAME="Keywords" CONTENT="">
 
<META NAME="Description" CONTENT="">
 
</HEAD>
 
<BODY BGCOLOR="#FFFFFF">
 
<H1>Hallo<H1>
<FORM name="logonForm" method="post" action=" /irj/servlet/prt/portal/prtroot/com.sap.portal.navigation.portallauncher.default">
<input name="login_submit" type="hidden" value="on">
<input type="hidden" name="login_do_redirect" value="1" />
<input name="j_authscheme" type="hidden" value="external">
<table border="0" align="left" valign="top">
<tr>
<td >
User Id
</td>
<td width="183" height="20">
<input name="j_user" type="text" value="">
</td>
</tr>
<tr>
<td width="161" height="20">
Password
</label>
</td>
<td width="183" height="20">
<input name="j_password" type="password">
</td>
</tr>
<tr>
<td colspan="2" height="20">  </td>
</tr>
<tr>
<td colspan="2">
<input value="Log on" type="submit">
</td>
</tr>
</table>
</form>
</BODY>
 
</HTML>

4. Now my task is to avoid this form.html page and write a code in one of the index.jsp page which when executed will directly call the url :-
Code:
 "/irj/servlet/prt/portal/prtroot/com.sap.portal.navigation.portallauncher.default".

5. For this I wrote the following code in Index.jsp page :-

Code:
<%@ page language="java" %>
<html>
	<head>
		<title>
			Title: Portal Logon
		</title>
	</head>
	<body>
		<input 
			name="login_submit" 
			type="hidden" 
			value="on"/>
		<input 
			type="hidden" 
			name="login_do_redirect" 
			value="1" 
			/>
		<input 
			name="j_authscheme" 
			type="hidden" 
			value="external"/>
		<%
			String redirectURL =
				"/irj/servlet/prt/portal/prtroot/com.sap.portal.navigation.portallauncher.default";
				
			response.sendRedirect(redirectURL);
		%>
 
	</body>
</html>


6. But what's happening is :-

When this J2EE Application is executed the url is getting re-directed but instead of thr Portal logon page I'm getting a Popup which asks my UID and PWD and when given in it will log u on to the Portal.
7. What my Qn is why this Pop-up is coming ?
and how to get the Standard Portal Logon Page ?
The url which is used in the earlier form.html page is the same I'm using to re-direct.
But why the output is not same in my case ?

I hope i'm clear in explaining my problem.

Can any one help me out ?

Regards,
Deepu.K




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top