This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 225836 - Ability to run Java web projects on Mobile devices
Summary: Ability to run Java web projects on Mobile devices
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Web Project (show other bugs)
Version: 7.4
Hardware: All All
: P2 normal (vote)
Assignee: Jan Becicka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-07 13:37 UTC by Petr Jiricka
Modified: 2013-03-26 15:34 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2013-02-07 13:37:09 UTC
In the latest trunk build:
1. Install the PhoneGap module from the Update Center
2. Register a server (GlassFish or Tomcat)
3. Create a Ant-based Web project
4. Go to Project Properties -> Run
5. You can now select the target browser: Chrome, Firefox, Embedded browser, ...

It would be nice if I could also choose Android Device, Android Emulator, iPhone Device and iPhone Simulator, like I can in HTML5 projects.
Comment 1 Jan Becicka 2013-02-13 15:49:50 UTC
cordova.platforms module already provides an API for opening url on mobile device (Device.openUrl).
There are several option how to implement this feature
1. cordova.platforms module can implement "top level" browser which will be available everywhere in the ide. On the other hand we probably don't want mobile browser to be the default for NB IDE.
2. cordova.platforms already have an API. Javaee module can use it
3. JavaEE can define it's own API and cordova.platforms module can implement it
Comment 2 Petr Jiricka 2013-02-13 17:25:30 UTC
> 1. ... On the other hand we probably don't want mobile browser to be the default for NB IDE.

Agreed.

> 2. cordova.platforms already have an API. Javaee module can use it

I don't think javaee should depend on cordova.platforms - cordova.platforms is quite specific and should be only loosely coupled with the rest of the IDE. javaee does not depend directly on FireFox or Opera or Chrome, so it should not depend on cordova.platforms either.

> 3. JavaEE can define it's own API and cordova.platforms module can implement it

Yes, I think we will need something like this, but this API will need to be deeper than JavaEE, because the same thing applies to PHP. Also, cordova.platforms will be in webcommon cluster, so the API should be in webcommon or lower down. Right now there is module web.browser.api (in ide cluster), where lots of common browser-relates stuff is placed, so that would be a possibility. 

In the longer run, I think it would be more clean to place this API (and maybe some other things from web.browser.api) to another (new?) module in webcommon cluster, because all these things are specific to web applications, so they should not be present in the code that's present in non-web distributions (Java SE and C++).
Comment 3 David Konecny 2013-02-13 22:51:21 UTC
+1 on everything what Petr said.
Comment 4 Jan Becicka 2013-03-26 15:34:14 UTC
Implemented for web and php projects