Gaurav Sainii

Greenhorn
+ Follow
since May 18, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Gaurav Sainii

Although it depends on the data, but if all data is of somewhat similar pattern then you can somehow break it into pieces like following:

10_1 J Martin; James L Crowley<>An Appearance-Based Approach to Gesture-Recognition <>ICIAP
1. split based on <>, you'll get 3 strings
2. second and third string are as per your requirement
3. first string can now be split based on ";", you'll get two strings.
4. second string is as per your requirement
5. first string can now further be broken into two parts based on first space coming, wherein you'll get your first author name.

Hope this solves your current string requirement and any other similar strings only.
6 years ago
If you want to pass parameter value on action submit.

EITHER use hidden/form field passing required value with <s:submit/> button

OR for passing value from URL passing parameter value try this:-

<s:url action="submitMail.action" var="actionLink">
<s:param name="user">
<s:property value="user" />
</s:param>
</s:url>
<s:a href="%{actionLink}">
<s:text name="userIDDetail" />
</s:a>
11 years ago
While using masterPage.jsp your MasterPage servlet is being executed. ??
12 years ago
You can also try jasper java reporting API.
13 years ago
Please try to include mail.jar in your server lib directory.
13 years ago
@buntha: the code you provided is working fine by passing the specified pattern.

Though you can try hardcoding the pattern and then pass the input to test the same.
The code is anyhow still correct and working fine.
14 years ago
Yes well said Grishma. I have been to Hyderabad for around 2.5 Years and I too feel the same about Hyderabad.

Great city. Language is a constraint but not a major one.
14 years ago

But is there any way to accommodate special character in database without increasing field size. I mean there should be some centralized control to change character encoding in database.



Yes there are ways to set the encoding in Oracle database but for DB/2 you need to google a little bit. Or anyone working on DB/2 could help.

14 years ago
You can specify a welcome intermediate file say index.jsp and can redirect it automatically to the customer.jsp executing the action and populating the values.

This will solve your problem.
14 years ago
Yes it may happen but not very soon.

It is really very well planned city.
14 years ago

What's the problem with my code. Why it is throwing exceptions. Can you please explain a little bit.



This kind of error that you are getting, occurs when you have a char or varchar field in your table in database of a given length,
and user tries to to put a longer string into it.
In particular, when using the UTF-8 Unicode character set, you must keep in mind that not all characters use the same number of bytes and can require up to four bytes per character.

When i convert datatype to bytes. How would i set its length. I mean let say for varchar(50) what could be equivalent for bytes.


I do not have much knowledge over DB/2 database types but possibly you can increase the size of your varchar type. For varchar(50) its equivalent in bytes could be 50x4=200. So you can declare a varchar(200) in this case.
14 years ago
Please share some more details for this problem. Such as the code snippets from the jsp, action mapping in config file, action, etc.
14 years ago
Hi,

As Charles said, please change the data type in your database to bytes and in the provided java code change the following:-



following changes are suggested:-

14 years ago
As you said the type of ID in database is as:-

ID ( number )



while you are trying to pass a string to this value from your jdbc as:-

INSERT INTO Recipes(ID,Recipe,Servings,timeToEat,howTo) VALUES ('7','Peanutbutter and banana','4','15','Insert here your recipe')



Remove quotes from ID='7' in insert statement so that your insert statement would look like this:-
INSERT INTO Recipes(ID,Recipe,Servings,timeToEat,howTo) VALUES (7,'Peanutbutter and banana','4','15','Insert here your recipe')
Chandigarh with latest IT park in Mohali - Chandigarh.

Coolest, pollution free, traffic jams free, calm and best city to work.
14 years ago