Jc Frane

Ranch Hand
+ Follow
since Aug 15, 2013
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jc Frane

Hi guys,

I have my android phone and laptop connected to the same wifi network.

Just want to ask if there is a way my android app knows my laptop's IPV4 address?

I want to call a php script within the laptop's localhost server.

Your responses are very much appreciated!

Thank you.
9 years ago
So here's the situation:

I want to put my table inside a form for retrieval purposes (or Am i doing it wrong?)
When the table is not within a form, it works perfectly. It displays information the way i wanted.
However, once I put the table inside a form the table doesn't display needed information.

Is the problem the html or the jsp code?

Here's my jsp file:




Thank you very much!
9 years ago
JSP
Hi guys.

I just want to to ask how can I send a form to a servlet using javascript?

Here's my form:




This button will responsible for sending:



Note that I include file uploading in the form.

Thank you very much!

Your responses will be much appreciated!
9 years ago
Hey guys,

still can't connect even i supplied android permission to use net.
9 years ago
@Ulf Ditmer - what I mean is I used my physical handphone for testing and I am connected to the network through Wifi.

@Maneesh Godbole - not yet sir, i'll try it =)

Thanks for your reply.
9 years ago
Hello guys.

I am new to android programming.

I tried to access the localhost in my laptop using my android phone.

To check the connection I supply thiis code:

try {
HttpClient httpclient = new DefaultHttpClient();


HttpPost httppost = new HttpPost(
"http://10.0.2.2/ssmis/acess1.php");
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
is = entity.getContent();
System.out.println("connected!");
} catch (Exception e) {
Log.e("log_tag", "Error in http connection" + e.toString());
}



However the logcat gives me an error that says that I have error in HttpConnection and that the connection is refused.

I also tried to supply many addresses in HttPost Constructor but nothing worked like http://192.168.10.7/ (which is my IPv4 address)

Note that I used my android phone as emulator and I am not using AVD.

So what should I do?

Your responses will be very much appreciated.

Thank you!





9 years ago
Hello guys,

I have this rookie question. I am just testing glassfish 4.0 that I have just installed on my pc.
So, I create a jsp file to test whethere it can ran on glassfish. However it gives me some error.

So here's what eclipse say in the error log:

Message: GlassFish: Error getting URL for WebResource

And the stack trace are these

java.lang.NullPointerException
at java.net.Parts.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at oracle.eclipse.tools.glassfish.GlassfishGenericServer.getModuleRootURL(GlassfishGenericServer.java:127)
at oracle.eclipse.tools.glassfish.GlassfishLaunchableAdapterDelegate.getLaunchable(GlassfishLaunchableAdapterDelegate.java:55)
at org.eclipse.wst.server.core.internal.LaunchableAdapter.getLaunchable(LaunchableAdapter.java:76)
at org.eclipse.wst.server.ui.internal.ServerUIPlugin.getLaunchableAdapter(ServerUIPlugin.java:1209)
at org.eclipse.wst.server.ui.internal.wizard.fragment.OptionalClientWizardFragment.updateClients(OptionalClientWizardFragment.java:65)
at org.eclipse.wst.server.ui.internal.wizard.fragment.OptionalClientWizardFragment.enter(OptionalClientWizardFragment.java:109)
at org.eclipse.wst.server.ui.internal.wizard.TaskWizard$2$1.run(TaskWizard.java:177)
at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:167)
at org.eclipse.ui.internal.UISynchronizer$3.run(UISynchronizer.java:165)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4147)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3764)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:175)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:390)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1059)
at org.eclipse.wst.server.ui.internal.wizard.TaskWizard.performFinish(TaskWizard.java:227)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:853)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:438)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:619)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:832)
at org.eclipse.jface.window.Window.open(Window.java:808)
at org.eclipse.wst.server.ui.internal.actions.RunOnServerActionDelegate.getServer(RunOnServerActionDelegate.java:137)
at org.eclipse.wst.server.ui.internal.actions.RunOnServerActionDelegate.run(RunOnServerActionDelegate.java:295)
at org.eclipse.wst.server.ui.internal.actions.RunOnServerActionDelegate.run(RunOnServerActionDelegate.java:764)
at org.eclipse.wst.server.ui.internal.ServerLaunchShortcut.launch(ServerLaunchShortcut.java:41)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension.launch(LaunchShortcutExtension.java:431)
at org.eclipse.debug.internal.ui.actions.LaunchShortcutAction.run(LaunchShortcutAction.java:74)
at org.eclipse.debug.internal.ui.actions.LaunchShortcutAction.runWithEvent(LaunchShortcutAction.java:123)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1070)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:782)
at org.eclipse.jface.action.ActionContributionItem$9.handleEvent(ActionContributionItem.java:1293)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:236)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)



So what do you think is wrong with these?

Your reply will be much appreciated.


9 years ago
What are the things I needed to get started?

Is Apache Tomcat enough?
9 years ago
Ok,

I think I just have to study web service. =)

Can you please give me summary of steps that I should do?
9 years ago
Good day!

I have a desktop application which I made using javafx and a database connection to a localhost server.

What I want to do is to have an online database and my desktop application can access that database.

In addition, I would also like to develop an android application that access the same database.

Can I do the connection to database without using web service in java?

How?

Your answers will be very much appreciated.

Cheers!
9 years ago
Hi,

Thank you for the reply.

I am gonna use the code for my school's project. My project includes a module where I want to register new task for each employee and tracking each one of them.
I already managed to write a code where the progressbar is in TableView. I also managed to create Task object and bind its progress to the progressbar.

But I think service will do well with the help of the Executor you are referring with. In oracle documentation it said that it can be restarted and scheduled.

The problem now is, I dont know how to implement Service and Executor.

Would you mind if you provide some sample codes? I will appreciate it so much since I am just a student and found it hard to understand the API documentation.

Thank you so much!
9 years ago
Good day!

So I wrote a program showing all employees and their current progress in each task they assigned.
I already managed to add ProgressBar on my TableCells (hoping I made the right way).

What I wanted now is when I select certain employee in the table and click the "Start" button the task should start and the progressbar should work.

How can I do that? Here's my two classse:





Badly needed guys.

Thank you very much!
9 years ago
Good day!

Can I use Thread class in javafx or should I use Task and Service class?

Thank you!
9 years ago
Instead of fading out you might want to slide the panel instead???

This might help you:

https://gist.github.com/jewelsea/1437374
9 years ago
Good Day!

So I am new into reporting in java.
I am using Netbeans for coding and Jaspersoft Studio for generating jrxml files. (My jdk is 1.8)

When I try to click a button and try to view the report in give me something like this:

log4j:WARN No appenders could be found for logger (net.sf.jasperreports.engine.xml.JRXmlDigesterFactory).
log4j:WARN Please initialize the log4j system properly.
net.sf.jasperreports.engine.JRException: Error loading object from file : C:\Users\JC\Documents\Simple_Blue.jrxml



I think the two lines are just normal however the JREException may be not, This is my whole code:



Any help will be so much appreciated!

Thank you!
9 years ago