Hi all
I'm trying to figure out the optimum way to develop and release a fairly simple web application, and I'm running into several problems. I'll outline the decisions I've made, because somewhere I've clearly gone off the rails.. Hugely grateful for any help!
I have what I think is a fairly simple web application. It contains a couple of jsps that reference a couple of java beans, and the usual static html, js, css and images.
Decision 1) I wanted to have a clear and clean release procedure, such that I could develop on my local machine and then release reliably to a production machine. I therefore made the decision to package the application into a war file (including all the static resources), to minimize the separate bits and pieces I would need to release. So far so good?
Decision 2) I wanted things on my local machine to be as similar as possible to the production environment. So in my html, for example, I may have a reference to a static file such as http://static.foo.com/file . To keep this code working seamlessly on dev and prod, I decided to put static.foo.com in my /etc/hosts when developing locally, so that all the urls work correctly without changing anything.
Decision 3) I decided to use eclipse and maven to give me a best practice environment for administering and building my project.
So I have a nice tight set up now, except that:
Every time I want to change anything in development, like one line in an html file, I have to rebuild the entire project and then wait for tomcat to load the war before I can see if it's what I wanted. So my questions are:
1) Is there a way to connect up eclipse and tomcat so that I don't have to rebuild the war each time? ie tomcat is looking straight at my actual workspace to serve up the static files?
2)I think I'm maybe making things harder by using /etc/hosts to reflect production urls - is there a better way that doesn't involve manually changing over urls (relative urls are fine of course, but where you have many subdomains, say one for static files and one for dynamic, you have to write out the full path, surely?)
3) Is this really best practice?? How do people set things up so that they balance the requirement for an automated, all-encompassing build process on the one hand, and the speed and flexibility to be able to develop javascript and html and css quickly, as quickly as if one just pointed apache at the directory and developed live? What do people find works?
Many thanks!
I'm looking for some recommendations for a python web application. We have some memory restrictions and we try to keep it small and lean.
We thought about using WSGI (and a python webserver) and build the rest ourself. We already have a template engine we'd like to use, but we are open for some suggestions regarding the whole request handling (the controller).
The application has to run in a single process and the requests have to be processed with multiple threads.
We've looked at django, but we are a not sure if it fits into our memory budget.
Your feedback is very welcome!
Cheers,
Reto
I'm about to start a new project and want some advice on how to implement.
I need a web application which contains a booking module for reserving timeslots, and a time management module which will enable employees to clock in / clock out.
If I am writing an update to the time managment module, I don't want to disrupt the booking engine availability by releasing a new solution containing both modules.
to make things more difficult, there is some shared functionality like common users, roles and security.
Here's a suggestion I've gotten, which sounds a bit cruddy, but may be functional.
Write a 'container' web application which consists of basically a frame, and authentication / security features. This then has links which, will load the 2 independantly built and released web applications into the frame.
I can see that say, if I wanted to update the time management module, I would only need to build and release this separately, and the rest of the solution would be 'untouched'
Any better alternatives?
I am creating an web application and I at the point that i am starting to make backend choices. Now there are a lot of ways to go with this, so I am looking for some good points and back practices.
Some of the question i have involve:
Should i make a seperate table in the db for admin users
Should i extend make some classes to load the admin data and the normal data, or make seperate classes for the admin section
Where can i get some information on making different types of users
Just some best practices for a backend
My application is written in PHP with an MySQL database.
I am trying to develop Annotation based Spring Hibernate standalone application to connect to DB. I've gone through the some blogs and wondered like we should not make use of hibernateTemplate becoz coupling your application tightly to the spring framework. For this reason, Spring recommends that HibernateTemplate no longer be used.Further more my requirement is changed to Spring Hibernate with AOP using Declarative Transaction management.I am new to AOP concepts. Can any one please give an example on Spring Hibernate Connection through AOP. That would be a great help to me.
Thanks in advance.
I am running an application server on Linux 64bit with 8 core CPUs and 6 GB memory.
The server must be highly responsive.
After some inspection I found that the application running on the server creates rather a huge amount of short-lived objects, and has only about 200~400 MB long-lived objects(as long as there is no memory leak)
After reading http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html
I use these JVM options
-Xms2g -Xmx2g -XX:MaxPermSize=256m -XX:NewRatio=1 -XX:+UseConcMarkSweepGC
Result: the minor GC takes 0.01 ~ 0.02 sec, the major GC takes 1 ~ 3 sec
the minor GC happens constantly.
How can I further improve or tune the JVM?
larger heap size? but will it take more time for GC?
larger NewSize and MaxNewSize (for young generation)?
other collector? parallel GC?
is it a good idea to let major GC take place more often? and how?
Is it possible to configure an android app so that if a user has opened your app, launched numerous activities, then returns to the home screen and relaunches your app again, instead of going to the main activity they will instead be taken to the activity highest on the stack (the most recent activity in your app)?
Hello everybody.
I want to create an small GUI Windows application that looks like all the other usual appz.
I am searching for a book that describes the whole procedure. Let's say an address book application that can be have a small database, minimized in the task bar, doing things in the background and so on.
I don't care for the language. But I would prefer to do it in .NET C++.
I know it is a "very" general question, so
Thanks in advance.
As the title says, are there any sources (web pages etc) of summarised changes at each API level?
I have an app which I've put out to a small group of beta testers and I already fell foul of Environment.getExternalFilesDir(), which I hadn't noticed was introduced in API Level 8, when a couple of the guys tried it on Android v2.1 devices.
The majority of my code should be pretty generic but it would be useful if I could find a condensed/summarised list/table or similar that I can quickly glance over.
Let me describe my question -
I have a Java application - Hibernate as the DB interfacing layer over MySQL. I get the communications link failure error in my application. The occurence of this error is a very specific case. I get this error , When I leave mysql server unattended for more than approximately 6 hours (i.e. when there are no queries issued to MySQL for more than approximately 6 hours). I am pasting a top 'exception' level description below, and adding a pastebin link for a detailed stacktrace description.
javax.persistence.PersistenceException:
org.hibernate.exception.JDBCConnectionException:
Cannot open connection
- Caused by: org.hibernate.exception.JDBCConnectionException:
Cannot open connection
- Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure
- The last packet successfully received from the server was
1,274,868,181,212 milliseconds ago.
The last packet sent successfully to
the server was 0 milliseconds ago.
- Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure
- The last packet successfully received from the server was
1,274,868,181,212 milliseconds ago.
The last packet sent successfully to
the server was 0 milliseconds ago.
- Caused by: java.net.ConnectException: Connection
refused: connect
the link to the pastebin for further investigation - http://pastebin.com/4KujAmgD
What I understand from these exception statements is that MySQL is refusing to take in any connections after a period of idle/nil activity. I have been reading up a bit about this via google search, and came to know that one of the possible ways to overcome this is to set values for c3p0 properties as c3p0 comes bundled with Hibernate. Specifically, I read from here http://www.mchange.com/projects/c3p0/index.html that setting two properties idleConnectionTestPeriod and preferredTestQuery will solve this for me. But these values dont seem to have had an effect.
Is this the correct approach to fixing this? If not, what is the right way to get over this?
The following are related Communications Link Failure questions at stackoverflow.com, but I've not found a satisfactory answer in their answers.
http://stackoverflow.com/questions/2121829/java-db-communications-link-failure
http://stackoverflow.com/questions/298988/how-to-handle-communication-link-failure
Note 1 - i dont get this error when I am using my application continuosly.
Note 2 - I use JPA with Hibernate and hence my hibernate.dialect,etc hibernate properties reside within the persistence.xml in the META-INF folder (does that prevent the c3p0 properties from working?)
Hi'
Is there a piece of code I could write to be notified when a download finishes in android, and be able to execute some custom actions on this event ?
I am using html, tag:
<input type = "file" />
On android and on many cellulars I have the ability to get the file directly by taking a picture and save it.
How can I know (by javascript code) how did I get the picture (direcly by the camera, or by some files that on my cellular)?
I did some workarround, and found exif (http://www.nihilogic.dk/labs/exif/exif.js), but I didn't succeed using it, either I don't know whether exif is the right solution.
Thanks :)
Hi
After scouring the web I have edited my question from the one below to what it is now.
Ok I seem to understand that I don't need all the capabilities of excel right now. I think i am satisfied having a data grid to display data. Basically i am working on Struts 2 and I wat my jsp page to have an excel like feel and hence looks like even a datagrid is sufficient. I came across This Technology
I am not sure whether I must go ahead and use it. Any other suggestions, alternatives are welcome
The older version of the question
"I have a java web application running on windows currently. I may host it in future in a Linux Server.
My application allows people to upload data. I want to display the data they have uploaded in an excel file and render it in a portion of my webpage.
How do I go about this ?"
Hello,
I have a deployed web application project that references my Utility.dll class library. I want to make a change to the Utlity.dll and roll only that .dll out. The problem is that when I do that, I get the following error when I try to launch my site:
Could not load file or assembly 'Utility, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3766481cef20a9d1' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Is there a setting I can change so I don't have to roll out the entire web application project - only the Utlity.dll? Thanks!
When am lancing camera using
Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(intent, CAMERA_REQUEST);)
And then we getting callback after taking pic to the
onActivityResult(){
//HERE AM CALL ING ANOTHER FRAGMENT
FragmentManager fm = getFragmentManager();
fm.beginTransaction().replace( R.id.tab_upload, new uploadingActivty(), "tabId").setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN)
.addToBackStack(null).commit();
}
Then we getting error as
11-21 16:13:44.316: E/AndroidRuntime(30944): Caused by: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
Any idea?
I am designing an application such that it will have to react to certain actions required by the website, mostly the same way Last.FM client does (if you have used one)
The way Last.FM client works is that, it will register a custom protocol in Windows (lastfm://) and on their website, they use that protocol to trigger certain action on the player, e.g.:
lastfm://artist//similarartists
will actually direct any Last.FM client running to load up similar artists.
I would like to do the same thing for my application.
Is this a good idea? Is there any good alternatives to send a message from a website to a desktop client in this manner?
Hi folks,
while my time developing on android I was looking for a functionality to get logcat messages from my real device (when starting an app on it from eclipse) and not only from my emulator...
Does someone know how to enable such a feature?
greetz. poeschlorn
Hi i couldn't find a single query that would give me in API 2.0 of the contacts API the URI of the contact's image and the display name.
For now as far as i know i can create a uri by having the contact's _ID , but i didn't see any row name that i can use in the projection of Data or Contact to get all that i need.
can anyone help ?
(i refer to using API 2 of the contacts API on android SDK V5 and above )
10x.
Warning in gdb, while run application in device mode...
The warning message is
warning: UUID mismatch detected with the loaded library - on disk is:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.2.sdk/System/Library/PrivateFrameworks/MBX2D.framework/MBX2D
=uuid-mismatch-with-loaded-file,file="/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.2.sdk/System/Library/PrivateFrameworks/MBX2D.framework/MBX2D"
warning: UUID mismatch detected with the loaded library - on disk is:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.2.sdk/usr/lib/libxml2.2.dylib
=uuid-mismatch-with-loaded-file,file="/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.2.sdk/usr/lib/libxml2.2.dylib"
The application not loaded in ipod ? the blackscreen shown for long time ... How can i fix this ? can any one help me?
Thanks in advance.....
hi, i am having a intranet asp.net application , all the clients connected to it is having a specific .exe file in their local disk, now i want to execute the .exe file from the .net application hosted in a intranet server. i used this code to do that
Dim psi As New System.Diagnostics.ProcessStartInfo()
psi.WorkingDirectory = "C:\\"
psi.FileName = "c:\\Project1.exe" '"file:///c:/Project1.exe"
psi.Arguments = iApqpId 'cTimeMaster.APQPID
psi.UseShellExecute = False
System.Diagnostics.Process.Start(psi)
but it is throwing a error the system cannot find the file specified.
is it having a permission issue on local system or any thing else, any help would be greatly appriciated.
thanks and regards
Hi,
I'm trying to unset an application role but have been failing miserably. I was able to get the cookie value after setting (sp_setapprole) the application role. But I haven't been able to use that cookie (type varbinary / byte array) in my query to unset using sp_unsetapprole.
If it was any other stored procedure it wouldn't have been a problem. I was able to use Command object and create a parameter which takes data type input of adVarBinary (204) and execute the command line.. but to the Server the query goes as below.
exec sp_executesql N'sp_unsetapprole @P1 ',N'@P1 varbinary(36)',0x01000000CD11697F8F0ED3627BC1DAD25FB9CEB3A2EC5B289C658235E510CD9F29230000
Since sp_setapprole and sp_unsetapprole have to be run ad hoc, the sql server is failing to run this line.
And I'm finding it hard to append varbinary cookie value to a simple query such as 'sp_unsetapprole ' & varKookie so it runs "directly" on to the server.
Any kind of suggestions are welcome.
Thanks,
Nandagopal
I need to create a simple application/script able to list the hierarchy of a folder containing subfolders and files (mostly PDF), so that a user can browse easily these files and maybe have a quick preview of them.
The files are all on an internal file server, so the dynamic aspects should all be client-sided.
My goal (and what my boss want) is to provide some sort of an HTML page listing, to have something like this.
The only problem I have now is that I cannot install anything on computers, so I cannot use PHP, Python, ...
This application will only runs on Windows in Internet Explorer.
What are the different possibilities I have ?
I don't know if I can do this but I was thinking of using HTML + Flex.
Thanks for helping.
Are you an iPhone/iPad/Android programmer with a designer soul? If so we would like to hear from you.
Drop us your best work/portfolio and than we talk.
[email protected]
Cheers
T