Talitha Bell

Greenhorn
+ Follow
since Oct 01, 2007
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 Talitha Bell

thanks for reply
[ December 05, 2008: Message edited by: Talitha Bell ]
15 years ago
JSP
Hi All,

I have web application ,I want to get port number and host name of the server (by java code)which run this application in my jsp.

For example :http://localhost:8080/mycontext,
here 8080 is server port and localhost is host ,




Any help would be very appreciable
.
15 years ago
JSP
Thanks Ulf Dittmer for reply..............

messages as part of the response body (or as response header, if the client supports that)



I will try to do that but Could you please explain me why it give me problem when it work with jboss not for Apache.
15 years ago

Can you tell us why you want a custom status code



My problem is same as I post the link above,we are trying to do is we send the custom response like(212 or etc rather than HTTP STATUS RESPONSE CODES),because HTTP STATUS RESPONSE CODES have some meaning(way of communication between client and server) ,so we are not want to take a chance to do with these codes (if any exception or something generate)and after getting those response which have some operations ,and also have some operation if we get predefine HTTP STATUS RESPONSE CODES web page.

But we easily find it on JBoss but not on Apache+jboss
15 years ago

There is no such code defined in the HTTP protocol



I know that I am asking you foolish question but..............

This response code only for Apache or for any other web server.Can you explain it.
15 years ago
Thanks for reply

When I set this response status in my code and run it on jboss its work fine.

Problem is that i want to set my response(like 212,....etc ) in my code for specific task by getting it .
here the link want I want to do is https://coderanch.com/t/421464/JBoss/Configure-apache-jboss-Response

Is there any solution..
15 years ago
Thanks for quick reply
but I tried to do it by setting in my code

response.setStatus(212);

it returns 500 ,but works fine when I am sending a response like 200 to 207 or 300 to 307 or 400 to 426 which are predefine status codes in Apache.
[ November 07, 2008: Message edited by: Talitha Bell ]
15 years ago
Hi All


Is it possible to set the response status code ,like 212,299,etc.............................
in Apache,

OS :windows
Platform:java


Thanks
15 years ago
Hi All

I Configure my Jboss4.0.4 with apache2.2 with the link

http://www.jboss.org/community/docs/DOC-12525;jsessionid=1569CBFB7C3096C59C977CD3F7159A32 every thing is fine.
But problem is that when I try to send the custom response (reponse.setStatus(like 804) ,if any exception in my code) ,but it send its own response ,but its work fine when merely access the jboss(without Apache).

for example

in my jsp what I do is........


List list=(List)request.getAttribute("a");
if(list==null){
response.setStatus(212);
list=new ArrayList();
}else{
....
........
........
}
}
%>

in my code I get response in .js file using Ajax

if (req.readyState == 4) {

if (req.status == 212) {
.......
....... do some thing
}
}
but it send 500 when using apache jboss both and send 212 when merely access the jboss.

I also tried to configure it by mod_proxy but same problem ,Is there any port bind by firewall
or
any other configuration required
or
any thing else ?

Any suggestion would be very helpful for me.
[ November 03, 2008: Message edited by: Talitha Bell ]
15 years ago
Hi All

I want to pass, dynamic value to the annotation........


I am using @XmlElement annotation there are two attribute in this annotation which I required ,type and name

@XmlElement(type=anyClassName.class, name = "anyValue")

Problem is this I don't know the class name because ,It comes at run time ,Is there any way to pass the information to annotation at runtime like this ,If there is any solution It would be very helpful to me.

class TheClass{

@XmlElement(type=anyClassName.class, name = "anyValue")
someMethod(){
......
}
}
[ October 18, 2008: Message edited by: Talitha ]
15 years ago
Hi ALL

I have POJO Class

Class Student{
prop1;
prop2;
.
.
.
}
I want to add its object in the list and marshal it into xml.

like....

List<Student> studentList=new ArrayList<Student>();
studentList.add(StudentObj);
and

I want marshal this studentList into xml.I have only these two classes nothing else .

[ October 08, 2008: Message edited by: john Max ]
[ October 08, 2008: Message edited by: john Max ]
Thanks Martijn for reply


This link is very much useful for configuration point of view and i think it will definitely help some one .................
I configured my application (java web application ) with jstat ,Its visual GC but problem is that I am very much new in this field[not from testing background] but some circumstance are here so i am doing this work ,and you help me most by providing me important link,here no one know about automated testing .I tried jprobe also but there are also no exact way to find the memory leak only hypothesis ,so please if you can provide me any document related to memory leak test by automated tool(related to this if any) any exact way to find it so it would be very much helpful .............
[ September 19, 2008: Message edited by: john Max ]
15 years ago
Thanks Martijn for reply

I have some other helpful document that demonstrate how JVMSTAT works like,

http://www.alessandroribeiro.com/?q=en/node/39

http://prefetch.net/blog/index.php/2008/01/16/monitoring-garbage-collection-with-jstat/#comment-612078

http://www.herongyang.com/Java-Tools/jstat-jps-List-Local-JVM-Processes.html

and yes java ranch ha ha ha...................................

but problem it that I want to find the memory leak in our application with the help of this tool ,any help would be great helpful for me.I provided the all configuration above, about version ,platform etc
[ September 19, 2008: Message edited by: john Max ]
15 years ago
Hi ALL


Any one know about JVMSTAT[JSTAT].How I configure jstat for web application any good document for it .

I am using
OS:Windows
JDK:1.5
JSTAT:3.0
Plateform:java
server:jboss



[ September 19, 2008: Message edited by: john Max ]
15 years ago
Thanks
Joe Ess and Rob Prime for reply

Rob formula works fine.
15 years ago