• Post Reply Bookmark Topic Watch Topic
  • New Topic

href link not working  RSS feed

 
Shrikant Kulkarni
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I have a simple J2EE application in which when clicking on a link, the request should forward to another jsp page. I am using Oracle 10g AS wireless. I am accessing the application in IE through oracle wireless portal (ptg/rm) gateway.

The code is as follows (title.jsp page)
<%
// setting the content type according to the browser.
if(request.getHeader("User-Agent").indexOf("MSIE") > 0){
response.setContentType("text/html");
} else if(request.getHeader("User-Agent").indexOf("PTG") > 0){
response.setContentType("application/vnd.wap.xhtml+xml; charset=UTF-8");
response.setHeader("Cache-Control", "no-store"); // HTTP 1.1
response.setHeader("Pragma", "no-cache"); // HTTP 1.0
response.setHeader("Expires", "0"); // prevents caching at the proxy server.
}

if("".equalsIgnoreCase(request.getParameter("ch"))){
%>
<jsp:forward page="hello.jsp" >
</jsp:forward>
<%
}
%>
<html>
<body>
<form name="" action="title.jsp" method="post" >
<table>
<tr>
<td>
<%
String check = "Link";
%>
<href="title.jsp?ch=<%=check%>">Link
</td>
</tr>
</table>
</form>
</body>
</html>
When the title.jsp page is accessed for the first time the URL is http://<server name>:<port no>/ptg/rm
When i click on the link it shows error page (Page cann't be found" but in the deployed EAR file the "hello.jsp" was included.
But when i click on the Link, the URL changes to
http://<server name>:<port no>/ptg/title.jsp?ch=
Here the rm of ptg/rm got misplaced.
but according to my experience it should be
http://<server name>:<port no>/ptg/rm with some postfix string.

can any one please tell me what could be the reason?
How can i forward the request to "hello.jsp" page?

Thanks well in advance.
Shrikant
[ April 27, 2006: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Shrikant KS", you have previously been warned on one or more occasions regarding adjusting your display name to meet JavaRanch standards. This is not optional. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it prior to your next post.

Be aware that accounts with invalid display names are removed.

bear
JavaRanch Sheriff
 
Shrikant Kulkarni
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See i have chnages my display name.
Sorry for the delay.

Shrikant
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!