Hello all,
The idea we had of building a screenscraper is to use the JTextArea functionalitie of Swing to render a GUI. The same the text area can render a web UI for HTML. The way the text area works is to have an Editor kit translate the bytes from a stream into document layout elements. Next is there a view factory that is able to render the text into a Swing text elements.
The package we added provides the editor kit and viewfactory to parse an incoming 5250 stream, translate it into Swing document elements which can be rendered by a EditorPane or something. By providing an simple alternative to the editor kit, you can 'interpret' certain areas in the stream and translate them into GUI constructs. This way you can change option fields into buttons, function keys into buttons, etc. If all of your screens conform to a certain company styleguide, you can augment these style to you own editor kit and parse out the title of the screen which you can apply to the window or dialog; you can drop options and functions and put them on the toolbar and/or menu etc. Then it becomes interesting. There is also a clipping editor kit to render partial 5250 screens to support windows etc. We have build a sprecific kits for one of our customers that is also customizable through XML to include icons for buttons after translating functions to toolbar buttons.
This makes it interesting. Not the most stable however at this point in time. Note you could use the editor kits in an web server to afterwards render the document elements as a webpage. Not sure though about resource consumption then.
Another very interesting class in there that is immediately usable for everybody is the Tn5250jTestTerminal.java class. This stats a 5250 session for a server but renders all screen planes on different tabs in the window. Very useful for debugging purposes !! I have used it to find out the workings of STRPCCMD. Try to use it to find out which bytes get send over on launching the PC cmd to verify if our implementation fails due to code pages etc.
HTH,
Wim
Richard Houston <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED] 18/07/2006 22:04
|
|
Hi all,
I am interested in the screen scrapping functions and what they can do
for my clients. Can someone give me a quick and dirty on how and what
this code does? Maybe an example of an application for this feature?
Thanks everyone and sorry for my ignorance on this.
+------------------------------------+
Best regards,
-Richard Houston
-R.L.H. Consulting
-E-Mail [EMAIL PROTECTED]
-WWW http://www.rlhc.net
-Blog http://www.rlhc.net/blog/
> Thanks Wim. I'll also build and test in the next day or so based on
> what Christian has committed.
>
> I am VERY interested in your screen scraper code. Thanks for including
> that.
>
> Pete
>
>
>
> [EMAIL PROTECTED] wrote:
>
>
>>
>> Hello guys,
>>
>>
>> sorry to get back to you so lately. But been so busy here. In the
>> meantime, our company has been takenover. So you can imagine.
>>
>> I have checked the changes and those are probably not commited to CVS.
>> I'm including our changes, as I don't have a project setup for TN
>> development against sourceforge. Is anybody willing to verify the
>> changes and commit them? The class changed for STRPCCMD is of course
>> the tnvt.java. The changes have been made against a reference version
>> 0.5.8a. This surely isn't the latest.
>>
>>
>> Note also we have included a new a new package
>> org.tn5é50j.swing.text.* We have set this up to implement a
>> screenscraper on top of tn5250j. It allows you to render the datastream
>> directly into JTextArea as a GUI like an HTML file with textfields and
>> buttons and stuff. Just take a look at it and see where we can get.
>>
>>
>> Thanks in advance,
>> Wim
>>
>>
>>
>>
>>
>>
>>
>>
>> *Richard Houston <[EMAIL PROTECTED]>*
>> Sent by: [EMAIL PROTECTED]
>>
>>
>> 14/07/2006 23:45
>> Please respond to
>> [EMAIL PROTECTED]; Please respond to
>> tn5250j-general@lists.sourceforge.net
>>
>>
>>
>> To
>> tn5250j-general@lists.sourceforge.net cc
>>
>> Subject
>> Re: [Tn5250j-general] STRPCCMD
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Hey guys,
>>
>>
>> We have been testing the strpccmd on our Linux setups but with little
>> success. We get a screen on the 400 saying that we need to start
>> PCO.exe
>> on the PC but of course we can not so that on Linux.
>>
>> So my question is, do we know if the below mentioned patches are in
>> CVS
>> yet and does anyone know how I can get around the PCO.exe issue?
>>
>> I have showed my client and he is really really excited to get it to
>> work.
>>
>> Thanks guys!
>>
>>
>>
>>
>>
>> +------------------------------------+
>> Best regards,
>> -Richard Houston
>> -R.L.H. Consulting
>> -E-Mail [EMAIL PROTECTED]
>> -WWW http://www.rlhc.net
>> -Blog http://www.rlhc.net/blog/
>>
>>
>>
>>> Probably that we have the code on our fixes path for the emulator.
>>> I'll
>>> verify this.
>>>
>>>
>>>
>>>
>>>
>>> Christian Geisert <[EMAIL PROTECTED]>
>>> Sent by: [EMAIL PROTECTED]
>>> 05/07/2006 09:18
>>> Please respond to
>>> tn5250j-general@lists.sourceforge.net
>>>
>>>
>>> To
>>> tn5250j-general@lists.sourceforge.net cc
>>>
>>> Subject
>>> Re: [Tn5250j-general] STRPCCMD
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> [EMAIL PROTECTED] schrieb:
>>>
>>>
>>>> Did you try the STRPCCMD + F4 to display commandproperties and
>>>> then fill
>>>
>>>> in the command on the screen?
>>>>
>>>> If you run /usr/bin/firefox from any shell, the browser opens?
>>>>
>>>>
>>>>
>>>> What version of the emulator are you running?
>>>> It might be you have to set a property to enable the scanning for
>>>>
>>>>
>>> strpccmd
>>>
>>> I just tried it with latest cvs and doesn't work for me either.
>>> Wim, are you sure the code has been committed?
>>> I remember there has been some discussion about implementing it but I
>>> don't think it has been comitted. I'll hopefully have some time to
>> have a
>>> closer look at it later
>>>
>>> Christian
>>>
>>>
>>>
>>> Using Tomcat but need to do more? Need to support web services,
>>> security? Get stuff done quickly with pre-integrated technology to
>>> make your job easier Download IBM WebSphere Application Server
>>> v.1.0.1
>> based on
>>> Apache Geronimo
>>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121
>>> 642
>>> _______________________________________________
>>> Tn5250j-general mailing list
>>> Tn5250j-general@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/tn5250j-general
>>>
>>>
>>>
>>> Using Tomcat but need to do more? Need to support web services,
>>> security? Get stuff done quickly with pre-integrated technology to
>>> make your job easier Download IBM WebSphere Application Server
>>> v.1.0.1 based on Apache Geronimo
>>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=12
>>> 1642
>>> _______________________________________________
>>> Tn5250j-general mailing list
>>> Tn5250j-general@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/tn5250j-general
>>>
>>>
>>>
>>
>>
>>
>>
>> ----------------------------------------------------------------------
>> ---
>> Using Tomcat but need to do more? Need to support web services,
>> security? Get stuff done quickly with pre-integrated technology to make
>> your job easier Download IBM WebSphere Application Server v.1.0.1 based
>> on Apache Geronimo
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=1216
>> 42
>> _______________________________________________
>> Tn5250j-general mailing list
>> Tn5250j-general@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/tn5250j-general
>>
>>
>> ----------------------------------------------------------------------
>> --
>>
>>
>> ----------------------------------------------------------------------
>> ---
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share
>> your opinions on IT & business topics through brief surveys -- and earn
>> cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVD
>> EV
>>
>>
>> ----------------------------------------------------------------------
>> --
>>
>>
>> _______________________________________________
>> Tn5250j-general mailing list
>> Tn5250j-general@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/tn5250j-general
>>
>>
>>
> ------------------------------------------------------------------------
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your opinions on IT & business topics through brief surveys -- and earn
> cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE
> V_______________________________________________
> Tn5250j-general mailing list
> Tn5250j-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tn5250j-general
>
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Tn5250j-general mailing list
Tn5250j-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tn5250j-general
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ Tn5250j-general mailing list Tn5250j-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tn5250j-general