JSP / JSTL :: Glass Fish Server At Port 4848 Is Not Running

Dec 21, 2012

I was running Glass Fish Server at port 4848 (http://localhost:4848). Later I stopped it through administration tool, STOP button.

Since then it was not running. I want to run it again.

View Replies


ADVERTISEMENT

Server Socket Channel - Listen On A Port For Incoming Connections

Dec 3, 2014

What is the difference between instansiating a ServerSocket and .accept(); and a ServerSocketChannel .accept();

They both listen on a port for incoming connections so what is the benifit or dissadvantage of ServerSocketChannel?

View Replies View Related

Running Server And Client From Two Different JButton

Mar 10, 2014

I am looking to run Server and Client from two different JButton.

When I click on start Server button, the server starts to run but I cannot click on start Client button to start the client. Here the code for server:

Java Code:

public void actionPerformed(ActionEvent e) {
Client c = new Client();
c.run();
} mh_sh_highlight_all('java');

View Replies View Related

Running Program From Server On Client Machine

Aug 9, 2014

I had some questions about a theoretical java program. Say you had a java program on a linux server/pc that referenced a folder on that server. And say you had a Client PC (Windows) that had a share folder to that java program.

If that windows client PC tried to run the program would it run (with a GUI if it had one) and would the main directory of the java program still be on the linux server or would it be on the windows computer since that is the computer that is running the program?

Basically I have a program I am trying to find the best way to run it remotely on a windows computer but it references files on the linux server it is located at and needs to put files it creates there as well. I am just trying to make sure I understand my theory here on how the program will run if it IS run remotely.

View Replies View Related

Swing/AWT/SWT :: Running Application Using Java 1.6 And Windows-based X Server

Apr 15, 2011

At our company we run a third-party Java-based GUI application on one of our Linux server machine, displaying the application to our local Windows work stations using the Cygwin X Server.We noticed a few problems with a new version of this application and was able to narrow it down to the following conditions:

1. Java Swing application running on a UNIX host;
2. Java used is 1.6 (problem not noticed when using Java 1.5)
3. Displaying to Cygwin X server (I've heard other windows-based X servers have the same issue, but I don't have access to any others at this time).

If we run the application natively on Windows, I'm told if the application runs on the Linux host and displays natively to that machine's display there are no problems (although I'm not able to verify this myself).The problems are:

1. Any new frame/dialog is opened in the geographic center of the dual displays, rather than in the middle of one or the other;
2. Any attempt to drag the window to a different location on the display seems to work, but as soon as you let go of the drag, the window snaps back to the original location. This only happens the first time you try to move each window.
3. Drop-down controls (JComboBox, for example) just close back up as soon as you click on them. If you click and drag the mouse to attempt to make a selection, no selection can be made.

Are these known problems using 1.6 on UNIX displaying to Windows-based X Servers?

The only real problem is number 3. I expect that if I put more work into the window placement, I should be able to get past number 1. Number 2 is just a minor annoyance.The following is a simple Java Swing application which when run in the correct environment will exhibit the problems.

import java.awt.EventQueue;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

[code]....

View Replies View Related

Go Fish Program And Null Pointer Exception

Mar 23, 2015

I'm new to Java programming (taking a beginner's class) and our assignment is to program a game of Go Fish. I've got all my classes written (Card, CardPile, Player and GoFish). Now the problem is that I'm getting a NullPointerException when I run the GoFish class. The error seems to occur when I ask the program to check whether the player whose current turn it is, has a book (meaning 4 cards of the same value) in their hand. My idea was to run through the values 1 to 13, first checking to see if the value appeared in the player's hand:

if(players[currentTurn].hasCard(hasValue))

And if true, then remove all the cards matching the value from the player's hand, add to a new array of cards and then check to see if this array is of length 4 i.e. a book. If not, return the array of cards to the player's hand.

Here's the error message:

java.lang.NullPointerException
at CardPile.searchValue(CardPile.java:88)
at Player.hasCard(Player.java:15)
at GoFish.main(GoFish.java:98)

It references the following lines of code:

In GoFish.main:

// At the end of each turn, check to see if player currentTurn has made a book.
boolean hasBook = false;
int hasValue;
for (hasValue = 1; hasValue <= 13; hasValue++) {
// Runs through player's hand and removes all cards of the same value between 1 and 13 and places in a new array.

[Code] ....

I cannot figure out why I am getting the null pointer exception error!!!

View Replies View Related

Error While Running In Command Prompt Only - In Eclipse Running Fine

May 19, 2014

This is my program: RemoteXMLRead.java

import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
import org.apache.commons.io.filefilter.WildcardFileFilte r;
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
import org.w3c.dom.Node;
import org.w3c.dom.Element;
import java.io.File;

[code]....

It is working fine when i run in Eclipse, but is giving error when i run in cmd.. What i need to do to over come this..

View Replies View Related

COM Port Does Not Display In Jcombobox

Feb 1, 2015

displaying COM port in Combo box , see my code below , it does not show any error but it does not show COM port in combo box , instead it shows the class name of Communicator with some garbage data .

Code :

import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JComboBox;
import gnu.io.CommPort;
import gnu.io.CommPortIdentifier;
import gnu.io.SerialPort;
import java.io.IOException;

[code].....

View Replies View Related

What Is The Coding For Udp Port Scanning

Feb 3, 2014

what is the coding for udp port scanning?

View Replies View Related

Opening A Serial Port In A GUI

Oct 20, 2014

I have created a java gui application and I need to communicate through the serial port. I would like to open the serial port in the beginning of the application and then close it when the applications closes. The problem that I am having is that I created a method to open the serial port in the main function but I can not close the serial port on exit off the application. Is there away of having the serial port be setup so that all methods can access the serial port.

View Replies View Related

How To Disable USB Port In Netbeans (Java)

Dec 3, 2014

If this is the C Programming codes for disabling the USB port:

system("reg add HKEY_LOCAL_MACHINESYSTEMCurrentControlSetSer vicesUSBSTOR /v Start /t REG_DWORD /d 4 /f");

How can I use the codes below in Java using Netbeans?

View Replies View Related

Reading COM Port On GPRS Modem

Jul 16, 2014

I'm a new in java program. I need reading COM port on GPRS Modem. I plug the GPRS Modem in my PC and it has connected. I use Eclipse and create a project and new a file a.java, i collect this following code from the internet and paste it into the a.java file.

Java Code:

package serial;
import java.io.*;
import java.util.*;
import javax.comm.*; //for accessing serialport
public class OwnPort {
static CommPortIdentifier portId;

[Code] ....

You can see the result here

I don't know the result why return " Set default port to COM4. port COM4 not found."

View Replies View Related

JRE :: Port Number For Active Host Name

Aug 23, 2014

I have tnsnames string and I know one of the following Host is working  say Primary-host .
 
DESCRIPTION =(ADDRESS_LIST= (ADDRESS = (PROTOCOL = TCP)(HOST = Primary-host)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = Secondary-host)(PORT = 1522)))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = ORA112DB)))
 
How to get Port number of only primary Side ?. This needs to do because we cannot get port number using any oracle query.

View Replies View Related

Read Serial Port In Java Applet

Jul 19, 2014

My company is a transport company. We receive goods form partner and transport it to customers. There is a process that we must accept a number of kilograms into bill after we weigh goods by the electronic balance(the electronic balance have serial port plug in PC) . To decrease this process, I'm looking for a project "read serial port wrote in java applet". Who have code,

View Replies View Related

JDBC :: Oracle UCP Connecting To Wrong Port

Apr 10, 2015

I am trying to connect to Sql Server database using Oracle UCP with sqljdbc4-3.0 JDBC driver for Sql Server,with different ports and instances.

– the issue is with the port being ignored in the server string.

For example, using port 1440 connects to the default instance (which is on port 1433) rather than MSSQLINSTANCE1 which is on 1440.

Below are Server hosts used.

sql005.sqlasoftware.com (connects correctly to the default instance)
sql005.sqlasoftware.com:1440 (connects incorrectly to the default instance on port 1433)
sql005.sqlasoftware.comMSSQLINSTANCE1 (connects correctly to the named instance)

View Replies View Related

EJB / EE :: Port Asynchronous Bean Support In App Servers Like Weblogic And Jboss

Dec 26, 2013

I need to port asynchronous bean (provided by websphere) support in App servers like weblogic and jboss. Is this feature already part of J2EE specification? Or should I use some other external package to get this feature?If so what are those async bean like features for weblogic and jboss?

View Replies View Related

Wages Calculator - Determine Total Cost Of Crew Departing From Port On That Day

Nov 27, 2014

A wages calculator application is required that can determine the total cost of crew departing from the port on that day. To do this, the application reads from an itinerary text file containing each ship being loaded in the port that day, in the following format:

<ship id>
<journey id>
<l> // where <l> is the length in hours of the journey
<s> // where <s> is the number of crew for the ship for this journey
<rate> // for each s, <rate> is hourly rate of pay

Your application must calculate the total cost of the crew for each ship/journey and then compare it with a "recommended maximum journey cost" (RM) amount typed in by the user when the application is first run. If the total amount is less than or equal to RM then the details must be written to the screen and to an output text file called wagedaily.txt. If the amount is larger than RM then the results must be written to the screen only. Messages to the screen must indicate whether the crew cost is less than, equal to or larger than RM.

Your application should find the ship with the highest crew cost that is below RM and print this out as the final piece of output to the screen.

It has given me a bunch of ships and numbers to play around with in the code, here they are:

Monarch
M141
16
6
10.5
10.5

[Code] ....

View Replies View Related

JSF :: XHTML On One Server Can Talk To Managed-bean On Other Server (different Machine)?

Jul 27, 2014

I am developing a web application using JSF-2.0 on weblogic 10.3.6. I am using Facelets as VDL. I have 5 different machine. They are different according to their OS and their geographical location. On my first xhtml page server (machine) is decided. Then on next page file upload and rest of processing takes place. My restriction is that SSO configuration can be done on only one machine.

So I am restricted to using xhtml files from only my primary server where SSO configuration is done. But I have to connect to servlets or managed-bean of different machine as requests are machine specific and file needs to be uploaded to those machines for processing. So I cannot use redirectUrl as I need to be only on one machine. Is it possible that xhtml on one server can talk to managed-bean on other server(different machine)?.

View Replies View Related

Servlets :: How To Create A Room That Should Be Like Static On The Server Until Server Is Down

Apr 1, 2014

I am working on a chess game. I need to construct a game room where all the player are present and room chat is up. Also some tables where games are being played. Now my question is how to create this game room?

To me this room must need to be like static or global (if I am not mistaken) that is up when server starts and players can join this room and should be down when server is done. How can I implement such room that would stay up for infinite time.

View Replies View Related

Connect A UDP Web Server To Compression Server

Apr 19, 2015

Working on a project and am in need of some quick guidance to wrap things up. I have a functioning compression server that will create two files after the user gives it some input and a "magic string" to know when to stop reading input for that specific file.

I now need to connect a UDP web server to that compression server. the web server will read from the HTTP POST Request the data that was uploaded and send it to the compression server to create the two files... i have included both programs below

Web Server:

import java.io.*;
import java.net.*;
import java.util.*;
final class HttpRequest implements Runnable {
//Declare Constants and Variables
final static int BUF_SIZE = 1024000;
final static String CRLF = "
";

[Code]...

Compression Server:

import java.net.*; // for DatagramSocket, DatagramPacket, and InetAddress
import java.io.*; // for IOException
import java.util.zip.*;// for Zip
public class CompressionServer {
private static final int ECHOMAX = 65535; // Maximum size of echo datagram
private static final int BUFFER = 2048; // Buffer size for writing to Zip File

[Code]....

View Replies View Related

JSP :: JSTL To Put Value In Request?

Mar 12, 2014

I am fetching records from result set and displaying on JSP with <c:forEach> tag

<c:forEach var="outer" items='${ProductList}' varStatus="seq1">
<tr>
<td class='center' nowrap><input type="radio" name="view" id = "view" value="Y" ></td>
<td class='left' nowrap><c:out value='${outer.sourceIndex}' /></td>
<td class='left' nowrap><c:out value='${outer.prodNameAbbr}' /></td>
<td class='left' nowrap><c:out value='${outer.productName}' /></td>
<td class='left' nowrap><c:out value='${outer.effectiveDate}' /></td>
<td class='left' nowrap><c:out value='${outer.uuName}' /></td>
</tr>
</c:forEach>

Below is one row with radio button

SourceIndex ProductAbbreviation Product Name Effective Date UseID
ABC PQR Test123 03/12/2014 smj

I have a view button also to select above radio button. When I select that I need all above values to be set in request.

View Replies View Related

JSP :: Translate To JSTL And EL

May 25, 2014

translate this part to jstl and el?

<%
while(i<nrows){
if(i==0){
%>
<tr>
<td ><b>id_article</b></td>
<td ><b><font color="#FF0033">nbr_stock</font></b></td>
<td ><b>critical_nbr</b></td>
<td ><b><font color="#FF0033">date_first_stock</font></b></td>

[code]....

View Replies View Related

JSP :: How Is Classpath Set For JSTL

Sep 9, 2014

I am looking at JSP page, which has code line as follows

<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>

This taglib will have to be installed on local environment. How is it referred in jsp ? I dont see any code in jsp, which refers to the location of JSTL. So how does jsp invoke these tags ? Is it through classpath ?If its so , how is classpath set for JSTL ? Is it just as classpath is set for java ?

View Replies View Related

JSP :: Sorting Query In JSTL?

Jun 21, 2006

i am doing a code using JSTL to fire a query. everything come fine except the resule is not sorted as desired. i am putting the code below--

String sort_order=(String)request.getAttribute("sort_order");
request.setAttribute("sort_order",sort_order);
<sql:query var="viewQueryj" sql= "select USER_ID, PERMISSION_ID, USER_NAME from administrator order by ?">
<sql:param value="${sort_order}"/>
</sql:query>

now the resule is always sorted by USER_ID. if i want to sort it using USER_NAME i pass parameter from controller to this page in sort_oredr variable which comes fine but the result doesn't sort by name, only by id. if i hardcode USER_NAME in query then the result is as desired.

View Replies View Related

JSP :: Using List From JSTL To Scriptlets?

Aug 29, 2014

I want to use the list element inside my scriptlet. Below is my code which is not working.

<c:forEach var="social" items="${sociallist}">
<%
callToFunction(%>${social}<%);
%>
</c:forEach>

How can i access social var inside scriptlet.

View Replies View Related

JSP :: How To Use Join In JSTL Function

Jul 31, 2014

In JSP page: firstly set the setter of a entity in bean and then set it in session,request etc. and gvet values using foreach loop as follow :

<jsp:useBean id="st" class="beans.student">
<jsp:setProperty name="st" property="roll_no"/>
</jsp:useBean>
<%

[Code]....

Here start is the variable whose value will vary after every time i visit this function.So how would i be able to use above query.

P.S. i was using scriplet before and i was able to deal these issues with scriplet easily.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved