J Lalit

Greenhorn
+ Follow
since May 19, 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 J Lalit

Hi,

I want to know how & where jvm gives memory allocation to an arraylist or vector when it is expanded automatically or lets say if arraylist is having default size 16 & say after 12 it will get another 16 blocks then from where & how jvm does this?
12 years ago
I may try this : create excel sheet using jxl apis & place it at a temporary location on server & then invoke a servlet which will dump the sheet from that temp location to user specified location using file store pop up which prompts user for location to store file say “My Documents” & then delete the sheet.
Hi,

I am using alfresco 3.1.1 over jboss 4.3.2 ga.Here i have a requirement that user should see a link to export content which is there in content repository & which he should see in a tabular form to be exported to an excel sheet.For this i am using JXL apis.Its working in windows as i am putting some location under c:\ drive as location for the sheet.But our production environment is Linux & this logic is not working there.So i want that when user clicks on export link he should either see a file pop up which asks him to put a location for the sheet which he can browse like my documents or my computer , name the sheet & click on save , it should save the sheet at that particular location or he should see a download pop up with some predefined excel sheet name & prompts user to either open or save it as usually happens while we download some item from internet.
I am googling for it but not got any help till now.Can anybody help me out for this?
Hi Again,

So sorry for that stupid mistake.I will try once more.
13 years ago
Hi,

Thanks for reply.It may be the case that i need to create the file with the same name at the given location prior to saving the file??If so,can you please tell me how to achieve that.Or should i follow some other approach??
13 years ago
Hi,

I havce craeted a servlet to download a file from web & store it locally.Here is my code




But when i am running this program,it is opening pop up & asking either to open the file or save it.On any of the option,i am getting this error at my server console


Aug 19, 2009 8:00:48 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet TestAction threw exception
java.io.FileNotFoundException: C:\Documents and Settings\Jangral\My Documents\ContentAdding_PDF_Attachment.pdf (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at TestAction.processRequest(TestAction.java:61)
at TestAction.doPost(TestAction.java:115)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)





Can anyone tell mne what more i need to do as i want to save this file with the same name locally on my machine.

Thanks & Regards,
lalit
13 years ago
Hi,

Thanks for reply.How can i differentiate that a particular link is a normal HTTP link or an attachment.Does this work:

For normal Link will return "text/html".
For an attachment will return application/type where type can be MSWORD,PDF etc.

Does this formula hold true always?

13 years ago
Hi,

I have a requirement that states extraction of links in body of some content.I have achieved it but stuck up in verifying whether a given HTTP link in content is a simple link to a page/site or it is an attachment?

I did enough googling but no success!!!

Any idea or link or piece of code?

Thanks & Regards,
Lalit
13 years ago
Hi,

Can you please tell me how to use jboss cache?I am using jboss as 4.2.3?
13 years ago
Hi,

I am working on JBoss Portal customization & need to set some user preferences in JBoss Portal like for AddressBook portlet ,the number of contacts user can see in a page or language preferences set by user.But have not got anything fruitful.I have somewhere saw it is related to CMS but no further clues.
Can anyone help me out how to store user preferences in Portal so that it is set per user per portlet.

Thanks you
Regards
j lalit
13 years ago
Hi,

i am a bit confused as what to use : NetBeans or Eclise for java development particularly Web Development.i think most people prefer Eclipse but it has less support than NetBeans ???

Can anyone help?

TIA
Hi,

i am developing portlets on JBoss Portal & thinking of using Struts framework for the same.Can anybody tell me how to proceed with that??How to integrate the two things?Any help or online resource??

TIA
13 years ago
Hi,

i have two jsp,first is the one from where i am submitting data & second where i am showing data using <jsp:useBean> tag but getting null on second jsp.My jsps are as below.

----------index.jsp-----------

<body>
<form name="myForm" method="post" action="showData.jsp">
<jsp:useBean id="show" class="com.test.ShowBean" scope="session"/>
<jsp:setProperty name="show" property="*"/>
<table>
<tr>
<td>
Enter Your Name :
<input type="text" name="name"/>
</td>
</tr>
<tr>
<td>
Enter Your Mobile :
<input type="text" name="mobile"/>
</td>
</tr>
<tr>
<td>
<input type="submit" value="Submit"/>
</td>
</tr>
</table>
</form>
</body>

From here i am submitting request to showData.jsp which is as

-----------showData.jsp-----------

<body>
<jsp:useBean id="show" class="com.test.ShowBean" scope="session"/>
Name is : <jsp:getProperty name="show" property="name"/><br>
Mobile is : <jsp:getProperty name="show" property="mobile"/><br>
</body>

But i am getting values of name & mobile as null.

Can anyone tell me where it is going wrong.

Also can i use <jsp:useBean> to submit data to a servlet & show data there as also in that case i am getting null values.

Thanks in Advance.
13 years ago
JSP
Hi,

I want to generate a pop up from a JSR 168 portlet deployed in JBoss Portal.I tried it using
1 pen("<portlet:renderURL><portlet aram name="jspp" value="AddContact.jsp"></portlet aram></portlet:renderURL>","addContactWindow","status=no,toolbar=no,menubar=no,scrollbars=yes,height=300,width=300");

2.open("http://localhost:8080/portal jsp/AddContact.jsp","addContactWindow","status=no,toolbar=no,menubar=no,height=300,width=300");

But none is working.First one is showing entire POrtal in Popup & if i put whole path thenit is also showing Entire POrtal.

Its very urgent,any help will be highly appriciated.

TIA
14 years ago
Hi

i want to know,how we can calculate size of any arbitrary java object- may be programatically or any other way??


Thanks
[ July 22, 2008: Message edited by: lalit jangra ]
14 years ago