Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSP-Servlet please help in jsp
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Vijay
please help in jsp
1 Answer(s)      4 years and 5 months ago
Posted in : JSP-Servlet


i have two Jsp's pages.
on main.jsp have some list of schools. from there i can go home page of any school. home.jsp represents a school home page.
in home.jsp have some links like message, vision, addmission etc.
when i click on any of these link then i get some information in a table area in a home page of that school (which is Home.jsp).
it show information when i click on these links otherwise table area in home.jsp show blank.

when i go from main.jsp to home.jsp, table area of home.jsp show blank. if i fill this table area by static data in Home.jsp. after that when
i click to message link, then message will show after static data.

my problem is when i go from main.jsp to home.jsp, table area of home.jsp show blank.
how i fill this table area by condtion so that when i move from main.jsp to Home.jsp, it can show some data.

here some data of Jsp's.

main.jsp
<html>
<body> <table width="200" border="1" >
<tr>
<td width="200" height="182" valign="top"><table width="200"
border="1">
<tr>
<th valign="top" height="34" bgcolor="#FFCC66"><div
align="left"><a href="Home.jsp?school=adrash"><FONT COLOR="#990000"
size="4"><span class="style5"> Adrash School </span>
</FONT></a></div></th>
</tr>
<tr>
<th valign="top" height="34" bgcolor="#FFCC66"><div
align="left"><a href="Home.jsp?school=dps"><FONT COLOR="#990000"
size="4"> Delhi Public School </FONT></a></div></th>
</tr>
</table>
</body>
</html>

Home.jsp
<html>
<body>
<td>
<table width="200" border="1" >
<tr>
<th valign="top" height="34" bgcolor="#FFCC66"><div
align="left"><a href="Home.jsp?value=message&&school=<%=school%>"
<FONT COLOR="#990000" size="4">Message</div></th>
message related information
</tr>
<tr>
<th valign="top" height="34" bgcolor="#FFCC66"><div
align="left"><a
href="Home.jsp?value=visionary&&school=<%=school%>"<FONT
COLOR="#990000" size="4">Visionary </FONT></a></div></th>
vision related information
</tr>
<tr>
<th valign="top" height="34" bgcolor="#FFCC66"><span
class="style2"><div align="left"><a
href="Home.jsp?value=addmission&&school=<%=school%>"<FONT
COLOR="#990000" size="4">Addmission </FONT></a></div></span></th>
addmission related information
</tr>
</table></td>
<td width="730" valign="top">
<table width="730" height="700" border="0">
<tr>
<td valign="top">
<%
String value=request.getParameter("value");

if((school.equals("adrash"))||(school.equals("dps")))
{
if(value!=null && (value.equals("message")))
{
%>
<p></p>
<font size="+1">Message</font>
<%
}}
%>

<%
if((school.equals("adrash"))||(school.equals("dps")))
{
if(value!=null && (value.equals("visionary")))
{
%>
<p></p>
<font size="+1">visionary</font>
<%
}}
%>
<%
if((school.equals("adrash"))||(school.equals("dps")))
{
if(value!=null && (value.equals("addmission")))
{
%>
<p></p>
<font size="+1">addmission</font>
<%
}}
%>
</td>
</tr></table>
</body>
</html>
please help.

Advertisement
View Answers

April 14, 2010 at 3:28 PM


Hi Friend,

Try the following:

Home.jsp:

<%String school=request.getParameter("school");%>
<html>
<body>
<td>
<table width="200" border="1" >
<tr>
<th valign="top" height="34" bgcolor="#FFCC66"><div
align="left"><a href="Home.jsp?value=message&&school=<%=school%>"
<FONT COLOR="#990000" size="4">Message</div></th>
message related information
</tr>
<tr>
<th valign="top" height="34" bgcolor="#FFCC66"><div
align="left"><a
href="Home.jsp?value=visionary&&school=<%=school%>"<FONT
COLOR="#990000" size="4">Visionary </FONT></a></div></th>
vision related information
</tr>
<tr>
<th valign="top" height="34" bgcolor="#FFCC66"><span
class="style2"><div align="left"><a
href="Home.jsp?value=addmission&&school=<%=school%>"<FONT
COLOR="#990000" size="4">Addmission </FONT></a></div></span></th>
addmission related information
</tr>
</table>
<table border="0">
<tr><td>This is reputed institution. </td></tr>
<tr>
<td >
<%
String value=request.getParameter("value");
if((school.equals("adrash"))||(school.equals("dps"))){
if(value!=null && (value.equals("message"))){
%>
<p></p>
<font size="+1">Message</font>
<%
}}
%>
<%
if((school.equals("adrash"))||(school.equals("dps"))){
if(value!=null && (value.equals("visionary"))){
%>
<p></p>
<font size="+1">visionary</font>
<%
}}
%>
<%
if((school.equals("adrash"))||(school.equals("dps"))){
if(value!=null && (value.equals("addmission"))){
%>
<p></p>
<font size="+1">addmission</font>
<%
}}
%>


</td>
</tr></table>
</body>
</html>

Thanks


Related Tutorials/Questions & Answers:
please help - JSP-Servlet
To Year "> please help...please help   i am making a program by this i can find out... with others combox values. Here is JSP's files: display.jsp
Please Help - JSP-Servlet
Please Help  Respected Sir/Madam, I am R.Ragavendran.. Thanks for your response.. You told me that its difficult to handle the problem.. Ok,Let me try my hands on it.. The help i need is can u please tell me
Advertisements
please help in jsp - JSP-Servlet
please help in jsp  i have two Jsp's pages. on main.jsp have some... please help.  Hi Friend, Try... data. here some data of Jsp's. main.jsp
please help//
please help//  Number square cube 1 1 1 3 9 27 5 25 125 7 49 343 9 81 729 total 165 1225 ‚?? this is the ouput..;;; i
please help//
please help//  Number square cube 1 1 1 3 9 27 5 25 125 7 49 343 9 81 729 total 165 1225 ‚?? this is the ouput..;;; i
please help//
please help//  Number square cube 1 1 1 3 9 27 5 25 125 7 49 343 9 81 729 total 165 1225 ‚?? this is the ouput..;;; i
please help
please help  please send me the code of dynamic stack in java without using the built in functions
help please?
help please?  Define a class named Circle with the following properties: List item ‚?Ę An integer data field named radius with protected access modifier, and a String data field named colour with private access modifier. Both
help please?
help please?  Define a class named Circle with the following properties: List item An integer data field named radius with protected access modifier, and a String data field named colour with private access modifier. Both
help please?
help please?  Define a class named Circle with the following properties: List item An integer data field named radius with protected access modifier, and a String data field named colour with private access modifier. Both
help please?
help please?  Define a class named Circle with the following properties: ‚?Ę An integer data field named radius with protected access modifier, and a String data field named colour with private access modifier. Both data fields
help please?
help please?  Define a class named Circle with the following properties: List item An integer data field named radius with protected access modifier, and a String data field named colour with private access modifier. Both
java please please help
java please please help  Dear Friends plz help me to complete this program import java.util.*; public class StringDemo { static...[] to HashMap so that i can seperate key and value using Map.Entry.Please help me!  
Please Help
Please Help  How do I create an attribute that represents the following: A grayscale ‚??color‚?? value, that is, an integer between 0 and 255 inclusive, where 0 corresponds to the darkest black and 255 to the brightest white
Please Help
Please Help  How do I create an attribute that represents the following: A grayscale 'color' value, that is, an integer between 0 and 255 inclusive, where 0 corresponds to the darkest black and 255 to the brightest white
help please?
help please?  Define a class named Circle with the following properties: ? An integer data field named radius with protected access modifier, and a String data field named colour with private access modifier. Both data fields
Please help
Please help  Problem: Write a program that does addition, subtraction, multiplication and division operation on real numbers. The operation started with a user entered 2 numbers and click one of the operation buttons
Please help
Please help  Problem: Write a program that does addition, subtraction, multiplication and division operation on real numbers. The operation started with a user entered 2 numbers and click one of the operation buttons
help please
help please  hi i am done with register application using jsps servlets htmls. But i couldnt imp one thing that.. Wen u login to ur account browser... file.. Or atleast help me with code here.. I tried checking session alive
please help
please help  public class AllContact extends javax.swing.JFrame { /** Creates new form AllContact */ public AllContact() { initComponents(); try{ Connection1 con =new Connection1(); Connection conobj
Display JSP selected listbox and checkbox in xml-please help me
Display JSP selected listbox and checkbox in xml-please help me  Hi... as selected multiple checked checkboxes. Please help in this how to do this.....I am new to java & jsp I need your help. Regards
please help me how to set up Netbeans for JSP
please help me how to set up Netbeans for JSP   Hi roseindian.net, the following page is what i have seen when i run jsp project.What I can do,please help me.We are ready to do INDUSTRIAL PROJECT by JSP. Thank you. ERROR
urgent...pleAse help me.....please!
urgent...pleAse help me.....please!  please help me urgent! how can i do dictionary with the use of array code in java, where i will type the word then the corresponding meaning for that word will appear...thanks
please help me.
please help me.  How to move the edits.jsp in below link? http://www.roseindia.net/answers/viewqa/JSP-Servlet/9584-JSP-Servlet-Search-and-Edit.html
please help me.
please help me.  Please send me the validation of this below link. the link is http://www.roseindia.net/answers/viewqa/JSP-Servlet/9584-JSP-Servlet-Search-and-Edit.html Thanks Trinath
please help me.
please help me.  I have a jsp page under that i add a list box under i get the countries through my database. so how can i do
Please help me.
Please help me.  Hi i am trinath in below there is a url.In that url there is a code of edit a jsp page.I understand that code but only one thing i...://www.roseindia.net/answers/viewqa/JSP-Servlet/9584-JSP-Servlet-Search
please help me
please help me  Dear sir, I have a problem. How to write JSP coding... before. This name list should get from the database. Please help me. By the way, I'm using access database and jsp code. Thank you
need help please
enter a page second time. Please help me. By the way I'm using Access database and JSP coding Thank you...need help please  Dear sir, my name is logeswaran. I have a big
please help me.
please help me.  Please send me a code of template in opencms and its procedure.so i can implement the code. Thanks trinath
please help me.
please help me.  How to read a properties file in java with a suitable example. Please send me. Thanks Trinath   Please visit the following link: Java read properties file
Advertisements
 

 

 

DMCA.com