Raj Mehta

Greenhorn
+ Follow
since Apr 26, 2004
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 Raj Mehta

Hi,

In my JSP page, I want to redirect to a CGI script which is also running on the same server. The CGI expects the request to be POST and also all the request parameters received by the JSP should be passed to the CGI. Some of the request parameters are of type "file". Can somebody show me how to do this?

Thanks
13 years ago
JSP
Hi,

I am trying to use the apache fileUpload to parse multipart request. But it is ignoring all the form elements upto and including the the first file element.

This is the html code


This is the JSP code (which parses the request)


I found this code in some online tutorial. When i submit the form to the jsp it only prints out file2 & file3. If i have more form elements before file1 even they are ignored.

Has anyone encountered such a problem before ?? Btw i am running this under WSAD.

Thanks
Raj
I have a JSP page on which I want to display a String which is extracted from the request (request.getParameter())

The String has new line characters ('\n') which i want to convert to respective html values like <br/> or <p/>.

What is the best way in Java to do this??
13 years ago
JSP
I am working on DB2 database, which doesnt have support for Auto Increment prirmary keys.

Is there a standard solution to this problem when inserting a new record in the DB using CMP EJB.
If you are using EJB 2.0, you can use the "Local" interface instead of the Remote interface.
I had already taken a look at DateFormat class. And the only thing I thought would solve my problem was the Parse(String) method. But when I do this :

java.text.DateFormat df = java.text.DateFormat.getDateInstance();
df.parse("050272004");

I get the following error : Unparseable date: "06202004".

Any other suggestions ??
13 years ago
How do I convert a String of the form "05272004" (MMDDYYYY) to a more meaningful format like 27th May, 2004.
13 years ago
Actually I want to include the output of the body only if a certain condition is met. What i am stuck at right now is that I cant get whatever is between the tags to appear on the JSP.

Eg.
<abc:myTag>

</abc:myTag>

What i want is the output betwen the tags to appear on the main JSP if a certain condition is met. I am processing the content of the body inside the doAfterBody() method and setting a session variable.

Tried extending BodyTagSupport class. But cant figure out how to do this. Help appreciated.
13 years ago
JSP
I have written a custom tag handler which extends from TagSupport class.

I see that the doStartTag() method can return one of the two : SKIP_BODY or EVAL_BODY_INCLUDE. But what i want to do is to process the body but not include it in the output. If I use SKIP_BODY the content of the body wont be processed and if I use EVA_BODY_INCLUDE the content would be included in the output.

Can someone suggest how this can be done?

Thanks
13 years ago
JSP
well i am using JSP 1.2 so I cant use custom actions.

More precisely my question is should the TAG class be generating the HTML or as in my case should I just pass back two variables currentPrice, basePrice back to the parent jsp which should determine if the currentPrice is lower than the base price and handle the display accordingly??
13 years ago
JSP
Hi ,
I want to display product prices on JSPs. This is how the prices are displayed:

If the current price of the product is less then the base price then display the base price striked out and the current price in red. Otherwise display the price as normal.

This has to be done on several pages. There is approx 10 lines of code to retreive the base price and the current price of the product, given a productId.

I was thinking of using JSP tags for this but at the same time I dont have much experience with tags.
Can somebody suggest a solution to this using tags?
Should the tag directly return the html to be displayed (red price & etc..)??

Thanks
Amit
13 years ago
JSP