Findforward() results in infinite loop and server exits
I have a dataform which has struts html text field and 3 poplist bound
to database fields. I do a submit on the event onChange in the first poplist and it
will call a custom method in app module, which will setup the VO for populating the second poplist, based on
the data from the first list. In the action class, I override the findforward() to go to
DataAction to execute this custom method. On sucess from DataAction a forward is set to the first page
which display the second poplist. When i run the action from struts-config.xml,
the oc4j server goes on to loop and exits with message "Process exited with exit code 128".
Any ideas why this is happing ?.
One or several of the events handled by the page are still present because you keep forwarding between actions.
The onChange event is still hanging around when it is forwarded to the next action and this action may act on it in an unpredictable way.
There is currently code in the ADF framework to insure that an event is not executed by more than one action but in your case you may have your own events. Make sure to act on possible event being forwarded around.
Charles.
Similar Messages
-
REDO scanning goes in infinite loop and Too much ARCHIVE LOG
After we restart DATABASE, capture process REDO scanning goes in infinite loop and Too much ARCHIVE LOG being generated.
No idea whats going on.... otherwise basic streams functionality working fine.What's your DB version
-
Revision: 4870
Author: [email protected]
Date: 2009-02-05 15:33:52 -0800 (Thu, 05 Feb 2009)
Log Message:
TextView with textAlign="justify" causes infinite loop and eventual RTE. Vellum sometimes returns width and/or height larger than the request width/height due to rounding error. This triggers a contentWidth/Height change event which triggers the scroller which comes back in to TextView updateDisplayList, etc.
QE Notes:
Doc Notes:
Bugs: SDK-19144
Reviewers: Gordon
Ticket Links:
http://bugs.adobe.com/jira/browse/SDK-19144
Modified Paths:
flex/sdk/branches/i10/frameworks/projects/flex4/src/mx/components/TextView.as -
To_char displays different results on sql client and server
Hi,
I am executing the below query on my database with 8.1.7.4 version:
SQL> select to_char(to_date('20-OCT-07'),'D') from dual;
The following result is displayed:
T
7
When the same query is being run through sqlplus client(9.2.0.3) connecting to the same database, following result is being displayed:
SQL> select to_char(to_date('20-OCT-07'),'D') from dual;
T
6
Could anyone please explain me why is this difference and what parameter setting needs to be made to get the same result.
Thanks in advance,
VishwanathOr from the territory part of NLS_LANG OS variable :
oracle@xxx:/home/oracle# echo $NLS_LANG
AMERICAN_AMERICA.UTF8
oracle@xxx:/home/oracle# sqlplus '/ as sysdba'
SQL*Plus: Release 9.2.0.8.0 - Production on Mon Oct 22 10:44:59 2007
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
SQL> select to_char(to_date('20-OCT-07'),'D') from dual;
T
7
SQL> quit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
oracle@xxx:/home/oracle# export NLS_LANG=AMERICAN_FRANCE.UTF8
oracle@xxx:/home/oracle# sqlplus '/ as sysdba'
SQL*Plus: Release 9.2.0.8.0 - Production on Mon Oct 22 10:45:38 2007
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
SQL> select to_char(to_date('20-OCT-07'),'D') from dual;
T
6
SQL>Check it on both sites (client and server).
Nicolas. -
Wsdl requests result in infinite loop response; sometimes
I'm not sure this is the appropriate place to post this question so please redirect me if there is a better place.
We have some web services deployed and after they have been running a while a request for the wsdl will result in the following response.
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://model.ws.acme.com" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsxsdns="http://model.ws.acme.com" xmlns:wsns="http://model.ws.acme.com" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://model.ws.acme.com" xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:complexType><xs:complexType><xs:complexType><xs:complexType><xs:complexType><xs:complexType><xs:complexType><xs:complexType><xs:complexType><xs:complexType><xs:complexType>
where '<xs:complexType>' is repeated without end.
We are using the following: tomcat 5.5, axis2 1.2 and java 1.5.
I thought a request for the wsdl would simply return the file from the file system but I guess I'm wrong. Anyone know what really happens when the wsdl is requested? Any suggested reading? Anyone else ever seen this? Any other advice?
Thanks for your kind assistanceSad, I see many questions and few answers. Open source is great when it works.
-
The attached file is work inprogress, with some dummy data sp that I can test it out without having to connect to equipment.
The second tab is the one that I am having the problem with. the output array from the replace element appears to be starting at the index position of 1 rather than 0 but that is ok it is still show that the new data is placed in incrementing element locations. However the main array that I am trying to build that is suppose to take each new calculation and place it in the next index(row) does not ap
pear to be working or at least I am not getting any indication on the inidcator.
Basically what I am attempting to do is is gather some pulses from adevice for a minute, place the results for a calculation, so that it displays then do the same again the next minute, but put these result in the next row and so on until the specifiied time has expired and the loop exits. I need to have all results displayed and keep building the array(display until, the end of the test)Eventually I will have to include a min max section that displays the min and max values calculated, but that should be easy with the min max function.Actually I thought this should have been easy but, I gues I can not see the forest through the trees. Can any one help to slear this up for me.
Attachments:
regulation_tester_7_loops.vi 244 KBI didn't really have time to dig in and understand your program in depth,
but I have a few tips for you that might things a bit easier:
- You use local variables excessively which really complicates things. Try
not to use them and it will make your life easier.
- If you flowchart the design (very similar to a dataflow diagram, keep in
mind!) you want to gather data, calculate a value from that data, store the
calculation in an array, and loop while the time is in a certain range. So
theres really not much need for a sequence as long as you get rid of the
local variables (sequences also complicate things)
- You loop again if timepassed+1 is still less than some constant. Rather
than messing with locals it seems so much easier to use a shiftregister (if
absolutely necessary) or in this case base it upon the number of iterations
of the loop. In this case it looks like "time passed" is the same thing as
the number of loop iterations, but I didn't check closely. There's an i
terminal in your whileloop to read for the number of iterations.
- After having simplified your design by eliminating unnecessary sequence
and local variables, you should be able to draw out the labview diagram.
Don't try to use the "insert into array" vis since theres no need. Each
iteration of your loop calculates a number which goes into the next position
of the array right? Pass your result outside the loop, and enable indexing
on the terminal so Labview automatically generates the array for you. If
your calculation is a function of previous data, then use a shift register
to keep previous values around.
I wish you luck. Post again if you have any questions. Without a more
detailed understanding of your task at hand it's kind of hard to post actual
code suggestions for you.
-joey
"nelsons" wrote in message
news:[email protected]...
> how do I create a 1d array that takes a single calculation and insert
> the result into the first row and then the next calculation the next
> time the loop passes that point and puts the results in thsecond row
> and so on until the loop is exited.
>
> The attached file is work inprogress, with some dummy data sp that I
> can test it out without having to connect to equipment.
> The second tab is the one that I am having the problem with. the
> output array from the replace element appears to be starting at the
> index position of 1 rather than 0 but that is ok it is still show that
> the new data is placed in incrementing element locations. However the
> main array that I am trying to build that is suppose to take each new
> calculation and place it in the next index(row) does not appear to be
> working or at least I am not getting any indication on the inidcator.
>
> Basically what I am attempting to do is is gather some pulses from
> adevice for a minute, place the results for a calculation, so that it
> displays then do the same again the next minute, but put these result
> in the next row and so on until the specifiied time has expired and
> the loop exits. I need to have all results displayed and keep building
> the array(display until, the end of the test)Eventually I will have to
> include a min max section that displays the min and max values
> calculated, but that should be easy with the min max function.Actually
> I thought this should have been easy but, I gues I can not see the
> forest through the trees. Can any one help to slear this up for me. -
JButton, flashcards and an infinite loop
I'm trying a create a flashcard panel for Japanese kana. I have a class JCWidget that consists of the image of the specific symbol and its name.
I could think of only two ways to create autoadvancing flashcards. Using Thread or Timer. May be there are more, and I would welcome the ideas.
When the start button is pushed, an image and a name should change in a set ammount of seconds and so on, until the stop button is pressed But there is a problem - output is shown only after actionPerformed method is executed completely, resulting in infinite loop.
Code using threads:
public static JPanel addPanel2()
jP2 = new JPanel(new GridLayout(2, 1));
jcw = new JCWidget(arr, isKatakana);
final JLabel letter = jcw.getLetter();
final JLabel text = new JLabel(jcw.getLetterName());
final JButton start = new JButton("Start flashcards");
final JButton stop = new JButton("Stop flashcards");
text.setHorizontalAlignment(JLabel.CENTER);
stop.setEnabled(false);
jP2.add(letter);
jP2.add(start);
jP2.add(text);
jP2.add(stop);
start.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e)
start.setEnabled(false);
stop.setEnabled(true);
while(stop.isEnabled())
try {jcw.sleep(500);}
catch (InterruptedException exept) {jcw.interrupt();}
jcw = new JCWidget(arr, isKatakana);
letter.setIcon(jcw.getLetter().getIcon());
text.setText(jcw.getLetterName());
stop.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e)
stop.setEnabled(false);
start.setEnabled(true);
jcw.notify();
return jP2;
}Code using timer:
public static JPanel addPanel2()
jP2 = new JPanel(new GridLayout(2, 1));
jcw = new JCWidget(arr, isKatakana);
final JLabel letter = jcw.getLetter();
final JLabel text = new JLabel(jcw.getLetterName());
final JButton start = new JButton("Start flashcards");
final JButton stop = new JButton("Stop flashcards");
text.setHorizontalAlignment(JLabel.CENTER);
stop.setEnabled(false);
jP2.add(letter);
jP2.add(start);
jP2.add(text);
jP2.add(stop);
final Timer timer = new Timer(1000, new ActionListener()
public void actionPerformed(ActionEvent e)
// while(stop.isEnabled())
letter.setIcon(jcw.getLetter().getIcon());
text.setText(jcw.getLetterName());
start.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e)
start.setEnabled(false);
stop.setEnabled(true);
timer.start();
stop.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e)
stop.setEnabled(false);
start.setEnabled(true);
timer.stop();
return jP2;
}When running for a single iteration, everything works perfectly, (although with timer can work only once - after pushing start button for the second time nothing would happen, with threads there is no problem in that.
I tried to use for loop with limited number of iterations, but the output is changed only once - at the end of the loop. And with the while loop, program completely freezes up.
Could someone, please, help?final Timer timer = new Timer(1000, 1000, new MyTimerActionListener());
start.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e)
start.setEnabled(false);
stop.setEnabled(true);
timer.start();
});To do the timer code better, you might want to construct a new timer each time the start button is pushed. Something like so:
start.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e)
Timer timer = new Timer(1000, new MyTimerActionListener());
start.setEnabled(false);
stop.setEnabled(true);
timer.start();
}); -
Why am I getting an infinite loop?
I have a for loop that never stops as the question suggests. If the boolean expression is true the loop does not stop. I tried tracing the loop and still cant figure out the solution. Please help. The code where the error is below with comments where the error is encountered:
public static void printGame()
//DECLARING
//User input, height of wall
int height = 0;
//User input, how much R2-D2 climbs each day
int climb;
//User input, how much R2-D2 slips each day
int slip;
//Count of how many days it takes for R2-D2 leaves
int count = 1;
//Total after each day which is total + climb - slip
int total = 0;
//User input, play again option
char plyagn;
//Gameplay
System.out.println("Please type in the height of the wall");
//Height input
height = In.getInt();
System.out.println("Please type in how much R2-D2 climbs each day");
//Climb input
climb = In.getInt();
System.out.println("Please type in how much R2-D2 slips each day");
//Slip input
slip = In.getInt();
//Evaluation
for( ; height != total; count++) //<----My ERROR which is an infinite loop that never exits
total = total + climb - slip;
System.out.println(total); //I tried tracing the error
System.out.println(height); //I tried tracing the error
//Printing the result of the evaluation
System.out.println("R2-D2 will leave on the " + count + " day");
System.out.println("Press Enter to continue");
In.getChar();
clear();
System.out.println("Do you want to play again? (y/n)");
plyagn = In.getChar();
//If statment, prints appropriate message if or if not to play again
if(plyagn == 'y' || plyagn == 'Y')
printMenu();
//If n or any other value end program
else
printEnd();
}//End of printGame methodflounder wrote:
Lets say th variables have these values
height = 10
climb = 4
slip = 1 which effectively adds 3 to total at each step.
So total is 0, 3, 6, 9, 12, 15, 18 etc
Total will always be not equal to height.
So change your condition. Also, why are you using a for loop instead of a while loop.Flounder, I was hoping you would answer my question as you always provide good answers. Continuing, I feel so dumb for missing that error. Oh and as for using the for loop instead of a while loop is something i was meaning to change. Anyhow, Thank You. -
Extension Installer in infinite loop
Hi,
I'm trying to use an Extension Installer to install some extra files for my application. I've searched the forum for problems with the Extension Installer and I've seen a few posts, even the same problem I'm having. But none of the suggestions have helped.
When I run the Extension Installer locally on my own machine it works just fine. However when I move the code to access over the internet the extension installer gets stuck in an infinite loop and my application will never start. And yes, my installer ends with eis.installSucceeded(false).
Based on other messages in the forum, these are some of the things that I've tried, to no avail:
1. Add System.exit(0) as the very last statement in my installer.
2. I don't specify a port in my codebase in either the application jnlp or the extension jnlp.
3. The webserver is running on the default port (80).
4. Tried adding "javaws.cfg.forceUpdate=false" to my javaws.cfg file.
I'm using JWS 1.0.1_02. My web server is IBM HTTP Server. The machine that I'm trying to install to is running W2K.
Anyone have any suggestions?
Thanks,
BethThe funny thing is that with you it seems to happen
during
one JWS launch session.
So I wonder why JWS will run k instances of your
Extension
installer.
You don't have an <extension> tag in the jnlp file of
your extension
installer, creating an infinite recursion?
Yes, I wonder why I get multiple instances of the Extension Installer. And also that it works fine if everything is running on my local computer. If I just change the codebase and run everything over the internet is when I get it an infinite loop. Any ideas would be greatly appreciated.
If it will help, here are my .jnlp files:
Extension:
<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for SpellChecker Installer -->
<jnlp spec="1.0 1.0+"
codebase="http://apsrv176.ctt.com/bethTest" >
<information>
<title>NGS SpellChecker Installer</title>
<vendor>Vendor</vendor>
<homepage href="docs/help.html"/>
<description>SpellChecker Installer</description>
<description kind="short">Install the SpellChecker files</description>
</information>
<security>
<all-permissions />
</security>
<resources>
<j2se version="1.2"/>
<property name="ngs.root" value="NGS"/>
<property name="spellchecker.home" value="SpellChecker"/>
<jar href="SpellChecker/SpellCheckerInstaller.jar"/>
</resources>
<installer-desc main-class="com.ngs.spellcheckerinstaller.SpellCheckerInstaller" />
</jnlp>
Main:
<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for test application -->
<jnlp spec="1.0 1.0+"
codebase="http://apsrv176.ctt.com/bethTest" >
<information>
<title>NGS Application</title>
<vendor>Vendor</vendor>
<homepage href="docs/help.html"/>
<description>NGS</description>
<description kind="short">NGS</description>
<icon href="images/ngs.jpg"/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.2" initial-heap-size="64m" max-heap-size="64m"/>
<property name="ngs.root" value="NGS"/>
<property name="spellchecker.home" value="SpellChecker"/>
<jar href="jars/NGSMainForm.jar"/>
<snip... lots of other jars>
<nativelib href="jars/bridge2java.jar" />
<extension href="Third_Party_Jars.jnlp" />
</resources>
<resources>
<extension
name="SpellCheckerInstaller"
href="SpellCheckerInstaller.jnlp">
</extension>
</resources>
<application-desc main-class="NGSMainForm"/>
</jnlp> -
Interrupting a process involving an infinite loop
I am using a JInternalFrame, with a JSplitPane, and panels within the SplitPane. My application involves the server continuously listening to a port.
When this happens, I am not able to STOP the process (the while(true)) loop, the buttons do not respond, and the JInternalFrame freezes. During this time, if I switch from this application to another application (while the processing is on), the controls disappear, and I am not able to view anything, until an OptionPane (which I have used to indicate the completion of an event0 appears.
Ideally, a user must be able to QUIT the application whenever he/she wants to, but my application does not allow the user to do this.
Please can anyone suggest a way out of this???
Thanks in advance :-)
p.s. : I hope the information I provided is sufficient to help reply to my query...... :-?Thanks for your help, but please could you explain
the solution better?
I am not using threads in my program..............
Then, why is it giving a problem?
Is it because the server is listening to a port in an
infinite loop, and that blocks all other processes,
even prevents me frmo exiting the application!!! Is
there any way out of this? I mean, can I interrupt
the server listening to the port, and if so, how can
this be done????The problem is that you have a loop in your program that is running on the EDT. That loop is hogging 100% of the CPU, preventing anything else from running. -
Mail step in workflow is in infinite loop.
Dear All,
I have created a workflow with deadline monitoring feature.In the workflow created,I have defined a mail step in a loop with loop condition priority = 8 and three minute for deadline.When the workflow gets triggered , the mail step is in infinite loop and as a result the recipient is receiving the mail every three minutes once.
Now I want to stop the workflow from infinite loop.Please provide me the solution for which I will be grateful.
Thanks and regards,
PariMaybe you should check the thread you created unde the user Vijay Kumar [here.|need to kill the dead line menotoring;
Regards,
Martin
Edited by: Martin Nooteboom on Jul 7, 2008 3:43 PM
I see Mike also noticed and locked the other thread. Thanks Mike. -
ActionEvent/Setting gui text in an infinite loop
Hi,
I have set up a gui that contains ~ 100 JTextFields and one JTextButton
Pressing the JTextButton on the gui triggers an action event that
1. establishes a socket connection w/ a server
2. reads input from the server in an infinite loop
3. should use the server data to dynamically setText in the various JTextFields found on the gui.
for example, during one iteration of the infinite loop, the data may set the text of JTextField #1 to ?foo? and in a later iteration of the loop, the new data from the input stream may set the text of the same field to something else (e.g. ?bar?). Thus, the gui should show a dynamically changing collection of TextFields after the user presses the JTextButton.
Problem: because of the infinite loop, NONE of the fields is ever updated (see pseudocode below). If I remove the infinite loop and simply have 1 iteration of the block of code within the actionPerformed method, the gui updates properly.
How might I alter the code to a) maintain the server connection, b) continuously read from the input stream and c) have a dynamic update of the textfields w/in the gui?
I've tried adding "this.paint(this.getGraphics());" within the infinite loop and it sort of works, but the updates to the gui are FAR SLOWER than the data that are streaming in from the server.
Thanks for any help!
The code looks something like this
Public class abc extends JFrame
Public abc()
{initialize components}
instantiate all textfields & button
create various arrays
public void initialize components
(set up gui using gridbaglayout
add actionListener to button)
private actionperformed
(establish socket connection w/ server
read data from server in an infinite loop
parse data and use information to setText on the gui)
public static void main(blah blah)
show abc();have the reading loop in a different class which will have its own Thread running aside from the main program's thread. This way your application will do both at once :)
-
RECTIFY_GEOMETRY goes into an infinite loop
I have a situation where running RECTIFY_GEOMETRY on certain geometries causes the process to go into what seems an infinite loop and results in me needing to kill the session to stop it. There is obviously something about the geometry which is incorrect. Has anyone seen this before and knwo what causes RECTIFY_GEOMETRY to hang.
Prior to 10.2.0.4, there was a bug with rectify which causes
this problem if the geometry cannot be rectified.
Which DB release are you on ?
siva -
Program enters infinite loop.
this is the first program i'm writing with sockets and is also a step towards making a chat application. my problem is that the program enters infinite loop.
package server;
import java.net.*;
import java.io.*;
class Server
public static void main(String[] args) throws Exception
ServerSocket ss = new ServerSocket(9090);
Socket soc = ss.accept();
BufferedReader in = new BufferedReader(new InputStreamReader(soc.getInputStream()));
String str = in.readLine();
while(str!="")
System.out.println(str);
str = in.readLine();
soc.close();
ss.close();
}this was the server - a seperate application. below is a part of the client - a seperate application
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
try
InetAddress ip = InetAddress.getByName("127.0.0.1");
Socket soc = new Socket(ip,9090);
PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(soc.getOutputStream())),true);
str_out = jTextArea2.getText();
while(str_out!="")
out.println(str_out);
str_out = jTextArea2.getText();
soc.close();
catch(Exception e)
System.out.println("Error sending message");
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
str_out = "";
jTextArea2.setText(str_out);
} when i press button send (jButton1) the text from the text area jTextArea2 is supposed to go to the server and then the server should display it in its out put screen. i tried sending hello and the server went on printing hello continously.
pleas help.String str = in.readLine();
while(str!="")
System.out.println(str);
str = in.readLine();
}You need to test for (str != null) above too, or instead of str != "". -
Neep help with infinite loop! Please Help
I currently have a program that allows a user to enter a password protected site and it will return all the images on that page.
I�m trying to allow the user to type in the root URL, i.e. http://stage.diabetescontrolforlife.com/ and have the program pull all the images in all of the child directories. i.e. http://stage.diabetescontrolforlife.com/tool.aspx
I got an inner class similar to the one pulling the <IMG> tag, that pulls the <A> tag. The class adds all the links to a linkList Arraylist. In my main method I call image.getInfo(image.getLinkList()); hoping that I can just pass all the links back through the program and find all the <IMG> tags.
The problem is that, I get the desired output but it displays in an infinite loop, and the program never ends as it searches linkList over and over for <IMG> tags.
So, I tried to adding two different Do, While loops.
Main Method:
do
image.getInfo(image.getLinkList());
test=1;
}while(test != 1);This one does not change the output. Infinite loop continues.
Inner Class:
HTMLEditorKit.ParserCallback callback;
callback = new HTMLEditorKit.ParserCallback ()
public void handleStartTag(HTML.Tag tag, MutableAttributeSet attributes, int position)
do
if (tag == HTML.Tag.A)
link = (String)attributes.getAttribute (HTML.Attribute.HREF);
if(link != null && !link.startsWith("javascript") && !link.startsWith("#") && link.startsWith("/"))
link = root + link;
linkList.add(link);
test=1;
}while(test!=1);
public void handleSimpleTag (HTML.Tag tag,MutableAttributeSet aset,int pos)
{if (tag == HTML.Tag.IMG )This one never allows the first URL to be checked, and the program just sits there.
Do you see anything I�m doing wrong, or anyway I can stop the infinite loop?
I think the problem is that both of the searching tag classes are inner classes but I don�t know how to make them their own classes without messing up the whole password checking.
Any advice would be helpful!HTMLEditorKit.ParserCallback callback;
callback = new HTMLEditorKit.ParserCallback ()
public void handleSimpleTag (HTML.Tag tag,MutableAttributeSet aset,int pos)
if (tag == HTML.Tag.IMG )
src = (String)
aset.getAttribute (HTML.Attribute.SRC);
alt = (String)
aset.getAttribute (HTML.Attribute.ALT);
height = (String)
aset.getAttribute (HTML.Attribute.HEIGHT);
width = (String)
aset.getAttribute (HTML.Attribute.WIDTH);
//System.out.println("SRC = " + src);
//System.out.println("ALT = " + alt);
System.out.println("ROOT2"+root);
System.out.println("SRC1"+src);
if(src.startsWith("http"))
else
if(src.startsWith("../"))
src = src.replace("../", "");
src = root +"/"+ src;
else
if(src.startsWith("/"))
src = root + src;
else
src = root +"/"+ src;
System.out.println("SRC2"+src);
altList.add(alt);
srcList.add(src);
heightList.add(height);
widthList.add(width);
currentUrl.add(passUrl);
if(alt == null)
altPresent.add("No");
else
altPresent.add("Yes");
URI uri = null;
try
if (!uriBase.toString ().endsWith ("/") &&
!src.startsWith ("/"))
src = "/" + src;
uri = new URI (src);
uri = uriBase.resolve (uri);
System.out.println("URL"+passUrl);
System.out.println ("uri being " +
"processed ... " + uri);
System.out.println("ROOT3"+root);
catch (URISyntaxException e)
System.err.println ("Bad URI");
return;
// Convert the URI to a URL so that its input
// stream can be obtained.
URL url = null;
try
url = uri.toURL ();
catch (MalformedURLException e)
System.err.println ("Bad URL");
return;
//InputStream is;
//String filename = url.getFile ();
//int i = filename.lastIndexOf ('/');
//if (i != -1)
// filename = filename.substring (i+1);
@Override
public void handleStartTag(HTML.Tag tag, MutableAttributeSet attributes, int position)
//while(test!=1)
System.out.println("TEST"+test);
if (tag == HTML.Tag.A)
link = (String)
attributes.getAttribute (HTML.Attribute.HREF);
if(link != null && !link.startsWith("javascript") && !link.startsWith("#") && link.startsWith("/"))
/*if(link.startsWith("/"))
link = root + link;
else
if(!link.startsWith("http"))
link = root +"/"+ link;
//if(link.contains(root))
link = root + link;
test=1;
linkList.add(link);
try
HttpURLConnection urlConn = null;
//URL url = new URL(server);
// Build the string to be used for Basic Authentication <username>:<password>
String userPassword = "testmlr" + ":" + "stage1-7000";
// Base64 encode the authentication string
String encoding = new sun.misc.BASE64Encoder().encode (userPassword.getBytes());
//URLConnection
urlConn = (HttpURLConnection) url.openConnection();
// Enable writing to server ( to write request )
urlConn.setDoOutput(true);
// Enable reading from server ( to read response )
urlConn.setDoInput(true);
// Disable cache
urlConn.setUseCaches(false);
urlConn.setDefaultUseCaches(false);
// Set Basic Authentication parameters
urlConn.setRequestProperty ("Authorization", "Basic " + encoding);
// test(server);
BufferedReader in = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));
new ParserDelegator().parse(in, callback, false);
System.out.println(in + "test123412341234");
catch (ChangedCharSetException e)
String csspec = e.getCharSetSpec ();
Pattern p = Pattern.compile ("charset=\"?(.+)\"?\\s*;?",
Pattern.CASE_INSENSITIVE);
Matcher m = p.matcher (csspec);
String charset = m.find () ? m.group (1) : "ISO-8859-1";
// Read and parse HTML document using appropriate character set.
public ArrayList getLinkList()
return linkList;
}
Maybe you are looking for
-
Convert 132 to 255 in Line width in EMail PDF attchment in smartforms
Hai Experts Send smart form output to EMail as a PDF attachment, in that program, Conver_otf gives BIN file, why it can be covert 132 to 255 send output to EMail as a PDF attachment. thanks sitaram
-
How to update the screen in realtime?
Hey, i am realy new in Indesign scripting i want to do a simple client script- the script should receive data and write it to a textbox (or do sth else with it). Everything works fine the only problem is: I dont know how to make this in realtime- for
-
Interface and SAP system issue
hi Experts Scenario : We have External system (Interface) and SAP system. GR usually done in External system for stock materials PO , then it will transfered and updated in SAP system thro IDOC daily bases. And then in SAP ,Zreport is there to find o
-
Setting up a new library from an existing one
Due to lack of Genius mixes I have decided to set up a new library from my existing one but what I wandered was is there anyway of retaining my ratings/play counts etc by copying the iTunes database file from my original library folder. I have over 1
-
Using "view zoom in" how do I make it permanent?
The zoom on IE stays zoomed. How do I do that with Mozilla?