So close plz help....
Hi, i have one error plz help...
// By Michael
import java.io.*;
public class Reading
public static void main (String [] args)
String prompt = "Enter an integer: ";
int number = getInt(prompt);
System.out.println ("The number you entered was " + number);
public static int getInt(String display)
String str = "";
int retNum = 0;
boolean inputOk = false;
InputStreamReader inReader = new InputStreamReader(System.in);
BufferedReader bfdReader = new BufferedReader(inReader);
while (!inputOk)
try
System.out.print(display);
str = bfdReader.readline();
retNum = Integer.parseInt (str);
inputOk = true;
catch (IOException e)
System.out.println("An error has occured: ");
catch (NumberFormatException e)
System.out.println ("An error has occured");
System.out.println ("Please input integer values only.\n");
return retNum;
You guys must be in the same class:
http://forum.java.sun.com/thread.jsp?forum=54&thread=332714&tstart=0&trange=15
Similar Messages
-
ITunes not working on ipad, stays on for 4 secs then closes, plz help?
iTunes not working on ipad, stays on for 4 secs then closes, plz help?
Can't help -- on my iPhone, i've turned the toggle switch on in Setting>Music but it says I have not subscribed to iTunes Match and to go to iTunes on my computer and subscribe even though I have already. So, can't get iCloud to update music on my iPhone wirelessly.
-
my iphone is acting crazy plz help asap my phone is giving reading me everything i lay my hand on and is not letting me scroll down or select anything i must have accidentally switched some voice thing on plz help me close it:(
First off, try triple clicking the home button.
To scroll use three fingers and I think you have to double tap to get into something.
Go to Settings>General>Accessability>Voiceover and then turn that off.
Hope that sorts it for you -
Plz help me to close new window ! ! ! ! ! ! !
Hi all,
i'm a fresher in jsp. i write a jsp page with a 'text box' & a button. when i click the button, i want to see the html page that can choose somthing from it & then, i want to see the selected data in the 'text box' of jsp page of previous window. but, when i run my code, the jsp page open, then when i click the button, the html page appear with new window. but, when i choose one & click the submit button, it call the jsp page again in new window. i don't want to see the jsp page again in new window. but in previous window with the data i selected in the 'text box'.
How can i do it? where can i change?
Plz help me.
Here my coding ..........
\\\\\\\\\\ 13p3.jsp \\\\\\\\\\\\\\\\\\\\\\
<%@ page language="java" info="form processing page" %>
<html>
<head><title></title></head>
<body>
<%! String sid; %>
<%
sid = request.getParameter("id");
%>
<input type="text" name="ID" size=20 value=<%= sid %>>
<%= sid %>
<input type="button" name="ControlButton" value="Start." onClick="window.open('13p2.html','ControlWindow','width=250, height=225')">
</body>
</html>
\\\\\\\\\\\\\ 13p2.html \\\\\\\\\\\\\\\\\
<html>
<head><title></title></head>
<body>
<form method=post action="13p3.jsp">
<table width=100% border=2 bordercolor=#00ffdd>
<tr><td colspan=2>
<table bgcolor=#A5A6C6#00ffdd width=100%><td width=50%><center>ID</center></td><td width=50%><center>Name</center></td></table>
</td></tr>
<tr><td width=50%><center><input type=radio name="id" value=1>1</center></td><td width=50%>Ma The The</td></tr>
<tr><td width=50%><center><input type=radio name="id" value=2>2</center></td><td width=50%>Ma Mar Mar</td></tr>
<tr><td width=50%><center><input type=radio name="id" value=3>3</center></td><td width=50%>Ma Mie Mie</td></tr>
</table>
<table width=100% border=0>
<tr><td width=100%><center><input type=submit value=Submit></center></td></tr>
</table>
</form>
</body>
</html>
\\\\\\\\\\End
thanks ...
icyrock.This isn't a JSP problem. Brush up on your Javascript.
-
Hi,
I have attached my simulation loop.In the model attached i hav eone main pump with constant rpm which drives the 5 smaller pumps and fills the tank at the same time.As soon as the tanks reach their 90% level,the valves of the five pumps close(SP1,SP2,SP3,Sp4,Sp5).After that the recirculating pumps opens for 5 secs of the first tank.As soon as the recirculation finishes,the drain valve(SV1) for tank 1 open and the volume goes to interim storage.This happens for all the remaining tanks.
My simulation works the first time,but when the second time the loop starts,it skips the recirculation pump even though i gave a time delay for 5 secs.Plz help ..I have attached the simulation.
Thanks,
Rami
Attachments:
Spatial Logic_2_Final.vi 223 KBRami,
I suspect that you have a race condition. The widespread use of local variables frequently leads to race conditions. Your subVI (Spatial Logic Sub_2.vi was not included) so I cannot run the VI. You have no way of knowing whether the subVI or the inner case structure will execute first, because there is no data dependency between them.
I think a shift register or a few and some dataflow thinking would allow you to eliminate the inner case structure, the local variables, and, probably, most of your problems.
Some of the SPi are indicators and some are controls. How are they used?
The last case of the inner loop retursn to Case 1. Would case 0 be better?
As for the second time through issue, it may be related to the Elapsed time function Auto Reset. From the help file: "Resets the start time to the value in Present (s) when the Express VI reaches the Time Target (s)." If more than 5 seconds elapses between the first time you use this and the next, it will exit immediately on the subsequent calls.
Lynn -
Plz help using ms access as database,i want to create a login page in java
hye frnz... plz help me m new to java
m using ms access as database and try to create a login page where user type username and pw
i had enter valid user entries in database i checked connectivity is working i want as user login the main window must open after checking username and pw field to database but
now there is an error class not found exception sun:jdbc...... error
plz help me i had stuck frm 4 days */
import java.sql.DriverManager;
import java.sql.Connection;
import java.sql.Statement;
import java.sql.ResultSet;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
class Login extends JFrame
//Component Declarations
JLabel jlb1,jlb2;
JTextField jtf1;
JPasswordField jpf1;
JButton jb1,jb2;
//Constructor
Login()
//frame settings
setTitle("Login Dialog");
setLayout(new GridBagLayout());
GridBagConstraints gbc = new GridBagConstraints();
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
Dimension d= Toolkit.getDefaultToolkit().getScreenSize();
setBounds(d.width/2-175,d.height/2-100,350,200);
gbc.insets=new Insets(7,7,7,7);
//adding components
jlb1=new JLabel("User ID");
gbc.gridx=0;
gbc.gridy=0;
add(jlb1,gbc);
jlb2=new JLabel("Password");
gbc.gridx=0;
gbc.gridy=1;
add(jlb2,gbc);
jtf1=new JTextField(10);
gbc.gridx=1;
gbc.gridy=0;
add(jtf1,gbc);
jpf1=new JPasswordField(10);
gbc.gridx=1;
gbc.gridy=1;
add(jpf1,gbc);
jb1=new JButton("Login");
gbc.gridx=0;
gbc.gridy=2;
add(jb1,gbc);
jb1.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent ae)
Connection conn=null;
Statement stmt=null;
boolean found=false;
try
Class.forName("sun.jdbc.driver.JdbcOdbcDriver");
String dataSourceName = "Inventory";
String dbURL = "jdbc:odbc:" + dataSourceName;
conn=DriverManager.getConnection(dbURL, "","");
stmt=conn.createStatement();
ResultSet rst=stmt.executeQuery("Select * from User");
System.out.println(jtf1.getText()+"/t"+jpf1.getPassword());
while(rst.next())
System.out.println( rst.getString(1) +"/t"+ rst.getString(2));
if(jtf1.getText().equals(rst.getString(1).trim()) && new String(jpf1.getPassword()).equals(rst.getString(2).trim()))
found=true;
rst.close();
dispose();
MainWindow mw= new MainWindow(); /*created min window object created to be opend after login but not working*/
break;
rst.close();
stmt.close();
conn.close();
catch(ClassNotFoundException e){System.out.print(e);}
catch(Exception e){System.out.print(e);}
if(found==false) /*this portion is executing and dialog box appears invalid name and pw with class not found exception sun:jdbc.......on console */
JOptionPane.showMessageDialog(null,"Invalid username or password",
"Error Message",JOptionPane.ERROR_MESSAGE);
jb2=new JButton("Clear");
gbc.gridx=1;
gbc.gridy=2;
add(jb2,gbc);
jb2.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent ae)
jtf1.setText("");
jpf1.setText("");
jtf1.requestFocus();
setSize(350,200);
setVisible(true);
jtf1.requestFocus();
public static void main(String args[])
Login l=new Login();
Edited by: 795772 on Sep 19, 2010 4:44 AM795772 wrote:
hye frnz... plz help me m new to java
m using ms access as database and try to create a login page where user type username and pw
i had enter valid user entries in database i checked connectivity is working i want as user login the main window must open after checking username and pw field to database but
now there is an error class not found exception sun:jdbc...... error
plz help me i had stuck frm 4 days */
<snip>The subject of this forum is Oracle databases. How does your problem relate to that subject?
Two bits of advice:
1) Make sure you ask questions in a forum related to your problem.
2) If you want to be taken seriously as a professional, drop the MS IM Speak and use the language of the forum. In this forum it is English, which is successfully used by many people for whom English is far from their native language. -
Refreshing JEditorPane (Urgent) plz help
hello programmers,
i'm building an html editor:
My html editor has a split pane, the 2 pane got of the split pane are JEditorPanes, one on which i write tag and the other i display them,... thankfully all's working great, my syntax is highlighting and the html is displayed well but i've got the following problem:
when i save a html page , i wanna my browser (on the right side of the slipt pane) to display the html page... it's ok .. it displays it with the method JHTMLEditorPane.setPage(file:/// directory/ file) but the problem is that when i save the page again using the same filename... my html page on the JHTMLEditorPane stays the same... it does not update...
is their a refresh function for the JEditorPane? how can i update my JHTMLPane to reflect the changes i've brought to it? ONe thing , the page changes when i save it by aother file name..... PLz help it's very urgent!!!!!!!
BernardHave you tried to close and then re-open the file in your editorpane after you've saved?
It will work when you change the name because it has to open the file as new. Java can't dynamically update values upon files like C does with pointers. -
when i upgrade my Mac Pro to yosemite safari doesn't good work and doesn't save bookmark plz help me to fix it
hi
when i save a page as boomark shown at the bookmark list when i close safari and restart safari evry bookmark that i saved dosn't show at the bookmark list
excuse me for whriting i speak a little english
1 save bookmark and show at the bookmarklist
2 i close safari
3 and reopen it
4any bookmark ,i saved them dosn't show at the bookmark list -
Experts plz help its very urgent
hi expert
plz help- me
previously i was getting dump in this statement
TRANSFER v_tab TO p_file.
FYI:
here v_tab is a table which hav som records
and p_file contains the path of a file like c:\new\ggg.txt
DATA: v_tab TYPE STANDARD TABLE OF t_line WITH HEADER LINE,
TYPES: BEGIN OF t_line,
pspid(9) TYPE c,
tab1 TYPE x,
post1 TYPE proj-post1,
tab2 TYPE x,
vernr TYPE prps-vernr,
tab3 TYPE x,
END OF t_line.
DUMP I WAS GETTIN :
For the statement
"TRANSFER f TO ..."
only character-type data objects are supported at the argument position
"f".
In this case. the operand "f" has the non-character-type "T_LINE". The
current program is a Unicode program. In the Unicode context, the type
'X' or structures containing not only character-type components are
regarded as non-character-type.
to avoid this dump i used feild symbol
assign V_TAB to <IN> casting.
p_file = <in>.
unassign <IN>.
nw there is no dump
but problem is p_file contains the contents of v_tab not the file path .
plz help me its very urgent
thanx in advanceHey, no probs,
after your initial declaration, do this.
TYPES: BEGIN OF n_line,
pspid(9) TYPE c,
tab1(15) TYPE c, "check the length you want
post1 TYPE proj-post1,
tab2(15) TYPE c, "check the length you want
vernr TYPE prps-vernr,
tab3(15) TYPE c, "check the length you want
END OF t_line.
DATA: n_tab TYPE STANDARD TABLE OF n_line WITH HEADER LINE.
now after you fetch data into v_tab,
move it to n_tab.
using a loop at v_tab and move corresponding fields to n_tab's work area
append to n_tab.
once you have populated n_tab and are ready to TRANSFER.
OPEN your file using
open dataset <file> for output in text mode encoding default.
now
loop at n_tab.
TRANSFER n_tab to p_file.
endloop.
CLOSE DATASET. -
my ipod touch 2g is on black screen.when i connect it to my pc it is not recognizing it.then i opened i tunes and put the phone in dfu mode it says an ipod is detected but it cannot be restored error 1600.plz help me...
Error 1604
This error is often related to USB timing. Try changing USB ports, using a different dock connector to USB cable, and other available USB troubleshooting steps (troubleshooting USB connections. If you are using a dock, bypass it and connect directly to the white Apple USB dock connector cable. If the issue persists on a known-good computer, the device may need service.
If the issue is not resolved by USB isolation troubleshooting, and another computer is not available, try these steps to resolve the issue:
Connect the device to iTunes, confirm that the device is in Recovery Mode. If it's not in Recovery Mode,put it into Recovery Mode.
Restore and wait for the error.
When prompted, click OK.
Close and reopen iTunes while the device remains connected.
The device should now be recognized in Recovery Mode again.
Try to restore again.
If the steps above do not resolve the issue, try restoring using a known-good USB cable, computer, and network connection.
Error 1600, 1601, 1602
Follow the steps listed above for Error 1604. This error may also be resolved by disabling, deactivating, or uninstalling third-party security, antivirus, and firewall software. See steps in this article for details on troubleshooting security software. -
Hi all,
i attended a interview, these are the qes..plz help me with ans..
1. is it possible without using function modules in
bdc(open, insert,close) data transferring? how ...
2. which one is better session/call transection? why?
3. in LSMW what r the methods u r using?
4. in LSMW otherthan recording any method is there? what are they?
5. in LSMW where are u doing field validation? in which step, can u explain?
6. is it possible to run smartform without using
" ssf_function_module_name", how ?
7. how will display secondary list in ALV.
8. how will u call back to secondary lists to base list?
9. how u r printing secondary list in interactive reports?
10. what are the events used in u r ALV reports?
11. how will u access data in secondary list?
12. what is diff b/w bapi created fm and standered bapi fm?
13. in ALE in which programm worked either standalone or any other?
here what is standalone?i know change pointer..Hi
10. what are the events used in u r ALV reports?
Events in alv and their FM The main events in alv and their FM and why we use these:
1. SLIS_PRINT_ALV.
2. SLIS_T_LISTHEADER.
3. SLIS_T_EVENT.
4. SLIS_T_SORTINFO_ALV.
5. SLIS_T_LAYOUT_ALV.
6. SLIS_T_FIELDCAT_ALV.
and in classic reports what is the sequence of events: === Events are
At selection-screen output.
Initialization.
At selection-screen on field
At selection-screen on end of field
At selection-screen on Radiobutton Group R1. (If you have any radio buttons)
At selection-screen on block b1. (If you have any blocks)
Start-of-selection.
Get node. (if the data is retreived from a logical database)
Get node late. (if the data is retreived from a logical database)
Top-of-page. (if the write statement is in the end-of-selection event or we can say that before the first write statement)
end-of-selection.
and fuction modules are
LISTHEADER - Is used to print the header information in the ALV List. Name, Date, Time, ALV Name and other details are called as Header information. EVENT - Basically this is the FM to handle Event's. When the user needs to do some event operation like when double clicking the a particular field we need to perform some operation. These events are captured by this FM. LAYOUT - This FM is used to define the layout of the List. There are many options available in this FM to define the Layout style. FIELDCAT - These are used to populate the List header. We can change them according to our req.
User-defined Text Output Event
Application
print_end_of_list
Define output text to be printed at the end of the entire list
print_top_of_list
Define output text to be printed at the beginning of the entire list
print_end_of_page
Define output text to be printed at the end of each page
print_top_of_page
Define output text to be printed at the beginning of each page
subtotal_text
Define self-defined subtotals texts
Mouse-controlled Actions in the Grid Control Event
Application
button_click
Query a click on a pushbutton in the ALV Grid Control
double_click
Query a double-click on a cell of the ALV Grid control
hotspot_click
Query a hotspot click on columns defined for this purpose in advance
onDrag
Collect information when elements of the ALV Grid Control are dragged
onDrop
Process information when elements of the ALV Grid Control are dropped
onDropComplete
Perform final actions after successful Drag&Drop
onDropGetFlavor
Distinguish between options for Drag&Drop behavior
Processing of Self-defined and Standard Functions Event
Application
before_user_command
Query self-defined and standard function codes
user_command
Query self-defined function codes
after_user_command
Query self-defined and standard function codes
Definition of Self-defined Functions Event
Application
toolbar
Change, delete or add GUI elements in the toolbar
menu_button
Define menus for menu buttons in the toolbar
context_menu_request
Change context menu
onf1
Define self-defined F1 help
All of these can be found under type group SLIS.
Events
SLIS_EV_ITEM_DATA_EXPAND TYPE SLIS_FORMNAME VALUE 'ITEM_DATA_EXPAND',
SLIS_EV_REPREP_SEL_MODIFY TYPE SLIS_FORMNAME VALUE 'REPREP_SEL_MODIFY', SLIS_EV_CALLER_EXIT_AT_START TYPE SLIS_FORMNAME VALUE 'CALLER_EXIT',
SLIS_EV_USER_COMMAND TYPE SLIS_FORMNAME VALUE 'USER_COMMAND',
SLIS_EV_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE',
SLIS_EV_DATA_CHANGED TYPE SLIS_FORMNAME VALUE 'DATA_CHANGED',
SLIS_EV_TOP_OF_COVERPAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_COVERPAGE',
SLIS_EV_END_OF_COVERPAGE TYPE SLIS_FORMNAME VALUE 'END_OF_COVERPAGE',
SLIS_EV_FOREIGN_TOP_OF_PAGE TYPE SLIS_FORMNAME
VALUE 'FOREIGN_TOP_OF_PAGE', SLIS_EV_FOREIGN_END_OF_PAGE TYPE SLIS_FORMNAME
VALUE 'FOREIGN_END_OF_PAGE',
SLIS_EV_PF_STATUS_SET TYPE SLIS_FORMNAME VALUE 'PF_STATUS_SET',
SLIS_EV_LIST_MODIFY TYPE SLIS_FORMNAME VALUE 'LIST_MODIFY',
SLIS_EV_TOP_OF_LIST TYPE SLIS_FORMNAME VALUE 'TOP_OF_LIST',
SLIS_EV_END_OF_PAGE TYPE SLIS_FORMNAME VALUE 'END_OF_PAGE',
SLIS_EV_END_OF_LIST TYPE SLIS_FORMNAME VALUE 'END_OF_LIST',
SLIS_EV_AFTER_LINE_OUTPUT TYPE SLIS_FORMNAME VALUE 'AFTER_LINE_OUTPUT', SLIS_EV_BEFORE_LINE_OUTPUT TYPE SLIS_FORMNAME VALUE 'BEFORE_LINE_OUTPUT',
SLIS_EV_SUBTOTAL_TEXT TYPE SLIS_FORMNAME VALUE 'SUBTOTAL_TEXT' -
Plz help me from the error - "org.apache.jasper.jasperException"
I am getting error with this code ,plz help me out ,i wanna correct this urgently
I've set the Environment variables JAVA_HOME and
CATALINA_HOME and here is my coding and error report
hello.html
<head><title>Database</title></head>
<body>
<form method="get" action="add.jsp">
<pre>
<center>Enter ur Name :<input type="text" name="nam" >
<br><input type="submit" value=" Add ">
</center></pre>
</form>
</body>
</html>
add.jsp
<%@ page language="java" %>
<%@ page import="java.sql.*" %>
<html>
<head><title>JSP</title></head>
<%! String name;
Connection con=null;
Statement st=null;
%>
<body>
<% name=request.getParameter("nam");
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
//I have created a User DSN sjp
con = DriverManager.getConnection("jdbc:odbc:sjp");
st = con.createStatement();
st.executeUpdate("insert into detail values('"+name+"')");
catch(Exception e)
con.close();
st.close();
%>
<h1> Name Added</h1>
</body>
</html>
Error
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:207)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)
root cause
java.lang.NullPointerException at org.apache.jsp.add_jsp._jspService(add_jsp.java:66)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:162)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)
Apache Tomcat/4.1.31hi,
when i use the code
if(st != null)st.close();
if(con != null ) con.close();
that works good ,the old error has been corrected.
but it's now throwing an SQLException[b] "datasource name not found and default driver not specified" why this occurs and also can u give me the explanation for the old error????
I am sure that i have created an user DSN, i am 100% sure about it .even though there is an error.
Deepak.
Deepak.C -
PLZ help me out here...URGENT....
Here, actually i need to request the program to ask the user howmany lines does he wants by asking him to input the number of lines and at the same time write the whole text line that he requested to anew file. PLZ help me out here. So, the program shud display the text files that it read line by line after the user enters the number of lines he wants....DO i need to manipulate the loop or wat???..plz help me out here guys...thanks in advance....
here is the code...
import java.io.*;
class FileReadTest3 {
public static void main (String[] args) {
FileReadTest3 f = new FileReadTest3();
f.readMyFile();
void readMyFile() {
DataInputStream dis = null;
String record = null;
int recCount = 0;
int EnterNum = 0;
System.out.println("Please enter the number of lines: "+EnterNum);
try {
File f = new File("aliran.txt");
FileInputStream fis = new FileInputStream(f);
BufferedInputStream bis = new BufferedInputStream(fis);
dis = new DataInputStream(bis);
for(int recCount = 0; recCount <= 10, recCount++)
recCount++;
System.out.println(recCount + ": " + record);
} catch (IOException e) {
// catch io errors from FileInputStream or readLine()
System.out.println("There was a problem for finding the file!" + e.getMessage());
} finally {
// if the file opened okay, make sure we close it
if (dis != null) {
try {
dis.close();
} catch (IOException ioe) {
}1.) Actually perform some user input of any kind. Right now, the user has no choice.
2.) Read from your file, for that's why you opened it.
3.) Don't use a DataInputStream unless you know what you're doing. Use a BufferedReader instead if it's simply text.
4.) Insert a condition check for the number of lines -- yes, you need to manipulate the loop or what.
P.S.: Multiple posting, no use of code tag, the word "URGENT" in subject, calling people "man" ... this is like wearing a shirt that says "shoot me!". -
How to use padding scheme FIPS81 in java plz help?
Plz refer the below code using this code I m trying to decrypt XLS file using pass phrase.
I m using the same pass phrase which was used @ the time of encryption.
But the problem I m facing is that the file was encrypted in DOT NET_ using padding scheme FIPS81 and there impelmentation of FIPS81 is not available in JAVA so that it gives exception at the time of decryption which is given below
Exception : javax.crypto.BadPaddingException: Given final block not properly padded
I urgently need the solution of this problem so somebody plz help me to find the solution of this problem.....Ur reply would be appriciated.....!!
The File is Encrypted using below mechanism
ALGORITHM : AES
MODE : ECB
PADDING SCHEME : FIPS81
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import javax.crypto.*;
import javax.crypto.spec.*;
public class DecryptTest {
public static void main(String[] s){
String passPhrase = "passphrase";
String encFileName = "encsample.xls";
String decFileName = "decsample.xls";
FileInputStream encFileIn = null;
FileOutputStream decFileOut = null;
File f = null;
byte[] message;
try {
f = new File(encFileName);
encFileIn = new FileInputStream(f);
decFileOut = new FileOutputStream(decFileName);
message = new byte[encFileIn.available()]; //Read the encrypted file in from disk
encFileIn.read(message);
SecretKeySpec spec = new SecretKeySpec(passwordToKey (passPhrase), "AES");
//decrypt it
Cipher c = Cipher.getInstance("AES/ECB/NoPadding");
c.init(Cipher.DECRYPT_MODE, spec);
System.out.println("Block Size is >-->" + c.getBlockSize());
String decryptedString = new String(c.doFinal(message));
System.out.println("Decrypted message: " + decryptedString);
//To write into another files
decFileOut.write(decryptedString.getBytes());
}catch (Exception e) {
System.out.println(e);
}finally {
try {
encFileIn.close();
decFileOut.close();
} catch (IOException ioe) {
}Is there any mechanism is available for FIPS81 or Is there any third party Provider available for it plz reply........????????I suggest you look in google http://www.google.co.uk/search?q=SWF+java
-
Abap code.........Plz help me
Hi all,
My requirement is
1. Users will be using the file upload Tcode in BW ( This TCode access will be authorized to specifi users)
2. ABAP Program need to place the file in the specified folder. Use the Z_FLATFILE_UPLOAD as a start. Copy to New program and work witht he New program
3. The ABAP program should be able to sent Trigger event after placingt he file to start the Process Chain, in which The flat file should be able to load to the ODS.
4. On Successful completion of the Process chain, the specific user group should be able to recive the email Message that the uploaded file has been loaded and avaible for reporting.
The ABAP program should be able to handle the follwing:
1. If the File Format is not correct the user should get an error message that the file is not in the expected format.
2. Once the File upload complete, user should see the message that the file uploaded correctly.
3. on Successful completion of the FileUpload, The program should trigger event.
and the program Z_FLATFILE_UPLOAD is given below
REPORT Z_FLATFILE_UPLOAD message-id zx .
PARAMETERS: FILE_NM LIKE RLGRAP-FILENAME obligatory.
PARAMETERS: P2 LIKE RLGRAP-FILENAME
DEFAULT '/Userdata/IFIN/0557'.
DATA: INRECORD_COUNT TYPE i,
OUTRECORD_COUNT TYPE i.
DATA : MASK(20) TYPE C VALUE ',. ,..'.
DATA: BEGIN OF ITAB OCCURS 0,
RECORD(3000),
END OF ITAB.
AT selection screen help and F4 statements
AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILE_NM.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
DEF_FILENAME = ' '
DEF_PATH = FILE_NM
MASK = MASK
MODE = 'O'
TITLE = 'File Select'
IMPORTING
FILENAME = FILE_NM
EXCEPTIONS
INV_WINSYS = 04
NO_BATCH = 08
SELECTION_CANCEL = 12
SELECTION_ERROR = 16.
IF FILE_NM = ' ' AND SY-SUBRC = 12.
SET CURSOR FIELD 'FILE_NM'.
MESSAGE I000(ZX) with 'File Selection cancelled.'
'Please select a valid file to proceed'.
ELSEIF SY-SUBRC NE 0.
MESSAGE E000(ZX) WITH FILE_NM.
EXIT.
ENDIF.
START-OF-SELECTION.
CALL FUNCTION 'UPLOAD'
EXPORTING
FILENAME = FILE_NM
TABLES
DATA_TAB = ITAB.
if sy-subrc <> 0.
message i000(ZX) with 'Upload Failed'.
LEAVE LIST-PROCESSING.
endif.
*editor-call for input_rec.
OPEN DATASET P2 FOR output IN text mode encoding default.
IF SY-SUBRC <> 0.
message i000(ZX) with 'COULD NOT OPEN THE FILE'.
LEAVE LIST-PROCESSING.
ENDIF.
INRECORD_COUNT = 0.
OUTRECORD_COUNT = 0.
LOOP AT ITAB. .
INRECORD_COUNT = INRECORD_COUNT + 1.
TRANSFER ITAB-RECORD TO P2.
OUTRECORD_COUNT = OUTRECORD_COUNT + 1.
ENDLOOP. "itab
END-OF-SELECTION.
CLOSE DATASET P2.
IF SY-SUBRC <> 0.
message e000(ZX) with 'COULD NOT OPEN THE FILE'.
ENDIF.
WRITE: / '# of records read ', INRECORD_COUNT,
/ '# of records transfered', OUTRECORD_COUNT.
WRITE:/ 'upload filename', FILE_NM.
WRITE:/ ' aix filename', P2.
after this code i need to trigger my event can any onle tell me the steps after this program and the code also please
thanks in advance
Sri
points will be assignedHey,
This forum is used to get some ideas/tips when you stcuk at some point during the development. This is not a place to send your work & expecting somebody to do it for you.
see similar funny thread
plz help me
Maybe you are looking for
-
ITunes match library isn't appearing on Apple TV
The only music that appears on my Apple TV are songs purchased from iTunes, anything else does not appear. Not sure if it matters, but home sharing IS turned on, on both the Apple TV and my Macbook and I'm signed in to the same iTunes account on bot
-
Hi, I have a logical entity which is a subtype of a "parent" entity. I'd like to define an unique identifier on it, composed of two attributes. The first is on the subtype and the second is on the supertype. Is it possible? I can't find the way to do
-
I just purchased and installed Elements 12 on Wed. I used it that day fine with no issues. The next day, the Organizer would open, but the Editor would not. I uninstalled the program and reinstalled and now it will not open at all. I have done tr
-
Hello, Can some one help me with the information also the document for the Cache modes? What is the difference between the cache mode 3 Persistent cache per Application server and 4. Persistent cache across each application server? Also i had a quest
-
Help with Photosmart Printer 7960 with Windows 8.1
I had to buy a new computer (8.1 windows). I was still using XP, when the computer crashed. I have lost the software for my printer. Does anyone know where I can find the software? HP told me that my printer is not compatible with windows 8.1. H