Ackshat Sharma

Greenhorn
+ Follow
since Sep 03, 2011
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
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Ackshat Sharma

Thanks Wang, I need to study Oasis WSRP first.
Right now I just want to put things in the existing framework and I have not got the solution yet and still searching.
4 years ago

Hi everyone !

I am using liferay bundled with tomcat for managing my spring mvc portlets ,
recently tried to add a filter to intercept all HttpRequests in order to perform some operation on them,
I tried with the basic method of adding a XML tag in the web.xml for the associated Servlet Class as we do in our servlet based web-apps, but that does not works.
I just need to intercept all HttpRequests at very first. Is it possible in portlet development ? .
I have already tried implementing RequestDataValueProcessor class provided by Spring, but the problem is,
any method(e.g processUrl() etc.) overridden to process the HttpServletRequest is invoked for as many times as there are portlets on the page,
i.e there is no single request here instead there are splitted requests for each portlet.

Can Anyone help ?
Thanks a lot in advance.
4 years ago
I recently tried to make a real time update functionality in my Spring mvc 3.0, using Tomcat7 ,
I found a here a good stuff and accordingly i changed my server.xml for the Tomcat, but it burst while starting the server(the server starts abnormally and it does not respond to any deployed applications).
Can someone help me in configuring Tomcat 7 for comet(long polling) functionality.
5 years ago
Hi Craig,

I found '${...}' quite useful in allocating values at runtime, and #{..}(in spring framework).
Searching google for ${..} gives no useful links.
I wanted to know more about these symbols and the technology behind , can you help out ?
Just think of creating a custom %{...} , can you help me out ?
5 years ago
JSP
Thanks Bill, It worked when I used

So it works when we specify context attribute too.
5 years ago
Hello Everyone , I started learning spring framework a month back reading "Spring in Action 3" and Online tutorials, I want to use static resources i.e css and js files.
I am using Eclipse JUNO where if you choose a new project as 'Dynamic Web Project' that's the hierarchy of folders I am talking here.
I have used


the 'resources' folder(placed in parallel to 'WEB-INF' inside 'WebContent' ) containing 'js' , 'css' folder which further contains .js and .css files respectively, these jQuery and Css are used in home.jsp.
I have a mapping as '/app/home' in a controller 'AppController' for a jsp page home.jsp placed in WebContent-->WEB-INF-->view-->jsp-->home.jsp.
another mapping as ' /app/home/userhome' in same controller using same ModelAndMap return type method returning a 'new ModelAndMap("home")' instance.
the problem is the former case works fine but later does not, the browser on viewing the source for the generated html content gives error 404(not found) when the js and css links are clicked.

What I concluded is spring mvc is having some problem with the context path , since it is the difference in mapping which let the dispatcher looking at two different location for the same mapped resource.

here is dispatcher-servlet.xml


web.xml is as


AppController as


here is the snippet of the home.jsp



Can anyone help and tell is there a way we can map and get our static content used without have to worry about context path every time we put a new mapping heirarchy(since the mapping is logical and helps to make a logical hierarchy for a portal or any web service ).

Thanks a lot sparing your time for this.
5 years ago
Hi , there. I recently started using Spring Framework , and found myself stuck at the XML configurations specially the xmlns, xsd and schemaLocation.
I am using Eclipse-JUNO as IDE, Here is the attached image of what i got stuck in.

Can someone explain how to resolve such issues.



you can use a simple javascript code on any event you like to have(e.g click focus or blur etc) , the logic may vary as per your need. i would not prefer to do it with a java code in jsp since on browser i need a dynamic response without playing with request and response.

for information regarding javascript refer javascript examples
What i am doing is "Capturing audio using java applet and sending it to a server what server has to do is to recieve the audio and write it to the disk with a name specified to the server" since every time a new audio is sent to server , i want server to save it with a new name which is sent by the client applet. I guess its clear to you Paul,
Since i can not store the entire captured data to some temporary buffer(if so please tell how) on client machine, cannot sent the whole data to server at once getting it blended with some object(in form of attribute along with name and other netadata), i streamed it to server , the server is recieving it.

The concern is fixing metadata with any bufferedStream/OutputStream and receiving it at server side,

The server will see that you are finished because it will come to the end of its SocketInputStream, so it can then deal with the whole of your captured audio clip.



please tell me how can server extract the name of audioinputstream( my context of metadata is what is generic i.e format,framesize,length and also the explicitly attached metadata i.e name, id etc).
the generic metadata can be extracted from the data stored in buffer since its JVM's personal matter but when it comes to extra information , i have not found any way yet to bind it to stream and extract it at server .

@Paul
Thanks a lot for the concern.
I am working with an application in which the client captures audio in java and send it to server(which waits for the connection and recieve the inputStream) , when it comes to sending metadata with AudioInputStream it creates a problem. i.e since AudioInputStream cannot be serialized with other attributes attached to make a serialized object, I am not able to send the name of audio file which is to be recieved at Server,

Is there any way to send name with the AudioStream, I tried signal based approach where first server waits for byte stream to get a name and then acknowledge client to send the AudioInputStream but tht doesnt work

and got the error message "Software caused connection abort" may be because second time when the client send the AudioStream the connection is closed by .... (is it JVM?)
how i solved it:
a) the InputStream cannot be typecasted to AudioInoutStream hence have to first store the data chunks in BufferedInputStream
b) then using a AudioInputStream constructor AudioInputStream (InputStream in, AudioFormat format, long length), where the bufferedInputStream in passed in the argument as inputStream and the format is obtained by using getAudioFormat() method and similarily the method getFrameLength gives out the length thus passing all arguments in the constructor gives the correct audioInputStream .

The problem i found is i was trying to use the constructor of AudioInputStream without knowing the metadata of the recieved datachunks so first the metadata must be known and then only the constructor is used.

and this is done using BufferedInputStream storage which first store data chunks in buffer then gives out the metadata and this metadata is used to create the object stream.
5 years ago
thanks a lot everyone for your concern, I have solved this problem.
5 years ago
@ Maneesh sir, its not a file upload problem as it can also be done using api like cos.jar and making a servlet to handle the file that is posted from a form by POST method, I am capturing a audio using applet and transmitting the captured audio to the server (in the code mentioned), the server is recieving the data and writing it to the disk but the on playing the audio file the sound is not what was sent.

here is the code i am using to write the AudioInputStream to the socket


5 years ago
I want know the process of data transmission over the net in java. as in my prevoius post i mentioned problem with getting audiostream , If i have an audioinputstream to write to a socket then whether i have to first convert it to bytestream or anyother way to get it at server side which is customised to recieve from client and reversing the transformation.
i.e serialization and deserialization in java.Please help
5 years ago
I am working with a audio-streaming web-app and i want my applet to transmit data to the server where i can grab the data and save it at server site.
a) Can Weblogic be configured to recieve data from the applet? if so how can it be done?
b) Is there any open source media server like Adobe media server (which is for flash a/v data) which can be used with the applet(as client). ?
c) I coded a server to recieve the AudioInputStream as:...




I get a file recorded as hello.au but the problem is : on playing the file using any player like VLC the sound is not what was sent from client instead its something not understandable.. beeps and blurred sound.

THANKS ALOT FOR READING THIS AND YOUR REPLIES .
5 years ago