Dushyant Shukla

Greenhorn
+ Follow
since Jan 13, 2013
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Dushyant Shukla

Got it working.Although I am now able to upload the images into a directory on my file system but the image is not displayed on the jsp page,instead a default icon of broken image in displayed.Here is my complete code:

file_upload.jsp


ajax_file.jsp


FileName.java




DisplayImage.java


7 years ago
I am having the same issue.I applied the fix,but it doesn't works.I am using eclipse.Following is the Exception Report I am getting.....


Please help.
7 years ago
I am a beginner at developing dynamic websites in java. Currently I am using eclipse Kepler with tomcat.The problem is when I launch my jsp pages from within the eclipse,the pages are not rendered in the way they are supposed to, i.e they partially neglect the css and other scripts associated with them. Although I design my webpages in notepad++ and after testing them in normal browser I import them into my eclipse project. This is causing me too much trouble.Is there any way out of it? Please help!
I had started a web project in java with eclipse.....The problem is I am unable to get a css file linked to the jsp page I have designed....
The following is my directory structure:

theFacebook
-WebContent
-----css
--------style.css
-----jsp
--------index.jsp
-----images
--------facebooklogo.jpg
--------fevicon.ico
-----META-INF
-----WEB-INF

and the link tags I have used in my jsp file are as follows:



When I deploy the jsp file in Tomcat it shows the HTML page as it is with no effect of the CSS whatsoever with none of the three tags working.
Please help.


7 years ago
JSP
Interfaces are 100 % abstract classes.They cannot be instantiated.Their sole purpose is to be implemented.So why does the following code works just fine while it is attempting to instantiate an interface.


Please correct me if I am wrong!
7 years ago
This is a problem regarding the behaviour of class members with private access level modifier:

Consider the code below:



This code compiles just fine with the expected output.

Inheritance provides the subclass access to superclass's members as if they were defined in the subclass itself,i.e. now the subclass owns the inherited class members exclusively.But as we know that those class members defined with 'private' access level modifier are not inherited.

Following what is stated above(I am assuming that its not wrong), in the code, class B must get his own copy of data member int b,GetValues() and SetValues() except for int a,which is correct.Now if class B does not own int a (as it fails 'b1.a' test), how come the SetValues() and GetValues() functions are able to access int a for a class B's object b1. Isn't it illogical as per the rules of java language?
8 years ago
Thanks Steve sir.
The problem is resolved.
8 years ago
I have file structre like this :
c:\javapractice\one\SomeFile.java
and
c:\javapractice\another\SomeOtherFile.java



Now when i try to compile SomeFile.java using the command
c:\javapractice\one>javac SomeFile.java
it compiles fine.
But when i try to compile SomeOtherFile.java using the command
c:\javapractice\another>javac SomeOtherFile.java
it gives the error
package one doesn't exist
import one.SomeFile;

After some study i got to know that this can be the problem associated with classpath....,but still i am not able to fix it.
Please suggest some remedy.
8 years ago
Thanks a lot Matthew sir. The code is working fine now.
8 years ago
thanks Phil sir and Matthew sir for your support and Matthew sir I will keep your suggestion in my mind....
The code is working fine after the changes besides the line 72 (pa=a.nextBoolean()).whenever i enter a yes/no or 1/0 it says Exception in thread "main" java.util.InputMismatchException....
what can be the possible errors...
thanks once again!
8 years ago
the code doesn't compiles as expected.Keeps giving the errors like
display() in volksWagon cannot implement display() in fourWheeler
attempting to assign weaker access privileges;was public.............................four other similar errors!



please help rectifying the code.....
8 years ago