Help coderanch get a
new server
by contributing to the fundraiser

velgapudi suresh

Ranch Hand
+ Follow
since Aug 11, 2006
Merit badge: grant badges
For More
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 velgapudi suresh

Hi Moores,

Thank you for the reply.

I tried below code


String imgLen = "D://sahi.JPG";

String filename = "image005.jpg";

int len = imgLen.length();
byte [] rb = new byte[len];
InputStream readImg = new BufferedInputStream(
new FileInputStream(imgLen));
int index=readImg.read(rb, 0, len);
//st1.close();
response.reset();
response.setContentType("image/JPG");
response.setHeader("Content-disposition","attachment; filename=" +filename);
response.getOutputStream().write(rb,0,len);
response.getOutputStream().flush();


this was done in my jsp scrip-let code. When i run the page i am able to get save window with the filename. But the content not able to read .

Where i was done mistake and where i can change my code.

please help out me.



Suresh.V
12 years ago
JSP
Hi Every one,

In my application image download functionality is there. One beside of image we have a button to download the image using url functionality.


How we can do it, i tried it but image storing it 0 size.

anyone help out in this problem.



Regards,
Suresh.V

12 years ago
JSP
Dear All,


I am using DisplayTag in my JSP , calling struts action and displaying data. At this point everything is working fine. Now i need a total on my purchase amount.

How we can use total as a footer.

anybody can helpout me in this point.


Regards,
Suresh.V
Dear All,


I am using DisplayTag in my JSP , calling struts action and displaying data. At this point everything is working fine. Now i need a total on my purchase amount.

How we can use total as a footer.

anybody can helpout me in this point.


Regards,
Suresh.V
Hi,

Its MDB.

And i configured my jboss.xml like this

<message-driven>
<ejb-name>STBLogProcessor</ejb-name>
<destination-jndi-name>queue/STBLogProcessor</destination-jndi-name>

</message-driven>

and in ejb.xml i am added

<message-driven >
<description><![CDATA[Description for STBLogProcessor]]></description>
<display-name>Name for STBLogProcessor</display-name>

<ejb-name>STBLogProcessor</ejb-name>

<ejb-class>com.mb.logapp.processor.STBLogProcessor</ejb-class>

<transaction-type>Container</transaction-type>
<acknowledge-mode>Auto-acknowledge</acknowledge-mode>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>

</message-driven>

but when change another jboss 6.1.0 ip then unable to send the message.

regards,
SureshV
12 years ago
Hi Guru,

Sorry for late response.

As per your suggestion modified to ConnectionFactory, now i am able to send the JMS.

Now, from my servlet calling remote server JMS queue. My message is going to the jnp url but unable to receive in server side.

Is any configuration i need to change.

My servlet communicate to ear.

Regards,
Suresh
12 years ago
Dear All,

I am using Jfreechart to draw a barChart. I am able to get the chart.
Now in my bar i have show the values in multiple colors.


JFreeChart chartope = ChartFactory

.createBarChart("Budget/Actual $(In 1000's)", "",
" ", datasetope,
PlotOrientation.VERTICAL, true, false, false);
CategoryPlot plotrev1 = (CategoryPlot) chartope.getPlot();
BarRenderer rendererope = (BarRenderer) plotrev1.getRenderer();

rendererope.setItemLabelPaint(new Color(0,0,255));

this should change each bar wise

how we can do this one.

Regards,
Suresh.V

Hi Guru,

Now i removed my ear and started server . I am able to see the jms name in my jmx-console.

When i run my servlet getting below error.

Could not create JNDI API context: javax.naming.NameNotFoundException: QueueConnectionFactory not bound
12 years ago
Dear All,

Anyone help out JMS configuration in Jboss 6.1.0 using horentq .
12 years ago
Dear All,

In my ear using JMS queues, i am unable to configure the JMS . I include queue name in hornetq-jms.xml as



and in my servlet calling like this




and my method will be




is any file i have to change for running the my queue.

Regards,
Suresh.V
12 years ago
Dear All,

Anyone helpout above problem i am facing in sturts-layout.tlds.

Regards,
Suresh.V
12 years ago
Dear Kiran,

Thanks for the reply, but in my Jboss 4.2.3 i'm able to run the page , when i migrate to Jboss 6.1.0 i am unable to view the page.

If i remove the layout element which will display.

I am using below code to generate the tree.

12 years ago
Dear All,

I am using struts-layout.tld version 1.0. In my jsp layout menu item.
<tag>
<name>menuItem</name>
<tagclass>fr.improve.struts.taglib.layout.MenuItemTag2</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>action</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>key</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>link</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>onClick</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>reqCode</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>open</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>page</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>forward</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>target</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>name</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>image</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>separator</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>style</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>styleClass</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>tooltip</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>genericPolicy</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>


In my jsp

<div style="overflow:auto; width: 240px; height: 422px; "> <layout:grid > <layout:panel styleClass="FORM" > <layout:treeview name="rooms" expandedLevelsAtFirst="1" closeOther="1"/> </layout:panel> </layout:grid> </div>


but when i run jsp getting the error

12 years ago
Dear All,

I am using Jboss 6.1.0 Neo final and in my jsp using struts layout tld. Getting the below error.

HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: org.apache.jasper.JasperException: Unable to compile class for JSP
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)


root cause

org.apache.jasper.JasperException: Unable to compile class for JSP
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:619)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:312)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
org.apache.struts.chain.commands.servlet.PerformForward.handleAsForward(PerformForward.java:113)
org.apache.struts.chain.commands.servlet.PerformForward.perform(PerformForward.java:96)
org.apache.struts.chain.commands.AbstractPerformForward.execute(AbstractPerformForward.java:54)
org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)


root cause

java.lang.NumberFormatException: multiple points
sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
java.lang.Double.parseDouble(Unknown Source)
org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1068)
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:859)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1530)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2377)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2427)
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:878)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1530)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2377)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2427)
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:878)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1530)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2377)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2427)
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:878)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1530)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2377)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2427)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2433)
org.apache.jasper.compiler.Node$Root.accept(Node.java:495)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2377)
org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1776)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:211)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:360)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:607)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:312)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
org.apache.struts.chain.commands.servlet.PerformForward.handleAsForward(PerformForward.java:113)
org.apache.struts.chain.commands.servlet.PerformForward.perform(PerformForward.java:96)
org.apache.struts.chain.commands.AbstractPerformForward.execute(AbstractPerformForward.java:54)
org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)



In my jsp using like this

<div style="overflow:auto; width: 240px; height: 422px; "> <layout:grid > <layout:panel styleClass="FORM" > <layout:treeview name="rooms" expandedLevelsAtFirst="1" closeOther="1"/> </layout:panel> </layout:grid> </div>

This is my layout.tld file tag
<tag>
<name>panel</name>
<tagclass>fr.improve.struts.taglib.layout.PanelTag</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>key</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>model</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>name</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>open</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>property</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>bundle</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>styleClass</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>styleId</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>style</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>arg0Name</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>arg0Property</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>arg0</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>arg1</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>arg2</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>arg3</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>arg4</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>width</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>height</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>align</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>genericPolicy</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>

I am unable to move from this page.


Regards,
Suresh.V
12 years ago
Hi JaiKrian,

Thanks for your reply, i will download AS 6.1.0 . My main concern is my webpage doesn't have HTML:select component then there is no problem. And also if i have
html:hidden then we need to change the format of value instead of "" to '' then page will be compile and run.

Like the above cases i hope in AS 6.1.0 will not occur.


thanks
Suresh.V>
12 years ago