How to send value in HTML without screen transition

It is a memo of how to send the value by GET without screen transition.

GET value sent in HTML

a href = "URL? Attribute name =" value "

<body>
<a href="TestServlet?action=sample"></a>
</body>

Receive value in Java

request.getParameter ("attribute name") s receives the string "sample".

protected void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

			String s = request.getParameter("action");

Recommended Posts

How to send value in HTML without screen transition
[Rails] How to prevent screen transition
How to pass the value to another screen
How to embed JavaScript variables in HTML with Thymeleaf
How to test file upload screen in Spring + Selenium
How to specify the resource path in HTML import
How to correctly check the local HTML file in the browser
How to transition from the [Swift5] app to the iPhone settings screen
How to pass an object to Mapper in MyBatis without arguments
How to retrieve the hash value in an array in Ruby
Mapping to a class with a value object in How to MyBatis
I want to transition to the same screen in the saved state
[Xcode] How to arrange Xcode and Simulator screens in full screen
How to control transactions in Spring Boot without using @Transactional
How to use Lombok in Spring
How to find May'n in XPath
How to hide scrollbars in WebView
How to run JUnit in Eclipse
How to iterate infinitely in Ruby
Screen transition using Intent in Kotlin
[Rails] How to write in Japanese
How to run Ant in Gradle
How to master programming in 3 months
How to learn JAVA in 7 days
How to get parameters in Spark
How to automatically operate a screen created in Java on Windows
How to output the value when there is an array in the array
How to install Bootstrap in Ruby
How to use InjectorHolder in OpenAM
[Swift] How to send a notification
How to get boolean value with jQuery in rails simple form
How to make a splash screen
How to introduce jQuery in Rails 6
How to use classes in Java?
How to name variables in Java
How to set Lombok in Eclipse
How to increment the value of Map in one line in Java
How to concatenate strings in java
How to install Swiper in Rails
How to change from HTML to Haml
[Swift] How to pass the Label value in the selected collectionViewCell to the destination TextField
[Android application development] How to display in full screen (notification bar hidden)
How to update user edits in Rails Devise without entering a password
How to get the value after "_" in Windows batch like Java -version
How to constrain the action of the transition destination when not logged in
How to get the setting value (property value) from the database in Spring Framework
How to change the value of a variable at a breakpoint in intelliJ
[Swift] How to set an image in the background without using UIImageView.
Android development, how to check null in the value of JSON object
How to create your own annotation in Java and get the value
[swift5] How to specify color in hexadecimal
How to implement search functionality in Rails
How to implement date calculation in Java
How to implement Kalman filter in Java
Multilingual Locale in Java How to use Locale
How to get date data in Ruby
How to use custom helpers in rails
How to reflect seeds.rb in production environment
How to use named volume in docker-compose.yml
How to filter JUnit Test in Gradle
How to insert a video in Rails