Solved

Passed from MultiPart Form or from Hyperlink?

Posted on 2004-08-13
1
221 Views
Last Modified: 2010-04-01
I have a page that can be opened either by the submission of an "enctype=multipart/form-data" form or by the click of a hyperlink.
When I get to the page from the form, I want to use the oReilly MultipartRequest, but when I get to the page through the hyperlink, then there has been no form submission, and I need to NOT use the oReilly MultipartRequest.

So how can I know at the top of the page if I am getting there through a form submission or a hyperlink?
Is there a variable that I can read in that will tell me if there was a form submitted?

Thanks in advance,
0
Comment
Question by:mderbin
1 Comment
 
LVL 3

Accepted Solution

by:
alskdj80 earned 250 total points
ID: 11795916
you can do this by putting a hidden field in your form, eg:
...
<form name="myform" action="wherever" method="post">
<input type="hidden" value="Form" name="Form">

//other form things

<input type="Submit" value="submit" name="submit">
</form>
...


then, in your next page, you can check if there is a parameter called "Form":
...
String isForm = request.getParameter("Form");
if ( isForm.equals("") ) {
    //not a form
} else {
    //is a form
}
...

hope this helps
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to group array of objects ? 5 65
AlarmClock Challenge 35 150
countXY challenge 28 152
withoutString  challenge 40 198
This tutorial shows how to create a greeting card by combining two image layers and a text layer on a PC using a free image editing app.
Data breaches are on the rise, and companies are preparing by boosting their cybersecurity budgets. According to the Cybersecurity Market Report (http://www.cybersecurityventures.com/cybersecurity-market-report), worldwide spending on cybersecurity …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question