| JSP upload - detecting file type by mime type? what is application/octet-stream? |
|
 |
Index ‹ java-programmer
|
- Previous
- 1
- Waiting For A Synchronized MethodSay thread1 begins executing a synchronized method.
While it's executing, both thread2 and thread3 call the synchronized
method, in that order.
When thread1 ends executing and gives up its lock, is thread2
guaranteed to execute next (because it's been waiting longer than
thread3), or is it possible that thread3 executes first?
My experiments seem to point to thread2 always running first in the
above situation, but I'd like to verify this.
Thanks,
John
- 7
- Recursion / Iteration (was Re: Increasing the stack?)Hi !
"bm" wrote the following:
> All recursions can be rewritten as iterations. Though it may not be as
> elegant.
> But not all iterations can be written as recursion.
I always thougt, it was just the other way round, but I might well be wrong
! Can you show one example for your last statement (an iteration that cannot
be expressed as a recursion) ?
- 7
- Memory issueHi All,
I have a problem with memory when I use a connection to a database. I have
also posted the question in the database group but as I suspect that it has
to do with garbage collection I also post the question here.
I have a problem with memory using SQLserver on a server running WIN2K
Advanced Server with 2 GB! of internal memory. We limmited the SQLserver
memory to 1 GB and 512 MB for JVM (version 1.4.2_01). The OutOfMemory error
is always at the same place in the jdbc driver as shown below.
java.lang.OutOfMemoryError
at com.microsoft.util.UtilPagedTempBuffer.compressBlockList(Unknown Source)
at com.microsoft.util.UtilPagedTempBuffer.getBlock(Unknown Source)
at com.microsoft.util.UtilPagedTempBuffer.write(Unknown Source)
at com.microsoft.util.UtilPagedTempBuffer.write(Unknown Source)
at com.microsoft.util.UtilByteArrayDataProvider.receive(Unknown Source)
at com.microsoft.util.UtilByteOrderedDataReader.receive(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.submitRequest(Unknown
Source)
at com.microsoft.jdbc.sqlserver.tds.TDSCursorRequest.openCursor(Unknown
Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.execute(Unknown
Source)
at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.executeQueryInternal(Unknown
Source)
at com.microsoft.jdbc.base.BasePreparedStatement.executeQuery(Unknown
Source)
.............................................. Truncated from here
.................................................
If I run (using same database & JVM) on a computer (W2K prof.) with 512 MB
internal memory and no limmit set for MS-Sqlserver but for JVM 128 MB doing
the same stuff, there is no problem at all.
I suspect it has something to do with a late "kicking in" of the Garbage
Collection causing memory segmentation. So when a big chunk of memory is
required (a large result-set from the database) no contigouis memory block
of memory is availble in the current heap. The JVM claims more memory to
expand the heap, grows and grows until it cosses the limmit. But I also
tought that garbage collection takes care of that too.
I hope some one has seen this behaviour and can point me in the right
direction.
TIA.
Frank.
--
Met vriendelijke groet,
Frank Brouwer
_________________________________________________
Trimergo BV
Project Manufacturing Software
Amersfoortseweg 15 C
7313 AB Apeldoorn, Nederland
Telefoon: 055 - 577 7373
Telefax: 055 - 577 7370
www.trimergo.com
- 10
- Searching and replacing multiple strings in textSuppose I have a String like:
"The quick brown fox jumped over the lazy dog's back."
Suppose I wanted to make the following multiple replacements in the
String:
"quick" -> "slow"
"brown" -> "red"
"jump" -> "walk"
"over" -> "under"
"back" -> "stomach"
After making the replacements, the String becomes:
"The slow red fox walked under the lazy dog's stomach."
It would be easy to just scan the string N times if we're replacing N
words but I'd like a way that scans the string only once regardless of
how many words we're replacing. I'm sure tons of programmers have had
need for this and I'm wondering if there's already some existing code
on the net for it.
If not, then what are the best data structures and classes to use for
this? For example, should the collection of words to replace just be a
String[] and the collection of replacements just be a String[], so
that e.g. wordsToReplace[i] is replaced by replacement[i], and then
you do the search and replace algorithm something loosely along the
idea of:
0. assume an input String, an output StringBuffer
1. set c = current input text character
2. if c is the first character of any of the words in wordsToReplace[]
then
2a. check if the next input character is the next character of
any of the words in our input string and so forth....
if the input word is a match, append the replacement
to the output StringBuffer.
otherwise, append the character c from step 1 to the
StringBuffer and
go back to step 1. with the input character
advanced to the next character.
I'm being very sloppy and crude here and only trying to illustrate the
idea, because actually programming the above function while making
sure you handle all the out-of-bounds cases, etc., would be tricky and
time-consuming, and I want to post here for a pre-canned solution or
something easy I haven't thought of yet before going to all the
trouble.
Thanks very much for any replies.
Chris
- 10
- Who specifies Java? We know that Java is specified by Sun Microsystems, Inc.
On the other hand, a language is specified by its specification
and in the case of Java this is the JLS. The specification is
specified or written by its authors. The authors of the JLS are:
http://images.pearsoned-ema.com/jpeg/large/0321246780.jpg
James Gosling, Bill Joy, Guy Steele, and Gilad Bracha.
So then, is Java being specified by James Gosling, Bill Joy,
Guy Steele, and Gilad Bracha or by Sun Microsystems, Inc.?
- 11
- Ant multi OS <exec> adviceHi,
I have the following Ant code which I would like to also use on Linux:
<target name="build.XmlJaxb">
<exec dir="${checkout.dest}/XmlJaxb" executable="cmd">
<arg line="/C ant -logger org.apache.tools.ant.XmlLogger
-logfile ant_log_dist.xml dist" />
</exec>
</target>
For Linux I woul dneed to replace "cmd" and "/C" with "bash" or something?
I know there is the <exec> OS option but then I would need to copy the
<exec> tags with a Windows and Linux version. Gives maintenance errors.
I know I could make variables for "cmd" and "/C" and use the <if>
contrib to look at the os Java system property.
I cannot use <ant> task because I do not seem to be able to specify the
Xml logger and the output file.
any ideas?
thanks,
Peter
- 13
- JaveHi
I need some help, I need to learn about java. What books, authors are the
best.
- 13
- Webservice from a servletHi,
I have an existing application uses Servlets and hosted on Websphere6.
Now we have a requirement to meke the same functions which we have in
JSPs and Servlets existing as Webservices.
Can any one have idea how to achieve this.
At this movement what i am looking is atleast how to use the existing
servlet as a webservice? A Simple example.
Thanks for the help in advance.
regards,
Ravi
- 13
- Static class - one per JVM or one per app?I have a class called MyClass that contains a static variable (myVar).
I have two J2EE apps running on WebSphere under the same JVM,
MyFirstApp and MySecondApp. From MyFirstApp i set the value of myVar by
doing MyClass.setMyVar(3).
....what will be the value of MyClass.getMyVar() when run from
MySecondApp?
ie - will the static var have scope across the whole JVM or just the
web app?
Thanks
David Bevan
http://www.davidbevan.co.uk
- 13
- 15
- array initilization and memory usageI'm a little new here, so please bear with me if this sounds like a
goofy
question!...
let's say that I have an class with 15 or so members, each taking up a
fair
amount of space - we'll call this class bars
If I create an array of 400 empty bars objects, but only instantiate
the
first five or so then am I still setting aside the memory for the other
395?
I hope that made sense!
Thanks
- 15
- Changing fonts in a JTable header I've been trying to figure out how to change the font in a JTable column
header to bold. I've been accessing the TableColumnModel().getColumn(x) for
the column I want, but i don't see any getFont or setFont methods which are
available.
Can someone point me in the right direction on how to change the header
text to bold in a JTable?
Thanks!
[Tim]
- 15
- Multiline JLabelHi, I want to use a JLabel but I want it to be shown in several lines.
Otherwise the JDialog is very very wide when the text is long.
How can I do that?
- 15
- 16
- reading a skingle key without pressing ENTER afterDenis wrote:
> Maybe I could write my own read() function
> deal with all backspace pressed etc...
>
> How do I read then a single key in Java?
> So it'll get just one keystroke and return key value
> without presing ENTER ?
You can't - that's the source of the problem and where
all attempts at a solution will fail.
|
| Author |
Message |
stephenriek

|
Posted: 2003-9-19 11:52:00 |
Top |
java-programmer, JSP upload - detecting file type by mime type? what is application/octet-stream?
I'm uploading a file via servlets or JSP, using the O'Reilly
MultipartWrapper, and was hoping that to be able to determine the file
type (eg. Excel spreadsheet, Word document, Powerpoint, PDF) depending
on the Mime Type.
Simple enough using the O'Reilly servlet package ~
<%@ page import="com.oreilly.servlet.*" %>
<%
if (request instanceof MultipartWrapper) {
try {
// Cast the request to a MultipartWrapper
MultipartWrapper multi = (MultipartWrapper)request;
// The file upload field on the submitting form is called
'upfile'.
String mimeType = multi.getContentType("resourcefile");
...
%>
Strange thing though is that I'm not getting the expected Mime Type.
For example, I just uploaded a Microsoft Word document and the
mimeType String is "application/octet-stream" instead of the expected
"application/msword".
However, uploading Excel spreadsheets and PDF files provided the
expected results of "application/vnd.ms-excel" and "application/pdf".
(see http://www.bc.edu/bc_org/tvp/email/helpers.shtml or
http://www.yolinux.com/TUTORIALS/LinuxTutorialMimeTypesAndApplications.html
for lists of mime types)
So, does anybody know why the Microsoft Word documents send the wrong
mime type ? Should I instead just use the file extension to determine
file type perhaps ?
Thanks in advance,
Stephen
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- Please help! SecurityFilter redirects to login page again...Hi All I ha e a problem around authenticating ith Securit Filter and can t see the reasons Container is Tomcat 5 5 9 The problem is: After successful authentication response is the login page again although form default page propert is a redirect jsp for securit filter here I redirect users to the proper role s starting page If I input and send user information again the redirect orks properl Just for the second time I can t see the reasons I ha e alread used securit filter and ha en t had this error there I ha e debugged redirect jsp and could see that on the line response sendRedirect basePath admin inde jsp has run but the result is the login page again When I tr to access some resources ithin the protected area after authentication the redirect is correct The abo e described error e ists onl hen I tr to do a direct login and hope to be redirected to the form default page An idea please ? redirect jsp s running section: < @ page language= ja a import= ja a util pageEncoding= iso 8859 2 > < String path = request getConte tPath ; String basePath = request getScheme : request getSer erName : request getSer erPort path ; if request isUserInRole admin response sendRedirect basePath admin inde jsp ; S stem out println basePath admin inde jsp ; else if request isUserInRole modifier response sendRedirect basePath modifier inde jsp ; else if request isUserInRole inquirier response sendRedirect basePath inquirier inde jsp ; else response sendRedirect basePath inde jsp ; > securit filter config ml: <? ml ersion= 1 0 encoding= ISO 8859 1 ?> < DOCTYPE securit filter config PUBLIC Securit Filter org DTD Securit Filter Configuration 2 0 EN http: securit filter org dtd securit filter config_2_0 dtd > <securit filter config> < securit konfiguracio START > < admin resources START > <securit constraint> < eb resource collection> < eb resource name>Admin resources< eb resource name> <description> accessible b authenticated users of the admin role< description> <url pattern> admin < url pattern> <http method>GET< http method> <http method>POST< http method> <http method>PUT< http method> <http method>DELETE< http method> < eb resource collection> <auth constraint> <description>These roles are allo ed access< description> <role name>admin< role name> < auth constraint> < securit constraint> < admin resources END > <login config> <auth method>FORM< auth method> <realm name>lm realm< realm name> <form login config> <form login page> inde jsp< form login page> <form error page> inde jsp?badpass =Y< form error page> <form default page> redirect jsp< form default page> < form login config> < login config> <securit role> <description>admin role has access to this eb application< description> <role name>admin< role name> < securit role> <realm className= org securit filter realm catalina CatalinaRealmAdapter > <realm className= org apache catalina realm JDBCRealm > <realm param name = dri erName alue= com microsoft jdbc sqlser er SQLSer erDri er > <realm param name = connectionURL alue= jdbc:microsoft:sqlser er: 127 0 0 1:1433;DatabaseName=db_licenceman ager;User=m user;Pass ord=m pass ord;SelectMethod=cursor > <realm param name = connectionName alue= m user > <realm param name = connectionPass ord alue= m pass ord > <realm param name = userTable alue= users > <realm param name = userNameCol alue= user_name > <realm param name = userCredCol alue= pass ord > <realm param name = userRoleTable alue= user_roles > <realm param name = roleNameCol alue= role_name > < realm> < <realm className= org apache catalina realm Memor Realm > > < securit konfiguracio END > < securit filter config> eb ml: <? ml ersion= 1 0 encoding= ISO 8859 1 ?> < DOCTYPE eb app PUBLIC Sun Micros stems Inc DTD Web Application 2 3 EN http: ja a sun com dtd eb app_2_3 dtd > < eb app> < filter: securit filter konfiguracio START > <filter> <filter name>Securit Filter< filter name> <filter class>org securit filter filter Securit Filter< filter class> <init param> <param name>config< param name> <param alue> WEB INF securit filter config ml< param alue> < init param> <init param> <param name> alidate< param name> <param alue>true< param alue> < init param> < filter> < map all requests to the Securit Filter control hat it does ith configuration settings > <filter mapping> <filter name>Securit Filter< filter name> <url pattern> < url pattern> < filter mapping> < filter: securit filter konfiguracio END > <ser let> <ser let name>action< ser let name> <ser let class>org apache struts action ActionSer let< ser let class> <init param> <param name>config< param name> <param alue> WEB INF struts config ml< param alue> < init param> <init param> <param name>debug< param name> <param alue>3< param alue> < init param> <init param> <param name>detail< param name> <param alue>3< param alue> < init param> <load on startup>0< load on startup> < ser let> <ser let mapping> <ser let name>action< ser let name> <url pattern> do< url pattern> < ser let mapping> < eb app> Thanks in ad ance Peet
- 2
- 3
- US-CA: San Rafael, Full time Java-PL/SQL programmer.Working as a team member of the I.S. group, develops, integrates, and
supports applications.
Primary Responsibilities:
* Conversion of Servlets/JSP to Swing based applications.
* Converting logic from procedures/packages in Oracle to Java.
* Maintenance of code.
* User training/support.
* Ability to work on multiple projects simultaneously.
* Research, evaluate, and implement new 3rd party software packages.
Requirements:
* 2-3 years industry level experience in the following Java
technologies: Swing, JSP, Servlet, JDBC, RMI, EJB.
* 1-2 years industry level experience in Oracle 8i (or greater) which
includes writing PL/SQL procedures, packages and triggers.
Position Type:
* Full Time.
Company Location:
* San Rafael, California, USA.
Restrictions:
* This is not an entry level position.
* No thrird party companies.
* Sorry No H1Bs visa holders.
Email resume to is0871 at gmail.com
- 4
- Best Friends Decide To Get Fucked Together For The First Time Just few link on some movies...
All just for you...
Download
>>>>> http://download-video.12w.net
>>>>> http://world-sex.urllogs.com
>>>>> http://video-sex.12w.net
CLICK FREE DOWNLOAD VIDEO PORN...
L
I
C
K
T
O
W
A
T
C
H
V
I
D
E
O
P
O
R
N
D
O
W
N
L
O
A
D
F
R
E
E
.
.
.
W
E
L
C
O
M
T
O
M
O
V
I
E
S
P
O
R
N
D
O
W
N
L
O
A
D
.
.
.
- 5
- Looking for Feedback on New Project - ChaiDBHi,
I'm one of the developers working on a new project: ChaiDB.
I am trying to get feedback on it, and looking to see if there might
be a good fit for your projects. We're currently exploring ways we
can add functionality to ChaiDB such as an indexing mechanism for
caching web data. I would appreciate any feedback/advice I could get
from this group and if you are interested, you can find details at
http://chaidb.sourceforge.net Below is a brief description of the
project.
ChaiDB is an embedded database developed at the kernel level using
Java and B-Tree implementation for data storage. It's very simple to
use without any administrative overhead for high performance read/
write operations. It provides Java, JCA, JTA interfaces and database
administration tools such as backup and restore, etc. ChaiDB is ideal
for applications utilizing caching, archiving, queuing and buffering
capabilities.
Thanks,
Jim
- 6
- Recommend a good programming environment for beginner?Howdy. I'm taking a java class, and they unfortunately just have us
using the DOS cmd liine and notepad to program. I'd like to use a good
environment. I used to use Codewarrior. Netbeans came with the Java
download from Sun, but it overwhelmed me, seems like I'd have to invest
a lot in learning it. Does anybody know of a sleeker, easier to get
used to environment?
Alternatively, anyone know of a good, simple, easy to follow tutorial
to get one up an running in netbeans?
Thanks a heap....
Bill J.
- 7
- development speed of struts is low?Hi
When i change my action class, struct-config.xml, i need to
restart tomcat, it will highlt affect my development speed. How to fix
this problem?
thanks
from Peter (email***@***.com)
- 8
- JDK BSD NewBeeHi all,
I'm a BSD newbie with a couple of simple questions.
Does the 1.4 jdk implementation implement the hotspot optimizer? And
are the threads green or native - and what is the difference? I've
read that the jdk1.3 binary does not implement hotspot and uses green
threads and I'm trying to decide if upgrading to the jdk 1.4 will
improve my servlet application's performance.
Also, I've noticed that there are ports for things like tomcat and
other java third party extensions. Can anyone tell me the difference
between the ports version and those that I would download from say
jakarta.apache.org? I've compiled mod_jk from the apache source using
the mac os X compile instructions, as those were the only that I could
get to work, will my compiled mod_jk work better if I use the ports?
I'm new to the ports system as I come from the land of RedHat LInux and
Mac OS X.
Thanks for all of your help.
Alden
Add Content Now
Offering a fun and interactive way to transform
your site content single handedly.
http://www.addcontentnow.com
303.279.2023
_______________________________________________
email***@***.com mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "email***@***.com"
- 9
- stable java environment on FreeBSD 5.2-RELEASE
--lrZ03NoBR/3+SXJZ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Hi freebsd-java@,
I would like to setup a stable java environment on a FreeBSD 5.2-RELEASE
system. The primary goal for this is to coding java programs with
eclipse. I have read all information I found on google.com and
freebsd.org/java, but I don't get all answers for the questions I have.
;)
I had tried the installation of jdk-1.3 but the only version I get to
work was the 'linux-sun-jdk1.3'. I am a little bit confused about these
many versions around. So here are the questions. :)
1. Which JDK you'll prefer on a 5.2-R focused on stability?
2. Which steps are needed to install the prefered JDK?
3. Are there issues on the threading model (kse||thr)?
best regards,
Gordon
--=20
Gordon Bergling <email***@***.com> http://www.0xFCE3.net/
PGP Fingerprint: 7732 9BB1 5013 AE8B E42C 28E0 93B9 D32B C76F 02A0
RIPE-HDL: MDTP-RIPE "There is no place like 127.0.0.0/8"
--lrZ03NoBR/3+SXJZ
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)
iD8DBQFAFqimk7nTK8dvAqARAoeMAKDB+vdwZbTJhz1AjClDXc1Vnb4hrwCePxY1
LWCoKOXfwQQUt5P8dr4cxKc=
=UQ5f
-----END PGP SIGNATURE-----
--lrZ03NoBR/3+SXJZ--
- 10
- Changing the value of Boolean?Sure I've read somewhere (but can't find it now) that you cannot change the
value of a Boolean tyep variable. You have to set it each time like this -
////////////////////////////////////////////////////////////
Boolean b = new Boolean(true);
b = new Boolean(false);
////////////////////////////////////////////////////////////
Is this correct?
thanks
harry
- 11
- A constructive debate: Eclipse or NetBeans?On Mon, 15 Oct 2007, Jon Harrop wrote:
> > Anyway, I agree partially that Eclipse workspace creation should be
> > easier. I even filed a bug about the fact that you cannot create a fully
> > working workspace programmatically and then just use it. Eclipse writes a
> > lot of workspace-specific caches that don't work even inside the same
> > workstation, let alone after porting them to another user. (And it's even
> > an error to call them caches if Eclipse won't invalidate them when they
> > are outdated.)
>
> Ugh. Just me trying it here for the time being though. :-)
I didn't quite understand. Let me clarify what I said, just in case you
thought I was talking about something people do every day with Eclipse:
I meant it's virtually impossible to create a _whole_ workspace (with
Eclipse, plugins, projects, settings, just press play on tape...)
programmatically. Individual project settings (and a lot of them) can be
commited to version control and many typical settings work out of the box
after checking them out.
> I'll give it a go. I've read a lot of conflicting advice about installing
> libraries though. A lot of people say just copy the .jar's
> into .../jre/lib/ext/ and the .so's into .../jre/lib/amd64/ but the
> official documentation warns against this for non-specific reasons. In the
> end, I ignored the advice of the official JOGL docs and installed it by
> hand. Compiling and running JOGL demos is easier now but most of them still
> don't work.
I have never written anything under the jre/jdk directory. The whole
thought of stabbing installed software makes me feel sick :)
Fortunately, I don't think there's ever any need for that, either.
- Ville Oikarinen
- 12
- Unexpected signal: 11 [Was: Sun JDK 1.4.2_01 for Linux]> Is it just my imagination or is the Sun JDK 1.4.2_01 for Linux
> (java/linux-sun-jdk14) stable and very well performing? On my FreeBSD
It was just my imagination ;-) See below for the error message I got seconds
after I started up my application server and executed no more than 3
requests:
Unexpected Signal : 11 occurred at PC=0x2A6BD991
Function=[Unknown.]
Library=(N/A)
NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.
Current Java thread:
Dynamic libraries:
Can not get information for pid = 21338
Heap at VM Abort:
Heap
def new generation total 576K, used 138K [0x2c760000, 0x2c800000,
0x2cc40000)
eden space 512K, 24% used [0x2c760000, 0x2c77ee30, 0x2c7e0000)
from space 64K, 23% used [0x2c7e0000, 0x2c7e3b78, 0x2c7f0000)
to space 64K, 0% used [0x2c7f0000, 0x2c7f0000, 0x2c800000)
tenured generation total 3036K, used 2298K [0x2cc40000, 0x2cf37000,
0x30760000)
the space 3036K, 75% used [0x2cc40000, 0x2ce7e870, 0x2ce7ea00,
0x2cf37000)
compacting perm gen total 5376K, used 5140K [0x30760000, 0x30ca0000,
0x34760000)
the space 5376K, 95% used [0x30760000, 0x30c653f8, 0x30c65400,
0x30ca0000)
Local Time = Fri Sep 12 16:50:59 2003
Elapsed Time = 194
#
# HotSpot Virtual Machine Error : 11
# Error ID : 4F530E43505002EF
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2_01-b06 mixed mode)
#
# An error report file has been saved as hs_err_pid21314.log.
# Please refer to the file for further information.
_______________________________________________
email***@***.com mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "email***@***.com"
- 13
- [Update] FreeQueryBuilder 2005.03FreeQueryBuilder 2005.03 is now available!
(http://querybuilder.sourceforge.net/)
With FreeQueryBuilder, you can create SQL queries without directly
writing SQL.
A diagram pane presents a graphic display of the tables you have
selected from the data connection.
It also shows any join relationships among them. When you make a change
in the diagram pane,
the SQL-Syntax pane are updated to reflect your change.
You can:
* Add or remove tables and specify data columns for output.
* Create,remove or modify joins between tables.
* Run a preview window.
And specify:
* Expressions for calculated columns.
* The sort order for the query.
* Search conditions.
* Grouping criteria.
Included:
* JDBC Administrator.
* Metadata search.
* Command editor.
* Queries history.
Works with any JDBC compliant database, including : ORACLE, MS
SQLServer, MySQL, FiREBiRD and HSQLDB.
Please give it a try and let me know if you have any problems or ideas
for features.
Thanks, Nickyb
- 14
- Creme 3.27 and AWT framesHi!
I working on a problem. We have an application in which a signature can
be captured. This works perfectly on a PDA (Windows CE, Creme 3.25) but
since the upgrade to Windows CE Second Edtion, Creme 3.27 it fails to
work.
The problem is, the created frame will not be shown after the
frame.show() method. It looks like this thread is killed because the
code after the frame.show() isnt executed.
The (partial) code:
frame = new Frame();
frame.setBackground(Color.white);
frame.setSize(dimension);
saveButton.setLabel("Save");
saveButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e)
{
saveButton_actionPerformed(e);
}
});
frame.add(saveButton, BorderLayout.NORTH);
clearButton.setLabel("Clear");
clearButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e)
{
clearButton_actionPerformed(e);
}
});
frame.add(clearButton, BorderLayout.SOUTH);
frame.show();
frame.addMouseMotionListener(this);
frame.addMouseListener(this);
frame.addWindowListener(this);
}
//////////////////
frame.pack() before frame.show() doesnt help, frame.setVisible(true)
instead of frame.show() doesnt help. Anyone an idea ?
- 15
- Robot.java low level help followupMy quest to emulate Robot.java in C# continues......
I was not able to use SendKeys, SendInput, keybd_event, or the
WH_JOURNALPLAYBACK hook to reproduce Robot.java's key sending ability
for apps that poll the asynch key state.
Since I was not able to get any info about the low-level code
Robot.java uses to execute the keyPress and keyRelease methods (any
info still appreciated :) ), I ended up creating a java app that runs
minimized that has a socket to accept keys, and uses robot.java to
send them. Any app of any kind can send the keys to this app and
utilize Robot.java's functionality.
Hope this info helps someone looking to use the wonderful Robot.java
in another platform.
|
|
|