Wayan Suwastika

Greenhorn
+ Follow
since May 25, 2005
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 Wayan Suwastika

I try to figure out your problem. It seem the onChange event will only fired when an object is lost focus or onLostFocus or onBlur event was fired.
May be you sould change the way you move the focus with call the
onKeyUp event on your Text field object. This event will call when a keyboad key is up (release) and its mean the content was of your text field was changed.
The HTML code may look like this:


pls replace space at o n K e y U p word.

Rgds,
Wyasa
To set an object properties for common using you may pass an object reference. May be you should change the argument of your js function like this :

argObj --> the text field object ie. FirstName/LastName
objValue --> some value entered on that field

function genericValidation(argObj, objValue)
{

//set focus
argObj.focus();
return true;
}

your HTML code may look like this :

<form name="someForm">
<input type="text" name="FirstName" value="" onchange="genericValidation(document.someForm.LastName, this.value)">
<input type="text" name="LastName" value="">
</form>

Correct me if i'm wrong. thanks.

Rgds,
Wyasa
I think there is some thing miss on your form element. To get the value from the your select box may be the method of your form should looks like :

<FORM name="qMain" action="../qServlet" method="POST" style="FLOAT: left" >
<SELECT class = selectStyle name="stream_name" id="stream_name" onChange="submitfrm(this.form);" size="1">

I change the GET to POST method.
And also make sure your servlet code are correct on overriding doGet() or doPost() method. To support both type GET & POST it better you override the two method doGet() and doPost()

rgds
wyasa
18 years ago
I suggest U to read the Head First Servlets and JSP book By Bryan Basham, Kathy Sierra, Bert Bates (<a href="http://www.oreilly.com/catalog/headservletsjsp/">http://www.oreilly.com/catalog/headservletsjsp/</a> . It is a good book in other to understand clearly about servlet, jsp and servlet container.

rgds
wyasa
18 years ago
Yes, Instance variable on any Servlet class are considered to be not Thread save.

why don't you just pass that two variables through u'r method argument say :
public void dispatch (HttpServletRequest request, HttpServletResponse response, String page,String s1) throws IOException, ServletException {
//......
}

rgds
wyasa
18 years ago
U can get Tomcat from http://jakarta.apache.org/tomcat/index.html
I suggest U to use Tomcat Ver 5.x
Yes, U must use response.encodeURL() (URL re-writing) for all URL to ensure your session tracking also work well for client browser that doesn't accept cookie.

-wyasa-
It seem u try to deploy multiple webapp in the same context.
Regarding the spec I think it wouldn't work.
It'd work if u deploy it in deferent context insteads deploy it under u'r /public_html directory.

in Tomcat 5.0 there is a directory call $TOMCAT_HOME$/webapps. U can deploy your webapp under that directory and It should work well.

rgds
wyasa
Hi Sharma,

I've try u'r problem with the same setting in web.xml and it work well.
It displays errorPage.jsp configured on :
<error-page>
<error-code>404</error-code>
<location>/errorPage.jsp</location>
</error-page>

I use Tomcat 5 for testing.

rgds,
WYasa
First, I want to say Congratulation to Muthya Prashant.

SCWCD will test your understanding in Servlet, JSP, JSTL
refer to : http://www.sun.com/training/catalog/courses/CX-310-081.xml
while SCBCD on EJB tech
refer to : http://www.sun.com/training/catalog/courses/CX-310-090.xml

rgds,
WYasa
18 years ago
I think there is some thing wrong with your method signature.
in your servlet code you write

public class ShowHeadersServlet extends HttpServlet {

public void goGet(HttpServletRequest req,HttpServletResponse res)
throws ServletException, IOException {
// ..........
}

to support GET or POST method you should override at least one service method :
public void doGet(HttpServletRequest req,HttpServletResponse res)
throws ServletException, IOException {
// to handle http GET method
}
or
public void doPost(HttpServletRequest req,HttpServletResponse res)
throws ServletException, IOException {
// to handle http POST method
}

I think your method shoulbe doGet() not goGet()

regards,
WYasa