Friday, 15 May 2015

java - What is meant by container? Web Container, JSP Container or Spring Container? -



java - What is meant by container? Web Container, JSP Container or Spring Container? -

please elaborate little illustration mean container in java. web container or jsp containe or servlet container or spring container? if possible can have link can visualize these concepts.

a web container, jsp container or servlet container refer same thing: a server takes java web application , executes it.

an illustration apache tomcat or eclipse jetty. create app, start server , pass application it. server "contain" application , executes (therefore it's called container). server handle things you, such listening on ports , incoming requests or routing.

a spring container executes application written spring framework.

java containers

php - Stuck with unknown column in field MySQL -



php - Stuck with unknown column in field MySQL -

i maintain getting error

unknown column 'hello' in 'field list'

when execute code

$sql = "insert installs (date,addedby,customer,reg,vehmake,vehmodel,colour,mileage,location,tracker,serial,sim,extr as,satnav,input1,input2,output,comments) values (" . $date . ", " . $addedby . ", " . $customer . ", " . $reg . ", " . $vehmake . ", " . $vehmodel . ", " . $colour . ", " . $mileage . ", " . $location . ", " . $tracker . ", " . $serial . ", " . $sim . ", " . $extras . ", " . $satnav . ", " . $input1 . ", " . $input2 . ", " . $output . ", " . $comments . ")"; $result = $connect->query($sql) or die($connect->error);

replace this

(' . "hello" . ', ' . 2 . ', ' . 3 . ', ' . 4 . ', ' . 4 . ', ' . 5 . ', ' . 6 . ', ' . 7 . ', ' . 8 . ', ' . 9 . ', ' . 10 . ', ' . 11 . ', ' . 12 . ', ' . 13 . ', ' . 14 . ', ' . 15 . ', ' . 16 . ', ' . 17 . ')';

by

("hello", 2 ,3, 4,4,5,6,7,8,9,10,11,12, 13,14,15,16,17)';

edit:

replace this

(" . $date . ", " . $addedby . ",..........

by

('$date', '$addedby',...........

or this

('" . $date . "', '" . $addedby . "',..........

php mysql mysqli

javascript - Secure Websockets not working on iphone browsers -



javascript - Secure Websockets not working on iphone browsers -

i have made setup of websockets on nginx server.

i using javascript websockets in project on ssl.

they working fine on desktop browsers, android browsers , blackberry browsers. not working on iphone browsers.

i have checked compatibility of iphone browsers. have tested in safari , chrome on iphone.

please help me solution.

javascript php ios iphone websocket

wso2esb - Backing up proxy services and configurations in WSO2 ESB? -



wso2esb - Backing up proxy services and configurations in WSO2 ESB? -

i have wso2 esb 4.6 running proxy services, proxies have endpoints, sequences , other artifacts saved inline, in registry , standalone endpoints/sequences. want backup them. there way suggested situation?

if in registry utilize checkin client tool backup. , take backup of repository/server/deployment/synapse-config folder too

wso2 wso2esb synapse

Is there a Java.Swing equivalent to AS3's ADDED_TO_STAGE event? -



Is there a Java.Swing equivalent to AS3's ADDED_TO_STAGE event? -

in as3, there event listens when object added stage. useful cases where, example, variables not set until added on-screen. waiting until object has been added, can assure of variables set.

is there equivalent in swing? example, have function relies on objects getwidth function. obviously, if seek phone call before object added on screen, function have problems because width zero. function called component added , has width. in as3, like:

mycomponent.addeventlistener(event.added_to_stage, myfunction).

how in java?

depending on setup, componentlistener might enough. there a section in java tutorials componentlisteners.

another way of initializing stuff displayed overriding paintcomponent method , performing setup on first invocation.

java swing

c# - How do I deserialize a List as another List instead of a readonly T[]? -



c# - How do I deserialize a List<T> as another List<T> instead of a readonly T[]? -

we have code makes re-create of list<t> of objects. problem code returning readonly array of t[] instead of list<t>.

why that, , how can prepare deserialization code?

public interface itestobject { } [knowntype(typeof(itestobject))] [datacontract(name = "testobject")] public class testobject : itestobject { [datamember] public int id { get; set; } [datamember] public string value { get; set; } } public class testapp { public void run() { ilist<itestobject> = new list<itestobject>(); a.add(new testobject() { id = 1, value = "a" }); a.add(new testobject() { id = 2, value = "b" }); ilist<itestobject> b = copy(a); // list<t> while b readonly t[] debug.writeline(a.gettype().fullname); debug.writeline(b.gettype().fullname); } public ilist<itestobject> copy(ilist<itestobject> list) { datacontractserializer serializer = new datacontractserializer(typeof(ilist<itestobject>), new type[] { typeof(testobject) }); using (stream stream = new memorystream()) { serializer.writeobject(stream, list); stream.seek(0, seekorigin.begin); ilist<itestobject> clone = (ilist<itestobject>)serializer.readobject(stream); stream.close(); homecoming clone; } } }

i'm guessing it's fact list<t> isn't listed knowntype

try using datacontractserializer(typeof(list<itestobject>) knows concrete type

c# datacontractserializer

php - htaccess redirect and not change the url -



php - htaccess redirect and not change the url -

how alter page url without redirecting?

file structure:

/www /www/app /www/app/index.html /www/app/.htaccess

.htaccess

options +followsymlinks -multiviews rewriteengine on rewritebase / rewriterule ^(demo1|demo2)\/?$ app [l]

for example

domain.dev/app (index.html page) domain.dev/app/demo1 (here want open /index.html page without changing url it) domain.dev/app/demo2 (same demo1 route)

php apache .htaccess redirect yeoman