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



Home Answers Viewqa JSP-Servlet Sending query with variable

Have Programming Question? Ask it here!
 
 
 


Jagadeesh
Sending query with variable
1 Answer(s)      4 years and 5 months ago
Posted in : JSP-Servlet


While displaying pages in frames concept, one page contains links and other page contains messages for that links. The links page is not static one.

Links page displays the contents from database and query should have a variable at the end. While using this variable we have to use single quotes . This does not show the write content in message page. How can we resolve this.


Static page link:
<a href="memspage.jsp?nou=201">

But in case of static page
<a href="mempage.jsp?nou='userno'">
here userno--> variable which contains no. that is retrieved from database.
Using userno within single quotes shows error.

RESOLVE MY PROBLEM.
Thanks.

Advertisement
View Answers

March 16, 2010 at 2:25 PM


Hi Friend,

Try the following:

1)a.jsp:

<html>
<script language="javascript" type="text/javascript">
var ide = 1;
openPage = function() {
location.href = "b.jsp?id="+ide;
}
</script>

<a href ="javascript:openPage()">Click </a>
</html>

2)b.jsp:

<%String ide=request.getParameter("id");

out.println(ide);
%>

Hope that it will be helpful for you.
Thanks


Related Tutorials/Questions & Answers:
Sending query with variable - JSP-Servlet
Sending query with variable   While displaying pages in frames... database and query should have a variable at the end. While using this variable we... page here userno--> variable which contains no. that is retrieved from
Query
Query  how can i set path and Classpath or Environmental Variable for jsp/servlet program to compile and run
Advertisements
Query
Query  //A.java public class A { static int a=regd; public A() { } } //B.java public class B { static int b=A.a; public A() { } } I created two classes separately.Here regd is dynamic variable means it's varying with the given
Query
Query  How can i call a static variable of one class to another class. can i change static varibale value. //A.java public class A { static JTextField p=null; static int k; public A() { } public actionPerformed(ActionEvent ae
Local Variable and Instant Variable
Local Variable and Instant Variable  difference between Local Variable and Instant Variable   Difference between local variable and instance variable Instance variable is declared within a class but not within
sending mails - JSP-Servlet
sending mails  my intension is sending mails through java program with out installing any softwares.what is code
sending mail - JSP-Servlet
sending mail  Hi, what is the code for sending mail automatically without user intervention? thanks in advance
sending mails - JSP-Servlet
sending mails   sending mail using smtp protocal ,while running,i got error an javax.mail.sendfailed exception. what is this error
sending emails - JavaMail
sending emails  what is the code for sending emails in java  Hi Friend, Please visit the following link: http://www.roseindia.net/javamail/ Hope that it will be helpful for you. Thanks
sending data to facebook
sending data to facebook  how to post data into facebook from a java program
sending mail using jsp
sending mail using jsp  please give me the detailed procedure and code for sending mail through jsp program   Please visit the following links: http://www.roseindia.net/ejb/introduction/j2eedemo.shtml http
Sending emails and insert into trable
Sending emails and insert into trable  I have created a form, once...(); @mail($email_to, $email_subject, $email_message, $headers); $query="insert...', message='$message', areaPick='$pickup', areaRet='$return' "; mysql_query ($query
Sending email without authentication
Sending email without authentication  Hi sir, Am doing a project in JSP, in that i want to send mail without any authentication of password so send.../mail/sending-an-email-in-jsp.shtml
Sending File - JSP-Servlet
Sending File  How to use tag in Jsp, & How read a file fom Client  Hi Friend, We used tag to upload a file. Please visit the following links: http://www.roseindia.net/jsp/fileupload.shtml http
sending a mail - JSP-Servlet
sending a mail   I m writing a code for send mail in jsp,i sending a mail to specified receiver but if i attach an file and send a mail then i m getting an error. Here Attachment is in String[] Attachment=null so how
Sending Emails In Java
Sending Emails In Java  I want to send emails from within a java program. I saw some online java programs to do that, but they needed me to enter a smtp server, but i don't know what that should be. Can someone please help
sending a zip file to servlet
sending a zip file to servlet  I have created a .zip file in a servlet on the local system(no static ip). The .zip file contains xml files. I have to send it to another servlet which is in a server(has a static ip). I have done
java mail sending with images
java mail sending with images  I need to send images through java mail without giving content path(i.e. we don't want hard code the image path)can you tell me the idea?   Please visit the following links: http
Sending Emails In Java
Sending Emails In Java  I want to send emails from within a java program. I saw some online java programs to do that, but they needed me to enter a smtp server, but i don't know what that should be. Can someone please help
Sending Emails In Java
Sending Emails In Java  I want to send emails from within a java program. I saw some online java programs to do that, but they needed me to enter a smtp server, but i don't know what that should be. Can someone please help
for sending project build
for sending project build  hello I want to send my iphone project build to someone else how can i send it...   yes you can send but Follow the steps on the portal to creating an ad hoc build and certificate. Look
Java variable
Java variable   To what value is a variable of the String type automatically initialized
Pointer a variable
Pointer a variable  hii, Pointer is a variable or not ?   hello, Yes, a pointer is a variable
Converting jsp variable to java variable
Converting jsp variable to java variable  Hi how to convert java script variable to java variable on same jsp page
sending automatic email - JavaMail
sending automatic email  Dear sir. In my project i need to send an automatic email to the clients when their accounts are going to expire in 30 days.i am using jsp,mysql and tomcat for my project.Expire information are stored
Passing variable
Passing variable  How to pass variable to HTTP object in HTMl or PHP
iphone mail sending problem
iphone mail sending problem  Hi, I'm receiving the following error ... while sending mail in my iphone application Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[viewController
regarding sending mesage - JavaMail
regarding sending mesage  i have tried the following program /* import java.util.*; import javax.mail.*; import javax.mail.internet.*; import... me in this regard   Hi friend, I am sending you a link
sending sms from laptop to mobile
sending sms from laptop to mobile   sending sms from laptop to mobile for multi users
sending sms from laptop to mobile
sending sms from laptop to mobile   sending sms from laptop to mobile for multi users
Sending mail - JavaMail
Sending mail  Need a simple example of sending mail in Java  Hi,To send email you need a local mail server such as apache james. You first...) { to = newTo;}}Thanks  Java Code for sending messages(text or multimedia
Sending an email in JSP
Sending an email in JSP       Sending an email in JSP In this section, you will learn how to send an email in jsp.   Following is a simple JSP page for sending
environment variable
environment variable  what are the environment variable is need to run j2ee application in eclipse could you explain the details
final variable
final variable  Please give some easiest and understanding example program for final variable
sending commands through RxTx
sending commands through RxTx  i am trying to call lightOn and LightOff method from NewSerialWriter's run() method but not able to make the correct logic. please help me with this. here is my code of different classes. package
environment variable
environment variable  what is environment variable in java?   Environment variables are used by the Operating System to pass configuration information to applications
Create Session Variable PHP
session Variable in PHP. May be this reference will solve your query. Thanks...Create Session Variable PHP  hi, Write a program which shows the example of how to create session variable in PHP. Please suggest the reference
Static Variable
Static Variable  What is the basic use of introducing static variable... that a certain object/variable is resident in memory and accessed each time an instance..., it means that the static variable is shared among all instances of the class
sending email code - JSP-Servlet
sending email code  How To Send Emails using jsp  Hi friend, I am sending you a link. This link will help you. Please visit for more information. http://www.roseindia.net/mail/sending-an-email
sending doc files - Swing AWT
sending doc files  how to send doc file using java from one machine to other over a network
Application Variable
anyone show a simple sample code of storing the connection data in a variable so
query string
query string  on my servlet page i take the values of the field in a variable and that variable is a primary key so on the basis of that i am sorting database and printing on another page. i have to take that variable from
sending sms with help of java - JavaMail
sending sms with help of java  hi can u plz help me to learn how to send sms with help of java. waiting for your reply
Sending SMS From Java Programs
Sending SMS From Java Programs  I want to develop and application to send sms from my computer, can someone please help me, like tell me where to start and what i need
Sending email with read and delivery requests
Sending email with read and delivery requests  Hi there, I am sending emails using JavaMail in Servlets on behalf of a customer from the website, and I'm having difficulty understanding how to implement, read and delivery
code for sending email using j2me
code for sending email using j2me  could someone tell me why when i try to compile this line using netbeans 7.1 Properties property... for sending a file attachment to gmail account
Sending images through java mail
Sending images through java mail  Am trying to develop greeting application that having images..... in one jsp page i displayed all images and by clicking one image the control go to mail sending page in that the image should add
session into a query
session into a query  Hi all this am Sreedhar from Hyderabad i am calling one session variable in mysql query but its not working can any one help me please... here is the query.. $query = 'SELECT * FROM post WHERE post_date <
how to assign javascript variable value to a jsp variable
how to assign javascript variable value to a jsp variable  how to assign javascript variable value to a jsp variable
Sending mail (Contact Form in a website)
Sending mail (Contact Form in a website)  Hi, I just uploaded few of my webpages into a free web hosting service, where i can just upload the web pages. Am very much new into this field. I want to write a contact form, which
 

 

 

DMCA.com