How To Improve JSP Page Load Performance

Feb 18, 2015

How to improve jsp page load performance and i have use sessions in jsp page.i tried using with include tag rather than using jsp:include. also

View Replies


ADVERTISEMENT

How Does Encapsulation Improve Maintainability

Jan 29, 2014

I understand making things private and using getters and setters to prevent corrupt data/valdiation. I am having trouble picturing a scenario where I can change my code without breaking others. What can I change without breaking existing code? One example I can think of is I can change an instance variable name since the getter for it will return it regardless. I am looking for a more vivid example...

View Replies View Related

How To Improve Battleship Game Java

Dec 3, 2014

I have an battleship program that I would like to improve in performance. I know that using certain algorithms it can be improve however I am beginner in Java. I would like any recommendations and or hint in how to improve this game. The are 5 ships per game and the computers plays 10000. I just want to sink all ships in as many shots as possible.

Main class

package solution;
import battleship.BattleShip;
import java.awt.Point;
import java.util.List;

[Code] .....

View Replies View Related

JavaFX 2.0 :: How To Improve Application Startup

Aug 26, 2014

I have a UI that uses fx:include to include a handful of nodes in a StackPane.  So far I have less than 10 panes and I can already notice a delay of ~3 seconds (on an older machine) when the initial scene is built.  It's especially noticeable because I'm using a pre-loader with a progress bar.  The progress bar runs smoothly until the pre-loader calls start() on my application.  After that, the scene is built on the application thread, so the progress bar doesn't get any more updates.  It looks like the progress bar freezes until the main scene is built and shown.
 
I was hoping I could build the main scene on the JavaFX launcher thread, but that doesn't work.  I tried it and, not surprisingly, get an exception for not being on the application thread.  What are the options, if any, for making an application's start up feel a bit smoother?

View Replies View Related

Improve Code To Output A Word With Most Frequent Letter?

Jan 31, 2015

The code is supposed to output a word from a sentence(from a sample file) with most frequently occurring letter in that word.

Example input: "Therefore, it is this word."

output: therefore

It currently uses 3 loops nested loops, is there a way to improve this?

public static String findWord(String file) throws IOException {
BufferedReader in = new BufferedReader(new FileReader(file));
String text, correctWord = null;
text = in.readLine();
StringTokenizer tokens = new StringTokenizer(text.toLowerCase(), " ,.?"); //split string into tokens of words only
int count = 0, numLetter = 0;

[code]....

View Replies View Related

Web Application Performance Monitoring

Jul 28, 2011

I want to monitor performance of web application, running in java JVM(Java version 1.5.0_22) using tomcat web server, for a given functionality want to find, methods and sql queries how much time taking for execution. i am looking for setting and free tools available.

View Replies View Related

Scalability And Its Relation To Performance

Mar 7, 2014

Have you ever did a design for an application with requirements such as X number of anticipated users of the application in the next 5 years, and should still perform as expected.

How do you usually implement design solution for this? the only solution I am familiar with when faced with this type of requirement is the use of EJBs (is that even a correct design for it?).

View Replies View Related

How To Improve File Reading Efficiency And Its Data Insertion In Java

Feb 8, 2014

We have an autosys job running in our production on daily basis. It calls a shell script which in turn calls a java servlet. This servlet reads these files and inserts the data into two different tables and then does some processing. Java version is 1.6 & application server is WAS7 and database is oracel-11g.

We get several issues with this process like it takes time, goes out of memory etc etc. Below are the details of the way we have coded this process.

1. When we read the file using BufferedReader, do we really get a lot of strings created in the memory as returned by readLine() method of BufferedReader? These files contain 4-5Lacs of line. All the records are separated by newline character. Is there a better way to read files in java to achieve efficiency? I couldnt find any provided the fact that all the record lines in the file are of variable length.

2. When we insert the data then we are doing a batch process with statement/prepared statement. We are making one batch containing all the records of the file. Does it really matter to break the batch size to have better performance?

3. If the tables has no indexes defined nor any other constraints and all the columns are VARCHAR type, then which operation will be faster:- inserting a new row or updating an existing row based upon some matching condition?

View Replies View Related

Achieving Performance On Large Data?

Oct 10, 2013

I have an application which has 10 million rows and 1000 columns in Oracle. Each value has a different set of calculations that are stored in User Defined PLSQL functions.

Data is displayed in form of data grid. When a user updates any value, the calculation is performed using plsql function and value is stored in database. Is there an easy way through which calculation is performed on the fly and i get maximum performance ?

View Replies View Related

JavaFX 2.0 :: Slow Performance On Linux For Visual Effects

Mar 6, 2015

Visual effects such as Transitions perform very poor on linux "wheezy" compared to windows. I noticed this on different PC's, checked for Java7 and Java8. If the UI contains many objects then the transition sometimes does not even appear.
 
I do not think this is graphic card related since videos play quite ok.
 
I use the default ATI driver without Xorg.conf file and  installed the xcompmgr
 
and tried several options, such as
 
Option "Composite" "Enable"
or
Option        "backingstore" "true"   
Option        "AllowGLXWithComposite" "true"
 
This did not speed up things, are there other things that I could do to improve the performance ?

View Replies View Related

JRE :: Java Certificate Revocation List / OCSP Performance

Dec 23, 2013

As the JRE environments and usage of applets has become more and more secure in through the evolution of enhancements to the JRE we have noticed a performance degradation in usage of these applets and launching of them.
 
As our customers are in the business to business environment they utilize our applets that are delivered from the server to the client.  We are looking at ways to reduce the time to validate that the certificates are still valid.  we are looking for ways to provide a means for our customers to validate against a CRL on our server or to cache the the checks against the OCSP so that not each and every client accessing our server needs to go out to the third party sites to get the checks completed.
 
Is there a means to store this information on our server and have the JRE validate against that system rather than the normal OSCP...

View Replies View Related

Storing Search Histories - Remove Duplication Without Affecting Performance

Aug 1, 2014

In our product we show search histories on the UI, means what ever user searches we make a history for that search in the database and show it on the UI.

At present we show duplicate histories also. for ex- if a user do a search with some criteria (say, abc), now if the user do search again with same criteria (abc), we show it twice on our history page.

What we need to do -

we need to remove the duplication, and only to show the search histories once if they have same criteria. also we need to save it only once in the database. means we neither display the same search histories nor store them in the database. ofcourse if we store it only once, it will be displayed only once. so we need logic in our storing part here.

Approaches we are trying -

Approach 1 - We thought to remove duplicate search histories by comparing their criteria's, but here the problem is that single search history itself can have so many criteria's and we store around 30 search histories in the database, so if we compare criteria of all of them one by one. we will loose the performance. so we dropped this approach.

Approach 2 - The second approach we are thinking is, at the time of creation of search histories, we will generate checksum based on their criteria, so if the criteria is same for two search histories the checksum generated would be same, and before creating (storing into database) the search history we first check if the checksum is already exist in the search history table for any search history or not, if it is already there, don't create the search history, as it is already there.

The problems with this approach is -

First Problem - we will need to create one more column in the Table which will impact our upgrade process, and we don't want to have an upgrade impact.

Second Problem - if user changed the sequence of criteria of search, for e.g. name criteria first and then number criteria but the values are same. and in the another search number criteria first then name criteria and values are same as first search, here the search results would be same as the criteria are same but only the sequence is different, so in this case two histories will get created (as we generate checksum based on criteria so if sequence gets changed checksum would also be different), however we want only one search history in this situation. we don't want to consider the sequence.

We store the search histories in XML format and we convert this xml to blob to store it into database, i thought to first sort them then generate checksum, but as they are in xml format, so i can't even sort them because the tags are similar to all the criteria's.

View Replies View Related

Monitoring Performance Of J2ee Application Using Open Source Infrared Tool?

Jun 13, 2013

I am using infrared for monitoring performance of j2ee web application(using hibernate and spring),deploying on tomcat 7.0.23 and jdk 1.6.17.here infrared shows only http layer not sql and jsp layer.

View Replies View Related

JSP :: Extracting Information About Previous Page From Where Current Page Came

Jan 31, 2015

I have to implement a system where I have to do almost same processing on a jsp page. The slight differences on the present page is based on whether the current page came from page 1 or page 2. So how can I do this?

View Replies View Related

JSF :: XHTML Page - Access To Content Of Dynamic Page?

Jan 15, 2014

I have a xhtml file that initialization it with ui:repeat tag in realtime.all tags of this page placed under ui:fragment tag.

<edges>
<ui:repeat value="#{graphInfoBean.edges}" var="edge" varStatus="indexVar">
<edge id="#{indexVar.index}" source="#{edge.source}" target="#{edge.target}"
weight="#{edge.weight}">

[Code] ....

When i access to this page and save it as xml in realtime, the tags in xml file saved is empty while it is initialized and everything is working properly.

<edges>
</edges>

How can i access to content of this xhtml page and save it on disk?

View Replies View Related

JSP :: How To Open Page Inside Another Page

Apr 1, 2015

I have two jsp page one is demo1.jsp and other is demo2.jsp on a click of a particular link on demo1.jsp I want to opwn demo2.jsp inside demo1.jsp without changing layout of demo1.jsp..I tried to use <jsp;include but that doesn't work for me.But how to do this simply on a single link click on a big page?

View Replies View Related

How To Load A Site Or URL

Jan 11, 2014

So the user is on a website and I want them to go to another site using the same browser and tab.Can this be done in java? And yes the java program is running on the browser .

View Replies View Related

Can Only Load One PNG File

Sep 10, 2014

I'am trying to finish my first Java Game with the slick2D library. I had it all working in eclipse but when i was about to make a jar file of it i did realize that i had to use class loader to load my png - SpriteSheets. But now to the problem. My ResourceLoader Class looks like this:

public static InputStream load(String path){
InputStream input = MyResourceLoader.class.getResourceAsStream(path);
if(input==null){
input = MyResourceLoader.class.getResourceAsStream("/"+path);
}
return input;
}

My init-Method in the BasicGame class, where i try to load my png-files looks like this:

public void init(GameContainer arg0) throws SlickException {
InputStream inputStream1 = MyResourceLoader.load("images/piratR.png");
sprite1 = new SpriteSheet("",inputStream1,32,32);

InputStream inputStream2 = MyResourceLoader.load("images/monkey.png");
sprite2 = new SpriteSheet("",inputStream2,32,32);

animation1 = new Animation(sprite1,200);
animation2 = new Animation(sprite2,250);
}

And that works fine for loading the FIRST png-file(eg piratR.png), but whenever i try to load another file it just loads the first one again. So in this case sprite1 and sprite2 looks the same though there are different images.

When i switch the "Load order" and Load sprite2 before sprite1 both animations looks different, so I'm sure that i have two different pictures and its always the one that i load first that will get loaded to all the other SpriteSheets.

View Replies View Related

Cannot Load JAR File

Feb 8, 2014

I can not load my jar file and it is telling me it can not find the main and I thought I had the right files in the right spots. Do I need the .class of my main file for it to make the jar file. I do not understand If I need to make a .jar out of the main then add all the other files to create the jar.

added manifest
adding: Board.class(in = 2431) (out= 1371)(deflated 43%)
adding: Cell.class(in = 1702) (out= 959)(deflated 43%)
adding: Mark.class(in = 1195) (out= 673)(deflated 43%)
adding: Outcome.class(in = 960) (out= 538)(deflated 43%)
adding: Player.class(in = 832) (out= 472)(deflated 43%)

TacToeGUIGame.jar

Error: Could not find or load main class TicTacToeGUIGame

View Replies View Related

Load A Class From Src Folder

Mar 13, 2014

Within my program I allow users to write their own code to be executed. I then save that code in a .java file and then compile. This gives me a .java file and a .class file within the same package in the src folder. However, the compilation process also creates a .class file in the build folder. When the user edits their code and then re-runs it, the .class file in the build folder does not get updated with the new data, but the .class in the src folder does.

What I want to do is to execute the .class file in the src folder and not the build folder. So far I have the following method, but that somehow refers to the .class file in the build folder:

public void runMethod(String packageFilePath, String className){
try{
URI fileURI = new URI("file:/src/uk/learningAid/UserInputs/");
URL url = fileURI.toURL();
URL[] urls = new URL[]{url};

[code]....

View Replies View Related

JSP :: How To Load A Properties File

Jul 21, 2014

I am using JPF controllers. Already, i am loading a properties file in the controller

(using annotations @Jpf.Controller(messageBundles = { @Jpf.Message Bundle(bundlePath = "validation.validator.Messages") },).

I have a problem. Depending on one of the request variables, i need to load different properties files. All these property files have same keys, but with different messages. I need to take the user to different sites(though internally, the backend logic remains same...Look and feel of the front end along with messages to be shown change to make the users feel they are being directed to a different site).

I am thinking of loading the properties file from the JSP when the user logs in first time from login page so that these properties are available until the session expires & not read the properties file in Controller.

View Replies View Related

Cannot Load Library JDIC

Jun 17, 2014

When I try to create a WebBrowser object

WebBrowser browser = new WebBrowser ();

I get this error

Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: Can't load library: C:UsersChris.m2
epositoryorgjdesktopjdicjdic.9.5windowsamd64jdic.dll

The problem is that the path does not exists after windowsamd64jdic.dll

So i cant put the dll file there..its the first time i use dll files ....

View Replies View Related

Applets :: Classloader Can't Load Properties

May 29, 2014

I'm developing an Applet that print a bar code using Jpos API. I need some jars and two configuration file. I've added jars to the classpath and configuration files in src directory. In Eclipse everything works fine.

DefaultProperties prop = new DefaultProperties();
prop.loadJposProperties();
SimpleXmlRegPopulator xmlReg = new SimpleXmlRegPopulator();
xmlReg.load(wincor.jpos17.THxxx.xml");

Everything works fine in Eclispe but I can't find property files when i call the applet from a web page. So I've checked the JavaPos sources and I've paste the loadJposProperties() and xmlReg.load("wincor.jpos17.THxxx.xml") content in my source code:

InputStream isD = prop.getClass().getClassLoader().getResourceAsStream(prop.JPOS_PROPERTIES_FILENAME); // (1) content of loadProperties
if (isD != null){
System.out.println("jpos/res/jpos.properties found");

[Code] ...

The same method is used to found wincor.jpos17.THxxx.xml. So when I call applet form the browser I get INPUT STREAM FROM PROPERTIES OK!! from (1) and jpos/res/jpos.properties not found from (2).

So getClass().getClassLoader().getResourceAsStream works if i write it directly in my code, but doesn't work if i call a jar method.

View Replies View Related

Swing/AWT/SWT :: How To Load Image To JFrame

Jul 23, 2014

How to load an image to a swing application?? I want to load it to myframe(JFrame)..

View Replies View Related

JDK 1.6 - Could Not Find Or Load Main Class

Sep 23, 2014

I have permanently set the path of bin of JDK 1.6 in the environment variables of my system. I am able to compile any of my java programs successfully. But when I give command to run the program I am getting an error "could not find or load main class".

When I write the command "set classpath=.;" program runs successfully. I want to know whether I have to set this classpath everytime I run a new progaram. Is there any permanent way to set classpath ?

View Replies View Related

JSF :: Load Images From CSS On Composite Component?

May 9, 2014

I have an issue about loading images from css using a composite component. The folder structure is:

resources
resources -> css -> componentname
resources -> images - > componentname
resources -> WEB-INF

If i write in the css something like

border-image: url(resources/images/componentname/image.png) !important;
or
border-image: url(images/componentname/image.png) !important;

i have a 404 error and i can't see the image.

I able to load the image only if i write path with context-root:

border-image: url(/<CONTEXTROOT>/resources/images/componentname/image.png) !important;

but i can't write explicit context root in css files!!

So, i tried to use resource EL variable:

border-image: url(#{resource[image/componentname/image.png]}) !important;

but this last way render

border-image: url("/<CONTEXTROOT>/javax.faces.resource/images/componentname/image.png.faces.faces") !important;

and i not able to replicate the right way written above.

The project is developed with RSA9 and WebSphere Portal 8, but if i try to execute it in NetBeans (no portal) it run correctly!

View Replies View Related







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