JSP to Frame...

Thread Solved

Join Date: Nov 2008
Posts: 27
Reputation: jaiprakash15 is an unknown quantity at this point 
Solved Threads: 0
jaiprakash15 jaiprakash15 is offline Offline
Light Poster

JSP to Frame...

 
0
  #1
Mar 9th, 2009
Dear Friends,

I am working on a project where i have a JSP page(ex1.jsp) and in that JSP page i have 2 frames((ex2.jsp on top) and (ex3.jsp in bottom))...When ex1.jsp is called..it has to load ex2.jsp frame and ex3.jsp by passing some paramenters to it.. Please see the code..


  1. <%@page contentType="text/html" pageEncoding="UTF-8" import=java.util.*,java.text.*" session="true"%>
  2. <%
  3. Vector vBtrs = null;
  4. String szKType = "";
  5. String szKDesc = "";
  6. String szOpearion = "";
  7. String szCustomForm = null;
  8. try{
  9. request.setCharacterEncoding("UTF-8");
  10. szKType = request.getParameter("KType");
  11. szKDesc = request.getParameter("KDesc ");
  12. szOpearion = request.getParameter("operation");
  13. szCustomForm = request.getParameter("customform");
  14.  
  15. if(szCustomForm !=null && szCustomForm.equals("yes")){
  16. System.out.println("IT is going for Custom form");
  17. }else{
  18. vBtrs = (java.util.Vector)request.getAttribute("Btrs");
  19. System.out.println("*************BTRS===>"+vBtrs);
  20. session.setAttribute("Btrs",vBtrs);
  21. }
  22. }catch(Exception e){
  23. e.printStackTrace();
  24. }
  25. %>
  26. <html>
  27. <head>
  28. <title>BtrList</title>
  29.  
  30. <%
  31. if(szCustomForm != null && szCustomForm.equals("yes")){
  32. %>
  33. <frameset rows="30%,*" frameborder="1" >
  34. <frame src="jsp/ex2.jsp?KType=<%=szKType%>&KDesc=<%=szKDesc%>&operation=<%=szOpearion%>" name="" scrolling="auto" name="btrsFrame1"></frame>
  35. <%
  36. }else{
  37. %>
  38. <frameset rows="23%,*" frameborder="1" >
  39. <frame src="jsp/ex3.jsp?KType=<%=szKType%>&KDesc=<%=szKDesc%>&operation=<%=szOpearion%>" name="" scrolling="auto" name="btrsFrame2"></frame>
  40. <%
  41. }
  42. %>
  43. <frame src="" name="showframe" scrolling="auto"></frame>
  44. </frameset>
  45. </head>
  46. </html>


i don't want this URL passing(as am passing some other language values, this passing is not supported)...is there any other method or way that i can pass the values to this 2 frames from ex1.jsp page..

Please suggest me how to solve this..

Thanks & regards,
Jayaprakash P R
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 27
Reputation: jaiprakash15 is an unknown quantity at this point 
Solved Threads: 0
jaiprakash15 jaiprakash15 is offline Offline
Light Poster

Re: JSP to Frame...

 
0
  #2
Mar 9th, 2009
Hi Friends..

I have solved the problem by putting the value in session...

session.setAttribute( "KType", KType);
and retrived it back in ex2.jsp as

String szKType = (String)session.getAttribute("Ktype")
Last edited by peter_budo; Mar 9th, 2009 at 8:20 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC