How to use Templates in JSP.
Hi,
is any body knows how to apply templates In JSP technology.
I was wondering if some can give some example or link to a working Example
Thanks in Advance.
Hi ,
Try this URL.
http://www.javaworld.com/javaworld/jw-09-2000/jw-0915-jspweb.html
OLabora.
Similar Messages
-
Help me!! How to use JavaScript with JSP ??
I am using JDeveloper and I created a screen in JSP which uses a bean for database connectivity and retriving info onto the page.
The page has a ListBox where list items are populated from the database.My requirement is
whenever the list is changed the page shuold be refreshed with the selected item info.
I tried to use 'JavaScript' for triggering the event with 'onChange' event of the ListBox.But the event is not getting invoked. I think JavaScript is not working with JSP.
Please help me with how to Use javaScript with JSP or any other alternative where I can meet my requirement.
I have one more question...I have gone through the JSP samples in OTN and I am trying do download the sample 'Travel servlet' which show list of countries...etc
I have also gone through the 'readme' but I don't know how to extract .jar file.
I would be great if you could help me in this.
Thanks!!
Geeta
nullWe have a similar need. We have used Cold Fusion to display data from Our Oracle Database. We have a simple SElect Box in HTML populated with the oracle data. When someone selects say the State of Pennsylvania. then we have an On change event that runs a Javascript to go get all the cities in Pennsylvania.
Proble we are having is that inorder for the Javascript to work , we currently have to send all the valid data.
Do you know of any way to dynamically query the the Oracle database in Javascript -
How to use EJB in JSP...urgent!!!
hello,
i am novice programmer in EJB.
i am using weblogic 6.1 ...
my problem is how to use EJB in jsp page.
my code is as follow..but its not displaying any result.
<%@ page import="javax.naming.InitialContext,
javax.naming.Context,
java.util.Properties,
firstEJB.First,
firstEJB.FirstHome"%>
<%
long t1 = System.currentTimeMillis();
System.out.println(t1);
Properties props = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.TengahInitialContextFactory");
props.put(Context.PROVIDER_URL, "localhost:7001");
Context ctx = new InitialContext(props);
FirstHome home = (FirstHome)ctx.lookup("FirstEJB");
First bean = home.create();
String time = bean.getTime();
bean.remove();
ctx.close();
long t2 = System.currentTimeMillis();
%>
<html>
<head>
<style>p { font-family:Verdana;font-size:12px; }</style>
</head>
<body>
<p>Message received from bean = "<%= time %>".<br>Time taken :
<%= (t2 - t1) %> ms.</p>
</body>
</html>
please tell me the solution.Hi, I don't know if it may be the cuase of your problems, but you should narrow the Object obtained doing the lookup, like this:
FirstHome home = (FirstHome) PortableRemoteObject.narrow(ctx.lookup("FirstEJB"), FirstHome.class); -
How to use taglibs in JSP for Database access
Hi
Could any one please tell me how to use taglibs in JSP for Database access
with regrds
JojoThis is a sample how to connect to a MySQL database with JSTL 1.0:
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<%@ taglib uri="http://java.sun.com/jstl/sql" prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>JSTL MySQL</title>
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<c:catch var="e">
<sql:setDataSource var="datasource" url="jdbc:mysql://Your_Server_Name_Here/You_Schema_Here"
user="Your_Username_Here" password="Your_Password_Here"
driver="com.mysql.jdbc.Driver"/>
<c:out value="datasource= ${datasource}, Class = ${driver.class}"/>
<br />
<br />
<sql:query var="deejays" dataSource="${datasource}">SELECT * FROM Your_Table_Name_Here</sql:query>
<table>
<%-- Get the column names for the header of the table --%>
<c:forEach var="columnName" items="${deejays.columnNames}"><th><c:out value="${columnName}"/></th></c:forEach>
<tbody>
<%-- Get the value of each column while iterating over rows --%>
<c:forEach var="row" items="${deejays.rows}">
<tr><c:forEach var="column" items="${row}">
<td><c:out value="${column.value}"/></td>
</c:forEach>
</tr>
</c:forEach>
</tbody>
</table>
</c:catch>
<br />
<br />
<c:if test="${e!=null}"><span class="error">Error</span>�
<c:out value="${e}" />
</c:if>
</body>
</html>And this thread might help you:
http://forum.java.sun.com/thread.jspa?threadID=639471&tstart=44 -
How to use JOptionPane in jsp, instead of javascript message alert box?
HI,
How to use JOptionPane in jsp,
instead of javascript "message alert box"?
I hate javascript,
I'd like to only use java in jsp. don't use javascript.
javascript is client side,
jsp is server side. i know that.
how to... instead of javascript box?
how to use ... message box in webpage?
don't use applet,,,, don't use javascript,,,
hm...zzzZzz
I hate javascript..T.T
<SCRIPT language=JavaScript>
alert("hate javascript");
</SCRIPT>
===>>>>
In this way,,
JOptionPane.showOptionDialog(null,"I love java")
I'd like to only use jsp and java and html...in webpage.
don't use javascript....
Why? don't sun provide message box in jsp, instead of javascrip box?
Why?
Edited by: seong-ki on Nov 4, 2007 8:38 PMDrugs are bad, m'kay?
-
Hi all,
I'm new to jsp, please let me know how to use cookies with jsp.
I have three web applications, in run time I have to switch from one application to another application based on single login page. I have taught cookies are one of the solution. But while I'm googling I unable to get such a good material.
please give some examples,
Thanks in advance.
achchayyaRead a cookie in jsp
HttpSession session = request.getSession();
Cookie cookie_session = getCookie(request, "COOKIENAME");
if (cookie_session == null) {
sesID = session.getId();
} else {
sesID = cookie_session.getValue();
}or
get all cookie in the browser
This gets all the cookies and according to the cookie name given u can get the cookie value
Cookie[] cookies = request.getCookies();
if (cookies != null) {
for (int i = 0; i < cookies.length; i++) {
if (cookies.getName().equals(cookieName))
return cookies[i];
}but i am not sure if this works for ur requirement try and see -
How to use threads in JSP???
hello
i want to use threads with JSP.
i want to write a jsp page which will
start 2 different threads. the 1st thread should just display a message and the second page should redirect this page to another jsp page.
till the redirection is goin on, the message should be displayed in the browser from the 1st thread.
i dont know actually how to use threads in JSP by implementing the Runnable insterface, if not m then how do i do it ??
thanx
Kamal JaiWhy do you want to use threads to do this ??
If you write a message and do a redirection, the message will be displayed until the other page will be loaded into the browser...
I already launched a thread from a JSP but it was for a four hour process where the user can close his browser windows. -
How to use datagrid in jsp ?
Hi All ,
Can any body let me know , how to use datagrid in jsp pages .I have downloaded the taglibs-datagrid.jar file and taglibs-datagrid.tld. I have saved the .jar File in the WEB-INF/lib and .tld to the WEB-INF directories.
I wrote a program that is getting a collection from the request and i just want to display the objects in the datagrid.Please help me out of this problem.It's better to explain with example. Waiting for a response.
Regards,
RakeshWhy do you want to use threads to do this ??
If you write a message and do a redirection, the message will be displayed until the other page will be loaded into the browser...
I already launched a thread from a JSP but it was for a four hour process where the user can close his browser windows. -
How to use Template manager in Adobe Designer
Hi,
I am new to WebDynpro. I am trying to import templates in Webdynpro Adobe Designer.
In the Interactive Form Designer, there is a Menu called "Tools", which has option "Template Manager".
When I select a template there is only a buttion Set Selected as default after i click it but nothing happen!! Can anyone please let me know how to use the Template Manager?
Thanks.
Edited by: bo wang on Jan 15, 2008 9:34 AMYes, here you dont have option of using standard template. In this case, just right click on the Project name shown in WD perspective on the left hand side of screen and check the Projectlocation in Properties --> Info.
go to "Projectlocation"\src\configuration\Components. Here you can find the XDP file. Open this XDP file, in this XDP you have File option. Select the template, and save the file.
This change will appear in WD.
With regards,
Amit -
How to use chart in jsp by using MS Acess Db
hii
My application is to generate the report using the chart with the help of MS Acess
i heard abt the JFreeChart . I downloaded it but i dont know how to link and use it in my application
plz help me.....
Thank u in advanceI downloaded it but i dont know how to link and use it in my application I'm sure they provide some examples how to use it.
Look at them and try to understand how a JFreeChart is used.
When you have a concrete question about JSPs an JSTL you may come back and ask again.
If you have questions about JFreeChart ask them in the JFreeChart Forum.
andi -
How to use template or fragment in PDF form
Hi Expert,
As required by project, I want to create a sample form only with company logo in header and address info in footer. Then this sample form can be made as a template. Any new form development will use this template form, no need to maintain logo and footer one by one.
above is my requirement. In transaction SFP, I can see Tools->Template manager->add template. I tried to save my sample form as a template, but when preview it, no displaying but with error saying "not well format".
Can anyone help me? I just want to create and use a custom template or fagment (it is said Fragment can also reuse to meet my requirement. but I also don't know how to use fragment).Hi
I'm also starting with hierachical tree (HTree) and I got an example from any Oracle examples or whatever. It works with the 'hr' schema (employee, manager, department).
In the case that I'm not finding any tutorial about htree, I'm taking this one as an example to build my own htree. If you are interested, I can email the example to you.
regards
remo -
Hello,
can any body tell me how to use the XMHTTP in jsp programming are servlet..what i know is XMLHTTP used in with java script functions..for connecting to servers without refrshing the page.can we use directly in jsp page.if so which APIs we have to use..provide me some help..
regards,Thanks Steve for ur reply..
XMLHTTP is a microsoft related thing..How so? This code works with Firefox & IE6 on Tomcat 5:
<%
String aStr = request.getParameter("a");
String bStr = request.getParameter("b");
String cStr = "";
int a,b,c;
if (aStr != null && bStr != null) {
a = Integer.parseInt(aStr);
b = Integer.parseInt(bStr);
c = a + b;
cStr = ""+c;
} else {
aStr = "";
bStr = "";
String acc = request.getHeader("Accept");
if (acc!=null && acc.indexOf("message/x-jl-formresult")!=-1) {
try { out.print(cStr.trim()); } catch (Exception e) { e.printStackTrace(); }
} else {
%>
<html>
<head>
<title>Add</title>
</head>
<body>
<script>
var xmlhttp=false;
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
xmlhttp = new XMLHttpRequest();
function calc() {
try {
frm=document.forms[0]
url="addbyxmlhttp.jsp?a="+frm.elements['a'].value+"&b="+frm.elements['b'].value
xmlhttp.open("GET",url,true);
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4) {
document.forms[0].total.value=xmlhttp.responseText;
xmlhttp.setRequestHeader('Accept','message/x-jl-formresult');
xmlhttp.send(null);
} catch(E) { alert (E.message); }
return false
</script>
<form action="addbyxmlhttp.jsp" method="get" onsubmit="return calc();">
<input type="text" name="a" value="<%=aStr%>"/> +
<input type="text" name="b" value="<%=bStr%>"/> =
<input type="text" name="total" value=""/>
<input type=submit value="Calculate">
</form>
</body>
</html>
<%
%>That is a direct translation from one of the examples on the page I pointed to earlier.
do we have any
apis in java insteead of
var xmlhttp = new
ew ActiveXObject("Microsoft.XMLHTTP");
var xml_dom = new
new ActiveXObject("MSXML2.DOMDocument");
var xml_domTemp = new
new ActiveXObject("MSXML2.DOMDocument");
these things i want to use java related stuff..is it
possible..
regards,Those things are JAVASCRIPT!! Like I said, most of the work is done in javascript, not the server side stuf.. And the page I pointed you to answers that question. -
I've used beans in JSP.. but how to use EJB's in beans ??
EJB's are deployed in Oracle 8i
Please Help
Thank You.Please find the answer in this HOWTO:
http://technet.oracle.com:89/ubb/Forum2/HTML/006404.html
HOWTO's are archived on the JDeveloper Documentation page:
http://technet.oracle.com/docs/products/jdev/listing.htm (Click on Documentation Tab)
Thanks,
-Roel. -
How can use interface in JSP?
hi! friends i have one dought in JSP? it's possible interface in JSP? how?
waiting for ur reply!hi
i think u can not use interface in JSP but u can extend a class which implements an interface -
How to use template.fmb file within form builder
Hi
I have created forms without using template.fmb file
and deploy them on EBS then they working fine
But when I try to use template.fmb file then it gives an error
following are the steps :
1:open template.fmb file with form builder
2:rename that file with XXXX.fmb
compile that file and deploy XXXX.fmb file in AU_TOP
after that
in putty i m trying to create XXXX.fmx file in same TOP but it gives an error
Forms 10.1 (Form Compiler) Version 10.1.2.3.0 (Production)
Forms 10.1 (Form Compiler): Release - Production
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
PL/SQL Version 10.1.0.5.0 (Production)
Oracle Procedure Builder V10.1.2.3.0 - Production
Oracle Virtual Graphics System Version 10.1.2.0.0 (Production)
Oracle Multimedia Version 10.1.2.0.2 (Production)
Oracle Tools Integration Version 10.1.2.0.2 (Production)
Oracle Tools Common Area Version 10.1.2.0.2
Oracle CORE 10.1.0.5.0 Production
Compiling package specification APP_CUSTOM...
No compilation errors.
Compiling package specification APP_CUSTOM...
No compilation errors.
Compiling package body APP_CUSTOM...
Compilation error on package body APP_CUSTOM:
PL/SQL ERROR 302 at line 22, column 19
component 'DISABLED' must be declared
PL/SQL ERROR 0 at line 22, column 5
Statement ignored
PL/SQL ERROR 201 at line 40, column 5
identifier 'APP_WINDOW.CLOSE_FIRST_WINDOW' must be declared
PL/SQL ERROR 0 at line 40, column 5
Statement ignored
Compilation errors have occurred.
Form not createdfollowing is command
$ frmcmp_batch module=$AU_TOP/forms/US/XXXX.fmb userid=APPS/apps output_file=$AU_TOP/forms/US/XXXX.fmx module_type=form batch=NO compile_all=specialfor you question - EBS General Discussion General EBS Discussion
Compiling Forms In R12
and search on forum
Maybe you are looking for
-
JMS receiver to JMS sender Problem
Hi, Please find the scenario IDOC 'A' - > PI - >JMS(WebSphere) Receiver IDOC 'B' <-- PI <-- JMS (WebSphere) Sender now here I need to pass the response to some other IDOC. I have follwoing 2 questions: 1. Please let me know adapter module to buil
-
Design mode disabled please help
Hi all Got to the office this morning and when I fired up Flash builder for PHP my desighn mode was disabled. I cant get this to work at all. Any idea what might be going on here? My builder mode is set to flah not Zend... this makes no sence please
-
Question on Grouping()
I am using Grouping function in one of my select statement. Now In the statement there is a substr on a particular column within the grouping. If the number of characters to be returned by substr is used as a bind variable then the query returns "not
-
Old iMac was sluggish and now won't go past blue screen.
We have a pretty old iMac, it will be 7 years old next month. I totally expect for it to slow down and have issues being that old, but was hoping I could maybe get a few more years out of it for my in-laws. We gave it to them 2 years ago and now it's
-
Database needs to be bounced every three weeks
I am a consultant (OCP DBA) on-site with a client. The problem they are having is that after about 2-3 weeks of up time their Oracle 9.2.0.2.1 running on Server 2000 SP2, on more than adequate hardware, slows down to a creeping speed, when they bounc