Browser widget problem [message #1032312] |
Tue, 02 April 2013 17:17  |
Eclipse User |
|
|
|
Hello
I have permanently problem with browser widget after operation setText.
I create one copy widget and after refresh only.
Dmitry
java.io.FileNotFoundException: .......\rwt-resources\org.eclipse.swt.browser\text612072251.html (The requested operation cannot be performed on a file with a user-mapped section open)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
|
|
|
|
|
|
|
|
Re: Browser widget problem [message #1037163 is a reply to message #1036828] |
Tue, 09 April 2013 04:28   |
Eclipse User |
|
|
|
Dmitry,
the snippet below works for me. Maybe the problem is only reproducible
on a Windows filesystem? If you can reproduce the problem with a snippet
like this, then please open a bug.
Regards, Ralf
public class BrowserSnippet extends AbstractEntryPoint {
@Override
public void createContents( Composite parent ) {
parent.setLayout( new GridLayout() );
final Browser browser = new Browser( parent, SWT.BORDER );
browser.setText( "Empty" );
browser.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true
) );
Button button = new Button( parent, SWT.PUSH );
button.setText( "change content" );
button.addListener( SWT.Selection, new Listener() {
@Override
public void handleEvent( Event event ) {
browser.setText( "Some other text " + UUID.randomUUID() );
}
} );
}
}
--
Ralf Sternberg
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
|
|
|
|
|
|
Re: Browser widget problem [message #1393134 is a reply to message #1042996] |
Thu, 03 July 2014 05:37  |
Eclipse User |
|
|
|
Also it is a very old thread, i want to mention my solution:
I could reproduce the error with embedded jetty on windows.
Following reason:
Jetty buffers static content for webapps such as html files, css files, images etc and uses memory mapped files to do this if the NIO connectors are being used. The problem is that on Windows, memory mapping a file causes the file to be locked, so that the file cannot be updated or replaced. This means that effectively you have to stop Jetty in order to update a file
Solution:
webAppContext.setInitParameter(org.eclipse.jetty.servlet.Default.useFileMappedBuffer", "false");
and everything works fine.
|
|
|
Powered by
FUDForum. Page generated in 0.05980 seconds