Solved

Passed from MultiPart Form or from Hyperlink?

Posted on 2004-08-13
1
223 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
reflections, dynamic class loading 3 79
String format issue 13 93
love6 challenge java 31 133
mysql jsp example issue 32 72
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Read our guide on how to survive being on-call.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

749 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