i have written a javascript code for mobile number and state validation but function is working except mobile number and state validation , where is my mistakes ?
<%@ page language="java" contentType="te xt/html; charset=ISO-8859-1"
pageEncoding="I SO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">...
User Profile
Collapse
-
rspvsanjay started a topic why javascript validation is not performed for mobile number and state in my code?in Javawhy javascript validation is not performed for mobile number and state in my code?
-
rspvsanjay started a topic why eclipse browser able to upload and read image file while out side browser not ?in Javawhy eclipse browser able to upload and read image file while out side browser not ?
I have three code file in which two are the jsp file and one servlet file created as follow :
servlet file UploadServlet.j ava
package net.codejava.se rvlet;
import java.io.File;
import java.io.IOExcep tion;
import javax.servlet.S ervletException ;
import javax.servlet.a nnotation.Multi partConfig;
import javax.servlet.a nnotation.WebSe rvlet;
import javax.servlet.h ttp.HttpServlet ;... -
ok, but i do not know how to do ?
please edit my above code and post here. -
how to print URL into jsp page while URL has hindi text ?
I want to print URL into next jsp page , even if URL has hindi text content.
index.html file :
<html>
<head>
<title>T-SUMM</title>
</head>
<body>
<form method="Post" action="./result.jsp">
<center>
Enter a URL : <input name='habits' id='t1'>
<br><br>... -
how print hindi text into web page by given servlet code
i am using one servlet file, one java file, one html file as given below:
//Extraction1.jav a //java file
...Code:import java.io.IOException; import java.net.URL; import java.util.Scanner; public class Extraction1 { public String toHtmlString(String url) throws IOException { StringBuilder sb = new StringBuilder(); for(Scanner sc = new Scanner(new URL(url).openStream());Last edited by Frinavale; Mar 2 '17, 03:02 PM. -
-
ok, thank you
how to write this code by replaceAll method:
String extractText(Str ing s) throws IOException
{
String html = fj.toHtmlString (s); //extracted html source code from wikipedia
String filtered_text=" ";
System.out.prin tln("extracted \n\n");
String []html_text = html.split("\n" );
long start = System.currentT imeMillis();...Leave a comment:
-
Why are the loops taking so much time to execute in following program
in this program, i have given wikipeadia URL for text extraction logic but after extraction of text for loops are taking to much time to execute.
the same logic too fast in python program.
how to reduces execution time ?
...Code:import java.io.IOException; import java.net.URL; import java.util.Scanner; import java.util.regex.Matcher; import java.util.regex.Pattern; public class TextExtraction1
-
rspvsanjay started a topic Failed to execute goal com.heroku.sdk:heroku-maven-plugin:1.1.3:deploy-war (default-cin JavaFailed to execute goal com.heroku.sdk:heroku-maven-plugin:1.1.3:deploy-war (default-c
when i am deploying to heroku server the following error is coming.
how , may i resolve it
[ERROR] Failed to execute goal com.heroku.sdk: heroku-maven-plugin:1.1.3:de ploy-war (default-cli) on project ProjectToDeploy : Failed to deploy application: Could not get API key! Please install the toolbelt and login with `heroku login` or set the HEROKU_API_KEY environment variable. -> [Help 1]
[ERROR]
[ERROR]... -
rspvsanjay started a topic how to deploy servlet project from github to heroku if i made from eclipse IDEin Pythonhow to deploy servlet project from github to heroku if i made from eclipse IDE
i made a servlet project from eclipse , what and where should i add extra file like pom.xml to deploy from github to heroku server ?
consider servlet java file name is ESUMTest.java where class name declared as public and html file name is index.html, here java file present in default package.
what code will be for pom.xml file with respect to above scenario and where should i put ?
what extra file is... -
run python file from java class by eclipse IDE
This program (below), I am able to run from command prompt but when i am using eclipse that is not returning any text.
May this is not running python file
java file and python file is present in bin folder when i am using command prompt
when i am using eclipse java and python both file is present in default package .
what i do to run python file from java class by eclipse IDE ?
...Code:public class
Last edited by Frinavale; Nov 18 '16, 04:10 PM. -
rspvsanjay replied to calling python from java,see logical error, why the URL string not return as resultin Java// thank sir my program is working perfectly there was logical //error of print statment not used in python program
// where do i put python file if i am using Eclipse IDE ??
import java.io.*;
class FirstClass
{
public static void main(String a[])throws Exception
{
//String prg = "import sys\ndef get_text(str):" +"\n return str"+
//"\ndef get_url_text(ur l):"+"\n...Leave a comment:
-
rspvsanjay started a topic calling python from java,see logical error, why the URL string not return as resultin Javacalling python from java,see logical error, why the URL string not return as result
import java.io.*;
class FirstClass
{
public static void main(String a[])
{
try{
String prg = "import sys\ndef main():\ndef get_text(str):" +"\n return str"+
"\ndef get_url_text(ur l):"+"\n return get_text(url)"
+"\ndef main():"+"\n get_url_text(sy s.argv[1])"+"\nif __name__ == \"__main__\" : main()";... -
//thank you sir Oralloy
//plese tell me where i have done mistake in below program
import java.io.*;
class test234
{
public static void main(String a[])
{
try{
String prg = "import sys\ndef main():\ndef get_text(str):" +"\n return str"+
"\ndef get_url_text(ur l):"+"\n return get_text(url)"
+"\ndef main():"+"\n ...Leave a comment:
-
please write above command with Runtime.getRunt ime().exec(comm and);
i want to know thar how argument can pass from java class ?Leave a comment:
-
thank you chaarmann :
above python code able to run as below from commondprompt :
C:\Python27>pyt hon
Python 2.7.12 (v2.7.12:d33e0c f91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (
Intel)] on win32
Type "help", "copyright" , "credits" or "license" for more information.
>>> import test432
>>> test432.get_url _text("http://www.tutorialspo int.com/java/")...Leave a comment:
-
how do we call python function with one argument by using first or second technique where python code will return string value to java program ?Leave a comment:
-
rspvsanjay started a topic how to remove this error : “sys-package-mgr*: can't create package cache dir”in Pythonhow to remove this error : “sys-package-mgr*: can't create package cache dir”
import org.python.core .PyObject;
import org.python.core .PyString;
import org.python.core .__builtin__;
import org.python.util .PythonInterpre ter;
public class JythonTest1 {
public static void main(String[] args) {
PythonInterpret er interpreter = new PythonInterpret er();
}}
when running that above code JVM giving error as “sys-package-mgr*: can't create...
No activity results to display
Show More
Leave a comment: