Win a copy of Securing DevOps this week in the Security forum!

Brij Garg

Ranch Hand
+ Follow
since Apr 29, 2008
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 Brij Garg

Thanks Vishal, But I am not using JQuery.
Javascript and html only

Regards
Hi,

Functionality in brief: When user clicks on the button on the screen, some processing is taking place (java code which is uploading images/documents to the database). Sometime this processing is taking sometime. I need to show some processing/busy icon on the screen till this processing is goingon.

I have the busy/processing icon (a kind of revolving circle) which is very similar to the busy icon of Windows 7.

I have a div section on that screen for the handling of this icon


Now when user clicks on the submit button, I am displaying this image by using code given below


Now Issue is :- busy/processing icon is visible to the screen when user clicks on the submit button, but it is not revolving.

Please note: image is a revolving circle. If I display it on a webpage, it is coming as a revolving circle. Only when user takes some action (by clicking button), it is not appearing as a revolving circle
Hi,

If I remove servlet-api.jar from the lib directory of my appliation, then my controller class is not getting compiled.

Error which I am getting is

I think, this implies that container is not providing this jar file.
Can you please put some light to it.

Regards,
Brij

Stefan Evans wrote:What else do you have in your WEB-INF/lib directory?

You wouldn't have a jsp-api or servlet-api there would you?
Any libraries that declare the base servlet classes included in the WEB-INF directory can seriously mess with your running application.
Those classes are always meant to be provided by the server.
This sort of error occurs when someone puts a newer/upgraded API in their WEB-INF/lib that doesn't match with the rest of the server.


Thanks for replying Evans.

I am having servlet-api.jar and jsp-api-2.1.jar files in the lib directory of my application.

Regards,
Brij

Bear Bibeault wrote:This has nothing to do with the JSTL. The EL is built right into JSP.

You are using a JSP 2.1 container?



Yes, I now have jsp-api-2.1.jar file in the lib directory of my application. But still I am facing the same problem.

Thanks for your reply. Please let me know if I am missing something.

Regards,
Brij
I am working on spring 3 application.

JSP code in one of my jsp is given below

code in include.jsp is given below


When above given code is getting invoked, I am getting below given error


I have jstl-1.2.jar in the lib directory of my appliction.

need suggestion to resolve this error
Thanks
some kind of input will be really appreciated.
6 years ago
Hi,

I have two applications on my local server (Tomcat). I wanted to implement SSO between these applications. I have created a separate login module (by using JAAS api) for both these applications. I am able to authenticate users to each of these applications individually.

But I do not know how to bring SSO between these two application. I am invoking one application from the other application.

I read on http://www.devx.com/Java/Article/7865/0/page/2 regarding SSO using JAAS. If I write the login module of both the application in the same JAAS configuration file then where the login module code for the applications should present. Currently login module code is at the application level.

sample code for the JAAS config file is given below


In the above code
SimpleLoginModuleapp1 is the login module for the first application and SimpleLoginModuleapp2 is the login module for the second application.

I hope I have put my question correctly.

Thanks
6 years ago
Hi,
I hope this is the right community to post my problem related to Java application connectivity from another java application running on netweaver AS.

This problem is regarding SSO (Single SignON).
My java appliation (uploadphoto) is getting invoked from another java application. Both these applications as hosted on same server.

when user who has already logged on to first java application, tries to upload his profile photo, he clicks on some button (upload photo) and my application gets invoked.
Now since user has already logged in to first application, I do not want user to login again when he is taken to uploadphoto application.

uploadphoto application is then making connection to SAP server and storing the photo (uploaded by user) to SAP server.

There is already one cookie MYSAPSSO2 available on netweaver when my application is getting invoked. This cookie is having all the credentials to login to SAP server.
I am trying to read this cookie when uploadphoto is getting invoked.
code to read the cookie is given below


this cookie is available, but still my application uploadphoto is not able to read this cookie.
I need to red this cookie to make the connection with SAP. this cookie is having details about user id and password in encrypted format which is required to make connection with the SAP server.

I hope I have correctly explained my problem
Any kind of input will be highly appreciated.

Thanks in advance


Andrew flexdeveloper wrote:See this site java2s.com/Tutorial/Java/0280__SWT/SetControlSize.htm and roseindia.net/java/example/java/awt/ImageSize.shtml

I am not sure it will solve your problem or not , but it will give you some hint for the solving your problem



Thanks. I will go through these links and will let you know if find something usefull.

6 years ago

Carey Brown wrote:a) I don't see where you are printing the AFTER size, and b) if you are keeping the original image dimensions, why would you expect the size to be any different?



Hi, This is not a complete code. This is just a part of my complete program.
By size I mean the size of image in bytes. We can compress or downscale the image even by keeping the dimensions same.

Thanks anyways :-)
6 years ago
jsp code is given below


In the above code image tag is taking src="GetImage"
GetImage is a servlet which is returning an image after compressing the image in out stream. I am setting one variable at application level to read that variable in the jsp.
Code snipet is given

When I run this code first time, value of message in jsp is "null". Why It is so? Since I am setting the message at application level, I think even for this first time, I should get the message in my jsp.

Can somebody suggest some reason for this behavour?

Thanks
6 years ago
JSP
Thanks Andrey :-)

I did not get the chance to look at the method suggested by you. I am very new to Graphics2D. I tried to use drawImage method of Graphics2D.

My requirement is I need to scaledown (or compress/reduce the size(KB) of the image) the image to some size (say 50000 bytes for my application) keeping the dimensions same.

Code I have written till now is


the way I am calling the above method is

(I have hard coded the dimensions currently because my original image is 800*600)

Now I finding on this code is:-
Image is getting downscaled to some size (dimensions same). I tried with few images. Getting different size for different images.
For example 1) My original image was around 38000 bytes and the new image after invoking the above code is around 6000 bytes.
2) My original image was around 64000 bytes and the new image after invoking the above code is around 53000 bytes.

My question is - Can not I control the size of image (keeping the dimesnions same). I want to dowmscale the image (keeping the dimensions same) to 50000 bytes if the size of the original image is more than 50000 bytes.

Please suggest some solution

6 years ago
Greetings!!

Can we downscale the image in Java without changing the dimensions of the image?

By using BufferedImage, Graphics2D, RenderingHints I can downsize the image with the dimensions I am giving. But if I keep the dimensions same, whatever image I am getting after calling drawimage() [dimensions are same], Is that image different from the original image?

I hope I have rightly put my question

Regards
6 years ago