Solved

Passed from MultiPart Form or from Hyperlink?

Posted on 2004-08-13
1
224 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Multi-threading long-running processes can have a significant increase in overall performance and drastically decrease over time it takes for a process to complete. Unfortunately, not all applications support native multi-threading, some by design a…
Popular third-party chat platforms like Slack, Discord, and Telegram are just a few of the many new productivity applications that are being hijacked by cybercriminals to create command-and-control (C&C) communications infrastructures for their malw…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

726 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