Question about Compilers & Programming Tools

1 Answer

JSP: Java code doesn't go steady with the HTML code,no output seen!!

Hi,
I am coding a JSP to take some input(keywords' search) from one form(HTML) and show it using the JSP,but no data is printed on the page(JSP),it uses a table to print the data....help!!

Posted by on

1 Answer

  • Level 1:

    An expert who has achieved level 1.

  • Contributor
  • 1 Answer

<html>
<body>
<form name=form1 action=test.jsp method=Get>
name:<input type="text" name="user">
<input type="submit">
</form>
<%=request.getParameter("user")%>
</body>
</html>

Posted on Feb 25, 2008

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

Which version of java is installed on my computer ?


You can view the currently installed version of java by clicking on the link below:

http://java.com/en/download/installed.jsp

Once at the website, click Verify Java Version.

Dec 18, 2012 | ArcMedia JavaScript Source Code 3000 Pro...

1 Answer

Lucky draw coding


You need two things:
1. JSP/Servlet knowledge.
2. SQL Programming basics

1. Create your PR jsp page which contain a form with method post and action to a servlet that will handle the insertion of the data to a database table i would add winners table containing ID, Frkey, thenumber

2. A servlet that will generate the number and cross check with those who guessed right and update the winners table with that data.

3. A servlet that will do an inner join with the pr and winners tables to display the results.

Good luck

Apr 05, 2010 | Sun Java Programming Language (cdj-275)

1 Answer

I want project idea for java with Servelts


hi,
well servlets are basically used for web application.instead of using servlets u should use jsp as it is quite easy and take less time to deply.And as a programmer u dont want to everytime compile the same code So u should use jsp

Jun 13, 2009 | Compilers & Programming Tools

1 Answer

Can i get the code to convert Text to XML using JSp


That depends upon precisely what you want to do, but generally yes, it's a fairly straightforward process to convert text to XML using here is a reference site touching on the topic you requested:
http://www.devsphere.com/xml/taglib/process/reference.html and according to this site in reference to their XML Java Tag Library they offer as a free download, "XJTL provides several XML parsing actions (<p:parse>, <p:element>, <p:start>, <p:end>, <p:data> and <o:pi>) that let you build JSP pages that process XML documents in the most natural and easiest way possible." As my Java professor used to say, "Java is not merely a programming language, it's a way of representing the entire world." That is akin to XML, which is an acronym for eXtensible Markup Language. The extensibility itself is why I answered your question cautiously above.

Apr 11, 2009 | Sun Java Programming Language (cdj-275)

4 Answers

Can anyone tell how run java program in cmd prompt???


Hi,

You need to type:

If it's a program.class

java program

or of it's a program.jar

java -jar program.jar

regards

Apr 03, 2009 | Sun Java Programming Language (cdj-275)

2 Answers

I want to know how various forms are interconnected


Here is an example of HTML And Javascript:

<HTML>
<HEADER>
<TITLE>Welcome To My Webpage</TITLE>
</HEADER>
<BODY>
<P><B><H1><U>Welcome To My Webpage</B><H1></U></P>
<script:"type/javascript">
alert("Welcome To My Webpage!");
</script>
</BODY>
</HTML>

Mar 22, 2009 | Sun Java Programming Language (cdj-275)

1 Answer

Validating in jsp


JavaScript Form Validation JavaScript can be used to validate input data in HTML forms before sending off the content to a server.
Form data that typically are checked by a JavaScript could be:
  • has the user left required fields empty?
  • has the user entered a valid e-mail address?
  • has the user entered a valid date?
  • has the user entered text in a numeric field?
Required Fields The function below checks if a required field has been left empty. If the required field is blank, an alert box alerts a message and the function returns false. If a value is entered, the function returns true (means that data is OK):
function validate_required(field,alerttxt)
{
with (field)
{
if (value==null||value=="")
{
alert(alerttxt);return false;
}
else
{
return true;
}
}
} The entire script, with the HTML form could look something like this:
<html>
<head>
<script type="text/javascript">
function validate_required(field,alerttxt)
{
with (field)
{
if (value==null||value=="")
{alert(alerttxt);return false;}
else {return true}
}
} function validate_form(thisform)
{
with (thisform)
{
if (validate_required(email,"Email must be filled out!")==false)
{email.focus();return false;}
}
}
</script>
</head> <body>
<form action="submitpage.htm"
onsubmit="return validate_form(this)"
method="post">
Email: <input type="text" name="email" size="30">
<input type="submit" value="Submit">
</form>
</body> </html>
E-mail Validation The function below checks if the content has the general syntax of an email.
This means that the input data must contain at least an @ sign and a dot (.). Also, the @ must not be the first character of the email address, and the last dot must at least be one character after the @ sign:
function validate_email(field,alerttxt)
{
with (field)
{
apos=value.indexOf("@");
dotpos=value.lastIndexOf(".");
if (apos<1||dotpos-apos<2)
{alert(alerttxt);return false;}
else {return true;}
}
} The entire script, with the HTML form could look something like this:
<html>
<head>
<script type="text/javascript">
function validate_email(field,alerttxt)
{
with (field)
{
apos=value.indexOf("@");
dotpos=value.lastIndexOf(".");
if (apos<1||dotpos-apos<2)
{alert(alerttxt);return false;}
else {return true;}
}
} function validate_form(thisform)
{
with (thisform)
{
if (validate_email(email,"Not a valid e-mail address!")==false)
{email.focus();return false;}
}
}
</script>
</head> <body>
<form action="submitpage.htm"
onsubmit="return validate_form(this);"
method="post">
Email: <input type="text" name="email" size="30">
<input type="submit" value="Submit">
</form>
</body> </html>


P.S.: If this information was helpful, please rate this solution.

Mar 13, 2009 | Sun Java Programming Language (cdj-275)

1 Answer

Database talks to code but code won't talk to database


Make sure you are connecting to the database,then just before you call your sql to insert use an echo statement to display the sql and check it for syntax:-
$sql = 'insert into table1 values('.$no.','.$no.',"block","'.$value3.'", "'.$value4.'")';
echo "SQL ==>" STARTOFSQL<br>".$sql." ENDOFSQL<br>";

Jan 18, 2009 | The PHP Group PHP

Not finding what you are looking for?
Compilers & Programming Tools Logo

Related Topics:

931 people viewed this question

Ask a Question

Usually answered in minutes!

Top Compilers & Programming Tools Experts

Robin Hill
Robin Hill

Level 3 Expert

1251 Answers

Les Dickinson
Les Dickinson

Level 3 Expert

18298 Answers

Florin

Level 3 Expert

733 Answers

Are you a Compiler and Programming Tool Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...