Results 1 to 3 of 3

Thread: How to prevent Error 500: javax.servlet.ServletException: Servlet initialization has

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2021
    Posts
    174

    How to prevent Error 500: javax.servlet.ServletException: Servlet initialization has

    Hello

    This is the First Time i got following error when logging and operating the website
    "Error 500: javax.servlet.ServletException: Servlet initialization has failed"

    Although my form has webview2 object and very often i operate the exe file with webview2.

    As the Error poped up then i thought of operating the same by google Chrome and From MS -Edge the website, everything went smooth and normal with login and password.

    My doubt why not similar type of above error is seen when operating a website thru search engines like MS-Edge and Google Chrome.

    How can i prevent the error ?

    Secondly My MS-Edge does not closes down properly when Clicking on X.
    I tried nearly all the solutions available on net but still not able to close MS Edge.

    Your help will be appreciated ?

    SamD
    91

  2. #2
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,737

    Re: How to prevent Error 500: javax.servlet.ServletException: Servlet initialization

    You have not provided us with any relevant code, let alone what language or version you are using.

    I would encourage you to visit this important thread to better help you help us help you.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    May 2021
    Posts
    174

    Re: How to prevent Error 500: javax.servlet.ServletException: Servlet initialization

    Thank you dday9 for your response.

    You have not provided us with any relevant code, let alone what language or version you are using.
    I've Coded in Below
    Windows 10 ver 22H2 (OS Build 19045-2486)
    MS-Vis-Studio 2019 Ver 16.10.0
    Vb.net with Windows Form App(.Net FrameWork)

    And Operating the Application or running the .EXE on
    Windows 11 Ver 21H2(OS Build 22000.1455) for my routine work. Basically it is simple application i thought to develop to fasten my proccess in my routine work.

    Kindly Note all the URL references are of Banks for that reason will not be sharing the URL names of banks.

    Code:
    Option Strict On
    
    Imports Microsoft.Office.Interop
    Imports Microsoft.Office.Interop.Excel
    Imports Microsoft.Web.WebView2.Core
    Imports System.Data.OleDb
    Imports System.IO
    
    Public Class WebViewFrm
    
        Public Ensure As Boolean = False
    
        Public URLCaptionNames(0 To 2) As String
        Public URLbankAddress(0 To 2) As String
        Public WorkbookNames(0 To 3) As String
        
        Public httpsString As String = "https://"
        
        Public bank1URL As String = ""
        Public bank2URL As String = ""
        Public bank3URL As String = ""
    
    Private Sub WebViewFrm_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    
            Me.Location = New System.Drawing.Point(-10, 0)
    
            Me.ClientSize = New Size(1500, 712)
    
    
            txtbx3.Width = 1200 
            txtBx4.Width = 1200 
    
            txtProcessIndication.Location = New System.Drawing.Point(1375, 74)
            txtProcessIndication.Width = 962
    
            URLCaptionNames(0) = "Bank 1"
            URLCaptionNames(1) = "Bank 2"
            URLCaptionNames(2) = "Bank 3"
    
            
            URLbankAddress(0) = httpsString & bank1URL
            URLbankAddress(1) = httpsString & bank2URL
            URLbankAddress(2) = httpsString & bank3URL
    
    
            ToolStripStatusLabel1.Text = ""
            txtProcessIndication.Text = ToolStripStatusLabel1.Text
    
            With cmbURLName
                .DropDownStyle = ComboBoxStyle.DropDown
                .AutoCompleteMode = AutoCompleteMode.Suggest
                .AutoCompleteSource = AutoCompleteSource.ListItems
    
                .Text = URLCaptionNames(0)
                txtBxBankURLName.Text = URLbankAddress(0)
    
                For i As Integer = 0 To UBound(URLCaptionNames)
                    .Items.Add(URLCaptionNames(i))
                Next i
    
    
                If cmbURLName.Text.Contains("Bank 1") Then
                    Call Bank1_FormEffect()
                    cmbURLName.Text = URLCaptionNames(0)
                    txtBxBankURLName.Text = URLbankAddress(0)
                End If
    
                If cmbURLName.Text.Contains("Bank 2") Then
                    Call Bank2_FormEffect()
                    cmbURLName.Text = URLCaptionNames(1)
                    txtBxBankURLName.Text = URLbankAddress(1)
                End If
    
                If cmbURLName.Text.Contains("Bank 3") Then
                    Call Bank2_FormEffect()
                    cmbURLName.Text = URLCaptionNames(2)
                    txtBxBankURLName.Text = URLbankAddress(2)
                End If
    
    
                With WebView21
                    .Source = New Uri(txtBxBankURLName.Text)
                    ToolStripStatusLabel1.Text = "[Opening URL] " & txtBxBankURLName.Text
                    txtProcessIndication.Text = ToolStripStatusLabel1.Text
                End With
            End With
    
            With txtbx3
                .ScrollBars = System.Windows.Forms.ScrollBars.Horizontal
            End With
    
            With txtBx4
                .ScrollBars = System.Windows.Forms.ScrollBars.Horizontal
            End With
    
     End Sub
    
    Private Sub WebView21_CoreWebView2InitializationCompleted(sender As Object, e As CoreWebView2InitializationCompletedEventArgs) Handles WebView21.CoreWebView2InitializationCompleted
    
            Ensure = True
            ToolStripStatusLabel1.Text = "[URL Opened and Page is Loaded of ] " & txtBxBankURLName.Text
            txtProcessIndication.Text = ToolStripStatusLabel1.Text
    
        End Sub
    
    End Class
    I would encourage you to visit this important thread to better help you help us help you
    Thanks for the reference on the basic etiquettes to post a thread into this forum. unfortunately i missed on that.

    SamD
    92

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width