Daily Archives

Articles indexed Saturday April 10 2010

Page 7/89 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • java httpclient post

    - by Eric V
    Hi, I have a question about how to allow my jsp page to issue a post command to the server, and still have the browser fallow the re direction of the posted page. Here are the code snipets: code that does the post (this is inside a jsp file): HttpClient client = new DefaultHttpClient(); client.getParams().setParameter("SUBMITTED", "submitted"); client.getParams().setParameter("xxxxxxxx", purchaser.getemail()); client.getParams().setParameter("xxxxxxxx", purchaser.getsuject()); HttpPost method = new HttpPost(url+"process.jsp"); client.execute(method); here is a snipet of process.jsp if (person.getStatus() == person.ACTIVE) response.sendRedirect("Account.jsp); else if (person.getStatus() == person.ERROR) response.sendRedirect("Error.jsp); I would like the browser to the fallow/goto the redirect from the process.jsp. Does anyone know a tutorial that would help me or Am I going about this the wrong way. Thanks, eric

    Read the article

  • XAMPP is caching .html files running as PHP

    - by Lee
    I have XAMPP (latest version) installed on my Mac OS 10.6.3 I've added the following to .htaccess because I want .html to be interpreted as PHP. AddType application/x-httpd-php .php .html The problem is that the default XAMPP config seems to be caching .html files as static... so even though the PHP statements inside are being called (for example, 'echo time()' in index.html displays the dynamic output)... the actual file is being cached. When I make changes to a .html file, I've having to restart Apache for it to load the newest changes. Looking at httpd.conf, it looks like it's loading the following cache mods.. LoadModule file_cache_module modules/mod_file_cache.so LoadModule cache_module modules/mod_cache.so LoadModule disk_cache_module modules/mod_disk_cache.so LoadModule mem_cache_module modules/mod_mem_cache.so Any idea how to implement a system whereby it checks the timestamp of the file, before loading it from cache? Thanks!

    Read the article

  • FBA site owner encounter access deny in sharepoint 2007

    - by intangible02
    I created a sharepoint 2007 publishing site first using windows authentication, then extended it to another site using FBA. I created a FBA user and set it as site collection admin as well as top site owner. I also make application pool which the FBA site is running in to run with a user account which is within administrator group. But I encounter access deny error when browsing certain links using this site owner account. Is there other settings I need to configure? I found in the web.config, the impersonation is set to true. How does this affect the access rights?

    Read the article

  • Installing a very old game on Windows 7 64-bit

    - by Josh
    I'm trying to install Theme Hospital (awesome game, eh?) on my Windows 7 machine and I'm getting this error: I've tried setting it to run in XP compatability mode but didn't hold out much hope, and as expected I still got this error. Is there a way I can force this application to run in 32-bit or something? Thank you.

    Read the article

  • How CPU finds ISR and distinguishes between devices

    - by ripunjay-tripathi-gmail-com
    I should first share all what I know - and that is complete chaos. There are several different questions on the topic, so please don't get irritated :). 1) To find an ISR, CPU is provided with a interrupt number. In x86 machines (286/386 and above) there is a IVT with ISRs in it; each entry of 4 bytes in size. So we need to multiply interrupt number by 4 to find the ISR. So first bunch of questions is - I am completely confused in mechanism of CPU receiving the interrupt. To raise an interrupt, firstly device shall probe for IRQ - then what ? The interrupt number travels "on IRQ" towards CPU? I also read something like device putting ISR address on data bus ; whats that then ? What is the concept of devices overriding the ISR. Can somebody tell me few example devices where CPU polls for interrupts? And where does it finds ISR for them ? 2) If two devices share an IRQ (which is very much possible), how does CPU differs amongst them ? What if both devices raise an interrupt of same priority simultaneously. I got to know there will be masking of same type and low priority interrupts - but how this communication happens between CPU and device controller? I studied the role of PIC and APIC for this problem, but could not understand. Thanks for reading. Thank you very much for answering.

    Read the article

  • Castle Windsor with ASP.NET MVC 2 Areas

    - by Doug Shontz
    Been lurking for a few months and decided to jump in with a question. I am very new to Windsor and IoC in general. I can get Windsor to work with my MVC2 project with no problem. The project I am working on is a "portal" of multiple applications under one MVC2 project using the new Areas concept. In this scenario, each Area will actually be a separate application inside the "portal". We are doing this to effectively share a LOT of common code, views, authentication, and cross-application functionality. Many of our apps link to one another, so it made sense after discussing it to combine them into one project. What I am wondering how to do is actually allow different Areas to inject different concrete classes? In my limited understanding, the Application_Start is governing building the container and assigning it as the controller factory. I don't necessarily want to do all the injection at the application level. We have a config system where we have a config.xml at the root of every Area and those settings override any root settings. I would like to continue that trend by having the injections for each Area be read by the Area's config.xml (an inheritance similar to Webforms web.config where the config in a lower folder overrides settings in a parent folder). Example: I would have an ILogHandler which would need a different concrete implementation depending on which Area of the application I am in. So I would need to inject something different depending on where I am at in the application. I can easily do this using factories since each area could have it's own set of factories, but I am attempting to take this opportunity to learn about IoC and what the benefits/drawbacks are. Any help would be appreciated.

    Read the article

  • JavaScript question -- onMouseOver event

    - by alex_wang
    Why doesn't this piece of code swap images on mouse-over as intended?: <a href="#" onMouseOver=" if (document.the_image.src == '01.jpg') { document.the_image.src = '02.jpg'; } else if (document.the_image.src == '02.jpg') { document.the_image.src = '03.jpg'; } else { document.the_image.src = '01.jpg'; } "> Some image</a><br>

    Read the article

  • How can ported code be detected?

    - by NiallJG
    If you port code over from one language to another, how can this be detected? Say you were porting code from c++ to Java, how could you tell? What would be the difference between a program designed and implemented in Java, and a near identical program ported over to Java?

    Read the article

  • Problems removing a " from a string

    - by Graeme
    Hi, I have a string that ends with a " (quotation mark) that I want to get rid of. However, because XCode usually requires you to enter the text you wish to remove using stringByReplacingOccurrencesOfString in @"texttoremove" format, you can't use the quotation marks in the space as it thinks you are closing the text. Any ideas on how I can do it? Thanks.

    Read the article

  • Network communication across two private network

    - by Sethu
    Hi All, I am trying to implement a peer to peer communication .. I use sockets for communication between them. I want to know if there are any ways i can use the same sort of communication when the two peers are behind two private Networks (They dont know each others public ip address.) I can think of a shared buffer in a well known location as a means of communication. But is there some other way to get this done?

    Read the article

  • Intercepting method with Spring AOP using only annotations

    - by fish
    In my Spring context file I have something like this: <bean id="userCheck" class="a.b.c.UserExistsCheck"/> <aop:config> <aop:aspect ref="userCheck"> <aop:pointcut id="checkUser" expression="execution(* a.b.c.d.*.*(..)) &amp;&amp; args(a.b.c.d.RequestObject)"/> <aop:around pointcut-ref="checkUser" method="checkUser"/> </aop:aspect> </aop:config> a.b.c.UserExistsCheck looks like this: @Aspect public class UserExistsCheck { @Autowired private UserInformation userInformation; public Object checkUser(ProceedingJoinPoint pjp) throws Throwable { int userId = ... //get it from the RequestObject passed as a parameter if (userExists(userId)) { return pjp.proceed(); } else { return new ResponseObject("Invalid user); } } And the class that is being intercepted with this stuff looks like this: public class Klazz { public ResponseObject doSomething(RequestObject request) {...} } This works. UserExistCheck is executed as desired before the call is passed to Klazz. The problem is that this is the only way I got it working. To get this working by using annotations instead of the context file seems to be just too much for my small brain. So... how exactly should I annotate the methods in UserExistsCheck and Klazz? And do I still need something else too? Another class? Still something in the context file?

    Read the article

  • Eclipse does not recognize Classes of the jar

    - by Tom Brito
    I've included a new jar in my jre/lib/ext folder, and updated the Eclipse jre so the Eclipse see the new jar in the default JRE System Library. The trouble is that even showing the jar in the JRE System Library, the Eclipse does not see the Classes. And the worst: Eclipse see tha packages! It don't see only the classes! Here is a printscreen showing the jar withing the JRE System Library, and the Eclipse preview showing only the packages: http://picasaweb.google.com/brito.pro/Fail#5458323206632279634 Any idea how to solve this? :?

    Read the article

  • How to best show progress info when using ADO.NET?

    - by Yadyn
    I want to show the user detailed progress information when performing potentially lengthy database operations. Specifically, when inserting/updating data that may be on the order of hundreds of KB or MB. Currently, I'm using in-memory DataTables and DataRows which are then synced with the database via TableAdapter.Update calls. This works fine and dandy, but the single call leaves little opportunity to glean any kind of progress info to show to the user. I have no idea how much data is passing through the network to the remote DB or its progress. Basically, all I know is when Update returns and it is assumed complete (barring any errors or exceptions). But this means all I can show is 0% and then a pause and then 100%. I can count the number of rows, even going so far to cound how many are actually Modified or Added, and I could even maybe calculate per DataRow its estimated size based on the datatype of each column, using sizeof for value types like int and checking length for things like strings or byte arrays. With that, I could probably determine, before updating, an estimated total transfer size, but I'm still stuck without any progress info once Update is called on the TableAdapter. Am I stuck just using an indeterminate progress bar or mouse waiting cursor? Would I need to radically change our data access layer to be able to hook into this kind of information? Even if I can't get it down to the precise KB transferred (like a web browser file download progress bar), could I at least know when each DataRow/DataTable finishes or something? How do you best show this kind of progress info using ADO.NET?

    Read the article

  • Jing + swfobject 2.2 = big video in small div

    - by consultutah
    I am trying to use swfobject 2.2 to display an swf, but the swf won't scale to fit the div that I'm putting it in. You can see what I've got here. When it first loads, it is the right size, then it expands larger for some reason. If I right-click on the movie and select "Show All", it then fits perfectly. Here is the code to generate the sfobject: var flashvars = {}; var params = {} params.scale = "showAll"; params.allowscriptaccess = "always"; var attributes = {}; swfobject.embedSWF("/content/tour.swf", "flashContent", "900", "700", "9.0.0", "expressInstall.swf", flashvars, params, attributes); Any help/suggestions would be greatly appreciated!

    Read the article

  • Why is my Asus P5PL2-E using 640MB of RAM (out of 4GB) ? [closed]

    - by Tom
    Possible Duplicate: Windows XP and RAM 3.5GB+ I've recently installed 4GB of RAM on my server, which is running Windows XP SP2 32-bit and My Computer showed that only 3.37GB were installed. After digging Google for a bit, I couldn't find anything helpful, but I do remember reading a post in a forum regarding the motherboard using 640MB of RAM. Digging in my own BIOS, I've also found that my motherboard has also reserved that amount for its self. Why does my motherboard reserve this memory and how can I tune it down to say 128MB?

    Read the article

  • How does a company proxy server act in reporting internet usage of employees?

    - by Mehper C. Palavuzlar
    Our company recently set up a proxy server. As far as I understand, they want to apply some access policies to undesired sites, and log/audit the usage of the internet and generate employee internet usage reports. My question is related to the latter part. Before they were using a proxy server, they were also generating internet usage reports. At that point, what kind of contribution will the new proxy server make? Does it have further advantages on reporting internet usage?

    Read the article

  • Enabling new admin action(button sales_order/view) in ACL

    - by latvian
    Hi, We created new action similar to 'hold', 'ship' and others in the 'sales_order/view' admin section that can be triggered by clicking at the button. Afterward, we added our new action to the ACL with the following code in config.xml: <acl> <resources> <admin> <children> <sales> <children> <order> <children> <actions translate="title"> <title>Actions</title> <children> <shipNew translate="title"><title>Ship Ups</title></shipNew> </children> </actions> </children> <sort_order>10</sort_order> </order> </children> </sales> </children> </admin> </resources> </acl> ACL functionality works, however, in the 'Resources Tree'(System/Permissions/Roles/Role Resources) our new action does never show up as selected(checked) even thou it is allowed for particular Role. I can see that from table 'admin_rule' with resource id for our new action that it is allowed, so it needs to be selected, but it is not. When trying to solve this issue i looked into the template(permissions/rolesedit.phtml) and I found that the 'resource tree' is draw with Javascript...thats where i got stock due to my limited knowledge in Javascript. Why the resource tree does not display our new ACL entry correctly, that is the check box is never checked? Thank You for helping margots

    Read the article

  • Can I use this technique to provide free email service for my users?

    - by Naughty.Coder
    I'll let users register their [email protected] ,,, they enter their members area where they can : 1- send emails ( easy to do) 2- receive emails .. for receiving emails , I'll use a catch all email account , read the email and figure to whom it's sent (username), and then I save it on the database with userid of the username who has registerd ! Do I miss something here ... is it really this simple (if I don't have an email server) ?

    Read the article

  • trying to parse an xml from a url and it wont work.

    - by ida
    this page shown an xml file and im trying to use simplexml to parse the data out and print it. what am i missing? cause all it does is show a blank page when i run it. <?php $url = "http://api.scribd.com/api?method=docs.getList&api_key=2apz5npsqin3cjlbj0s6m"; $xml = new SimpleXMLElement($url,NULL,true); foreach($xml -> result as $value) { echo $value->doc_id."<br/>"; echo $value->access_key."<br/>"; echo $value->secret_password."<br/>"; echo $value->title."<br/>"; } ?>

    Read the article

  • iPad title bars. Navbars or toolbars?

    - by Squeegy
    I see a bunch of apps for iPad with really cool title bars. These seem to be a combination of a navigation bar and a toolbar. They usually have a back button and a title as well as men other buttons. And a navbar only supports a left item, a right item and and title view. And the toolbar does not really support back buttons or titles. So how do I implement these rich navbars with many buttons on my UINavigationController driven application?

    Read the article

  • How do I convert Data::Dumper output back into a Perl data structure?

    - by newbee_me
    Hi all! I was wondering if you could shed some lights regarding the code I've been doing for a couple of days. I've been trying to convert a Perl-parsed hash back to XML using the XMLout() and XMLin() method and it has been quite successful with this format. #!/usr/bin/perl -w use strict; # use module use IO::File; use XML::Simple; use XML::Dumper; use Data::Dumper; my $dump = new XML::Dumper; my ( $data, $VAR1 ); Topology:$VAR1 = { 'device' => { 'FOC1047Z2SZ' => { 'ChassisID' => '2009-09', 'Error' => undef, 'Group' => { 'ID' => 'A1', 'Type' => 'Base' }, 'Model' => 'CATALYST', 'Name' => 'CISCO-SW1', 'Neighbor' => {}, 'ProbedIP' => 'TEST', 'isDerived' => 0 } }, 'issues' => [ 'TEST' ] }; # create object my $xml = new XML::Simple (NoAttr=>1, RootName=>'data', SuppressEmpty => 'true'); # convert Perl array ref into XML document $data = $xml->XMLout($VAR1); #reads an XML file my $X_out = $xml->XMLin($data); # access XML data print Dumper($data); print "STATUS: $X_out->{issues}\n"; print "CHASSIS ID: $X_out->{device}{ChassisID}\n"; print "GROUP ID: $X_out->{device}{Group}{ID}\n"; print "DEVICE NAME: $X_out->{device}{Name}\n"; print "DEVICE NAME: $X_out->{device}{name}\n"; print "ERROR: $X_out->{device}{error}\n"; I can access all the element in the XML with no problem. But when I try to create a file that will house the parsed hash, problem arises because I can't seem to access all the XML elements. I guess, I wasn't able to unparse the file with the following code. #!/usr/bin/perl -w use strict; #!/usr/bin/perl # use module use IO::File; use XML::Simple; use XML::Dumper; use Data::Dumper; my $dump = new XML::Dumper; my ( $data, $VAR1, $line_Holder ); #this is the file that contains the parsed hash my $saveOut = "C:/parsed_hash.txt"; my $result_Holder = IO::File->new($saveOut, 'r'); while ($line_Holder = $result_Holder->getline){ print $line_Holder; } # create object my $xml = new XML::Simple (NoAttr=>1, RootName=>'data', SuppressEmpty => 'true'); # convert Perl array ref into XML document $data = $xml->XMLout($line_Holder); #reads an XML file my $X_out = $xml->XMLin($data); # access XML data print Dumper($data); print "STATUS: $X_out->{issues}\n"; print "CHASSIS ID: $X_out->{device}{ChassisID}\n"; print "GROUP ID: $X_out->{device}{Group}{ID}\n"; print "DEVICE NAME: $X_out->{device}{Name}\n"; print "DEVICE NAME: $X_out->{device}{name}\n"; print "ERROR: $X_out->{device}{error}\n"; Do you have any idea how I could access the $VAR1 inside the text file? Regards, newbee_me

    Read the article

  • enable mod_rewrite in MAMP?

    - by ajsie
    how do i enable mod_rewrite in MAMP. i have created a file .htaccess in the documentroot with following content: RewriteEngine on RewriteCond $1 !^(index\.php|images|robots\.txt) RewriteRule ^(.*)$ /index.php/$1 [L] but it still doesn´t work. i suspect that i have to enable mod_rewrite in MAMP's apache configuration. how do i do that? do i have to download anything? thanks

    Read the article

  • How to debug Ubuntu/Cisco VPN issues

    - by Joe Casadonte
    I'm trying to connect an Ubuntu laptop (9.10) with some kind of Cisco VPN device; I don't know what's on the other end, and I'm not likely to find out exactly what. I know my company allows VPN from Linux clients because they provide one that I cannot get to install (it fails to compile). I've had the most luck with the network-manager-vpnc package, however I can't figure out what's failing. When I try to connect, I get this message from libnotify: The VPN connection 'XXX' failed. which is not very helpful. I've scoured the system logs and all I can find is this: Dec 27 12:57:45 jcasadon-lap NetworkManager: <info> Starting VPN service 'org.freedesktop.NetworkManager.vpnc'... Dec 27 12:57:45 jcasadon-lap NetworkManager: <info> VPN service 'org.freedesktop.NetworkManager.vpnc' started (org.freedesktop.NetworkManager.vpnc), PID 2672 Dec 27 12:57:45 jcasadon-lap NetworkManager: <info> VPN service 'org.freedesktop.NetworkManager.vpnc' just appeared, activating connections Dec 27 12:58:00 jcasadon-lap NetworkManager: <info> VPN plugin state changed: 3 Dec 27 12:58:00 jcasadon-lap NetworkManager: <info> VPN connection 'AmericasEast' (Connect) reply received. Dec 27 12:58:00 jcasadon-lap NetworkManager: SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/tun0, iface: tun0) Dec 27 12:58:00 jcasadon-lap kernel: [ 6144.529002] tun0: Disabled Privacy Extensions Dec 27 12:58:00 jcasadon-lap NetworkManager: SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/tun0, iface: tun0): no ifupdown configuration found. Dec 27 12:58:15 jcasadon-lap NetworkManager: SCPlugin-Ifupdown: devices removed (path: /sys/devices/virtual/net/tun0, iface: tun0) Dec 27 12:58:15 jcasadon-lap NetworkManager: <info> VPN plugin failed: 1 Dec 27 12:58:15 jcasadon-lap NetworkManager: <info> VPN plugin state changed: 6 Dec 27 12:58:15 jcasadon-lap NetworkManager: <info> VPN plugin state change reason: 0 Dec 27 12:58:15 jcasadon-lap NetworkManager: <WARN> connection_state_changed(): Could not process the request because no VPN connection was active. Dec 27 12:58:15 jcasadon-lap NetworkManager: <info> (wlan0): writing resolv.conf to /sbin/resolvconf Dec 27 12:58:15 jcasadon-lap NetworkManager: <info> Policy set 'Northbound Train' (wlan0) as default for routing and DNS. Dec 27 12:58:27 jcasadon-lap NetworkManager: <debug> [1261936707.002971] ensure_killed(): waiting for vpn service pid 2672 to exit Dec 27 12:58:27 jcasadon-lap NetworkManager: <debug> [1261936707.003175] ensure_killed(): vpn service pid 2672 cleaned up I have no idea where to go from here. Tomorrow I'll ask the IT/IS guys if there's anything they can tell me from their end, but I don't know if they'll be able to tell me anything. Any ideas? Thanks!

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >