URGENT help with JSP
Any help with this will be really appreciated. I'm new to programming.
If I search for an ssn in a database, I want to view all records relating to that ssn. However, I am getting all the records in the table.
eg.
at the prompt for ssn, let's say I enter 111111111
I would like to see
111111111 abc xyz etc
111111111 pdg ppp etc
however, I am getting
000000000 utt tui etc
111111111 tug etg etc
How do I make limit the search to the ssn I want?
The related code is below.
Thanks.
Java Code
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
if (checkLoginSessionPresent(request, response)) {
loadTable("/esoladm/TaxView.jsp", request, response);
else {
checkLoginSessionRedirect("/esoladm/ESOLAdminMain.jsp", request, response);
JSP Code
<% while (MyTaxSuppress != null) { %>
<% String sPlanCode = MyTaxSuppress.getPlanCode(); %>
<% String sSSN = MyTaxSuppress.getSSN(); %>
<% String sTaxYear = MyTaxSuppress.getTaxYear(); %>
<% String sDistCode = MyTaxSuppress.getDistCode(); %>
<% double sGrAmount = MyTaxSuppress.getGrAmount(); %>
<% String sStmtType = MyTaxSuppress.getStmtType(); %>
<% boolean bNewSuppress = MyTaxSuppress.getNewSuppress(); %>
<% String rowID = sPlanCode; %>
<% rowID += sSSN; %>
<% rowID += sTaxYear; %>
<% rowID += sDistCode; %>
<% rowID += sStmtType; %>
<% rowID += sGrAmount; %>
<% System.out.println( "Do While lp exiti" + rowID);%
<% if (bNewSuppress) { %>
<% out.println( "<TD> %>
<% <img BORDER='0' SRC='/esoladm/ESOLNew2.gif' %>
<% ALT='' WIDTH='50' HEIGHT='20'> </TD >"); %>
<% } else { %>
<% out.println( "<TD></TD>"); %>
<% } %>
<TD><%= sPlanCode %></TD>
<TD><%= sSSN %></TD>
<TD><%= sTaxYear %></TD>
<TD><%= sDistCode %></TD>
<TD><%= sGrAmount %></TD>
<TD><%= sStmyType %></TD>
<TD><input TYPE="checkbox" name="<%=rowID %>" ></TD>
<% MyTaxSuppress = MySuppressTaxList.getNext(); %>
<% } // end of while loop %>
I don't see anywhere in your code where you conditionally output a tuple from your database. You seem to be outputting everything.
Maybe you need:
<% if (sSSN==input_value){ %>
<TD><input TYPE="checkbox" name="<%=rowID %>" ></TD>
<% } %>
Similar Messages
-
Need urgent help with Ifs1.1 on Solaris
We have installed IFS 1.1 with Oracle 8.1.7 on a three tier System (two Suns). We use JWS as WebServer. When we start IFS and JWS everything seems to work fine. But after some time (irregulary) we are not able to contact the JSP-Sites via a bowser. After restarting JWS, everything works fine for some time.
Sometimes it happens (about one times a day), that the whole JWS crashes (JWS-Admin doesn't work). So we have to restart the whole IFS.
What can be the problem? We need urgent help, because the deadline for our project is Wednesday.
By the way:
Where do I have to start CTX on the IFS- or the Oracle-Side?
nullYes, we tried the Oracle HTTP - Server, but we weren4t able to get it to work. We didn4t get our JSP-Files to work with it. But that is another issue. I think it4s not a problem of JWS, but IFS.
Additionally it is strange, that we are still able to connect to the database via SqlPlus.
IFS works fine for about 15 minutes, than it crashes, nothing works anymore. We found following errors in the IfsAgents.log:
maybe it can help?!
Mon Dec 04 23:12:20 CET 2000
Server STARTED: IfsAgents(19944) not managed
Attempting to load agent EventExchangerAgent
Agent EventExchangerAgent loaded
Server STARTED: IfsProtocols(19945) not managed
Attempting to start agent EventExchangerAgent
EventExchangerAgent: Start request
Agent EventExchangerAgent started
Attempting to load agent ExpirationAgent
Agent ExpirationAgent loaded
EventExchangerAgent: starting timer
Attempting to start agent ExpirationAgent
ExpirationAgent: Start request
Agent ExpirationAgent started
Attempting to load agent GarbageCollectionAgent
Agent GarbageCollectionAgent loaded
ExpirationAgent: computed initial delay (in ms) is: 10024504
ExpirationAgent: starting timer
Attempting to start agent GarbageCollectionAgent
GarbageCollectionAgent: Start request
Agent GarbageCollectionAgent started
Attempting to load agent ContentGarbageCollectionAgent
Agent ContentGarbageCollectionAgent loaded
GarbageCollectionAgent: computed initial delay (in ms) is: 11816890
GarbageCollectionAgent: starting timer
Attempting to start agent ContentGarbageCollectionAgent
ContentGarbageCollectionAgent: Start request
Agent ContentGarbageCollectionAgent started
Attempting to load agent DanglingObjectAVCleanupAgent
Agent DanglingObjectAVCleanupAgent loaded
ContentGarbageCollectionAgent: starting timer
Attempting to start agent DanglingObjectAVCleanupAgent
DanglingObjectAVCleanupAgent: Start request
Agent DanglingObjectAVCleanupAgent started
Attempting to load agent OutboxAgent
Agent OutboxAgent loaded
DanglingObjectAVCleanupAgent: computed initial delay (in ms) is: 5500105
DanglingObjectAVCleanupAgent: starting timer
Attempting to start agent OutboxAgent
OutboxAgent: Start request
Agent OutboxAgent started
Attempting to load agent ServiceWatchdogAgent
Agent ServiceWatchdogAgent loaded
OutboxAgent: Done processing
Attempting to start agent ServiceWatchdogAgent
ServiceWatchdogAgent: Start request
Agent ServiceWatchdogAgent started
Attempting to load agent QuotaAgent
Agent QuotaAgent loaded
ServiceWatchdogAgent: Initializing ServerWatchdogTable with 9 entries
ServiceWatchdogAgent: starting timer
Server STARTED: FtpServer(20082) managed by IfsProtocols(19945)
ServiceWatchdogAgent: New Server being watchdogged
Attempting to start agent QuotaAgent
QuotaAgent: Start request
Agent QuotaAgent started
QuotaAgent: starting timer
Server STARTED: CupServer(20124) managed by IfsProtocols(19945)
ServiceWatchdogAgent: New Server being watchdogged
Server STARTED: ImapServer(20130) managed by IfsProtocols(19945)
ServiceWatchdogAgent: New Server being watchdogged
Server STARTED: SmtpServer(20150) managed by IfsProtocols(19945)
ServiceWatchdogAgent: New Server being watchdogged
ServiceWatchdogAgent: Unlocked Server Detected in checkServer
ServiceWatchdogAgent: Unlocked Server Detected in checkServer
ServiceWatchdogAgent: Unlocked Server Detected in checkServer
ServiceWatchdogAgent: Unlocked Server Detected in checkServer
ServiceWatchdogAgent: Unlocked Server Detected in checkServer
ServiceWatchdogAgent: Unlocked Server Detected in checkServer
ServiceWatchdogAgent: Unlocked Server being investigated
ServiceWatchdogAgent: Unlocked Server being investigated
ServiceWatchdogAgent: Unlocked Server being investigated
ServiceWatchdogAgent: Unlocked Server being investigated
ServiceWatchdogAgent: Unlocked Server being investigated
ServiceWatchdogAgent: Unlocked Server being investigated
ServiceWatchdogAgent: Freeing unlocked server 19687
ServiceWatchdogAgent: Freeing unlocked server 19666
Server STOPPED: CupServer(19687) managed by IfsProtocols(19519)
ServiceWatchdogAgent: Freeing unlocked server 19723
ServiceWatchdogAgent: Freeing unlocked server 19520
Server STOPPED: FtpServer(19666) managed by IfsProtocols(19519)
Server STOPPED: SmtpServer(19723) managed by IfsProtocols(19519)
ServiceWatchdogAgent: Freeing unlocked server 19519
Server STOPPED: IfsAgents(19520) not managed
ServiceWatchdogAgent: Freeing unlocked server 19712
Server STOPPED: IfsProtocols(19519) not managed
Server STOPPED: ImapServer(19712) managed by IfsProtocols(19519)
ServiceWatchdogAgent: Freed Server removed from watchdog list
ServiceWatchdogAgent: Freed Server removed from watchdog list
ServiceWatchdogAgent: Freed Server removed from watchdog list
ServiceWatchdogAgent: Freed Server removed from watchdog list
ServiceWatchdogAgent: Freed Server removed from watchdog list
ServiceWatchdogAgent: Freed Server removed from watchdog list
QuotaAgent: Timer event: 0 active; 0 exceeded
ContentGarbageCollectionAgent: Freed 5 unreferenced ContentObjects
QuotaAgent: Timer event: 0 active; 0 exceeded
ServiceWatchdogAgent: IfsException publishing timer details:
ServiceWatchdogAgent: oracle.ifs.common.IfsException: IFS-11012: Unable to get events from other services
java.sql.SQLException: ORA-03114: not connected to ORACLE
ServiceWatchdogAgent: IfsException in checkForDeadServices():
ServiceWatchdogAgent: oracle.ifs.common.IfsException: IFS-10651: Unable to begin transaction
oracle.ifs.common.IfsException: IFS-10603: Unable to set database savepoint
java.sql.SQLException: ORA-03114: not connected to ORACLE
ServiceWatchdogAgent: IfsException in handle loop; continuing:
ServiceWatchdogAgent: oracle.ifs.common.IfsException: IFS-10651: Unable to begin transaction
oracle.ifs.common.IfsException: IFS-10603: Unable to set database savepoint
java.sql.SQLException: ORA-03114: not connected to ORACLE
ServiceWatchdogAgent: IfsException publishing timer details:
ServiceWatchdogAgent: oracle.ifs.common.IfsException: IFS-10651: Unable to begin transaction
oracle.ifs.common.IfsException: IFS-10603: Unable to set database savepoint
java.sql.SQLException: ORA-03114: not connected to ORACLE
ServiceWatchdogAgent: IfsException publishing timer details:
ServiceWatchdogAgent: oracle.ifs.common.IfsException: IFS-10651: Unable to begin transaction
oracle.ifs.common.IfsException: IFS-10603: Unable to set database savepoint
java.sql.SQLException: ORA-03114: not connected to ORACLE
ServiceWatchdogAgent: IfsException publishing timer details:
ServiceWatchdogAgent: oracle.ifs.common.IfsException: IFS-10651: Unable to begin transaction
oracle.ifs.common.IfsException: IFS-10603: Unable to set database savepoint
java.sql.SQLException: ORA-03114: not connected to ORACLE
ServiceWatchdogAgent: IfsException publishing timer details:
ServiceWatchdogAgent: oracle.ifs.common.IfsException: IFS-10651: Unable to begin transaction
oracle.ifs.common.IfsException: IFS-10603: Unable to set database savepoint
java.sql.SQLException: ORA-03114: not connected to ORACLE
ServiceWatchdogAgent: IfsException publishing timer details:
ServiceWatchdogAgent: oracle.ifs.common.IfsException: IFS-10651: Unable to begin transaction
oracle.ifs.common.IfsException: IFS-10603: Unable to set database savepoint
java.sql.SQLException: ORA-03114: not connected to ORACLE
null -
URGENT Help With Scientific Calculator!
Hi everybody,
I designed a calculator, and I need help with the rest of the actions. I know I need to use the different Math methods, but I tried tried that and it didn't work. Also, it needs to work as an applet and application, and in the applet, the buttons don't appear in order, how can I fix that?
I will really appreciate your help with this program, I can't get it to work and I'm frustrated, I need to finish this for next Tuesday 16th. Please e-mail me at [email protected].
Below is the code for the calcualtor.
Thanks a lot!
-Maria
// calculator
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.*;
public class calculator extends JApplet implements
ActionListener
private JButton one, two, three, four, five, six, seven,
eight, nine, zero, dec, eq, plus, minus, mult, div, clear,
mem, mrc, sin, cos, tan, asin, acos, atan, x2, sqrt, exp, pi, percent;
private JLabel output, blank;
private Container container;
private String operation;
private double number1, number2, result;
private boolean clear = false;
//GUI
public void init()
container = getContentPane();
//Title
//super("Calculator");
JPanel container = new JPanel();
container.setLayout( new FlowLayout( FlowLayout.CENTER
output = new JLabel("");
output.setBorder(new MatteBorder(2,2,2,2,Color.gray));
output.setPreferredSize(new Dimension(1,26));
getContentPane().setBackground(Color.white);
getContentPane().add( "North",output );
getContentPane().add( "Center",container );
//blank
blank = new JLabel( " " );
container.add( blank );
//clear
clear = new JButton( "CE" );
clear.addActionListener(this);
container.add( clear );
//seven
seven = new JButton( "7" );
seven.addActionListener(this);
container.add( seven );
//eight
eight = new JButton( "8" );
eight.addActionListener(this);
container.add( eight );
//nine
nine = new JButton( "9" );
nine.addActionListener(this);
container.add( nine );
//div
div = new JButton( "/" );
div.addActionListener(this);
container.add( div );
//four
four = new JButton( "4" );
four.addActionListener(this);
container.add( four );
//five
five = new JButton( "5" );
five.addActionListener(this);
container.add( five );
//six
six = new JButton( "6" );
six.addActionListener(this);
container.add( six );
//mult
mult = new JButton( "*" );
mult.addActionListener(this);
container.add( mult );
//one
one = new JButton( "1" );
one.addActionListener(this);
container.add( one );
//two
two = new JButton( "2" );
two.addActionListener(this);
container.add( two );
//three
three = new JButton( "3" );
three.addActionListener(this);
container.add( three );
//minus
minus = new JButton( "-" );
minus.addActionListener(this);
container.add( minus );
//zero
zero = new JButton( "0" );
zero.addActionListener(this);
container.add( zero );
//dec
dec = new JButton( "." );
dec.addActionListener(this);
container.add( dec );
//plus
plus = new JButton( "+" );
plus.addActionListener(this);
container.add( plus );
//mem
mem = new JButton( "MEM" );
mem.addActionListener(this);
container.add( mem );
//mrc
mrc = new JButton( "MRC" );
mrc.addActionListener(this);
container.add( mrc );
//sin
sin = new JButton( "SIN" );
sin.addActionListener(this);
container.add( sin );
//cos
cos = new JButton( "COS" );
cos.addActionListener(this);
container.add( cos );
//tan
tan = new JButton( "TAN" );
tan.addActionListener(this);
container.add( tan );
//asin
asin = new JButton( "ASIN" );
asin.addActionListener(this);
container.add( asin );
//acos
acos = new JButton( "ACOS" );
cos.addActionListener(this);
container.add( cos );
//atan
atan = new JButton( "ATAN" );
atan.addActionListener(this);
container.add( atan );
//x2
x2 = new JButton( "X2" );
x2.addActionListener(this);
container.add( x2 );
//sqrt
sqrt = new JButton( "SQRT" );
sqrt.addActionListener(this);
container.add( sqrt );
//exp
exp = new JButton( "EXP" );
exp.addActionListener(this);
container.add( exp );
//pi
pi = new JButton( "PI" );
pi.addActionListener(this);
container.add( pi );
//percent
percent = new JButton( "%" );
percent.addActionListener(this);
container.add( percent );
//eq
eq = new JButton( "=" );
eq.addActionListener(this);
container.add( eq );
//Set size and visible
setSize( 190, 285 );
setVisible( true );
public static void main(String args[]){
//execute applet as application
//applet's window
JFrame applicationWindow = new JFrame("calculator");
applicationWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//applet instance
calculator appletObject = new calculator();
//init and start methods
appletObject.init();
appletObject.start();
} // end main
public void actionPerformed(ActionEvent ae)
JButton but = ( JButton )ae.getSource();
//dec action
if( but.getText() == "." )
//if dec is pressed, first check to make shure there
is not already a decimal
String temp = output.getText();
if( temp.indexOf( '.' ) == -1 )
output.setText( output.getText() + but.getText() );
//clear action
else if( but.getText() == "CE" )
output.setText( "" );
operation = "";
number1 = 0.0;
number2 = 0.0;
//plus action
else if( but.getText() == "+" )
operation = "+";
number1 = Double.parseDouble( output.getText() );
clear = true;
//output.setText( "" );
//minus action
else if( but.getText() == "-" )
operation = "-";
number1 = Double.parseDouble( output.getText() );
clear = true;
//output.setText( "" );
//mult action
else if( but.getText() == "*" )
operation = "*";
number1 = Double.parseDouble( output.getText() );
clear = true;
//output.setText( "" );
//div action
else if( but.getText() == "/" )
operation = "/";
number1 = Double.parseDouble( output.getText() );
clear = true;
//output.setText( "" );
//eq action
else if( but.getText() == "=" )
number2 = Double.parseDouble( output.getText() );
if( operation == "+" )
result = number1 + number2;
else if( operation == "-" )
result = number1 - number2;
else if( operation == "*" )
result = number1 * number2;
else if( operation == "/" )
result = number1 / number2;
//output result
output.setText( String.valueOf( result ) );
clear = true;
operation = "";
//default action
else
if( clear == true )
output.setText( "" );
clear = false;
output.setText( output.getText() + but.getText() );
}Multiple post:
http://forum.java.sun.com/thread.jsp?forum=31&thread=474370&tstart=0&trange=30 -
Please i need som help with my tabbedpoane. I want my tab to call a new class when it is chosen. I have tried this: tabbedPane.addTab( "Schema", new Schema() ); , but it doesnt work. Schema is a class in the same package. AI could really do with some help on this one.
Dont answer the question that this same guy is posted here
http://forum.java.sun.com/thread.jsp?thread=503459&forum=57&message=2382925
He is a good cross-poster -
Urgent help with simple BPEL process for reading data from database
Hello there,
I need help with BPEL project.
i have created a table Employee in Database.
I did create application, BPEL project and connection to the database properly using Database Adapter.
I need to read the records from the database and convert into xml fomat and it should to go approval for BPM worklist.
Can someone please describe me step by step what i need to do.
Thx,
DpsI have created a table in Database with data like Empno,name,salary,comments.
I created Database Connection in jsp page and connecting to BPEL process.
It initiates the process and it goes automatically for approval.
Please refer the code once which i created.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@page import="java.util.Map" %>
<%@page import="com.oracle.bpel.client.Locator" %>
<%@page import="com.oracle.bpel.client.NormalizedMessage" %>
<%@page import="com.oracle.bpel.client.delivery.IDeliveryService" %>
<%@page import="javax.naming.Context" %>
<%@page import="java.util.Hashtable" %>
<%@page import="java.util.HashMap" %>
<%@ page import="java.sql.*"%>
<%@ page import= "jspprj.DBCon"%>
<html>
<head>
<title>Invoke CreditRatingService</title>
</head>
<body>
<%
DBCon dbcon=new DBCon();
Connection conn=dbcon.createConnection();
Statement st=null;
PreparedStatement pstmt=null;
Hashtable env= new Hashtable();
ResultSet rs = null;
Map payload =null;
try
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
env.put(Context.PROVIDER_URL, "opmn:ormi://localhost:port:home/orabpel");//bpel server
env.put("java.naming.security.principal", "username");
env.put("java.naming.security.credentials", "password");//bpel console
Locator locator = new Locator("default","password",env);
IDeliveryService deliveryService =
(IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME );
// construct the normalized message and send to Oracle BPEL Process Manager
NormalizedMessage nm = new NormalizedMessage();
java.util.HashMap map = new HashMap();
st=conn.createStatement();
out.println("connected");
String query1="Select * from EMPLOYEE";
rs=st.executeQuery(query1);
/*reading Data From Database and converting into XML format
so that no need of going to BPEL console and entering the details.
while (rs.next()){
String xml1 = "<AsynchBPELProcess1ProcessRequest xmlns='http://xmlns.oracle.com/AsynchBPELProcess1'>"+
"<Empno>"+rs.getString(1)+"</Empno>"+
"<EmpName>"+rs.getString(2)+"</EmpName>"+
"<Salary>"+rs.getString(3)+"</Salary>"+
"<Comments>"+rs.getString(4)+"</Comments>"+
"</AsynchBPELProcess1ProcessRequest>";
out.println(xml1);
nm.addPart("payload", xml1 );
// EmployeeApprovalProcess is the BPEL process in which human task is implemented
deliveryService.post("EmployeeApprovalProcess", "initiate", nm);
// payload = res.getPayload();
out.println( "BPELProcess CreditRatingService executed!<br>" );
// out.println( "Credit Rating is " + payload.get("payload") );
//Incase there is an exception while invoking the first server invoke the second server i.e lsgpas13.
catch(Exception ee) {
//("BPEL Server lsgpas14 invoking error.\n"+ee.toString());
%>
</body>
</html>
Its working fine.And i want it for Bulk approvals.please help me step by step procedure if any other way to implement this. -
Urgent help with Pages 5.0 needed
Hi guys,
I need urgent help! I deleted Pages 5.0 (as I HATED it) but now can't open a very important document. Can someone please tell me how to reinstall it??
Thanks
KellieDownloading again is not as easy as that. you must find the app in the "Purchased" section of the
app store and I think you then must hold down the option key to reinstall it.
BTW, I only worked with one document as a trial for Pages 5 and then imported it to Word and saved it. I then deleted Pages 5 (I can't believe anyone who works with software would think that piece of worthless junk would sufice for anyone who uses a word processor professionally), reopened the Word document and saved it in Pages 09.
I hope this helps -
Urgent Help with Planning Book
Hello Gurus,
Need your help with a very urgent issue. I cannot see my key figure values in my planning book(Interactive Planning). I could sucessfully generate my CVC, then initialised my planning area. Then when I go the interactive planning I can see all my characteristics -Ex Material master( has all values), Prod type has values, etc. Iam in DEV system and have to move the whole config to QA now. I have to validate that the config works in QA. Its works ok in the sandbox but I cannot figureout why I can not see the values for key figs that Iam loading from a Flat File. Please help!!!!!!Hello Suresh,
I have one more question for you. Let me tell you my scenario. I have the client giving me a rough forecast for the future. I have to do stat forecast based on the history and check that against the initial forecast given by them. But, the problem I realised now is that when I go to my planning books I can see the values for 2008 in mothly buckets since I have 0calmonth. But the client gave me another file with forecast for 2008 in monthly buckets and for 2009 and 2010 in quarter buckets. So, i have a planning buck profile defined to meet that but, how do I upload the file with both 0calmonth and 0calquarter in a single file. Please let me know!! Urgent task.
Thanks again,
Chinna. -
Urgent Help with network access to FileOutputStream
URGENT HELP NEEDED GUYS...I am stuck on this past 2 days. I tried several alternatives but to vain.
I am trying to access a Folder on a user's computer which is lying in a different Domain.
For accessing this folder, I have the following information with me.
Domain name, PC name, folder name, windows username, windows password.
Note: This username and password will give me rights to read + write to that folder.
How to use these information to open a fileoutputstream ? Does the java.io package allow programs to pass a username, password , domainname, pcname and then the folder and filename to create/read/write files..
Pls. suggest code examples. Sometime back I posted this query but didnt get an answer to my satisfaction. I have tried at my end but unsuccessful yet. Help would be appreciated.
I am trying this on a Windows File System and Network domain
THIS IS V. URGENT
Thanks,Hi HJK,
I am referring to the last reply of yours.
" Hi, there are three approaches I can think of offhand:
1) make sure the user-context under which you run the java app has the right to access the remote drive.
2) Do the network connection in a batch or c program and call that at the start of your java app with Runtime#exec.
3) Write some c/c++ code to open the connection and integrate that via JNI.
Let me know what (other) solution you came up with in the end!
Regarding the 1st.
I am supposed to write a remote installation utility actually. There are around 200 PC(s) in a network on which I need to copy these java class files. My problem statement is such that at runtime I only have username, passwords, domain access. I am not supposed to map any drives. Its supposed to be done dynamically. No manual intervention required. :(
How do I do the network connection in a batch mode ? Let me know that?
If 2nd option can be done, probably I can think of action-3 at the moment I am quite blurr :( -
Need urgent help with HSDIO hardware timing
Hi everyone,
I need urgent help regarding HSDIO hardware timing. I've been working in a project which generating serial ramp using HSDIO pxie device.
I'm using clock rate 40MHz and generating 14 bit of boolean for each step of ramp. And I have to generate simply 256 steps ramp.
Which means, 256 (steps) x 14 (boolean array) x 25 ns (period of 1 boolean value) = 89,6 ns.
What I'm doing right now is with using index of FOR loop as my input data (converting the index into 14bit boolean), then write into pxie device in every iteration,
which means, my data is getting into output in every 1ms time, right? (I'm using windows)
And I want to be able to generate faster than that.
How can I prewrite my 256 steps ramp, then write them all at once into pxie device. I'm really stuck here.
In the picture can you see how I do the write into device in every iteration of FOR Loop.
Regards,
Yan.hi, thanks for responding.
with using example of dynamic generation with script, I can manage to generate the ramp with controllable delay (generate the whole waveform, including delay with script command, then write to the card).
But I still have 1 question, I can test the output of the generation using oscilloscope and cant see the start delay (I'm writing delay at the start, before generating the ramp). My signal generated at 0 sec.
How can I check this start delay? is there any good example delivered with Labview to check this generation? Somehow I cant use the "dynamic generation and acquisition" example to see my generation (cant figure out how to capture the generated signal).
regards,
Yan. -
Help with JSP and logic:iterate
I have some queries hope someone can help me.
I have a jsp page call request.jsp:
====================================
<%@ page import="java.util.*" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<html>
<body>
<%@ page import="RequestData" %>
<jsp:useBean id="RD" class="RequestData" />
<%Iterator data = (Iterator)request.getAttribute("Data");%>
<logic:iterate id="element" name="RD" collection="<%=data%>">
<jsp:getProperty name="RD" property="requestID" />
<%=element%><br>
</logic:iterate>
</body>
</html>
And I have the RequestData.java file:
======================================
private int requestID = 1234;
public int getRequestID() { return requestID; }
The jsp page display:
======================
0 RequestData@590510
0 RequestData@5b6d00
0 RequestData@514f7f
0 RequestData@3a5a9c
0 RequestData@12d7ae
0 RequestData@e1666
Seems like the requestID is not returned. Does anybody know this?
I have done the exact one using JSP and servlets, trying to learn using JSP and custom tags. The one with JSP and servlet looks like:
============================================
<%@ page import="RequestData" %>
<%Iterator data = (Iterator)request.getAttribute("Data");
while (data.hasNext()) {
RequestData RD = (RequestData)data.next();
out.println(RD.getRequestID() );
}%>Oh think I got it...
but one thing I'm not sure is...
If I use "<jsp:useBean id="RD" class="RequestData" />", do I still need "<%@ page import="RequestData" %>"?
I tried without and it gives me error... -
Hi ,
I'm new to beans .Please help me on this. I have 2 jsp pages -trial.jsp and trial2.jsp and a bean class-UserInfo.java
I'm setting the bean values from trial.jsp and trying to retrieve from trial2.jsp. But the values are coming as null. Can you please help me on this.
Code of Trial.jsp
<html>
<body>
<form name="beanTest" method="get" action="trial2.jsp">
<table width="60%">
<tr>
<td width="44%">Name</td>
<td width="56%"><label>
<input type="text" name="name" id="name">
</label></td>
</tr>
<tr>
<td>Age</td>
<td><input type="text" name="age" id="age"></td>
</tr>
<tr>
<td>Occupation</td>
<td><input type="text" name="occupation" id="occupation"></td>
</tr>
<tr>
<td><label>
<jsp:useBean id="person" class="javaUtil.UserInfo" scope="request"/>
<jsp:setProperty property="*" name="person"/>
<input type="submit" value="Test the Bean">
</form>
</body>
</html>
Trial2.jsp
<form>
<jsp:useBean id="person" class="javaUtil.UserInfo" scope="request"/>
Name<jsp:getProperty property="name" name="person"/><br>
age:<jsp:getProperty property="age" name="person"/><br>
job:<jsp:getProperty property="occupation" name="person"/><br>
</form>
UserInfo.java
package javaUtil;
import java.io.Serializable;
public class UserInfo implements Serializable{
private static final long serialVersionUID = 1L;
private String name;
private int age;
private String occupation;
public String getName()
return this.name;
public void setName(String name)
this.name=name;
public int getAge()
return this.age;
public void setAge(int age)
this.age=age;
public String getOccupation()
return this.occupation;
public void setOccupation(String occupation)
this.occupation=occupation;
Please help me.....Actually you're probably off on a false trail with jsp:useBean. The more up to date methods use tag libraries (typically JSTL) and access bean attributes using EL, bean expression language. E.g. you put your initial form data into a request attribute called "data" and you put:
<input type="text" name="property1" value="${data.property1}" ....useBean is no use for binding returned fields from a form. Always remember that your JSP generates HTML and once that HTML is sent to the browser that's it, the JSP has done it's job and finished. Only with JSF, at present, does what you write in your JSP affect the processing of received form data. When you get the form data back you need to "bind" the values from the request back to the bean. A framework like Spring will do this stuff for you, but in a raw Servlet/JSP environment it's up to you. -
Help with JSP/Weblogic/Tomcat Discrepencies
Hi,
I have something very strange happening. I recently did some JSP stuff on
WLS60SP1 and all went quite well. I then took those same JSP pages and tried
them out on the latest release of TOMCAT. I was really impressed that
everything seemed to be completely transparent and working just fine until
the following situation:
When I reference, within a JSP page, an object that has previously been
added to the request scope that has just been created, but not messed with
in anyway...meaning all the attributes in this bean have their default
values set...and they are all Strings with the exception of one Integer
using this format:
<%= custVal.getCustomerNumber() %>
- In WLS, what shows in the text field on the form is nothing, because
customer number in the custVal object is null (default for a String)..this
is what I want.
- In Tomcat, what shows it the word "null".
...here is the weird part, by changing from scriptlet references to the
<jsp:getProperty....> format such as....
<jsp:getProperty name="custVal" property="customerNumber"/>
-In WLS, he is still a happy camper and works just fine regardless of how I
reference the bean
-In Tomcat, I also get the correct results that I want.
So, unlike most postings, I found out how to fix it but I would like to know
why...any ideas?
Thanks in advance,
Paul Reed
www.jacksonreed.com
object training and mentoring
Jackson-Reed, Inc. 888-598-8615
www.jacksonreed.com
Author of "Developing Applications with Visual Basic and UML"
http://www.amazon.com/exec/obidos/ASIN/0201615797/jackreedinc/104-0083168-31
95939
Author of "Developing Applications with Java
Try http://localhost:7001/HelloWorld.jsp
"b. patel" <[email protected]> wrote:
>
>I need help with running a simple JSP. I created a WLS domain using the
>WebLogic
>Configuration Wizard. I am trying to access HelloWorld.jsp which is
>located under
>C:\bea\user_projects\wlsdomainex\applications\DefaultWebApp.
>I type
>http://localhost:7001/DefaultWebApp/HelloWorld.jsp. I get 404 - Page
>Not Found
>Error. The weblogic server starts Succesfully. I am trying this in Win
>2K environment.
>
>I am new to WebLogic. Thanks for your Help in advance.
>
-
Need some URGENT help with 3 DVD mastering issues PLEASE! :
Hi there,
Firstly, I am running DVD SP 3.0.2 on Mac OS 10.4.7 on a G5 Dual 2 GHz 3Gb Ram plenty of HD space...
I am creating a DVD with: An intro sequence, a main menu, 4 sub menus, and 4 sections with around 12 chapters each.
I am having some big problems, and a pretty stuck. I will lest them separately below, numbered. If you are able to help, please refer clearly to which number you are helping with. Any help is MUCH appreciated! Many thanks!!
1. Each of the 5 menus (1 main, 4 sub) have a background video, and a separate audio track. I added the background videos by simply dragging them to the assests panel, then from there onto the menu editor window. They are created in FCP and are properly encoded. However, when I click the motion button, or use the simulator, the videos do not show up. The music plays, but all i see is plain black.
What is going on?!?!?!
2. I am really struggling with rollover buttons. I have custom created buttons, and I wand them to have a soft red glow around them when hovered over. HOW ON EARTH DO I ACTUALLY DO THIS??
The buttons are in photoshop so can be exported with/without background/glow in any format.
3. Is it possible, once I have got the above rollover working, to have an image to the right hand side of my buttons which changes with the the button rollover. i.e. hover over button 1, see image 1. hover over button 2, image changes to image 2.
PLEASE PLEASE give any help you can, I have a deadline coming up and am quite stumped. Thanks again!!I am still having problems regarding issue Number 1. PLEASE ANYONE HELP?!
Sorry, I'm not sure about the motion menus. I avoid those whenever possible. But you might click on the menu in the storyline tab (whatever it's called -- the hierarchical view with the disc, tracks, slideshows, etc.) and look at the properties and see if there's anything you have to enable specifically for motion. And be sure the motion button is on on the main display/preview area, but it sounds like you already know how that works.
For your information, here is a screen grab of the menu I am trying to create:
http://www.redhavoc.co.uk/stuff/menu.jpg
I think it is obvious that when a button is hovered over, I want it to glow red, and the image to the right will change to match the respective button.
IS THIS GOING TO BE POSSIBLE????
Yes.
First, your menus have to be layered menus. Unfortunately, there's no way to convert non-layered menus to layered menus, so if you already have non-layered, you'll have to just delete them and create new layered menus. The button (and menu item) to create a layered menu should be right by the normal new-menu item.
Next, the graphical work is all in Photoshop.
Side tip: You may already know this, but I found it's best to use 640x480 for the Photoshop document. When I do text and leave it as a text object in the Photoshop file, it resizes poorly in DVDSP. So this ends up being another 720x480 vs. 640x480 square/rectangular pixel conversion thing. DVDSP plays in the 640x480 world, at least as far as the designer can see. So I keep my images at 640x480, and it doesn't have to resize, and everything looks right.
Moving on... Set up your basic background, the part that won't change (or will have other things covering it, like for your square image).
Then put in all the buttons and images you'll be using, each part in a separate layer. This could have fifteen buttons (you have five buttons, and there can be three versions for each -- inactive, selected, and activated versions) and five or six square images (you said one for each button, and you might want a blank default if, say, you want to add a "back" button on the menu and want some blank or default image for the square when they're on the "back" button).
Sometimes people don't bother with a separate "active" button state, but you usually want some visual feedback that they clicked the button. Also, I usually just build the default (unselected) button into the background; that's less hassle later on, and it will just draw the selected or activated buttons over that when the user is on that button.
Line up all your buttons and images. All the square images lined up perfectly on top of each other, all the buttons in the right places (so you'll have three buttons stacked on top of each other in each spot). Give each layer a short but quickly recognizable name, and line them up in a consistent order. (button1-default, button1-selected, button1-active, button1-squarepicture, then button2-default, ... etc.) Photoshop and DVDSP don't care, but it makes it easier for you later.
Note that earlier versions of DVDSP won't show Photoshop layer effects. (They handle layers, just not the effects, like inner glow, outer bezel, etc.) I don't remember when they changed this, but I think it was version 4.something. So if you're using that method to make your buttons glow, you may have to flatten each selected or active button layer, and you may even need to create a dummy blank layer underneath it first to give it something to flatten onto.
Save the file as a standard Photoshop file (.psd). Drag the file onto your DVDSP layered menu and set it as the background.
Now, in DVDSP, create all your buttons. Just drag boxes over/around the button pictures you have. Feel free to make them extra-big; users won't see the actual area you've selected, and bigger areas makes it easier for people to hit them if they're using a mouse on a computer to watch the DVD. You can point the buttons to their targets now if you want, and set the end jumps on the tracks if you want. (I tend to set the end jumps on the tracks so they automatically select the button for the next track.)
Now's the fun part, since it will actually hook everything up and should be easy if your naming layer order were consistent. Click on the layered menu (in that hierarchical view) and look at the properties window. (Sorry I can't remember the technical names for all these windows; I'm doing this all from memory. So feel free to ask more questions if you can't find what I'm talking about.) One of the properties tabs should have a grid of checkboxes with a list of your layers. Make sure the background is checked for all of the states. Then check the layers you want to show for each button state, as well as the corresponding square image to show for each.
Again, I'm doing this from memory, and I can't remember exactly how things are listed in that grid. But I remember it keeps your layers in the same order you put them in the Photoshop file and shows you those names, so it should make it easy to go down the list and check the right boxes.
And another side tip: You can update the Photoshop file, but once you've put it in DVDSP, if you change the layer order, it will screw up the check boxes you checked. It always shows you the layer names correctly, but it keeps the checkboxes in DVDSP simply assigned to the layer number, so the fifth layer will keep the same checkboxes even if you juggle them so some other layer is now the fifth layer. So if you do juggle the layers in Photoshop, go back and fix the checkbox list in DVDSP.
I put a sample Photoshop file based on yours in
http://dan.black.org/layered-menu-sample.psd
It's quick and dirty, but shows the layer layout, and you should be able to drop it on DVDSP to play with. (I also won't leave it there forever, maybe a few weeks, so anybody reading this in a month or more probably will get a 404 for that url.)
Again, doing this from memory, so feel free to ask if anything doesn't work or doesn't make sense.
G4/dual867 Mac OS X (10.4.5) 2GB/0.8TB -
URGENT: Help with dynamic borders!
Hello all -
I DESPERATLY need help with this! I am using the code from
kirupa's xml photo gallery with the thumbnails. right now the alpha
changes on mouseover, fine...but my client is demanding that it
draw a border instead. I have been at this for about a week and
have NO idea how to do this...i have looked at things like API's
and things...but my main issue is that the images and MC's are all
created on the fly and i dont know how to code in an on mouseover
draw a border type of function, no idea at all!
This is my code as it sits now, PLEASE SOMEONE HELP ME!!!
thank you in advance!really could use some help quick here guys
-
Urgent Help with Image Gallery
Hi,
I really need help with an image gallery i have created. Cannot think of a resolution
So....I have a dynamic image gallery that pulls the pics into a movie clip and adds them to the container (slider)
The issue i am having is that when i click on this i am essentially clicking on all the items collectively and i would like to be able to click on each image seperately...
Please see code below
var xml:XML;
var images:Array = new Array();
var totalImages:Number;
var nbDisplayed:Number = 1;
var imagesLoaded:int = 0;
var slideTo:Number = 0;
var imageWidth = 150;
var titles:Array = new Array();
var container_mc:MovieClip = new MovieClip();
slider_mc.addChild(container_mc);
container_mc.mask = slider_mc.mask_mc;
function loadXML(file:String):void{
var xmlLoader:URLLoader = new URLLoader();
xmlLoader.load(new URLRequest(file));
xmlLoader.addEventListener(Event.COMPLETE, parseXML);
function parseXML(e:Event):void{
xml = new XML(e.target.data);
totalImages = xml.children().length();
loadImages();
function loadImages():void{
for(var i:int = 0; i<totalImages; i++){
var loader:Loader = new Loader();
loader.load(new URLRequest("images/"+String(xml.children()[i].@brand)));
images.push(loader);
// loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,onProgress);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,onComplete);
function onComplete(e:Event):void{
imagesLoaded++;
if(imagesLoaded == totalImages){
createImages();
function createImages():void{
for(var i:int = 0; i < images.length; i++){
var bm:Bitmap = new Bitmap();
bm = Bitmap(images[i].content);
bm.smoothing = true;
bm.x = i*170;
container_mc.addChild(bm);
var caption:textfile=new textfile();
caption.x=i*170; // fix text positions (x,y) here
caption.y=96;
caption.tf.text=(xml.children()[i].@brandname)
container_mc.addChild(caption);yes, sorry i do wish to click on individual images but dont know how to code that
as i mentioned i have 6 images that load into an array and then into a container and i think that maybe the problem is that i have the listener on the container so when i click on any image it gives the same results.
what i would like is have code thats says
if i click on image 1 then do this
if i click on image 2 then do something different
etc
hope that makes sense
thanks for you help!
Maybe you are looking for
-
Could not find Factory: javax.faces.context.FacesContextFactory
I'm trying to start a new JSF with facelets app from scratch using JSF 1.2.06 on Tomcat 6.0.10 but I can't even get the app to start. I get this when I try to start the app: java.lang.IllegalStateException: Application was not properly initialized at
-
Delete Previous Version - file associations
Have a question on file association problems when deleteing previous version of PS. For example user bought CS5 and installed. File Associations now changed by defauilt to CS5. If user un-installs CS4, the file associations now revert back to CS4,
-
How do I change the aspect ratio on Final Cut Pro X?
Whenever I upload new media (regardless of what ratio it was filmed in) it plays in letterbox format. I would like to change the aspect ratio to 16:9. Thanks.
-
hi i ma getting following error as a pop up when i try to execute one of my programs: ERROE GENERATING TEST FRAME Can any one suggest a solution
-
External number range for Billing Document
Hi Gurus, Can you please let me know how to get the external number for the invoices? I know there is no standard way but if there is a way around to determine it. And the external number should be first 2 places are alphanumeric and dynamic and the