943,917 Members | Top Members by Rank

Ad:
  • JSP Discussion Thread
  • Marked Solved
  • Views: 3922
  • JSP RSS
Mar 9th, 2009
0

JSP to Frame...

Expand Post »
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..


JSP Syntax (Toggle Plain Text)
  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
Similar Threads
Reputation Points: 18
Solved Threads: 0
Light Poster
jaiprakash15 is offline Offline
27 posts
since Nov 2008
Mar 9th, 2009
0

Re: JSP to Frame...

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.
Reputation Points: 18
Solved Threads: 0
Light Poster
jaiprakash15 is offline Offline
27 posts
since Nov 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JSP Forum Timeline: Proble displaying images dynamically in jsp
Next Thread in JSP Forum Timeline: file:upload





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC