I want to upload files outisde web server like in d d drive into servlets, I but I'm not able to upload them.
What I have to do to make functionality like this enable in Tomcat 6.0?
Hi! Do you have any idea how to access files in WEB-INF/index folder from my application? I'm using OpenCMS for my application and I want to open a Lucene search index (with the help of Lucene IndexReader class) located at WEB-INF/index folder. Lucene jar is stored in WEB-INF/lib folder.
I am a student working on a homework project. I spent DAYS trying to get the following code to display an image on my new windows 7 laptop. I compiled it and ran it on my old xp pc and it worked! I really want to use my laptop. Any suggestions on how to get it to display the image?
import java.awt.*;
import java.applet.*;
import java.awt.event.*;
import java.awt.image.*;
public class MoveIt extends Applet implements ActionListener
{
// set variables and componets
private Image cup;
Panel keypad = new Panel();
public int top = 15;
public int left = 15;
private Button keysArray[];
public void init()
{
cup = getImage(getDocumentBase(), "cup.gif");
Canvas myCanvas = new Canvas();
keysArray = new Button[5];
setLayout(new BorderLayout(5,5));
setBackground(Color.blue);
// set up keypad layout
keypad.setLayout(new BorderLayout(0,0));
keysArray[0] = new Button("Up");
keysArray[1] = new Button("Left");
keysArray[2] = new Button("Center");
keysArray[3] = new Button("Right");
keysArray[4] = new Button("Down");
// add buttons to the keypad panel
keypad.add(keysArray[0], BorderLayout.NORTH);
keysArray[0].addActionListener(this);
keypad.add(keysArray[1], BorderLayout.EAST);
keysArray[1].addActionListener(this);
keypad.add(keysArray[2], BorderLayout.CENTER);
keysArray[2].addActionListener(this);
keypad.add(keysArray[3], BorderLayout.WEST);
keysArray[3].addActionListener(this);
keypad.add(keysArray[4], BorderLayout.SOUTH);
keysArray[4].addActionListener(this);
// add canvas and keypad to the BorderLayout
add(myCanvas, BorderLayout.NORTH);
add(keypad, BorderLayout.SOUTH);
}
public void paint(Graphics g)
{
g.drawImage( cup, left, top, this );
}
public void actionPerformed(ActionEvent e)
{
// test for menu item clicks
String arg = e.getActionCommand();
if (arg == "Up")
top -=15;
else
if (arg == "Down")
top +=15;
else
if (arg == "Left")
left -=15;
else
if (arg == "Right")
left +=15;
else
{
top = 60;
left =125;
}
repaint();
}
}
I have an Excel sheet with two column, one is a number , and second column have a picture.
i want to read these data from c# with oledb connection, i can read number easily , but pictures is not contained in second column , so in c# i just get first column.
now, how can i read the images ? i want to extract the numbers and related images from this excel sheet.
Thanks.
I'm working on as small game for class and was wondering what is a easy way to handel level configuration files. Like object placements , names, etc.
I'm new to C# but fluent in Java, Ruby.
so XML? YML? text, serialized objects?
I am trying to get silverlight smooth streaming going on a site I am bilding and it works fine with the big buck bunny sample code which looks like this:
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%" id="Object2">
<param name="source" value="SmoothStreamingBlackGlass.xap"/>
<param name="onerror" value="onSilverlightError" />
<param name="initparams"value='autoplay=False,muted=False,stretchmode=0,displaytimecode=False, playlist=<playList><playListItems><playListItem title="Big%20Buck%20Bunny" description="" mediaSource="Big%20Buck%20Bunny.ism/Manifest" adaptiveStreaming="True" thumbSource="Big%20Buck%20Bunny_Thumb.jpg" frameRate="24.0000384000614" ></playListItem></playListItems></playList>' />
<a href="http://go2.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;"><img src="http://go2.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none" /></a>
</object>
<iframe style="visibility:hidden;height:0;width:0;border:0px"></iframe>
but if i change the code like this i only get a blank area when the page is rendered instead of the movie clip.
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%" id="Object2">
<param name="source" value="SmoothStreamingBlackGlass.xap"/>
<param name="onerror" value="onSilverlightError" />
<param name="initparams"value='autoplay=False,muted=False,stretchmode=0,displaytimecode=False, playlist=<playList><playListItems><playListItem title="Robotica_1080" description="" mediaSource="Robotica_1080.ism/Manifest" adaptiveStreaming="True" thumbSource="Robotica_1080_Thumb.jpg" frameRate="24.0000384000614" ></playListItem></playListItems></playList>' />
<a href="http://go2.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;"><img src="http://go2.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none" /></a>
</object>
<iframe style="visibility:hidden;height:0;width:0;border:0px"></iframe>
Any ideas? I am using Encoder 3 to do the encoding set on microsoft smooth streaming for 720p with all the default settings.
Hi all,
I'm new to mysql. My requirement is to import a sql dump into mysql using shell script for linux and this script should be called by java program for the restoration to take place automatically.
Please advice me on this.
Regards,
Chandu.
how to creat exe of c program in linux,i think we need to use makefile,but i don't know whether we have to creat makefile and how to creat it,what is its extention ,how to run it.
I pushed a new version of my website, but now the CSS and static images are not deploying properly.
Here is the messed up page: http://www.gaiagps.com
Appengine shows the latest version as being correct though: http://1.latest.gaiagps.appspot.com/
Any help?
Hi,
How do I make syncdb execute SQL queries (for table creation) defined by me, rather then generating tables automatically.
I'm looking for this solution as some particular models in my app represent SQL-table-views for a legacy-database table.
So, I've created their SQL-views in my django-DB like this:
CREATE VIEW legacy_series AS SELECT * FROM legacy.series;
I have a reverse engineered model that represents the above view/legacytable. But whenever I run syncdb, I have to create all the views first by running sql scripts, otherwise syncdb simply creates tables for them (if a view is not found).
How do I make syncdb run the above mentioned SQL?
I've looked in the page for instrutions on this, tried .out or .output extensions and filenames, but nothing works.. How I am supporte to upload the ouput?
I was attempting to install an exe that requires a serial number before the install, which the vendor has not provided to us yet.
This got my wheels turning about whether there is any information that can be gained from viewing an exe using a hex editor/VI/etc?
Using VI to view an exe, I can see some sections of plain text, but it is difficult to determine what it refers to without any context around it.
Is it possible to determine any information by reading an exe?
Thanks
Hi StackOverflow, I've spent the past 3 hours trawling the web for answers to no avail, so I hope you can help me. I'm writing an application which automates Excel. The application has an option to "show/hide the excel sheet" so you can look at it, make any final changes and so forth.
Closing the application will naturally close the instance of Excel, however, there is a small chance that someone may exit out of Excel directly, without thinking. This breaks my application and I can't seem to find anyway of "checking if the same workbook is still open, and if not, re-opening it", before saving it
I've tried all sorts of things: checking if the Excel Application is null (when it's !=null it will save correctly, but when it "is" null (or at least, something other than !=null it won't even hit the breakpoint so I'm completely lost :(
Help please?
I need a script to automatically delete the user profile left on ubuntu 9.04, anyone please send me this mail: [email protected] thank you, please indicate how I work not fluent in shellscript.
I have the code
NSArray *paths = [[NSArray alloc]
initWithArray:NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES)];
NSString *docsDirectory = [[NSString alloc] initWithString:[paths objectAtIndex:0]];
NSLog(@"This app's documents directory: %@",docsDirectory);
NSString *docsDirectoryWithPlist = [[NSString alloc] initWithFormat:@"%@/Stuff.plist", docsDirectory];
BOOL fileExists = [[NSFileManager defaultManager] fileExistsAtPath:docsDirectoryWithPlist isDirectory:NO];
if (fileExists)
{
chdir([docsDirectory UTF8String]);
NSMutableDictionary *readDict = [[NSMutableDictionary alloc] initWithContentsOfFile:@"Stuff.plist"];
in an application's applicationDidFinishLaunching method and whenever it gets to the last line it crashes, throwing EXC_BAD_ACCESS along the way.
Thanks in advance!
Hi
I am trying to do unit testing of database access layer of my project.
But thing is i need to test this layer using apache derby database and during production testing i need to do it on oracle.
So can i use same xml representation of database to do so using dbunit ?
I am in the requirements phase of building a JEE application that will most likely run on a GlassFish/JBoss backend (doesn't matter for now). I know I shouldn't be thinking about architecture at requirements time, but one can't help but start to imagine how the components would all snap together :-)
Here are some hard, non-flexible requirements on the client-side:
(1) The client application will be a Swing box
(2) The client is free to download, but will use a subscription model (thus requiring a login mechanism with server-side authentication/authorization, etc.)
(3) Yes, Java is the best platform solution for the problem at hand for reasons outside the scope of this post
(4) The client-side .class files need safeguarding against decompiling
That last (4th) requirement is the basis of this post.
I'm not really worried about someone actually decompiling and getting at my source code: in the end, it's just Swing controls driven by some lightweight business logic.
I'm worried about a scenario where someone decompiles my code, modifies it to exploit/attack the server, re-compiles, and fires it up.
I've envisioned all sorts of nasty solutions, but didn't know if this was a common problem with a common solution for JEE developers. Any thoughts?
Not interested in "code obfuscation" techniques!
Thanks for any input!
i have an a href tag.
i want that embed swf (object) tag to a href.
i dont want add event in swf, beacuse a href link is different and create dynamic.
underestand it?
what can i do?
Hi
I'm trying to do a route in Rhapsody that transform CSV to ASTM. The problem is when i'm going to test the mapper, appears this error:
unable to parse message. The character encoding may not have been recognised correctly.
I don't know what to do. I hope you can help me.
Thanks for all
Even though Interface Builder is aware of a MyClass, I get an error when starting the application.
This happens when MyClass is part of a library, and does not happen if I compile the class directly in the application target.